/* Čaj Dom — Moroccan-riad inspired design system */
:root {
  --rust: #b5542f;
  --rust-dark: #8f3f22;
  --saffron: #d98e3a;
  --indigo: #2f3b4c;
  --slate: #44586e;
  --cream: #f6ecda;
  --cream-deep: #efddb8;
  --ink: #2a2521;
  --line: #d8c6a2;
  --radius: 14px;
  --shadow-1: 0 10px 30px -12px rgba(42, 37, 33, .35);
  --shadow-2: 0 4px 14px -6px rgba(42, 37, 33, .25);
  --font-display: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --font-body: "Avenir Next", Avenir, "Segoe UI", system-ui, -apple-system, sans-serif;
  --measure: 68ch;
  --ease: cubic-bezier(.22, 1, .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(--cream);
  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; line-height: 1.1; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; }
button { font-family: inherit; }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--indigo);
  color: var(--cream);
  border-bottom: 3px solid var(--saffron);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; }
.logo { display: flex; align-items: center; gap: .6rem; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .02em; color: var(--cream); }
.logo svg { width: 40px; height: 40px; flex-shrink: 0; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--cream); color: var(--cream);
  width: 44px; height: 44px; border-radius: 8px; align-items: center; justify-content: center;
}
.nav-toggle svg { width: 22px; height: 22px; }
.main-nav { display: flex; align-items: center; gap: clamp(.6rem, 2vw, 1.4rem); flex-wrap: wrap; }
.main-nav a { font-size: .92rem; padding: .4rem .2rem; position: relative; opacity: .9; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0; background: var(--saffron);
  transition: width .3s var(--ease);
}
.main-nav a:hover::after, .main-nav a.is-active::after { width: 100%; }
.main-nav a.is-active { opacity: 1; }
.cart-link { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--saffron); border-radius: 999px; padding: .4rem .8rem; }
.cart-link svg { width: 18px; height: 18px; }
[data-cart-count] { font-weight: 700; }
[data-cart-count].bump { animation: bump .4s var(--ease); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.5); color: var(--saffron); } 100% { transform: scale(1); } }

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed; inset: 72px 0 0 auto; width: min(78vw, 320px);
    background: var(--indigo); flex-direction: column; align-items: flex-start;
    padding: 1.5rem; gap: 1rem;
    transform: translateX(100%); visibility: hidden; transition: transform .35s var(--ease), visibility .35s;
    box-shadow: var(--shadow-1); height: calc(100vh - 72px); overflow-y: auto;
  }
  .main-nav.is-open { transform: translateX(0); visibility: visible; }
}

/* ===== Buttons ===== */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; padding: .75rem 1.5rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; overflow: hidden; isolation: isolate;
  min-height: 44px; transition: color .3s, transform .15s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; left: -100%; width: 100%; z-index: -1;
  transition: left .35s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rust); color: var(--cream); border-color: var(--rust); }
.btn-primary::before { background: var(--rust-dark); }
.btn-primary:hover::before { left: 0; }
.btn-ghost { background: transparent; color: var(--indigo); border-color: var(--indigo); }
.btn-ghost::before { background: var(--indigo); }
.btn-ghost:hover { color: var(--cream); }
.btn-ghost:hover::before { left: 0; }
.btn-ghost-dark { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-ghost-dark::before { background: var(--cream); }
.btn-ghost-dark:hover { color: var(--indigo); }
.btn-ghost-dark:hover::before { left: 0; }
.btn-small { padding: .5rem 1rem; font-size: .85rem; min-height: 38px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ===== Reveal / motion ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease), clip-path .7s var(--ease); clip-path: inset(0 0 15% 0); }
.reveal.in-view { opacity: 1; transform: translateY(0); clip-path: inset(0 0 0 0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { transition: none !important; opacity: 1 !important; transform: none !important; clip-path: none !important; }
  html { scroll-behavior: auto; }
}

/* ===== Hero ===== */
.hero { position: relative; background: var(--indigo); color: var(--cream); overflow: hidden; }
.hero-grain { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .18; pointer-events: none; mix-blend-mode: overlay; }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(3rem, 8vw, 6rem); display: grid; gap: 2rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin-bottom: .6rem; }
.hero-clip { display: block; overflow: hidden; }
.hero-clip span { display: block; clip-path: inset(0 100% 0 0); animation: wipe 1.1s .15s var(--ease) forwards; }
@keyframes wipe { to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .hero-clip span { animation: none; clip-path: inset(0 0 0 0); } }
.hero p.lede { font-size: 1.15rem; max-width: 42ch; opacity: .92; }
.hero-art { position: relative; aspect-ratio: 1 / 1; }
.hero-art svg { width: 100%; height: 100%; }
.hero-actions { display: flex; gap: 1rem; margin-top: 1.4rem; flex-wrap: wrap; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; } }

