/* Knoflíček — psychedelic-70s haberdashery, hand-crafted. */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html, body { overflow-x: clip; }

:root {
  --c-aubergine: #4a2b50;
  --c-aubergine-dark: #30152f;
  --c-lime: #a8c23a;
  --c-ivory: #f8efe0;
  --c-rust: #c76b3c;
  --c-blush: #f0c7c9;
  --c-sky: #bcdce0;
  --c-sand: #e9d9bd;
  --c-ink: #2c1c2b;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 28px;
  --radius-md: 16px;
  --shadow-paper: 0 18px 40px -16px rgba(48, 21, 47, 0.35);
  --measure: 68ch;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-ivory);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 .5em; line-height: 1.1; }
p { line-height: 1.6; }
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-aubergine); color: var(--c-ivory); padding: .6em 1em; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; border-radius: 8px; }

:focus-visible { outline: 3px solid var(--c-rust); outline-offset: 3px; border-radius: 4px; }

/* ===== Layout utilities ===== */
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stack { display: flex; flex-direction: column; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 2rem; } .mt-4 { margin-top: 4rem; }
.mb-1 { margin-bottom: .5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 2rem; } .mb-4 { margin-bottom: 4rem; }
.section { padding: 4rem 0; }
.section-sm { padding: 2.5rem 0; }
.center { text-align: center; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 239, 224, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 2px solid var(--c-aubergine);
}
.site-header-inner {
  max-width: 1160px; margin: 0 auto; padding: .8rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.logo { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-word {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--c-aubergine); letter-spacing: .01em;
}
.nav-toggle {
  display: none; background: none; border: 2px solid var(--c-aubergine); border-radius: 10px;
  width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--c-aubergine);
  cursor: pointer;
}
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a {
  text-decoration: none; font-weight: 600; color: var(--c-aubergine);
  position: relative; padding: .3rem .1rem;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0;
  background: var(--c-rust); border-radius: 3px; transition: width .25s ease;
}
.site-nav a:hover::after, .site-nav a.is-active::after { width: 100%; }
.site-nav a.is-active { color: var(--c-rust); }
.nav-cart { display: flex; align-items: center; gap: .3rem; }
.cart-badge {
  background: var(--c-rust); color: var(--c-ivory); font-size: .75rem; font-weight: 700;
  border-radius: 999px; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 .35em;
}
.cart-badge.bump { animation: cartBump .35s ease; }
@keyframes cartBump { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px);
    background: var(--c-aubergine); flex-direction: column; align-items: flex-start;
    padding: 5rem 1.6rem 2rem; gap: 1.2rem; z-index: 150;
    transform: translateX(100%); visibility: hidden; transition: transform .3s ease;
  }
  .site-nav.is-open { transform: translateX(0); visibility: visible; }
  .site-nav a { color: var(--c-ivory); }
  .site-nav a.is-active { color: var(--c-lime); }
  .nav-cart { color: var(--c-ivory); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-body); font-weight: 700; font-size: .95rem;
  padding: .8em 1.6em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; min-height: 44px;
  position: relative; overflow: hidden; isolation: isolate;
  transition: color .25s ease, border-color .25s ease, transform .15s ease;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%;
  background: var(--c-aubergine-dark); z-index: -1; transition: left .3s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-rust); color: var(--c-ivory); }
