/* KozTex — editorial design system (see DESIGN.md) */
:root {
  --wine: #8E2D3D; --wine-deep: #6F2230; --rose: #D29AA0; --rose-soft: #EFDAD7;
  --cream: #FBF5F1; --ivory: #F4ECE1; --card: #FFFFFF; --ink: #3A2A2C; --muted: #6E5856;
  --wa: #1A7F37;
  --shadow-card: 0 6px 24px rgba(142,45,61,.10); --shadow-pop: 0 14px 44px rgba(58,42,44,.20);
  --serif: "Cormorant Garamond", Georgia, serif; --sans: "Mulish", system-ui, sans-serif;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.65; }
h1,h2,h3 { font-family: var(--serif); font-weight: 600; color: var(--wine); margin: 0; line-height: 1.08; }
a { color: var(--wine); text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.eyebrow { font-family: var(--serif); text-transform: uppercase; letter-spacing: .2em; font-size: 13px; font-weight: 600; color: var(--wine); margin: 0; }
.eyebrow.light, .light { color: var(--cream); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 700; font-size: 14px; letter-spacing: .03em; border: 0; border-radius: 7px; padding: 13px 26px; cursor: pointer; transition: .16s; }
.btn-wine { background: var(--wine); color: var(--cream); }
.btn-wine:hover { background: var(--wine-deep); }
.btn-cream { background: var(--cream); color: var(--wine); }
.btn-cream:hover { background: #fff; }
.btn-out { background: transparent; color: var(--wine); border: 1px solid var(--wine); }
.btn-out:hover { background: var(--rose-soft); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { filter: brightness(.94); }

/* topbar + header */
.topbar { background: var(--wine-deep); color: var(--rose-soft); text-align: center; font-size: 12.5px; letter-spacing: .04em; padding: 8px 16px; }
.hdr { position: sticky; top: 0; z-index: 40; background: rgba(251,245,241,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rose-soft); }
.hdr .wrap { display: flex; align-items: center; justify-content: space-between; height: 86px; gap: 20px; }
.brand img { height: 74px; width: auto; }
.mainnav { display: flex; gap: 26px; }
.mainnav a { font-family: var(--serif); font-size: 18px; color: var(--ink); padding: 11px 6px; }
.mainnav a:hover { color: var(--wine); }
.cartbtn { background: none; border: 0; cursor: pointer; color: var(--wine); font-family: var(--serif); font-size: 17px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.cartcount { background: var(--wine); color: var(--cream); font-family: var(--sans); font-size: 12px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0 5px; }

/* hero (full-bleed image + overlay) */
.hero { position: relative; height: 80vh; min-height: 520px; max-height: 760px; overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay { position: absolute; inset: 0; display: flex; align-items: center; background: linear-gradient(90deg, rgba(58,28,32,.62) 0%, rgba(58,28,32,.35) 45%, rgba(58,28,32,.05) 100%); }
.hero-inner { max-width: var(--max); margin: 0 auto; padding: 0 24px; width: 100%; }
.hero h1 { color: var(--cream); font-size: clamp(46px, 7vw, 86px); margin: 10px 0 16px; }
.hero .lede { max-width: 480px; font-size: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* sections */
.section { padding: 76px 0; }
.section.ivory { background: var(--ivory); }
.center-head { text-align: center; margin-bottom: 36px; }
.center-head h2 { font-size: clamp(30px, 4vw, 44px); margin-top: 6px; }
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* category tiles */
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tile { position: relative; aspect-ratio: 3/4; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.06); }
.tile-label { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 18px; color: #fff; font-family: var(--serif); font-size: 24px; background: linear-gradient(0deg, rgba(58,28,32,.66) 0%, rgba(58,28,32,0) 55%); }
.tile-label small { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; opacity: .9; margin-top: 2px; }

/* featured rail */
.rail { display: flex; gap: 22px; overflow-x: auto; padding: 4px 24px 24px; scroll-snap-type: x mandatory; scrollbar-width: none; max-width: var(--max); margin: 0 auto; }
.rail::-webkit-scrollbar { display: none; }
.rail .card { flex: 0 0 270px; scroll-snap-align: start; }

/* product cards + grid */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-card); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-pop); }
.card.hidden { display: none; }
.card .ph { position: relative; aspect-ratio: 4/5; background: var(--ivory); cursor: pointer; overflow: hidden; }
.card .ph-b { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.card:hover .ph-b { opacity: 1; }
.badge { position: absolute; top: 10px; left: 10px; z-index: 2; background: rgba(251,245,241,.92); color: var(--wine); font-size: 11px; letter-spacing: .06em; font-weight: 700; padding: 4px 11px; border-radius: 999px; }
.section-intro { text-align: center; color: var(--muted); max-width: 560px; margin: 8px auto 0; font-size: 15px; }
.reassure-modal { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .ph img { transform: scale(1.05); }
.card .body { padding: 15px 17px 19px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .cat { font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--wine); font-weight: 700; }
.card h3 { font-size: 21px; cursor: pointer; }
.card .price { color: var(--muted); font-size: 14px; font-style: italic; margin-top: auto; }
.card .add { margin-top: 8px; width: 100%; justify-content: center; }
#loadMore { margin-top: 44px; }

/* inline category pills */
.cats-inline { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 38px; }
.pill { display: inline-flex; align-items: center; min-height: 44px; border: 1px solid var(--rose); background: transparent; color: var(--wine); font-family: var(--sans); font-weight: 600; font-size: 14px; padding: 0 20px; border-radius: 999px; cursor: pointer; transition: .15s; }
.pill.active { background: var(--wine); color: var(--cream); border-color: var(--wine); }
.pill.showcase { border-style: dashed; }

/* atelier band */
.atelier { display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; }
.atelier-img img { width: 100%; height: 100%; object-fit: cover; min-height: 380px; }
.atelier-text { background: var(--wine); color: var(--cream); padding: 64px clamp(30px, 6vw, 90px); display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.atelier-text .eyebrow { color: var(--rose-soft); }
.atelier-text h2 { color: var(--cream); font-size: clamp(30px, 4vw, 46px); }
.atelier-text p { max-width: 460px; }
.pillars { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 8px 0; }
.pillars li { border: 1px solid var(--rose); border-radius: 999px; padding: 6px 16px; font-size: 13px; letter-spacing: .04em; }
.atelier-text .btn-out { color: var(--cream); border-color: var(--rose-soft); align-self: flex-start; }
.atelier-text .btn-out:hover { background: rgba(255,255,255,.12); }

/* testimonials + social */
.avis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.avis-card { margin: 0; background: var(--card); border-radius: 12px; padding: 26px; box-shadow: var(--shadow-card); }
.avis-card blockquote { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--ink); }
.avis-card figcaption { margin-top: 14px; color: #A45661; font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.social { margin-top: 40px; }
.social p:last-child { font-size: 17px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(58,42,44,.55); padding: 20px; }
.modal.open { display: flex; }
.modal .box { position: relative; background: var(--card); border-radius: 14px; max-width: 920px; width: 100%; max-height: 90vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; box-shadow: var(--shadow-pop); }
.modal .gallery { background: var(--ivory); }
.modal .gallery img { width: 100%; height: 100%; max-height: 90vh; object-fit: cover; }
.modal .info { padding: 34px; display: flex; flex-direction: column; gap: 14px; }
.modal .info h2 { font-size: 32px; }
.modal .thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.modal .thumbs button { padding: 0; line-height: 0; background: none; border: 2px solid transparent; border-radius: 5px; cursor: pointer; }
.modal .thumbs button.sel { border-color: var(--wine); }
.modal .thumbs img { width: 56px; height: 70px; object-fit: cover; border-radius: 3px; display: block; }
.price-modal { font-style: italic; color: var(--muted); }
.modal-actions { display: grid; gap: 10px; order: 1; }
.modal .info .reassure-modal { order: 2; }
.modal .info .related { order: 3; }
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-top: 1px solid var(--rose-soft); }
.faq details:last-child { border-bottom: 1px solid var(--rose-soft); }
.faq summary { font-family: var(--serif); font-size: 21px; color: var(--wine); padding: 20px 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 26px; line-height: 1; color: var(--rose); transition: transform .2s ease; flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; color: var(--ink); line-height: 1.65; max-width: 64ch; }
.modal .x { position: absolute; top: 14px; right: 18px; font-size: 30px; line-height: 1; color: #fff; cursor: pointer; background: rgba(0,0,0,.25); border: 0; border-radius: 50%; width: 44px; height: 44px; }

/* drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; z-index: 70; background: var(--cream); box-shadow: var(--shadow-pop); transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column; }
.drawer.open { transform: translateX(0); }
.drawer .x { position: absolute; top: 16px; right: 18px; font-size: 28px; line-height: 1; color: var(--wine); cursor: pointer; background: none; border: 0; width: 44px; height: 44px; }
.drawer h2 { padding: 22px 56px 12px 22px; font-size: 26px; border-bottom: 1px solid var(--rose-soft); }
.drawer .items { flex: 1; overflow: auto; padding: 8px 22px; }
.drawer .row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rose-soft); }
.drawer .row img { width: 56px; height: 70px; object-fit: cover; border-radius: 5px; }
.drawer .row .t { flex: 1; font-family: var(--serif); font-size: 18px; }
.drawer .row .sub { font-size: 12px; color: var(--muted); }
.drawer .qty { display: flex; align-items: center; gap: 8px; }
.drawer .qty button { width: 44px; height: 44px; border: 1px solid var(--rose); background: var(--card); color: var(--wine); border-radius: 6px; cursor: pointer; font-weight: 700; }
.drawer .rm { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.drawer .empty { padding: 40px 22px; color: var(--muted); text-align: center; }
.drawer form { padding: 16px 22px; border-top: 1px solid var(--rose-soft); display: grid; gap: 10px; background: var(--ivory); }
.drawer label { font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.drawer input, .drawer textarea { font-family: var(--sans); font-size: 15px; padding: 10px 12px; border: 1px solid var(--rose); border-radius: 6px; background: #fff; color: var(--ink); }
.drawer input:focus, .drawer textarea:focus { outline: 0; border-color: var(--wine); box-shadow: 0 0 0 3px rgba(142,45,61,.25); }
.drawer .send { width: 100%; justify-content: center; padding: 14px; font-size: 15px; }
.drawer .reassure { font-size: 12px; color: var(--muted); text-align: center; margin: 2px 0 0; }

/* fab + overlay + footer */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 50; width: 56px; height: 56px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-pop); }
.overlay { position: fixed; inset: 0; background: rgba(58,42,44,.4); z-index: 65; display: none; }
.overlay.open { display: block; }
footer { background: var(--wine-deep); color: var(--rose-soft); padding: 56px 0; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
footer h3 { color: var(--cream); font-size: 28px; margin-bottom: 10px; }
footer a { color: var(--rose-soft); display: inline-block; padding: 11px 0; }
footer a:hover { color: #fff; }
footer .col { max-width: 320px; }
.foot-eyebrow { color: var(--rose-soft); }
.divider { text-align: center; color: var(--rose); letter-spacing: .4em; }
.foot-divider { margin-top: 28px; }
.foot-copy { text-align: center; font-size: 13px; margin-top: 10px; }
.hidden { display: none; }

/* responsive */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .avis { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 760px) {
  .mainnav { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .modal .box { grid-template-columns: 1fr; }
  .atelier { grid-template-columns: 1fr; }
  .hero { height: 72vh; }
  .hero-overlay { background: linear-gradient(0deg, rgba(58,28,32,.7) 0%, rgba(58,28,32,.25) 60%); align-items: flex-end; padding-bottom: 36px; }
}

/* ---- round-2 audit: a11y, mobile nav, motion, related items ---- */
:focus-visible { outline: 3px solid var(--wine); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--wine); color: var(--cream); padding: 10px 16px; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; }
.card .ph[role="button"] { cursor: pointer; }
.navtoggle { display: none; background: none; border: 0; color: var(--wine); font-size: 26px; line-height: 1; cursor: pointer; }
.related { margin-top: 22px; border-top: 1px solid var(--rose-soft); padding-top: 18px; }
.related h3 { font-family: var(--serif); color: var(--wine); font-size: 20px; margin: 0 0 12px; }
.related-row { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; }
.related-row::-webkit-scrollbar { display: none; }
.rel { flex: 0 0 92px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.rel img { width: 92px; height: 115px; object-fit: cover; border-radius: 8px; }
.rel span { display: block; font-size: 12px; color: var(--ink); margin-top: 5px; line-height: 1.25; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}
@media (max-width: 760px) {
  .navtoggle { display: block; }
  .mainnav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--cream); border-bottom: 1px solid var(--rose-soft); padding: 4px 0; display: none; }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 13px 24px; }
  .fab { bottom: calc(20px + env(safe-area-inset-bottom)); }
  body { padding-bottom: 84px; }
  .modal .info .reassure-modal, .modal .info .related, .modal .info .modal-actions { order: 0; }
  .modal-actions { position: sticky; bottom: 0; background: var(--card); margin-top: 6px; padding: 12px 0 6px; z-index: 3; box-shadow: 0 -8px 16px rgba(58,28,32,.08); }
}
