/* =====================================================================
   Mydlana Opowieść – style
   Mobile-first. Motyw świąteczny sterowany atrybutem <html data-theme>.
   ===================================================================== */

:root {
  --bordo: #7A1F2B;
  --bordo-dark: #5E161F;
  --gold: #C9A24B;
  --gold-light: #E6CF8E;
  --cream: #FBF6EE;
  --cream-2: #F3E9DB;
  --pine: #2F4B3A;
  --ink: #2B2225;
  --muted: #6B5F62;
  --white: #FFFFFF;
  --line: rgba(122, 31, 43, 0.14);

  --font-head: "Playfair Display", "Georgia", serif;
  --font-body: "Nunito", "Segoe UI", system-ui, sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(74, 32, 20, 0.12);
  --shadow-sm: 0 4px 14px rgba(74, 32, 20, 0.10);
  --gutter: 20px;
  --max: 1120px;
  --dock-h: 72px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- Widoczność elementów motywu ---------- */
[data-theme="classic"] .christmas-only { display: none !important; }
[data-theme="christmas"] .classic-only { display: none !important; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--bordo); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0; color: var(--bordo-dark); }
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.icon { width: 22px; height: 22px; flex: none; }
.icon--lg { width: 32px; height: 32px; }

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--bordo); color: #fff; padding: 10px 14px; border-radius: 8px;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- Śnieg ---------- */
.snow {
  position: fixed; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 5;
}
[data-theme="classic"] .snow { display: none; }

/* ---------- Pasek sezonowy ---------- */
.season-bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--bordo); color: #fff;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  padding: 8px 12px;
  text-align: center;
}
.season-bar strong { color: var(--gold-light); font-weight: 700; white-space: nowrap; }
.season-bar__icon { color: var(--gold); font-size: 12px; }

/* ---------- Nagłówek ---------- */
.site-header {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 22px var(--gutter) 26px;
  background: var(--cream);
}
.logo { text-decoration: none; text-align: center; }
.logo__name {
  display: block; font-family: var(--font-head); font-weight: 700;
  font-size: 30px; letter-spacing: .01em; color: var(--bordo-dark);
}
.logo__tagline {
  display: block; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-top: 2px;
}
.site-nav { display: none; gap: 26px; font-weight: 600; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-color: var(--gold); }

/* ---------- Girlanda lampek ---------- */
.lights {
  position: absolute; left: 0; right: 0; bottom: -10px; height: 22px;
  display: flex; justify-content: space-around; align-items: flex-start;
  padding: 0 8px; pointer-events: none;
}
.lights::before {
  content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 10px;
  border-bottom: 1.5px solid var(--pine); border-radius: 50% / 100%;
  opacity: .55;
}
.light {
  position: relative; width: 9px; height: 13px; border-radius: 50% 50% 55% 55%;
  background: var(--c);
  box-shadow: 0 0 6px 1px var(--c), 0 0 14px 2px color-mix(in srgb, var(--c) 45%, transparent);
  margin-top: 8px;
  animation: twinkle 2.6s ease-in-out infinite;
  animation-delay: var(--d);
}
.light::before {
  content: ""; position: absolute; left: 2px; top: -5px; width: 5px; height: 5px;
  background: var(--pine); border-radius: 2px 2px 0 0;
}
@keyframes twinkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: .55; filter: brightness(.75); }
}

/* ---------- Przyciski ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: 17px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s var(--ease), box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn--primary { background: var(--bordo); color: #fff; box-shadow: 0 8px 22px rgba(122,31,43,.28); }
.btn--primary:hover { background: var(--bordo-dark); }
.btn--ghost { background: transparent; color: var(--bordo-dark); border-color: var(--bordo); }
.btn--ghost:hover { background: rgba(122,31,43,.06); }
.btn--outline { background: var(--white); color: var(--bordo-dark); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn--outline:hover { border-color: var(--gold); }
.btn--block { width: 100%; }

/* lekka iskierka na głównym przycisku (tylko święta) */
[data-theme="christmas"] .btn--messenger { position: relative; overflow: hidden; }
[data-theme="christmas"] .btn--messenger::after {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.28), transparent);
  animation: shine 4.5s ease-in-out infinite;
}
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; gap: 22px; padding: 6px var(--gutter) 40px; max-width: var(--max); margin: 0 auto; }
.hero__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream-2); }
.hero__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero__content { text-align: center; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
[data-theme="christmas"] .eyebrow { color: var(--bordo); }
.hero h1 { font-size: clamp(32px, 8vw, 54px); margin-bottom: 14px; }
.hero__lead { font-size: 18px; color: var(--muted); max-width: 34ch; margin: 0 auto 22px; }
.hero__actions { display: grid; gap: 12px; }
.hero__badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px;
  margin-top: 22px; font-size: 14px; color: var(--muted); font-weight: 600;
}
.hero__badges li::before { content: "✦"; color: var(--gold); margin-right: 6px; font-size: 11px; }

