/*
Theme Name: Kamp Prikolki
Description: Лесна, брза тема за kamp-prikolki.mk – WooCommerce, вграден SEO, без page builder.
Version: 1.0.0
Author: Toni
Requires PHP: 7.4
Text Domain: kamp-prikolki
*/

:root {
	--bg: #141414;
	--bg2: #1d1d1d;
	--bg3: #262626;
	--line: #333;
	--text: #f2f2f2;
	--muted: #a9a9a9;
	--accent: #f7be68;
	--accent-d: #e9a646;
	--radius: 10px;
	--wrap: 1200px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; font-weight: 800; letter-spacing: .01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3, h4 { font-size: 1.2rem; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.kp-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.kp-muted { color: var(--muted); }
.kp-skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #000; padding: 8px 14px; z-index: 1000; }
.kp-skip:focus { left: 10px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Header ---------- */
.kp-header { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, .92); backdrop-filter: blur(8px); border-bottom: 1px solid #222; }
.kp-header-in { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.kp-logo img { height: 56px; width: auto; }
.kp-logo-text { font-weight: 800; color: #fff; font-size: 1.2rem; }
.kp-nav { margin-left: auto; }
.kp-menu { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.kp-menu a { display: block; padding: 10px 12px; color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-radius: 6px; }
.kp-menu a:hover, .kp-menu .current-menu-item > a, .kp-menu .current_page_item > a { color: var(--accent); }
.kp-menu .sub-menu { display: none; }
.kp-tools { display: flex; align-items: center; gap: 6px; }
.kp-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 8px; background: transparent; color: #fff; cursor: pointer; }
.kp-icon:hover { background: #1f1f1f; color: var(--accent); }
.kp-cart-count { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #000; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; }
.kp-menu-toggle { display: none; flex-direction: column; gap: 5px; }
.kp-menu-toggle span { display: block; width: 22px; height: 2px; background: currentColor; transition: .2s; }
.kp-search { border-top: 1px solid #222; padding: 14px 0; }
.kp-search form { display: flex; gap: 8px; }
.kp-search input[type="search"] { flex: 1; }

@media (max-width: 960px) {
	.kp-menu-toggle { display: inline-flex; }
	.kp-tools { margin-left: auto; }
	.kp-nav { position: fixed; inset: 76px 0 auto 0; background: #000; border-bottom: 1px solid #222; max-height: calc(100vh - 76px); overflow: auto; display: none; }
	.kp-nav.is-open { display: block; }
	.kp-menu { flex-direction: column; padding: 10px 20px 20px; }
	.kp-menu a { padding: 14px 6px; font-size: 15px; border-bottom: 1px solid #1c1c1c; border-radius: 0; }
	.kp-logo img { height: 46px; }
	.kp-header-in { min-height: 66px; }
	.kp-nav { inset: 66px 0 auto 0; }
}

/* ---------- Forms & buttons ---------- */
input, select, textarea { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
.kp-btn, button.button, a.button, .button, input[type="submit"], .wp-element-button, .woocommerce #respond input#submit {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border: 2px solid var(--accent); border-radius: 8px;
	background: var(--accent); color: #111 !important; font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: .15s; line-height: 1.2;
}
.kp-btn:hover, .button:hover, input[type="submit"]:hover { background: var(--accent-d); border-color: var(--accent-d); color: #000 !important; }
.kp-btn-ghost { background: transparent; color: #fff !important; border-color: #fff; }
.kp-btn-ghost:hover { background: #fff; border-color: #fff; color: #000 !important; }
.kp-price-badge { display: inline-block; padding: 12px 22px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--line); font-weight: 800; color: #fff; }
.kp-btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5rem 0; }

/* ---------- Hero slider ---------- */
.kp-hero { position: relative; height: min(78vh, 720px); min-height: 420px; overflow: hidden; background: #000; }
.kp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.kp-slide.is-active { opacity: 1; }
.kp-slide img { width: 100%; height: 100%; object-fit: cover; }
.kp-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.8) 100%); pointer-events: none; }
.kp-hero-text { position: absolute; left: 0; right: 0; bottom: 70px; z-index: 2; }
.kp-hero-text h1 { margin-bottom: .3em; text-shadow: 0 2px 12px rgba(0,0,0,.5); }
.kp-hero-text p { max-width: 640px; font-size: 1.1rem; color: #eee; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.kp-hero-btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2rem; }
.kp-dots { position: absolute; z-index: 3; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.kp-dots button { width: 34px; height: 4px; border: 0; border-radius: 2px; background: rgba(255,255,255,.4); cursor: pointer; padding: 0; }
.kp-dots button.is-active { background: var(--accent); }

/* ---------- Content ---------- */
.kp-main { min-height: 50vh; }
.kp-page-head { background: linear-gradient(180deg, #000, var(--bg)); padding: 56px 0 28px; border-bottom: 1px solid #1f1f1f; }
.kp-page-head h1 { margin: 0; text-transform: uppercase; letter-spacing: .03em; }
.kp-content { padding-top: 40px; padding-bottom: 70px; }
.kp-content > *:first-child { margin-top: 0; }
.kp-section { margin: 0 0 56px; }
.kp-section-title { text-align: center; margin-bottom: 1.4rem; }
.kp-cols { display: grid; gap: 40px; align-items: start; }
.kp-cols-2 { grid-template-columns: 1fr 1fr; }
.kp-cols-3 { grid-template-columns: repeat(3, 1fr); }
.kp-cols-4 { grid-template-columns: repeat(4, 1fr); }
.kp-cols-2-1 { grid-template-columns: 2fr 1fr; }
.kp-cols-1-2 { grid-template-columns: 1fr 2fr; }
.kp-col > *:last-child { margin-bottom: 0; }
.kp-img img { border-radius: var(--radius); width: 100%; }
.kp-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kp-imgs .kp-img:first-child { grid-column: 1 / -1; }
.kp-imgs img { aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.kp-col ul { padding-left: 1.2em; }
.kp-col li { margin: .25em 0; }
.kp-content table { width: 100%; border-collapse: collapse; }
.kp-content td, .kp-content th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.kp-map iframe { width: 100%; height: 420px; border: 0; border-radius: var(--radius); filter: grayscale(.2) contrast(1.05); }

/* Почетна: блокови за моделите */
.kp-front .kp-section { background: var(--bg2); border: 1px solid #242424; border-radius: 16px; padding: 28px; }
.kp-front .kp-cols-2 { align-items: center; }
.kp-front .kp-section:nth-of-type(even) .kp-cols-2 > .kp-col:first-child { order: 2; }

/* Галерија (WordPress gallery) */
/* Мозаик со мешани големини: голема 2×2, висока, широка, мали — без празнини (dense) */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense; gap: 10px; margin: 0; }
.gallery > br { display: none; }
.gallery-item { margin: 0; overflow: hidden; border-radius: 10px; background: #1e1e1e; }
.gallery-item .gallery-icon, .gallery-item a { display: block; width: 100%; height: 100%; }
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; transition: transform .35s ease, filter .35s ease; }
.gallery-item:hover img { transform: scale(1.05); filter: brightness(1.08); }
.gallery-item:nth-child(10n+1) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(10n+4) { grid-row: span 2; }
.gallery-item:nth-child(10n+6) { grid-column: span 2; }
.gallery-item:nth-child(10n+8) { grid-column: span 2; grid-row: span 2; }
.gallery-item:nth-child(10n+10) { grid-row: span 2; }
.gallery-caption { display: none; }

/* Lightbox */
.kp-lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.94); display: flex; align-items: center; justify-content: center; }
.kp-lightbox[hidden] { display: none; }
.kp-lightbox img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 6px; }
.kp-lightbox button { position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 30px; line-height: 1; cursor: pointer; }
.kp-lightbox button:hover { background: var(--accent); color: #000; }
.kp-lb-close { top: 16px; right: 16px; }
.kp-lb-prev { left: 16px; }
.kp-lb-next { right: 16px; }

/* Instagram */
.kp-insta { padding: 20px 0 70px; }

/* Листа */
.kp-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.kp-card { background: var(--bg2); border-radius: var(--radius); overflow: hidden; color: #fff; }
.kp-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.kp-card-title { display: block; padding: 14px 16px; font-weight: 700; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0 0 2rem !important; padding: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--bg2); border: 1px solid #262626; border-radius: 14px; padding: 14px 14px 18px; text-align: left; display: flex; flex-direction: column; }
.woocommerce ul.products li.product a img { border-radius: 10px; margin-bottom: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { color: #fff; font-size: 1.05rem; padding: 0; text-transform: uppercase; letter-spacing: .02em; }
.woocommerce ul.products li.product .price { color: var(--accent) !important; font-size: 1.15rem; font-weight: 800; margin: 4px 0 14px; }
.woocommerce ul.products li.product .button { margin-top: auto; width: 100%; }
.kp-ask-price { color: var(--accent); font-weight: 800; }
.woocommerce .woocommerce-result-count, .woocommerce .woocommerce-ordering { color: var(--muted); margin-bottom: 20px; }
.woocommerce span.onsale { background: var(--accent); color: #000; }
.kp-single div.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; }
.kp-single div.product .woocommerce-product-gallery, .kp-single div.product .summary { width: auto !important; float: none !important; margin: 0 !important; }
.kp-single div.product .woocommerce-tabs, .kp-single div.product .related, .kp-single div.product .upsells { grid-column: 1 / -1; }
.kp-single .product_title { text-transform: uppercase; }
.kp-single div.product p.price, .kp-single div.product span.price { color: var(--accent); font-size: 1.6rem; font-weight: 800; }
.kp-single .woocommerce-product-gallery img { border-radius: 12px; }
.kp-single .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px !important; }
.kp-single .flex-control-thumbs li { width: auto !important; }
.kp-single .flex-control-thumbs img { border-radius: 6px; opacity: .6; }
.kp-single .flex-control-thumbs img.flex-active, .kp-single .flex-control-thumbs img:hover { opacity: 1; }
.kp-ask-box { background: var(--bg2); border: 1px solid #2a2a2a; border-radius: 12px; padding: 18px; margin: 1rem 0; }
.kp-ask-box p { margin: .8rem 0 0; color: var(--muted); }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 1rem; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: var(--bg2) !important; border-color: var(--line) !important; border-radius: 8px 8px 0 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: #fff !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--bg3) !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce .quantity .qty { width: 70px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { background: var(--bg2) !important; color: var(--text) !important; border-top-color: var(--accent) !important; }
.woocommerce table.shop_table { border-color: var(--line); background: var(--bg2); border-radius: 10px; }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--line) !important; }
.woocommerce-cart .cart-collaterals .cart_totals, .woocommerce-checkout #order_review { background: var(--bg2); padding: 20px; border-radius: 12px; }
.woocommerce form .form-row .input-text, .woocommerce form .form-row select { background: var(--bg2); color: var(--text); }
.select2-container--default .select2-selection--single { background: var(--bg2); border-color: var(--line); }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text); }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { color: #fff; }

/* ---------- Footer ---------- */
.kp-footer { background: #000; border-top: 1px solid #1f1f1f; margin-top: 40px; }
.kp-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 40px; padding-top: 50px; padding-bottom: 40px; }
.kp-footer h3 { font-size: .95rem; }
.kp-footer a { color: #ddd; }
.kp-footer a:hover { color: var(--accent); }
.kp-footer .kp-logo img { height: 64px; margin-bottom: 14px; }
.kp-copy { border-top: 1px solid #1a1a1a; padding: 16px 0; color: var(--muted); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.kp-cols-2, .kp-cols-3, .kp-cols-4, .kp-cols-2-1, .kp-cols-1-2 { grid-template-columns: 1fr; gap: 24px; }
	.kp-front .kp-section:nth-of-type(even) .kp-cols-2 > .kp-col:first-child { order: 0; }
	.woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
	.kp-single div.product { grid-template-columns: 1fr; }
	.kp-footer-grid { grid-template-columns: 1fr; gap: 24px; }
	.gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
}
@media (max-width: 600px) {
	.woocommerce ul.products { grid-template-columns: 1fr; }
	.gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: 8px; }
	.gallery-item:nth-child(10n+4), .gallery-item:nth-child(10n+10) { grid-row: span 1; }
	.kp-hero { height: 70vh; min-height: 380px; }
	.kp-hero-text { bottom: 56px; }
	.kp-front .kp-section { padding: 18px; }
	.kp-btns .kp-btn, .kp-btns .kp-price-badge { width: 100%; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}
