/*
Theme Name: Sezonownia
Description: Motyw WooCommerce dla małego sklepu sezonowego (1–5 produktów) w modelu dropshipping. Przełączane sezony (Halloween, Boże Narodzenie, Walentynki), Consent Mode v2, GA4/GTM, piksel Meta, Microsoft Clarity, zdarzenia e-commerce, szacowana dostawa i numery przesyłek.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
WC requires at least: 8.5
Text Domain: sezonownia
License: GPL-2.0-or-later
*/

/* ===== Tokeny sezonów ===== */
:root, .season-halloween {
	--bg: #0e0918;
	--surface: #1a1229;
	--surface-2: #251a3a;
	--line: #3a2c55;
	--text: #f4effc;
	--muted: #b8abd1;
	--accent: #ff7a1a;
	--accent-ink: #1c0d00;
	--accent-2: #a78bfa;
	--danger: #ff6b6b;
	--display: "Rubik Wet Paint", "Inter", system-ui, sans-serif;
	--glow: 0 0 40px rgba(255, 122, 26, .35);
}
.season-xmas {
	--bg: #0b1a14;
	--surface: #12291f;
	--surface-2: #193729;
	--line: #2a4d3c;
	--text: #f6f3ea;
	--muted: #b7c9bd;
	--accent: #e8423f;
	--accent-ink: #fff;
	--accent-2: #f3c74b;
	--display: "Lobster", "Inter", system-ui, sans-serif;
	--glow: 0 0 40px rgba(243, 199, 75, .3);
}
.season-valentine {
	--bg: #24070f;
	--surface: #370d1a;
	--surface-2: #461326;
	--line: #632037;
	--text: #fff1f4;
	--muted: #f0b9c7;
	--accent: #ff4d7d;
	--accent-ink: #fff;
	--accent-2: #ffd1dc;
	--display: "Pacifico", "Inter", system-ui, sans-serif;
	--glow: 0 0 40px rgba(255, 77, 125, .35);
}
:root {
	--radius: 14px;
	--wrap: 1160px;
	--body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ===== Baza ===== */
*, *::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.6 var(--body);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); }
a:hover { color: var(--accent-2); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 1000; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 8px; }
.sz-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sz-muted { color: var(--muted); }
.sz-hidden, [hidden] { display: none !important; }
.sz-display { font-family: var(--display); font-weight: 400; letter-spacing: .01em; }
.sz-h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: center; margin: 0 0 1.2em; }
.sz-main { min-height: 60vh; }
.sz-content { padding: 40px 16px 64px; }

/* ===== Przyciski (też WooCommerce) ===== */
.button, button.button, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .wp-element-button {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: 44px; padding: .7em 1.3em;
	border: 1px solid var(--line); border-radius: 999px;
	background: var(--surface-2); color: var(--text);
	font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
	transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: var(--line); color: var(--text); }
.button.alt, .woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce .single_add_to_cart_button,
.woocommerce #payment #place_order, .woocommerce-cart .wc-proceed-to-checkout a.checkout-button, .woocommerce a.add_to_cart_button {
	background: var(--accent); border-color: var(--accent); color: var(--accent-ink);
}
.button.alt:hover, .woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.woocommerce .single_add_to_cart_button:hover, .woocommerce a.add_to_cart_button:hover {
	background: var(--accent); color: var(--accent-ink); transform: translateY(-1px); box-shadow: var(--glow);
}
.sz-btn-lg { font-size: 1.1rem; padding: .9em 1.8em; }
.sz-btn-ghost { background: transparent; }
.sz-linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; text-decoration: underline; cursor: pointer; }

/* ===== Pasek ogłoszeń + nagłówek ===== */
.sz-announce { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: .875rem; font-weight: 600; }
.sz-announce p { margin: 0; padding: 8px 16px; }
.sz-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.sz-header__row { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.sz-brand__name { font-family: var(--display); font-size: 1.6rem; color: var(--text); text-decoration: none; }
.sz-brand img { max-height: 44px; width: auto; display: block; }
.sz-nav { flex: 1; }
.sz-nav ul { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.sz-nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.sz-nav a:hover { color: var(--text); }
.sz-header__actions { display: flex; gap: 8px; margin-left: auto; }
.sz-icon-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; color: var(--text); text-decoration: none; border-radius: 999px; font-weight: 600; font-size: .9rem; }
.sz-icon-link:hover { background: var(--surface-2); color: var(--text); }
.sz-cart-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; display: inline-grid; place-items: center; }
@media (max-width: 720px) {
	.sz-nav { display: none; }
	.sz-icon-link span:not(.sz-cart-count) { display: none; }
	.sz-brand__name { font-size: 1.25rem; white-space: nowrap; }
}

