/* Palačinkarnica Riva — scrapbook art direction */

:root {
  --bone: #f2ecd9;
  --bone-2: #e9e0c7;
  --paper: #fffaf0;
  --forest: #1f3b2c;
  --forest-2: #2c5339;
  --forest-3: #16281c;
  --brass: #b08d3e;
  --brass-light: #d9b968;
  --ink: #241d14;
  --ink-soft: #4a4335;
  --red-pin: #9c3b3b;
  --font-display: Georgia, "Times New Roman", serif;
  --font-hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
  --font-body: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-mono: "Consolas", "SF Mono", monospace;
  --radius: 4px;
  --shadow-paper: 0 2px 4px rgba(36, 29, 20, 0.15), 0 10px 20px -8px rgba(36, 29, 20, 0.25);
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bone);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; color: var(--forest-3); line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  left: -9999px;
}

/* ---------- grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 300;
  opacity: .05;
  mix-blend-mode: multiply;
}

/* ---------- reveal ---------- */
.reveal { opacity: 1; }
.reveal.js-hidden {
  opacity: 0;
  transform: translateY(26px);
  clip-path: inset(0 0 12% 0);
  transition: opacity .7s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0% 0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal.js-hidden { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ---------- icon sprite ---------- */
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; vertical-align: -5px; }

/* ---------- skip link ---------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brass); color: var(--forest-3); padding: .6em 1em; z-index: 400;
}
.skip-link:focus { left: 1em; top: 1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: var(--bone);
  border-bottom: 2px solid var(--forest-3);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: .7rem;
  gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .5rem; }
.logo svg { width: 190px; height: 42px; }

.main-nav { display: flex; align-items: center; gap: 1.6rem; }
.main-nav ul { display: flex; gap: 1.4rem; list-style: none; }
.main-nav a {
  font-weight: 600;
  position: relative;
  padding-bottom: 3px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--brass); transition: width .3s var(--ease);
}
.main-nav a:hover::after, .main-nav a:focus-visible::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: .9rem; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.cart-count {
  background: var(--red-pin); color: #fff; font-size: .72rem; font-weight: 700;
  border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 3px;
}
.cart-count.bump { animation: bump .4s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }

.menu-toggle {
  display: none; background: none; border: 2px solid var(--forest-3); border-radius: 4px;
  width: 44px; height: 44px; align-items: center; justify-content: center; cursor: pointer;
}

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }
  .site-header .container { gap: .5rem; }
  .logo svg { width: 140px; height: 32px; }
  .header-actions { gap: .5rem; }
  .cart-link { font-size: .92rem; gap: .25rem; }
  .main-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--forest-3); flex-direction: column; align-items: flex-start;
    padding: 5rem 1.6rem 2rem; gap: 2rem; z-index: 250;
    transform: translateX(100%); visibility: hidden;
    transition: transform .4s var(--ease), visibility .4s;
  }
  .main-nav.open { transform: translateX(0); visibility: visible; }
  .main-nav ul { flex-direction: column; gap: 1.1rem; }
  .main-nav a { color: var(--bone); font-size: 1.1rem; }
  .nav-close {
    position: absolute; top: 1.2rem; right: 1.2rem; background: none; border: none;
    color: var(--bone); width: 44px; height: 44px; cursor: pointer;
  }
}

/* ---------- buttons ---------- */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: .5rem;
  padding: .75em 1.5em; border-radius: 3px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--forest-3); background: var(--forest-3); color: var(--bone);
  isolation: isolate; min-height: 44px;
}
.btn span { position: relative; z-index: 2; }
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--brass); transition: left .35s var(--ease); z-index: 1;
}
.btn:hover::before, .btn:focus-visible::before { left: 0; }
.btn:hover, .btn:focus-visible { color: var(--forest-3); }
.btn-outline { background: transparent; color: var(--forest-3); }
.btn-outline::before { background: var(--forest-3); }
.btn-outline:hover, .btn-outline:focus-visible { color: var(--bone); }
.btn-brass { background: var(--brass); border-color: var(--brass); color: var(--forest-3); }
.btn-brass::before { background: var(--forest-3); }
.btn-brass:hover, .btn-brass:focus-visible { color: var(--bone); }
.btn-sm { padding: .5em 1em; font-size: .9rem; min-height: 38px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]::before { display: none; }

