:root {
  color-scheme: light;
  --paper: #fdfaf7;
  --ink: #29201e;
  --muted: #64544f;
  --accent: #762f3b;
  --line: #e5d9d2;
  --wa: #1f7a4c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.notice {
  background: #2d2123;
  color: #fff5ef;
  text-align: center;
  padding: 9px 16px;
  font-size: .85rem;
  letter-spacing: .02em;
}
.header {
  min-height: 75px;
  padding: 16px clamp(18px, 5vw, 84px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 10;
}
.wordmark {
  font: 700 clamp(1.2rem, 3vw, 1.65rem)/1 Georgia, "Times New Roman", serif;
  letter-spacing: .14em;
  text-decoration: none;
}
.header nav {
  display: flex;
  align-items: center;
  gap: clamp(10px, 2.4vw, 28px);
  font-size: .875rem;
  white-space: nowrap;
}
.header nav a { text-decoration: none; }
.header nav a:hover { text-decoration: underline; }
.wa-nav { color: var(--wa); font-weight: 600; }

.lang-wrap select {
  appearance: auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  font-size: .82rem;
  border-radius: 3px;
  cursor: pointer;
}

.bag-link {
  border: 0;
  background: none;
  padding: 6px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.bag-badge {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0dfdd;
  color: #5e2330;
  font-weight: 600;
  font-size: .8rem;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #f3e6e0;
}
.hero-copy {
  align-self: center;
  padding: clamp(36px, 7vw, 100px) clamp(22px, 7vw, 100px);
}
.eyebrow {
  font: 700 .85rem/1.4 Georgia, serif;
  letter-spacing: .18em;
  color: var(--accent);
}
h1, h2, h3, p { margin-block: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h1 {
  font-size: clamp(2.2rem, 5.2vw, 4.6rem);
  line-height: 1.08;
  margin: 16px 0 20px;
}
.hero-copy > p:not(.eyebrow) {
  max-width: 30em;
  color: var(--muted);
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}
.solid {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  min-height: 44px;
  border: 1px solid var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
}
.solid:hover { background: #5b202a; }
.outline {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: transparent;
  color: var(--ink);
  padding: 12px 20px;
  min-height: 44px;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
}
.outline:hover { background: var(--ink); color: #fff; }

.hero-image { min-width: 0; }
.hero-image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 620px;
  min-height: 400px;
  object-fit: cover;
  object-position: center;
}

.collection {
  max-width: 1440px;
  margin: auto;
  padding: clamp(35px, 6vw, 84px) clamp(18px, 5vw, 84px);
}
.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
}
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 14px;
  font-size: .875rem;
  min-height: 36px;
}
.filters button[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 32px);
}
.product { min-width: 0; }
.product-photo {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  width: 100%;
  background: #f2e5df;
  overflow: hidden;
}
.photo-count-badge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  background: rgba(41, 32, 30, 0.72);
  color: #fff;
  font-size: .72rem;
  padding: 3px 8px;
  border-radius: 999px;
  pointer-events: none;
}
.product-photo img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform .25s;
}
.product-photo:hover img { transform: scale(1.035); }
.product-body { padding-top: 16px; }
.category {
  color: var(--accent);
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
h3 { margin-block: 6px 6px; font-size: 1.08rem; }
h3 button {
  background: none;
  border: none;
  text-align: left;
  padding: 0;
  font-weight: 600;
}
h3 button:hover { text-decoration: underline; }
.description { line-height: 1.55; color: var(--muted); font-size: .92rem; }
.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.price {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.sku-tag {
  color: var(--muted);
  font-size: .78rem;
}

.info-strip {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px clamp(18px, 5vw, 84px) 60px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  border-top: 1px solid var(--line);
}
.info-item h3 {
  font-family: Georgia, serif;
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.info-item p {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.6;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  gap: 15px;
  color: var(--muted);
  padding: 26px clamp(18px, 5vw, 84px);
  font-size: .875rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.footer-links a {
  color: var(--wa);
  font-weight: 600;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }

dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(92vw, 760px);
  max-height: 88dvh;
  padding: 0;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(25, 16, 15, .28);
  overflow: hidden;
  overscroll-behavior: contain;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: rgba(35, 25, 26, .62);
}
.dialog-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 12px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  flex: 0 0 auto;
}
.dialog-bar h2 {
  font-size: 1.25rem;
  margin: 0;
}
.dialog-bar form { margin: 0; }
.dialog-body {
  padding: 22px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}
.close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
}
.close:hover { background: #efe4de; }
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 24px;
}
.detail-gallery { min-width: 0; }
.gallery-stage {
  position: relative;
  background: #f2e5df;
  overflow: hidden;
}
.gallery-stage img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(253, 250, 247, 0.88);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  display: grid;
  place-items: center;
}
.gallery-nav:hover { background: #fff; }
.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }
.gallery-nav[hidden] { display: none; }
.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.gallery-thumbs[hidden] { display: none; }
.gallery-thumb {
  width: 60px;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  background: #f2e5df;
  overflow: hidden;
}
.gallery-thumb[aria-current="true"] { border-color: var(--accent); }
.gallery-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.detail-layout h2 { font-size: 1.55rem; margin: 6px 0 10px; }
.detail-layout p { line-height: 1.6; }
.detail-price { font-size: 1.25rem; margin-top: 14px; }
.sku { color: var(--muted); font-size: .85rem; margin-block: 8px 16px; }
.detail-actions { display: flex; flex-direction: column; gap: 10px; }