/* Dekoracje sezonowe (czysty CSS, wyłączane przy ograniczonym ruchu) */
.sz-deco { position: absolute; inset: 100% 0 auto; height: 0; pointer-events: none; }
.season-halloween .sz-deco::before, .season-halloween .sz-deco::after {
	content: ""; position: absolute; top: 18px; width: 46px; height: 22px; opacity: .55;
	background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath fill='%23a78bfa' d='M32 10c2-4 4-6 4-6l1 5c3 0 5 2 6 4 4-6 12-9 21-6-6 2-9 6-9 11-3-2-7-2-9 1-2-3-6-4-9-2l-5 6-5-6c-3-2-7-1-9 2-2-3-6-3-9-1 0-5-3-9-9-11 9-3 17 0 21 6 1-2 3-4 6-4l1-5s2 2 4 6Z'/%3E%3C/svg%3E");
	animation: sz-fly 14s linear infinite;
}
.season-halloween .sz-deco::after { top: 60px; width: 30px; animation-duration: 19s; animation-delay: -7s; }
.season-xmas .sz-deco::before {
	content: ""; position: absolute; top: 0; left: 0; right: 0; height: 220px; opacity: .35;
	background-image: radial-gradient(2px 2px at 10% 20%, #fff 50%, transparent 51%), radial-gradient(3px 3px at 35% 60%, #fff 50%, transparent 51%), radial-gradient(2px 2px at 60% 30%, #fff 50%, transparent 51%), radial-gradient(3px 3px at 85% 70%, #fff 50%, transparent 51%);
	background-size: 300px 220px; animation: sz-snow 10s linear infinite;
}
@keyframes sz-fly { from { transform: translateX(-60px) translateY(0); } 50% { transform: translateX(50vw) translateY(24px); } to { transform: translateX(105vw) translateY(0); } }
@keyframes sz-snow { from { background-position: 0 -220px; } to { background-position: 40px 0; } }

/* ===== Hero ===== */
.sz-hero {
	position: relative; overflow: hidden; text-align: center; padding: 72px 0 56px;
	background:
		radial-gradient(60% 70% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
		radial-gradient(40% 50% at 90% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 70%);
}
.season-halloween .sz-hero::after {
	content: ""; position: absolute; right: -40px; top: -40px; width: 260px; height: 260px; opacity: .18; pointer-events: none;
	background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23f4effc' stroke-width='.8'%3E%3Cpath d='M100 0 0 100M100 0 30 100M100 0 60 100M100 0 100 100M100 0 0 70M100 0 0 40M100 0 0 0'/%3E%3Cpath d='M86 0q2 12 14 14M70 0q4 26 30 30M52 0q6 42 48 48M34 0q8 58 66 66'/%3E%3C/svg%3E");
}
.sz-hero__inner { position: relative; z-index: 1; max-width: 820px; }
.sz-eyebrow { display: inline-block; margin: 0 0 16px; padding: 4px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--accent-2); font-weight: 600; font-size: .9rem; }
.sz-hero h1 { font-size: clamp(2.3rem, 7vw, 4.4rem); color: var(--text); text-shadow: var(--glow); }
.sz-lead { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--muted); max-width: 640px; margin: 0 auto 28px; }

.sz-countdown { margin-top: 36px; }
.sz-countdown__label { margin: 0 0 10px; color: var(--muted); font-weight: 600; }
.sz-countdown__units { display: inline-flex; gap: 10px; }
.sz-countdown__units span { min-width: 72px; padding: 10px 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: .8rem; color: var(--muted); }
.sz-countdown__units b { display: block; font-size: 1.8rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }

/* ===== Korzyści ===== */
.sz-benefits { border-block: 1px solid var(--line); background: var(--surface); }
.sz-benefits ul { list-style: none; margin: 0 auto; padding: 16px; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: center; font-weight: 600; font-size: .95rem; }

/* ===== Produkty ===== */
.sz-products { padding: 64px 16px; }
.woocommerce ul.products, .woocommerce-page ul.products { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin: 0; padding: 0; list-style: none; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
	width: auto !important; margin: 0 !important; float: none !important;
	display: flex; flex-direction: column; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.woocommerce ul.products li.product { position: relative; }
.woocommerce ul.products li.product a { text-decoration: none; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--glow); }
.woocommerce ul.products li.product a img { border-radius: 10px; margin: 0 0 12px; aspect-ratio: 1; object-fit: cover; background: var(--surface-2); }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 1.05rem; font-weight: 600; color: var(--text); padding: 0; }
.woocommerce ul.products li.product .price { color: var(--accent); font-weight: 800; font-size: 1.15rem; margin-bottom: 12px; }
.woocommerce ul.products li.product .price del { color: var(--muted); font-weight: 400; font-size: .9rem; }
.woocommerce ul.products li.product .button { margin-top: auto; width: 100%; }
.woocommerce span.onsale { background: var(--accent); color: var(--accent-ink); border-radius: 999px; min-height: auto; min-width: auto; padding: 4px 10px; line-height: 1.4; font-weight: 800; top: 22px; left: 22px; right: auto; position: absolute; margin: 0; z-index: 2; }
.woocommerce a.added_to_cart { display: block; text-align: center; margin-top: 8px; font-weight: 600; }