/* ---------- hero split ---------- */
.hero-split {
  position: relative;
  display: grid;
  min-height: 86vh;
  overflow: hidden;
}
.hero-pane {
  position: relative;
  grid-row: 1; grid-column: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 3rem clamp(1.4rem, 5vw, 4rem);
}
.hero-pane--sweet {
  background: linear-gradient(160deg, rgba(31,59,44,.9), rgba(22,40,28,.94)), url("../img/hero.jpg") center/cover no-repeat;
  color: var(--bone);
  clip-path: inset(0 0 0 0);
}
.hero-pane--savory {
  background: linear-gradient(160deg, rgba(242,236,217,.93), rgba(233,224,199,.93)), url("../img/savory-hero.jpg") center/cover no-repeat;
  color: var(--ink);
  grid-row: 1; grid-column: 1;
  clip-path: inset(0 0 0 54%);
}
.hero-divider {
  position: absolute; top: 0; bottom: 0; left: 54%; width: 0;
  z-index: 20; cursor: grab;
  touch-action: none;
}
.hero-divider::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -2px; width: 4px;
  background: var(--brass); box-shadow: 0 0 0 1px rgba(0,0,0,.3);
}
.hero-divider-handle {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: var(--brass);
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--forest-3); box-shadow: var(--shadow-paper);
}
.hero-divider-handle .icon { stroke: var(--forest-3); width: 24px; height: 24px; }

.hero-illustration { position: absolute; right: 2rem; bottom: 1.4rem; width: 150px; height: 150px; opacity: .95; }
@media (max-width: 680px) { .hero-illustration { display: none; } }

.hero-content { max-width: 480px; }
.hero-eyebrow {
  font-family: var(--font-hand); font-size: 1.1rem; display: inline-block; margin-bottom: .4rem;
  color: var(--brass-light);
}
.hero-pane--savory .hero-eyebrow { color: var(--red-pin); }
.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.6rem); margin-bottom: .5rem; color: inherit;
}
.hero-title .clip-wipe {
  display: inline-block;
  clip-path: inset(0 100% 0 0);
  animation: wipe 1.1s .2s var(--ease) forwards;
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .clip-wipe { clip-path: inset(0 0 0 0); animation: none; }
}
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }

.hero-labels {
  position: absolute; top: 1.6rem; left: 0; right: 0;
  display: flex; justify-content: space-between; padding: 0 clamp(1.4rem, 5vw, 4rem);
  pointer-events: none; z-index: 15; font-family: var(--font-hand); font-size: 1rem;
  letter-spacing: .04em;
}

/* ---------- sections ---------- */
section { padding-block: clamp(3rem, 7vw, 6rem); position: relative; }
.section-head { max-width: 640px; margin-bottom: 2.4rem; }
.section-head .kicker {
  font-family: var(--font-hand); color: var(--brass); font-size: 1.15rem; display: block; margin-bottom: .2rem;
}
section.on-forest { background: var(--forest-3); color: var(--bone); }
section.on-forest h2, section.on-forest h3 { color: var(--bone); }
section.on-brass-tint { background: var(--bone-2); }
section.on-brass-tint .kicker { color: var(--forest-2); }

.divider-torn { width: 100%; height: 36px; display: block; }
.divider-torn path { fill: var(--bone); }
section.on-forest + .divider-wrap path,
.divider-wrap.flip-forest path { fill: var(--forest-3); }

/* ---------- polaroid / scrapbook ---------- */
.polaroid {
  background: var(--paper);
  padding: .7rem .7rem 2.2rem;
  box-shadow: var(--shadow-paper);
  position: relative;
  transform: rotate(var(--tilt, -2deg));
}
.polaroid img { width: 100%; height: auto; aspect-ratio: var(--ar, 4/5); object-fit: cover; }
.polaroid figcaption {
  font-family: var(--font-hand); text-align: center; margin-top: .6rem; font-size: 1.05rem; color: var(--ink-soft);
}
.washi {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-4deg);
  width: 90px; height: 28px;
}