#bag-dialog { width: min(92vw, 520px); }
.bag-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.bag-item button {
  border: 1px solid var(--line);
  background: none;
  padding: 5px 10px;
  font-size: .82rem;
}
.bag-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0 4px;
  font-size: 1rem;
}
.bag-wa-btn { width: 100%; background: var(--wa); border-color: var(--wa); }
.bag-wa-btn:hover { background: #165e39; }
.empty { margin-top: 14px; color: var(--muted); }

.fab-wa {
  position: fixed;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: .88rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .2);
}
.fab-wa:hover { background: #165e39; }

@media (max-width: 780px) {
  html, body { overflow-x: hidden; }
  .notice { font-size: .76rem; padding: 8px 12px; }
  .header { min-height: 60px; padding: 12px 16px; gap: 10px; }
  .wordmark { font-size: 1.15rem; letter-spacing: .12em; }
  .header nav { gap: 10px; }
  .wa-nav { display: none; }
  .lang-wrap select { padding: 6px 6px; font-size: .78rem; max-width: 112px; }

  .hero { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .hero-image img { min-height: 0; max-height: 320px; aspect-ratio: 4 / 3; }
  .hero-copy { padding: 24px 16px 30px; }
  h1 { font-size: 2rem; margin: 10px 0 12px; }
  .hero-actions { margin-top: 18px; }
  .hero-actions a { flex: 1 1 140px; }

  .collection { padding: 28px 14px 40px; }
  .collection-head { margin-bottom: 18px; gap: 12px; }
  .filters {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filters button { flex: 0 0 auto; padding: 8px 14px; }

  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-body { padding-top: 10px; }
  .category { font-size: .72rem; }
  h3 { font-size: .95rem; margin-block: 4px; }
  .description { font-size: .8rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .price-row { flex-direction: column; gap: 2px; margin-top: 8px; }
  .price { font-size: .95rem; }
  .sku-tag { font-size: .72rem; }

  .info-strip { grid-template-columns: 1fr; padding: 26px 16px 36px; gap: 18px; }
  footer { padding: 22px 16px calc(76px + env(safe-area-inset-bottom, 0px)); font-size: .8rem; }
  .fab-wa { display: inline-flex; }
}

@media (max-width: 640px) {
  .header nav > a[href="#collection"] { display: none; }
  dialog {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 86dvh;
    border-radius: 12px;
  }
  .dialog-bar { padding: 10px 10px 10px 16px; }
  .dialog-body { padding: 14px 16px 18px; }
  .close { width: 42px; height: 42px; font-size: 1.65rem; }
  .detail-layout { grid-template-columns: 1fr; gap: 14px; }
  .gallery-stage img {
    aspect-ratio: auto;
    max-height: 38dvh;
    width: 100%;
    object-fit: contain;
    background: #f2e5df;
  }
  .gallery-nav { width: 40px; height: 40px; font-size: 1.45rem; }
  .gallery-thumb { width: 50px; height: 50px; }
  .detail-layout h2 { font-size: 1.25rem; margin: 0 0 6px; }
  .detail-layout p { font-size: .9rem; line-height: 1.5; }
  .detail-price { font-size: 1.15rem; margin-top: 10px; }
  .sku { margin-block: 6px 12px; }
  .detail-actions .solid, .detail-actions .outline { width: 100%; min-height: 46px; }
}

@media (max-width: 340px) {
  .products { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .product-photo img { transition: none; }
}