/* ornamenty jodłowe */
.ornament { position: absolute; width: 96px; height: 96px; color: var(--pine); opacity: .75; pointer-events: none; }
.ornament--tl { left: -6px; top: -6px; transform: rotate(90deg); }
.ornament--footer { left: 8px; bottom: 8px; width: 80px; height: 80px; opacity: .5; }

/* ---------- Sekcje ---------- */
.section { padding: 48px var(--gutter); }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section--tint { background: var(--cream-2); }
.section__head { text-align: center; margin-bottom: 26px; }
.section__title { font-size: clamp(28px, 6.5vw, 40px); }
.section__title--left { text-align: left; }
.divider { width: 180px; height: 18px; margin: 10px auto 12px; }
.section__lead { color: var(--muted); max-width: 46ch; margin: 0 auto; }
.center { text-align: center; margin-top: 26px; }

/* ---------- Siatka produktów ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(201,162,75,.18);
  text-align: left; padding: 0; cursor: pointer; width: 100%;
  transition: transform .2s var(--ease), box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { background: var(--cream-2); }
.card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.card__body { padding: 12px 12px 14px; }
.card__name { font-family: var(--font-head); font-size: 18px; color: var(--bordo-dark); margin: 0 0 3px; }
.card__scent { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.swatches { display: flex; gap: 5px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); background: var(--c); }

/* ---------- Karta winogron ---------- */
.grape {
  display: grid; gap: 18px; background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); border: 1px solid rgba(201,162,75,.18);
}
.grape__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.grape__body { padding: 0 20px 22px; }
.grape__title { font-size: 26px; margin-bottom: 8px; }
.grape__desc { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 16px; }
.chips__label { width: 100%; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin-top: 8px; }
.chip {
  padding: 6px 13px; border-radius: 999px; background: var(--cream); font-size: 15px; font-weight: 600;
  border: 1px solid rgba(201,162,75,.35); color: var(--ink);
}

/* ---------- Na prezent ---------- */
.gift-grid { display: grid; gap: 16px; }
.gift {
  display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center;
  background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201,162,75,.18);
}
.gift img { width: 110px; height: 100%; aspect-ratio: 1; object-fit: cover; }
.gift__body { padding: 12px 14px 12px 0; }
.gift__name { font-family: var(--font-head); font-size: 19px; color: var(--bordo-dark); margin-bottom: 4px; }
.gift__desc { font-size: 15px; color: var(--muted); margin: 0; }
.perks { display: grid; gap: 12px; margin-top: 22px; }
.perks li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--pine); }
.perks .icon { color: var(--gold); }

/* ---------- O mnie ---------- */
.about { display: grid; gap: 22px; }
.about__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about__text .section__title { margin-bottom: 14px; }
.about__text p { color: var(--ink); }
.facts { display: grid; gap: 14px; margin-top: 28px; }
.facts li {
  display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px;
  background: var(--white); padding: 14px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.facts .icon { grid-row: span 2; align-self: center; color: var(--bordo); }
.facts strong { color: var(--bordo-dark); }
.facts span { font-size: 15px; color: var(--muted); }

/* ---------- Opinie ---------- */
.testimonials {
  display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px var(--gutter) 14px; margin: 0 calc(-1 * var(--gutter)); max-width: none;
  scrollbar-width: none; scroll-padding-left: var(--gutter);
}
.testimonials::-webkit-scrollbar { display: none; }
.quote {
  flex: 0 0 82%; scroll-snap-align: start; background: var(--white);
  border-radius: var(--radius); padding: 22px 20px 18px; box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold); position: relative;
}
.quote::before { content: "“"; position: absolute; top: 2px; left: 16px; font-family: var(--font-head); font-size: 54px; color: var(--gold-light); line-height: 1; }
.quote p { font-style: italic; margin: 10px 0 12px; }
.quote footer { font-weight: 700; color: var(--bordo-dark); font-size: 15px; }

/* ---------- Jak zamówić ---------- */
.steps { display: grid; gap: 14px; counter-reset: s; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px;
  background: var(--white); padding: 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
}
.steps__num {
  grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bordo); color: #fff; font-family: var(--font-head); font-size: 20px; font-weight: 700;
}
.steps strong { color: var(--bordo-dark); }
.steps span:not(.steps__num) { color: var(--muted); font-size: 15px; }
.shipping { display: grid; gap: 10px; margin-top: 20px; }
.shipping li { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--pine); }
.shipping .icon { color: var(--gold); }

/* ---------- Kontakt ---------- */
.contact { display: grid; gap: 26px; }
.contact__buttons { display: grid; gap: 12px; }
.form {
  background: var(--white); border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow-sm);
  border: 1px solid rgba(201,162,75,.18);
}
.form__title { font-size: 21px; margin-bottom: 14px; }
.form__row { display: grid; gap: 6px; margin-bottom: 14px; }
.form__row label { font-weight: 700; font-size: 15px; }
.form input[type="text"], .form input[type="email"], .form textarea {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--cream); color: var(--ink);
}
.form input:focus, .form textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,75,.25); }
.form textarea { resize: vertical; min-height: 110px; }
.form__row--check { grid-template-columns: 22px 1fr; align-items: start; gap: 10px; font-size: 14px; }
.form__row--check label { font-weight: 400; color: var(--muted); }
.form__row--check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--bordo); }
.form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin: 12px 0 0; font-weight: 600; min-height: 1.4em; }
.form__status.ok { color: var(--pine); }
.form__status.err { color: var(--bordo); }
.form input:user-invalid, .form textarea:user-invalid { border-color: var(--bordo); }