.btn-primary:hover::before { left: 0; }
.btn-secondary { background: var(--c-aubergine); color: var(--c-ivory); }
.btn-secondary::before { background: var(--c-rust); }
.btn-secondary:hover::before { left: 0; }
.btn-ghost { background: transparent; color: var(--c-aubergine); border-color: var(--c-aubergine); }
.btn-ghost::before { background: var(--c-aubergine); }
.btn-ghost:hover { color: var(--c-ivory); }
.btn-ghost:hover::before { left: 0; }
.cookie-banner .btn-ghost { color: var(--c-ivory); border-color: var(--c-ivory); }
.btn-sm { padding: .5em 1.1em; font-size: .85rem; min-height: 36px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== Hero (home) ===== */
.hero {
  position: relative; padding: 3.5rem 0 5rem; overflow: hidden;
  background: linear-gradient(135deg, var(--c-sand) 0%, var(--c-blush) 55%, var(--c-sky) 100%);
}
.hero-grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; mix-blend-mode: multiply; pointer-events: none; }
.hero-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 1.5rem;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; position: relative;
}
.hero-title {
  font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--c-aubergine); margin-bottom: .4em;
}
.hero-underline { position: relative; display: inline-block; }
.hero-underline svg {
  position: absolute; left: 0; bottom: -.12em; width: 100%; height: .3em;
  stroke: var(--c-rust); stroke-width: 6; fill: none;
  stroke-dasharray: 340; stroke-dashoffset: 340;
}
.in-view .hero-underline svg { animation: drawUnderline 1s ease .4s forwards; }
@keyframes drawUnderline { to { stroke-dashoffset: 0; } }
.hero-lede { font-size: 1.15rem; max-width: 34ch; }
.hero-figure { position: relative; }
.hero-photo {
  border-radius: var(--radius-lg); width: 100%; aspect-ratio: 4/5; object-fit: cover;
  box-shadow: var(--shadow-paper); border: 6px solid var(--c-ivory);
}
.hero-card {
  position: absolute; bottom: -1.6rem; left: -1.6rem; background: var(--c-ivory);
  border-radius: var(--radius-md); padding: 1rem 1.3rem; box-shadow: var(--shadow-paper);
  display: flex; align-items: center; gap: .7rem; max-width: 220px;
  border: 2px solid var(--c-aubergine);
}
.hero-card strong { display: block; color: var(--c-rust); }
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { position: static; margin-top: 1.5rem; }
}

/* ===== Reveal / scroll motion ===== */
.reveal { opacity: 1; transform: none; }
.js-reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal-ready .reveal.in-view { opacity: 1; transform: none; }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }

/* ===== Section dividers / decorative svg ===== */
.divider-wave { width: 100%; height: 44px; display: block; margin: 0 auto; }
.ornament { display: block; margin: 2rem auto; }

/* ===== Cards / product grid ===== */
.card {
  background: var(--c-ivory); border-radius: var(--radius-md); overflow: hidden;
  box-shadow: var(--shadow-paper); border: 2px solid transparent;
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--c-rust); }
.card-media { aspect-ratio: 4/3; overflow: hidden; background: var(--c-sand); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.08); }
.card-body { padding: 1.1rem 1.2rem 1.4rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .2em; }
.card-meta { font-size: .85rem; color: var(--c-aubergine); opacity: .8; }
.card-price { font-weight: 700; color: var(--c-rust); font-size: 1.1rem; margin: .4em 0; }
.badge {
  display: inline-block; background: var(--c-lime); color: var(--c-aubergine-dark);
  font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  padding: .25em .7em; border-radius: 999px; margin-bottom: .5em;
}
.product-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 1.2rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 1rem;
}
.product-strip .card { scroll-snap-align: start; }
@media (min-width: 720px) {
  .product-strip { grid-auto-flow: row; grid-auto-columns: unset; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); overflow: visible; }
}

/* ===== Feature: Fuzzy Button Finder ("Najdi svůj knoflík") ===== */
.finder {
  background: var(--c-aubergine); color: var(--c-ivory); border-radius: var(--radius-lg);
  padding: 2.4rem; position: relative; overflow: hidden;
}
.finder h2 { color: var(--c-ivory); }
.finder-form { display: flex; gap: .8rem; flex-wrap: wrap; margin: 1.2rem 0; }
.finder-form input {
  flex: 1; min-width: 220px; border-radius: 999px; border: 2px solid var(--c-ivory);
  padding: .8em 1.3em; font-size: 1rem; background: var(--c-aubergine-dark); color: var(--c-ivory);
}
.finder-form input::placeholder { color: rgba(248,239,224,.6); }
.finder-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.finder-chips button {
  background: var(--c-aubergine-dark); border: 1px solid var(--c-lime); color: var(--c-lime);
  border-radius: 999px; padding: .4em 1em; font-size: .85rem; cursor: pointer;
}
.finder-chips button:hover { background: var(--c-lime); color: var(--c-aubergine-dark); }
.finder-results { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 1rem; }
.finder-result { background: var(--c-ivory); color: var(--c-ink); border-radius: var(--radius-md); padding: 1rem; }
.finder-empty { opacity: .8; font-style: italic; }

/* ===== Page hero (inner pages) ===== */
.page-hero {
  background: linear-gradient(120deg, var(--c-blush), var(--c-sand));
  padding: 3rem 0 2.4rem; border-bottom: 2px solid var(--c-aubergine);
}
.page-hero h1 { color: var(--c-aubergine); font-size: clamp(2rem, 4vw, 3rem); }
.page-hero p { max-width: 60ch; font-size: 1.05rem; }