/* ===== Section dividers / ornaments ===== */
.divider { width: 100%; height: 36px; display: block; color: var(--saffron); }
.ornament { width: 54px; height: 54px; color: var(--rust); }

/* ===== Bento grid (home) ===== */
.bento { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(160px, auto); }
.bento-tile { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--cream-deep); box-shadow: var(--shadow-2); }
.bento-feature { grid-column: span 4; grid-row: span 2; background: var(--indigo); color: var(--cream); padding: clamp(1.5rem, 4vw, 2.6rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.bento-tile.img-tile { padding: 0; }
.bento-tile.img-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.bento-tile.img-tile:hover img { transform: scale(1.06); }
.bento-card { grid-column: span 2; padding: 1.4rem; display: flex; flex-direction: column; gap: .5rem; transition: transform .3s var(--ease); }
.bento-card:hover, .bento-tile:hover { transform: translateY(-4px); }
@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-feature { grid-column: span 2; }
  .bento-card { grid-column: span 2; }
}

/* ===== Compass (signature feature) ===== */
.compass { background: var(--cream-deep); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2rem); }
.compass-grid { display: grid; gap: 1.2rem; grid-template-columns: 1fr 1fr; margin-block: 1.2rem; }
.compass-group { display: flex; flex-direction: column; gap: .5rem; }
.compass-group legend { font-weight: 700; margin-bottom: .3rem; font-family: var(--font-display); }
.chip-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.chip { border: 2px solid var(--indigo); border-radius: 999px; padding: .45rem 1rem; cursor: pointer; font-size: .9rem; background: transparent; min-height: 44px; }
.chip[aria-pressed="true"] { background: var(--indigo); color: var(--cream); }
.compass-result { margin-top: 1rem; padding: 1.2rem; background: var(--cream); border-radius: var(--radius); border: 1px dashed var(--rust); display: none; gap: 1rem; align-items: center; }
.compass-result.is-visible { display: flex; }
.compass-result img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
@media (max-width: 640px) { .compass-grid { grid-template-columns: 1fr; } }

/* ===== Cards / product grid ===== */
.card-grid { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-2); transition: transform .3s var(--ease), box-shadow .3s var(--ease); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-1); }
.product-card .thumb { aspect-ratio: 4/3; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.08); }
.product-card .body { padding: 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-card .price { font-weight: 700; color: var(--rust-dark); font-family: var(--font-display); font-size: 1.1rem; }
.strip { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
.strip .product-card { min-width: 230px; scroll-snap-align: start; }

/* ===== Generic inner-page components ===== */
.page-hero { background: var(--indigo); color: var(--cream); padding-block: clamp(2.5rem, 6vw, 4rem); }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.breadcrumbs { font-size: .85rem; opacity: .85; display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .4rem; }
.breadcrumbs a { text-decoration: underline; }
main { display: block; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { max-width: 52ch; margin-bottom: 2rem; }
.prose { max-width: var(--measure); }
.prose h2 { margin-top: 1.8em; font-size: 1.5rem; }
.prose h3 { font-size: 1.15rem; }
.prose ul { padding-left: 1.3rem; margin-bottom: 1em; list-style: disc; }
.prose li { margin-bottom: .4em; }
.legal-toc { background: var(--cream-deep); border-radius: var(--radius); padding: 1.2rem 1.5rem; max-width: var(--measure); margin-bottom: 2rem; }
.legal-toc li { margin-bottom: .3em; }
.legal-toc a { text-decoration: underline; }

.notice { border-radius: var(--radius); padding: 1rem 1.2rem; border: 1px solid var(--line); background: var(--cream-deep); margin-bottom: 1.2rem; }
.notice-success { background: #e4f1e2; border-color: #8fb98a; }
.notice-error { background: #f6dede; border-color: #c97a7a; }

/* forms */
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); max-width: 640px; }
.form-grid .field.full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; font: inherit;
  background: #fff; accent-color: var(--rust); min-height: 44px;
}
.field textarea { min-height: 110px; resize: vertical; }
.field-error { color: #9c2b2b; font-size: .82rem; min-height: 1.1em; }
.field.has-error input, .field.has-error textarea { border-color: #9c2b2b; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* contact layout */
.contact-layout { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 820px) { .contact-layout { grid-template-columns: 1fr; } }

/* faq */
.faq-item { border-bottom: 1px solid var(--line); padding-block: .4rem; }
.faq-item summary { cursor: pointer; font-weight: 600; padding: .8rem .2rem; list-style: none; display: flex; justify-content: space-between; gap: 1rem; min-height: 44px; align-items: center; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--rust); transition: transform .3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 1rem; max-width: var(--measure); }

/* product detail */
.product-detail { display: grid; gap: 2.5rem; grid-template-columns: 1fr 1fr; align-items: start; }
.product-detail .gallery img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; }
.product-detail .price { font-size: 1.8rem; color: var(--rust-dark); font-family: var(--font-display); }
.qty-row { display: flex; align-items: center; gap: .8rem; margin-block: 1rem; }
.qty-row input { width: 70px; text-align: center; }
@media (max-width: 820px) { .product-detail { grid-template-columns: 1fr; } }

/* cart */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.cart-table th, .cart-table td { text-align: left; padding: .8rem .5rem; border-bottom: 1px solid var(--line); }
.cart-table img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cart-summary { max-width: 360px; margin-left: auto; background: var(--cream-deep); border-radius: var(--radius); padding: 1.4rem; }
.cart-summary .total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-top: .6rem; }
.cart-empty { text-align: center; padding: 3rem 1rem; }

/* footer */
.site-footer { background: var(--indigo); color: var(--cream); margin-top: 4rem; padding-block: 3rem 1.6rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(4, 1fr); }
.footer-grid h4 { color: var(--saffron); font-size: 1rem; }
.footer-grid ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-grid a:hover { text-decoration: underline; }
.newsletter-form { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter-form input { flex: 1; min-width: 160px; border-radius: 8px; border: 1px solid var(--slate); padding: .6rem .8rem; min-height: 44px; }
.footer-bottom { border-top: 1px solid var(--slate); margin-top: 2.2rem; padding-top: 1.2rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; opacity: .85; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }

/* cookie banner */
.cookie-banner { position: fixed; inset: auto 1rem 1rem 1rem; z-index: 100; background: var(--indigo); color: var(--cream); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow-1); display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; justify-content: space-between; max-width: 760px; margin-inline: auto; }
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: .9rem; }
.cookie-actions { display: flex; gap: .7rem; flex-wrap: wrap; }