/* ===== Strona produktu ===== */
.sz-woo { padding: 32px 16px 80px; }
.woocommerce div.product { display: grid; gap: 32px; }
@media (min-width: 860px) { .woocommerce div.product { grid-template-columns: 1fr 1fr; } .woocommerce div.product .woocommerce-tabs, .woocommerce div.product .related, .woocommerce div.product .upsells { grid-column: 1 / -1; } }
.woocommerce div.product div.images, .woocommerce div.product div.summary { width: auto !important; float: none !important; margin: 0 !important; }
.woocommerce div.product div.images img { border-radius: var(--radius); }
.woocommerce div.product .product_title { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4.5vw, 3rem); }
.woocommerce div.product p.price, .woocommerce div.product span.price { color: var(--accent); font-size: 1.8rem; font-weight: 800; }
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 20px 0; }
.woocommerce div.product form.cart .single_add_to_cart_button { flex: 1; min-height: 52px; font-size: 1.1rem; }
.woocommerce .quantity .qty { min-height: 52px; width: 72px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: center; }
.sz-delivery { margin: 8px 0 4px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; font-size: .95rem; }
.sz-delivery p { margin: 0; }
.sz-delivery__warn { color: var(--danger); margin-top: 6px !important; font-weight: 600; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; margin: 0 0 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.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; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--muted); padding: 8px 16px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: var(--accent); border-color: var(--accent); }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--accent-ink); }

.sz-sticky-atc { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
.sz-sticky-atc__name { flex: 1; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sz-sticky-atc__price { color: var(--accent); font-weight: 800; }
@media (min-width: 860px) { .sz-sticky-atc { display: none !important; } }

/* ===== Koszyk / zamówienie / konto ===== */
.woocommerce table.shop_table { border-color: var(--line); border-radius: var(--radius); background: var(--surface); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { border-color: var(--line); }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text, .select2-container--default .select2-selection--single {
	min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit;
}
.woocommerce form .form-row label { color: var(--muted); }
.woocommerce-message, .woocommerce-info, .woocommerce-error { background: var(--surface); color: var(--text); border-top-color: var(--accent); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--accent); }
.woocommerce #payment, .woocommerce-checkout #payment { background: var(--surface); border-radius: var(--radius); }
.woocommerce #payment div.payment_box { background: var(--surface-2); color: var(--text); }
.woocommerce #payment div.payment_box::before { border-bottom-color: var(--surface-2); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.woocommerce-account .woocommerce-MyAccount-navigation a { display: block; padding: 10px 14px; border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a { background: var(--accent); color: var(--accent-ink); }
.woocommerce form.login, .woocommerce form.register { border-color: var(--line); border-radius: var(--radius); background: var(--surface); }
.sz-account-perks { color: var(--muted); }
.sz-tracking { padding: 14px; border: 1px dashed var(--accent); border-radius: 10px; }

.sz-freeship { margin: 0 0 20px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.sz-freeship p { margin: 0 0 8px; }
.sz-freeship__track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.sz-freeship__track span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .4s ease; }

/* ===== FAQ ===== */
.sz-faq { padding: 24px 16px 72px; max-width: 820px; }
.sz-faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; }
.sz-faq summary { cursor: pointer; padding: 16px 18px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.sz-faq summary::-webkit-details-marker { display: none; }
.sz-faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.sz-faq details[open] summary::after { content: "–"; }
.sz-faq details p { margin: 0; padding: 0 18px 16px; color: var(--muted); }

/* ===== Stopka ===== */
.sz-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 24px; margin-top: 40px; }
.sz-footer__grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sz-footer__brand { font-family: var(--display); font-size: 1.5rem; margin: 0 0 6px; }
.sz-footer ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; }
.sz-footer a { color: var(--muted); }
.sz-footer__copy { color: var(--muted); font-size: .85rem; margin-top: 24px; }
.sz-404 { text-align: center; padding: 80px 16px; }
.sz-404 h1 { font-size: clamp(2rem, 6vw, 3.6rem); }

/* ===== Baner zgód ===== */
.sz-consent { position: fixed; inset: auto 12px 12px; z-index: 100; display: flex; justify-content: center; }
.sz-consent__box { max-width: 640px; width: 100%; padding: 18px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0,0,0,.5); font-size: .92rem; }
.sz-consent__title { font-weight: 800; margin: 0 0 6px; font-size: 1rem; }
.sz-consent__opts { display: grid; gap: 8px; margin: 10px 0; }
.sz-consent__opts label { display: flex; gap: 8px; align-items: center; }
.sz-consent__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.sz-consent__actions .button { min-height: 40px; padding: .5em 1em; font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