.pinned-note {
  background: var(--brass-light);
  padding: 1.4rem 1.5rem 1.6rem;
  box-shadow: var(--shadow-paper);
  position: relative;
  transform: rotate(var(--tilt, 1.2deg));
  font-family: var(--font-hand);
  font-size: 1.08rem;
  color: var(--ink);
}
.pinned-note::before {
  content: ""; position: absolute; top: -9px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--red-pin);
  box-shadow: 0 2px 3px rgba(0,0,0,.4);
}

/* ---------- about / split image blocks ---------- */
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
}
@media (max-width: 760px) { .feature-grid { grid-template-columns: 1fr; } }
.layered-photo { position: relative; }
.layered-photo .seal { position: absolute; bottom: -22px; right: -14px; width: 108px; height: 108px; }

/* ---------- catalog ---------- */
.filter-bar { display: flex; gap: .7rem; flex-wrap: wrap; margin-bottom: 2rem; }
.filter-chip {
  border: 2px solid var(--forest-3); border-radius: 100px; padding: .4em 1.1em;
  background: transparent; font-weight: 600; cursor: pointer; min-height: 44px;
}
.filter-chip.active { background: var(--forest-3); color: var(--bone); }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.8rem;
}
@media (max-width: 640px) {
  .product-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
  .product-grid .product-card { scroll-snap-align: start; }
}
.product-card {
  background: var(--paper); box-shadow: var(--shadow-paper); padding: .8rem .8rem 1.2rem;
  transition: transform .3s var(--ease);
}
.product-card:hover { transform: translateY(-6px) rotate(-.6deg); }
.product-card .thumb { overflow: hidden; aspect-ratio: 4/3; margin-bottom: .8rem; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.08); }
.product-card h3 { font-size: 1.15rem; margin-bottom: .2rem; }
.product-card .cat { font-family: var(--font-hand); color: var(--brass); }
.product-card .price { font-weight: 700; font-size: 1.1rem; margin: .4rem 0; }
.product-card .row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }

/* ---------- product page ---------- */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: start; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }
.qty-row { display: flex; align-items: center; gap: .8rem; margin: 1.2rem 0; }
.qty-row button {
  width: 40px; height: 40px; border: 2px solid var(--forest-3); background: transparent; font-size: 1.2rem; cursor: pointer; border-radius: 3px;
}
.qty-row input { width: 3em; text-align: center; border: 2px solid var(--forest-3); border-radius: 3px; height: 40px; font-size: 1rem; }

/* ---------- beach box builder (signature feature) ---------- */
.beach-box {
  background: var(--paper); box-shadow: var(--shadow-paper); padding: clamp(1.4rem, 4vw, 2.6rem);
  position: relative; color: var(--ink);
}
.beach-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1.2rem; margin: 1.6rem 0; }
@media (max-width: 680px) { .beach-grid { grid-template-columns: 1fr; } }
.beach-item { border: 2px dashed var(--forest-2); border-radius: 4px; padding: 1rem; text-align: center; }
.beach-item h4 { margin-bottom: .2rem; font-size: 1rem; }
.beach-item .stepper { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: .6rem; }
.beach-item .stepper button {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--forest-3); background: var(--bone); font-size: 1.1rem; cursor: pointer;
}
.beach-item .stepper output { min-width: 1.6em; font-weight: 700; font-size: 1.1rem; }
.beach-summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; border-top: 2px solid var(--forest-3); padding-top: 1.2rem; }
.beach-summary .total { font-size: 1.4rem; font-weight: 700; }
.beach-summary .saving { color: var(--forest-2); font-family: var(--font-hand); font-size: 1.1rem; display: block; }