/* ---------- Stopka ---------- */
.site-footer {
  position: relative; text-align: center; padding: 40px var(--gutter) 30px; background: var(--bordo-dark); color: rgba(255,255,255,.85);
  font-size: 15px;
}
.site-footer a { color: var(--gold-light); }
.site-footer__brand { font-family: var(--font-head); font-size: 24px; color: #fff; margin-bottom: 6px; }
.site-footer__copy { font-size: 13px; opacity: .7; margin-top: 16px; }
.site-footer .ornament { color: var(--gold); }

/* ---------- Pływający pasek ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(251,246,238,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(201,162,75,.35);
  transition: transform .3s var(--ease);
}
.dock--hidden { transform: translateY(110%); }
.dock__btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none;
  background: var(--white); color: var(--bordo-dark); border: 1.5px solid var(--line);
}
.dock__btn--primary { background: var(--bordo); color: #fff; border-color: var(--bordo); box-shadow: 0 6px 18px rgba(122,31,43,.3); }

/* ---------- Dolny arkusz produktu ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(43,34,37,.55); animation: fade .2s; }
.sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto;
  background: var(--cream); border-radius: 24px 24px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.25);
  animation: slideUp .32s var(--ease);
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet__grip { width: 44px; height: 5px; border-radius: 3px; background: rgba(43,34,37,.2); margin: 10px auto 0; }
.sheet__close {
  position: absolute; top: 10px; right: 12px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgba(255,255,255,.9); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-sm);
}
.sheet__media { margin: 10px 16px 0; border-radius: var(--radius); overflow: hidden; background: var(--cream-2); }
.sheet__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.sheet__body { padding: 16px 18px 22px; }
.sheet__title { font-size: 26px; }
.sheet__scent { color: var(--gold); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; margin: 4px 0 10px; }
[data-theme="christmas"] .sheet__scent { color: var(--bordo); }
.sheet__desc { color: var(--ink); }
.sheet__actions { display: grid; gap: 10px; margin-top: 6px; }
.sheet__actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet__hint { font-size: 14px; color: var(--muted); text-align: center; margin: 4px 0 0; }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
body.sheet-open { overflow: hidden; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--dock-h) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 70; background: var(--pine); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: 15px; box-shadow: var(--shadow); max-width: calc(100% - 32px); text-align: center;
  animation: toastIn .25s var(--ease);
}
.toast[hidden] { display: none; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Wjeżdżanie sekcji ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Ruch ograniczony ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .light, .btn--messenger::after { animation: none !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .sheet__panel, .sheet__backdrop, .toast { animation: none; }
  .snow { display: none; }
}

/* =====================================================================
   Tablet i desktop
   ===================================================================== */
@media (min-width: 640px) {
  .hero__actions { grid-auto-flow: column; justify-content: center; }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .gift-grid { grid-template-columns: 1fr 1fr; }
  .perks { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .shipping { grid-auto-flow: column; justify-content: center; gap: 30px; }
  .quote { flex-basis: 48%; }
  .contact { grid-template-columns: 1fr 1.2fr; align-items: start; }
  .grape { grid-template-columns: 1fr 1fr; align-items: center; }
  .grape__media img { aspect-ratio: 1; height: 100%; }
  .grape__body { padding: 24px; }
}

@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .dock { display: none; }
  .toast { bottom: 28px; }
  .site-header { flex-direction: row; justify-content: space-between; padding: 22px 32px 30px; max-width: var(--max); margin: 0 auto; }
  .logo { text-align: left; }
  .site-nav { display: flex; }
  .hero { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 44px; padding: 10px 32px 64px; }
  .hero__media img { aspect-ratio: 1; }
  .hero__content { text-align: left; }
  .hero__lead { margin-left: 0; }
  .hero__actions { justify-content: start; }
  .hero__badges { justify-content: flex-start; }
  .section { padding: 72px 32px; }
  .product-grid { grid-template-columns: repeat(4, 1fr); gap: 22px; }
  .about { grid-template-columns: 1fr 1.2fr; align-items: center; gap: 44px; }
  .testimonials { display: grid; grid-template-columns: repeat(3, 1fr); overflow: visible; padding: 0; margin: 0 auto; max-width: var(--max); }
  .quote { flex-basis: auto; }
  .sheet__panel {
    left: 50%; right: auto; top: 50%; bottom: auto; transform: translate(-50%, -50%);
    width: min(860px, 92vw); max-height: 88vh; border-radius: 24px;
    display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0;
    animation: popIn .28s var(--ease);
  }
  .sheet__grip { display: none; }
  .sheet__media { margin: 0; border-radius: 24px 0 0 24px; height: 100%; }
  .sheet__media img { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .sheet__body { padding: 32px; }
  @keyframes popIn { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
}