/* ===== Breadcrumbs ===== */
.breadcrumbs { font-size: .85rem; color: var(--c-aubergine); margin-bottom: 1rem; }
.breadcrumbs a { text-decoration: underline; }
.breadcrumbs span[aria-current] { font-weight: 700; }

/* ===== Prose / legal text ===== */
.prose { max-width: var(--measure); margin: 0 auto; }
.prose h2 { color: var(--c-aubergine); margin-top: 2em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ===== Legal TOC ===== */
.legal-toc {
  background: var(--c-ivory); border: 2px solid var(--c-sand); border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem; max-width: var(--measure); margin: 0 auto 2rem;
}
.legal-toc h2 { font-size: 1rem; margin-bottom: .5em; }
.legal-toc ol { margin: 0; padding-left: 1.2em; }

/* ===== Notice ===== */
.notice {
  border-radius: var(--radius-md); padding: 1rem 1.2rem; border: 2px solid var(--c-aubergine);
  background: var(--c-ivory); display: flex; gap: .8rem; align-items: flex-start;
}
.notice-success { border-color: var(--c-lime); background: #f1f7df; }
.notice-error { border-color: var(--c-rust); background: #fbe9e0; }
.notice-info { border-color: var(--c-sky); background: #eaf6f8; }

/* ===== Forms ===== */
.form-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field-full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .9rem; color: var(--c-aubergine); }
.field input, .field select, .field textarea {
  border: 2px solid var(--c-sand); border-radius: 10px; padding: .7em .9em; font: inherit;
  background: var(--c-ivory); accent-color: var(--c-rust);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-rust); }
.field-error { color: #a03a1f; font-size: .82rem; min-height: 1.2em; }
.form-status { min-height: 1.4em; font-weight: 600; }
.form-status.is-success { color: #4c7a1f; }
.form-status.is-error { color: #a03a1f; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ===== Contact layout ===== */
.contact-layout { display: grid; gap: 2.4rem; grid-template-columns: 1fr 1fr; align-items: start; }
.contact-info-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.contact-info-list li { display: flex; align-items: center; gap: .7rem; }
.contact-info-list svg { color: var(--c-rust); flex-shrink: 0; }
@media (max-width: 760px) { .contact-layout { grid-template-columns: 1fr; } }

/* ===== FAQ ===== */
.faq { display: grid; gap: .8rem; max-width: var(--measure); margin: 0 auto; }
.faq-item {
  background: var(--c-ivory); border: 2px solid var(--c-sand); border-radius: var(--radius-md);
  padding: .2rem 1.2rem;
}
.faq-item summary {
  cursor: pointer; font-weight: 700; padding: 1rem 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--c-rust); }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding-bottom: 1rem; margin: 0; }

/* ===== Product detail ===== */
.product-detail { display: grid; gap: 2.4rem; grid-template-columns: 1fr 1fr; }
.product-detail-media img { border-radius: var(--radius-lg); width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 6px solid var(--c-ivory); box-shadow: var(--shadow-paper); }
.product-detail-info .card-price { font-size: 1.6rem; }
.qty-stepper { display: inline-flex; align-items: center; border: 2px solid var(--c-aubergine); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 44px; height: 44px; border: none; background: var(--c-ivory); cursor: pointer; font-size: 1.1rem; }
.qty-stepper input { width: 48px; text-align: center; border: none; font: inherit; background: transparent; }
@media (max-width: 760px) { .product-detail { grid-template-columns: 1fr; } }

/* ===== Cart ===== */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: .8rem .5rem; border-bottom: 2px solid var(--c-sand); text-align: left; vertical-align: middle; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.cart-summary {
  background: var(--c-ivory); border: 2px solid var(--c-aubergine); border-radius: var(--radius-md);
  padding: 1.4rem; max-width: 360px; margin-left: auto; display: grid; gap: .6rem;
}
.cart-summary-row { display: flex; justify-content: space-between; }
.cart-summary-total { font-weight: 800; font-size: 1.2rem; color: var(--c-rust); }
.cart-empty { text-align: center; padding: 3rem 1rem; }

/* ===== Toast ===== */
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--c-aubergine); color: var(--c-ivory); padding: .8em 1.4em; border-radius: 999px;
  font-weight: 600; opacity: 0; transition: opacity .3s ease, transform .3s ease; z-index: 300;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== Footer ===== */
.site-footer { background: var(--c-aubergine); color: var(--c-ivory); padding: 3rem 0 1.5rem; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; display: grid; gap: 2.4rem; grid-template-columns: 1.2fr 2fr; }
.footer-logo { color: var(--c-ivory); }
.footer-brand p { opacity: .85; max-width: 32ch; }
.newsletter-form label { display: block; font-weight: 700; margin-bottom: .4em; }
.newsletter-row { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-row input {
  flex: 1; min-width: 180px; border-radius: 999px; border: 2px solid var(--c-ivory);
  padding: .7em 1.1em; background: var(--c-aubergine-dark); color: var(--c-ivory);
}
.footer-links { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.footer-col h3 { font-size: .95rem; color: var(--c-lime); margin-bottom: .6em; }
.footer-col a { display: block; text-decoration: none; opacity: .88; margin-bottom: .5em; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom {
  max-width: 1160px; margin: 2.4rem auto 0; padding: 1.2rem 1.5rem 0; border-top: 1px solid rgba(248,239,224,.25);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .6rem; font-size: .85rem; opacity: .85;
}
.footer-bottom a { display: inline-flex; align-items: center; gap: .4em; text-decoration: none; }
@media (max-width: 760px) { .footer-inner { grid-template-columns: 1fr; } }

/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; max-width: 560px; margin: 0 auto;
  background: var(--c-aubergine-dark); color: var(--c-ivory); border-radius: var(--radius-md);
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow-paper); z-index: 250;
  transform: translateY(140%); opacity: 0; transition: transform .4s ease, opacity .4s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-actions { display: flex; gap: .7rem; margin-top: .8rem; flex-wrap: wrap; }

/* ===== 404 ===== */
.error-page { text-align: center; padding: 5rem 1rem; }
.error-page h1 { font-size: clamp(3rem, 10vw, 6rem); color: var(--c-rust); }

@media (max-width: 390px) {
  .hero-card { max-width: 160px; }
}

/* COMPONENTS:
.wrap - centered max-width container with side padding
.grid / .grid-2 / .grid-3 / .grid-4 - responsive auto-fit grids
.section / .section-sm - vertical page section padding
.site-header / .site-nav / .nav-toggle / .nav-cart / .cart-badge - header & nav
.btn / .btn-primary / .btn-secondary / .btn-ghost / .btn-sm - button variants with fill-sweep hover
.hero / .hero-inner / .hero-title / .hero-underline / .hero-lede / .hero-figure / .hero-photo / .hero-card - home hero
.reveal (+ delay-1/2/3) - scroll-reveal animated element, visible by default
.divider-wave / .ornament - decorative SVG section dividers
.card / .card-media / .card-body / .card-meta / .card-price / .badge - product/content card
.product-strip - horizontal scroll-snap card strip on mobile, grid on desktop
.finder / .finder-form / .finder-chips / .finder-results / .finder-result / .finder-empty - Fuzzy Button Finder feature
.page-hero - inner page hero banner
.breadcrumbs - breadcrumb trail
.prose - readable long-form legal/content text measure
.legal-toc - legal page table of contents box
.notice (+ -success/-error/-info) - callout banner
.form-grid / .field / .field-full / .field-error / .form-status / .hp-field - form layout & validation
.contact-layout / .contact-info-list - contact page split layout
.faq / .faq-item - FAQ accordion (details/summary)
.product-detail / .product-detail-media / .product-detail-info / .qty-stepper - product page layout
.cart-table / .cart-summary / .cart-summary-row / .cart-summary-total / .cart-empty - cart/checkout layout
.toast - transient confirmation message
.site-footer / .footer-inner / .footer-links / .footer-col / .footer-bottom - footer
.cookie-banner / .cookie-actions - cookie consent banner
.error-page - 404 page layout
*/

/* ===== Missing component styles ===== */
.logo-mark {
  width: 40px; height: 40px; display: inline-block; flex-shrink: 0;
}

.delay-4 {
  transition-delay: .4s;
}

.sr-only {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

.cart-qty {
  border: 2px solid var(--c-sand); border-radius: 10px; padding: .7em .9em;
  font: inherit; background: var(--c-ivory); accent-color: var(--c-rust);
  text-align: center; width: 54px;
}

.cart-qty:focus {
  border-color: var(--c-rust);
}