/* ---------- forms ---------- */
.form-grid { display: grid; gap: 1.1rem; max-width: 560px; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input, textarea, select {
  width: 100%; padding: .7em .8em; border: 2px solid var(--forest-3); border-radius: 3px;
  background: var(--paper); font-family: inherit; font-size: 1rem; accent-color: var(--brass);
}
textarea { min-height: 120px; resize: vertical; }
.field-error { color: var(--red-pin); font-size: .85rem; margin-top: .25rem; display: none; }
.field.invalid .field-error { display: block; }
.field.invalid input, .field.invalid textarea { border-color: var(--red-pin); }
.form-status { margin-top: 1rem; font-weight: 700; }
.form-status.ok { color: var(--forest-2); }
.form-status.error { color: var(--red-pin); }
.honeypot-field { position: absolute; left: -9999px; }

/* ---------- cart ---------- */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th, .cart-table td { text-align: left; padding: .8em .6em; border-bottom: 1px solid var(--bone-2); vertical-align: middle; }
.cart-table img { width: 62px; height: 62px; object-fit: cover; border-radius: 3px; }
.cart-line-title { font-weight: 700; }
.cart-remove { background: none; border: none; color: var(--red-pin); cursor: pointer; font-weight: 700; min-height: 44px; }
.cart-totals { display: flex; justify-content: flex-end; }
.cart-totals dl { display: grid; grid-template-columns: auto auto; gap: .3em 1.5em; font-size: 1.1rem; }
.cart-totals dt { color: var(--ink-soft); }
.cart-totals .grand dt, .cart-totals .grand dd { font-weight: 700; font-size: 1.3rem; }
.cart-empty { font-family: var(--font-hand); font-size: 1.3rem; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.5rem; align-items: start; margin-top: 2rem; }
@media (max-width: 820px) { .checkout-grid { grid-template-columns: 1fr; } }
.order-summary-box { background: var(--bone-2); padding: 1.4rem; border-radius: 4px; }

/* ---------- footer ---------- */
.site-footer { background: var(--forest-3); color: var(--bone); padding-block: 3rem 1.6rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2rem; margin-bottom: 2rem; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h3 { color: var(--brass-light); font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .9rem; }
.site-footer ul { list-style: none; display: grid; gap: .55em; }
.site-footer a:hover { color: var(--brass-light); }
.site-footer .logo svg { width: 170px; height: 38px; }
.footer-newsletter input { margin-bottom: .6rem; }
.footer-bottom {
  border-top: 1px solid rgba(242,236,217,.2); padding-top: 1.4rem; margin-top: 1rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .9rem; color: var(--bone-2);
}

/* ---------- cookie banner ---------- */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 500;
  background: var(--forest-3); color: var(--bone); padding: 1.2rem 1.4rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: 0 -6px 18px rgba(0,0,0,.25);
  transform: translateY(0); transition: transform .4s var(--ease);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; max-width: 620px; }
.cookie-banner a { text-decoration: underline; }
.cookie-actions { display: flex; gap: .8rem; flex-wrap: wrap; }
.btn-ghost { background: transparent; border: 2px solid var(--bone); color: var(--bone); }
.btn-ghost::before { background: var(--bone); }
.btn-ghost:hover, .btn-ghost:focus-visible { color: var(--forest-3); }

/* ---------- misc pages ---------- */
.legal-page .container { max-width: 760px; }
.legal-page h2 { margin-top: 2rem; }
.faq-item { border-bottom: 1px solid var(--bone-2); padding-block: 1.1rem; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--brass); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { margin-top: .8rem; }

.error-page { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.error-page .container { max-width: 520px; }

.badge-strip { display: flex; gap: 2.2rem; align-items: center; flex-wrap: wrap; justify-content: center; margin: 2rem 0; }
.badge-strip svg { width: 84px; height: 84px; }

.map-note { font-family: var(--font-hand); font-size: 1.15rem; color: var(--ink-soft); }

.marquee-wrap { overflow: hidden; background: var(--brass); padding-block: .6rem; }
.marquee { display: flex; gap: 2.5rem; white-space: nowrap; font-family: var(--font-hand); font-size: 1.1rem; color: var(--forest-3); animation: marquee 28s linear infinite; }
@media (prefers-reduced-motion: reduce) { .marquee { animation: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