/* toast */
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: .8rem 1.3rem; border-radius: 999px; opacity: 0; transition: opacity .3s, transform .3s; z-index: 200; font-size: .9rem; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* utilities */
.u-center { text-align: center; }
.u-mt-0 { margin-top: 0; }
.u-mb-0 { margin-bottom: 0; }
.u-flex { display: flex; gap: 1rem; flex-wrap: wrap; }
.u-grid-2 { display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 700px) { .u-grid-2 { grid-template-columns: 1fr; } }
.visually-hidden { position: absolute; left: -9999px; }

/* ===== Product card extras ===== */
.product-card-inner { display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-price { font-weight: 700; color: var(--rust-dark); font-family: var(--font-display); font-size: 0.95rem; }
.product-desc { font-size: 0.9rem; color: var(--slate); margin: 0; }
.product-price-large { font-weight: 700; color: var(--rust-dark); font-family: var(--font-display); font-size: 1.8rem; }
.product-info { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.product-info p { font-size: 0.95rem; }

/* COMPONENTS:
.wrap - centered max-width content container
.site-header - sticky top header bar
.logo - logo mark + wordmark
.nav-toggle - mobile menu button
.main-nav - nav list, becomes off-canvas drawer on mobile
.cart-link - header cart pill with count badge
.btn / .btn-primary / .btn-ghost / .btn-ghost-dark / .btn-small - button variants with fill-sweep hover
.reveal / .reveal-stagger - scroll reveal animation hooks
.hero / .hero-clip / .hero-art / .hero-actions / .hero-grain - home hero section
.divider / .ornament - decorative SVG dividers and seals
.bento / .bento-tile / .bento-feature / .bento-card / .img-tile - home bento grid
.compass / .compass-grid / .compass-group / .chip-row / .chip / .compass-result - Čajni Kompas signature feature
.card-grid / .product-card / .strip - product listing grid and mobile scroll-snap strip
.page-hero - inner page hero banner
.breadcrumbs - breadcrumb trail
.section / .section-head - generic page section spacing
.prose - readable long-form text column for legal pages
.legal-toc - table of contents box for legal pages
.notice / .notice-success / .notice-error - inline alert boxes
.form-grid / .field / .field-error / .hp-field - form layout, field wrapper, error text, honeypot
.contact-layout - two-column contact page layout
.faq / .faq-item - FAQ accordion (details/summary)
.product-detail / .gallery / .qty-row - product page layout
.cart-table / .cart-summary / .cart-empty - cart/checkout page
.site-footer / .footer-grid / .newsletter-form / .footer-bottom - site footer
.cookie-banner / .cookie-actions - cookie consent banner
.toast - transient confirmation message
.u-center / .u-flex / .u-grid-2 / .u-mt-0 / .u-mb-0 / .visually-hidden - layout utilities
*/
