:root {
  color-scheme: light;
  --ink: #30221d;
  --muted: #82736b;
  --cream: #f8f3ec;
  --paper: #fffdf9;
  --cocoa: #603b31;
  --cocoa-dark: #3e2923;
  --rose: #d7a698;
  --line: #e9dfd4;
  --sage: #73816d;
  --serif: Georgia, "Times New Roman", serif;
  font-family: "Trebuchet MS", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
a { color: inherit; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  height: 82px;
  padding: 0 7.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(96, 59, 49, .1);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  display: block;
  padding: 3px;
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}
.header-nav { display: flex; align-items: center; gap: 35px; }
.nav-link { color: var(--muted); font-size: 12px; text-decoration: none; transition: color .2s; }
.nav-link:hover, .nav-link-active { color: var(--cocoa); }
.header-note { color: var(--muted); font-family: var(--serif); font-size: 13px; font-style: italic; }
.header-note span { color: #ba7665; font-style: normal; font-size: 17px; }

.hero {
  min-height: 462px;
  padding: 62px 13% 64px 14%;
  display: grid;
  grid-template-columns: 1fr .9fr;
  align-items: center;
  gap: 5%;
  overflow: hidden;
  background: #f1e7dc;
}
.hero-copy { position: relative; z-index: 1; max-width: 510px; }
.eyebrow {
  margin: 0 0 15px;
  color: var(--sage);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  line-height: 1.5;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  margin-bottom: 18px;
  color: var(--cocoa-dark);
  font-family: var(--serif);
  font-size: clamp(47px, 5.2vw, 69px);
  font-weight: 400;
  letter-spacing: -2.7px;
  line-height: .99;
}
.hero h1 span { color: #a76e5d; font-style: italic; }
.hero-description { max-width: 380px; margin-bottom: 25px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.button {
  min-height: 44px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  text-decoration: none;
  transition: background .2s, color .2s, transform .2s;
}
.button:hover { transform: translateY(-2px); }
.button-dark { background: var(--cocoa-dark); color: #fffaf5; }
.button-dark:hover { background: #684238; }
.hero-art { position: relative; width: min(100%, 400px); height: 310px; justify-self: center; }
.hero-sun {
  position: absolute;
  top: 5px;
  right: 3%;
  width: 245px;
  height: 245px;
  border-radius: 50%;
  background: #ddbdab;
}
.hero-chocolate {
  position: absolute;
  width: 206px;
  height: 138px;
  border-radius: 18px 18px 29px 29px;
  background: linear-gradient(147deg, #91604c, #57352b 72%);
  box-shadow: 4px 19px 24px rgba(67, 38, 29, .17), inset 0 3px 4px rgba(255,255,255,.2);
}
.hero-chocolate::after {
  position: absolute;
  top: 14px;
  right: 17px;
  left: 17px;
  height: 71px;
  border: 1px solid rgba(245, 220, 200, .22);
  border-radius: 12px;
  content: "";
}
.hero-chocolate-back { top: 54px; left: 25px; transform: rotate(-15deg); }
.hero-chocolate-front { right: 7px; bottom: 29px; transform: rotate(12deg); background: linear-gradient(145deg, #684338, #39251f 75%); }
.hero-caption {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 4px;
  color: var(--cocoa);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
  line-height: 1.35;
  transform: rotate(-8deg);
}
.hero-sparkle { position: absolute; z-index: 2; color: #b77764; }
.sparkle-one { top: 7px; left: 20px; font-size: 28px; }
.sparkle-two { right: 10px; top: 62px; font-size: 18px; }

.collection-section { padding: 74px 9% 92px; background: var(--paper); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.section-heading .eyebrow { margin-bottom: 10px; }
.section-heading h2, .about-section h2, .detail-copy h1 {
  margin-bottom: 0;
  color: var(--cocoa-dark);
  font-family: var(--serif);
  font-size: clamp(34px, 4vw, 46px);
  font-weight: 400;
  letter-spacing: -1.6px;
}
.section-aside { margin: 0 2px 6px; color: var(--muted); font-family: var(--serif); font-size: 13px; font-style: italic; }
.category-list { display: flex; gap: 9px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: thin; }
.category-button {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  transition: background .2s, color .2s, border-color .2s;
}
.category-button:hover, .category-button-active { border-color: var(--cocoa); background: var(--cocoa); color: white; }
.catalog-toolbar {
  display: grid;
  grid-template-columns: minmax(210px, 1.7fr) minmax(120px, .75fr) minmax(140px, .85fr) minmax(100px, .65fr) minmax(145px, .9fr);
  gap: 9px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.search-field, .filter-field, .price-filter {
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: center;
  border: 1px solid #eee8e1;
  background: #fffdfa;
}
.search-field { gap: 9px; padding: 0 11px; }
.search-icon { color: #a98171; font-size: 22px; line-height: 1; }
.search-field input, .filter-field select {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}
.search-field input::placeholder { color: #a3968d; }
.filter-field { padding: 0 9px; }
.filter-field select { appearance: none; padding-right: 14px; background: linear-gradient(45deg, transparent 50%, #927c70 50%) calc(100% - 5px) 17px / 5px 5px no-repeat, linear-gradient(135deg, #927c70 50%, transparent 50%) 100% 17px / 5px 5px no-repeat; }
.price-filter { justify-content: space-between; gap: 5px; padding: 0 8px; color: var(--muted); font-size: 10px; }
.price-input-wrap { display: flex; align-items: center; gap: 3px; color: var(--ink); }
.price-input-wrap input { width: 47px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.results-count { margin: 17px 0 16px; color: var(--muted); font-size: 11px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 23px; }
.product-card { min-width: 0; border: 1px solid #eee7de; background: white; transition: box-shadow .22s, transform .22s; }
.product-card:hover { box-shadow: 0 12px 30px rgba(74, 47, 36, .09); transform: translateY(-3px); }
.product-image-link { position: relative; display: block; height: auto; aspect-ratio: 1 / 1; overflow: hidden; background: #fff; }
.product-image-link img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 7px 9px;
  background: rgba(255,253,249,.93);
  color: var(--cocoa);
  font-size: 9px;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.product-card-body { padding: 16px 16px 15px; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--sage); font-size: 9px; letter-spacing: .8px; text-transform: uppercase; }
.product-card h3 { margin-bottom: 7px; color: var(--cocoa-dark); font-family: var(--serif); font-size: 22px; font-weight: 400; }
.product-card-description { min-height: 38px; margin-bottom: 13px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.product-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 11px; border-top: 1px solid #f0e9e2; }
.product-price { color: var(--cocoa); font-family: var(--serif); font-size: 16px; }
.product-link { color: var(--cocoa); font-size: 10px; font-weight: 700; text-decoration: none; }
.product-link:hover { text-decoration: underline; }
.empty-state { grid-column: 1 / -1; padding: 45px 18px; border: 1px dashed var(--line); color: var(--muted); text-align: center; font-family: var(--serif); font-size: 18px; }
.notice { padding: 15px 17px; font-size: 12px; line-height: 1.6; }
.notice-error { border: 1px solid #d6a397; background: #fff5f1; color: #793b30; }
.notice-error[hidden] { display: none; }

.about-section {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
  padding: 70px 13%;
  background: #eee3d7;
}
.about-stamp {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid #b98674;
  border-radius: 50%;
  color: var(--cocoa);
  font-family: var(--serif);
  font-size: 39px;
  font-style: italic;
  transform: rotate(-12deg);
}
.about-stamp span { margin-left: -9px; color: #b77764; font-size: 17px; }
.about-section .eyebrow { margin-bottom: 10px; }
.about-section h2 { font-size: clamp(31px, 3.2vw, 40px); line-height: 1.08; }
.about-section p:not(.eyebrow) { max-width: 470px; margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.text-link { white-space: nowrap; color: var(--cocoa); font-size: 11px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link span { margin-left: 5px; }
.site-footer {
  min-height: 80px;
  padding: 18px 7.2%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #3e2923;
  color: #eadbd0;
}
.brand-footer .brand-logo { width: 64px; height: 64px; flex-basis: 64px; }
.site-footer p, .site-footer > span { margin: 0; color: #c9b6aa; font-size: 10px; }

.detail-main { min-height: calc(100vh - 162px); padding: 35px 9% 84px; background: var(--paper); }
.back-link { display: inline-block; margin-bottom: 27px; color: var(--muted); font-size: 11px; text-decoration: none; }
.back-link:hover { color: var(--cocoa); }
.back-link span { margin-right: 7px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(35px, 7vw, 90px); align-items: start; }
.detail-image-wrap { position: sticky; top: 25px; aspect-ratio: 1 / 1; min-height: 0; overflow: hidden; background: #fff; }
.detail-image-wrap:focus-visible { outline: 2px solid #9c7668; outline-offset: 3px; }
.detail-gallery-image { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.gallery-controls { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.gallery-arrow {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%;
  background: rgba(48,34,29,.65);
  color: #fff;
  font-size: 19px;
  pointer-events: auto;
  transition: background .2s, transform .2s;
}
.gallery-arrow:hover { background: rgba(48,34,29,.9); transform: scale(1.05); }
.gallery-footer { position: absolute; right: 0; bottom: 0; left: 0; min-height: 46px; padding: 9px 13px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(transparent, rgba(35,24,20,.62)); }
.gallery-dots { display: flex; align-items: center; gap: 7px; }
.gallery-dot { width: 8px; height: 8px; padding: 0; border: 1px solid white; border-radius: 50%; background: transparent; }
.gallery-dot-active { background: white; }
.gallery-counter { color: white; font-size: 10px; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
.detail-copy { padding-top: 10px; }
.detail-copy .eyebrow { margin-bottom: 12px; }
.detail-copy h1 { margin-bottom: 14px; font-size: clamp(38px, 4.5vw, 56px); }
.detail-description { max-width: 560px; margin-bottom: 24px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.option-heading { margin: 27px 0 11px; color: var(--cocoa-dark); font-family: var(--serif); font-size: 19px; font-weight: 400; }
.option-subtitle { margin: -5px 0 12px; color: var(--muted); font-size: 10px; }
.type-switch { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.type-button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  transition: background .2s, border-color .2s, color .2s;
}
.type-button:hover, .type-button-active { border-color: var(--cocoa); background: var(--cocoa); color: white; }
.filling-list { display: grid; gap: 9px; }
.filling-option {
  padding: 12px 13px;
  border: 1px solid var(--line);
  background: white;
  transition: border-color .2s, background .2s;
}
.filling-option-selected { border-color: #9c7668; background: #fffaf6; }
.filling-choice { width: 100%; padding: 0; display: flex; align-items: center; gap: 10px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.filling-choice:focus-visible { outline: 2px solid #9c7668; outline-offset: 3px; }
.filling-name { flex: 1; color: var(--ink); font-size: 11px; font-weight: 700; }
.filling-price { color: var(--cocoa); font-family: var(--serif); font-size: 15px; }
.filling-info { margin: 9px 0 0 24px; color: #72645b; font-size: 10px; line-height: 1.6; }
.filling-info > summary { color: var(--cocoa); cursor: pointer; font-weight: 700; }
.filling-description { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.filling-notes { margin-top: 7px; color: #72645b; font-size: 10px; line-height: 1.6; }
.filling-notes summary { cursor: pointer; }
.filling-notes p { margin: 5px 0 0; }
.loading-message { padding: 65px 0; color: var(--muted); font-family: var(--serif); font-size: 20px; }
.detail-error { max-width: 620px; margin-top: 20px; }

@media (max-width: 900px) {
  .hero { padding-right: 8%; padding-left: 9%; }
  .collection-section { padding-right: 6%; padding-left: 6%; }
  .catalog-toolbar { grid-template-columns: minmax(190px, 1.5fr) repeat(2, minmax(120px, 1fr)); }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-section { grid-template-columns: 80px minmax(0,1fr); padding-right: 8%; padding-left: 8%; }
  .about-stamp { width: 75px; height: 75px; font-size: 32px; }
  .about-section .text-link { grid-column: 2; }
  .detail-main { padding-right: 6%; padding-left: 6%; }
  .detail-layout { gap: 34px; }
}
@media (max-width: 620px) {
  .site-header { height: 70px; padding: 0 5%; }
  .header-nav { gap: 14px; }
  .nav-link { font-size: 10px; }
  .header-note { display: none; }
  .brand-logo { width: 58px; height: 58px; flex-basis: 58px; }
  .brand-footer .brand-logo { width: 54px; height: 54px; flex-basis: 54px; }
  .hero { min-height: auto; padding: 52px 7% 36px; grid-template-columns: 1fr; gap: 13px; }
  .hero h1 { font-size: clamp(48px, 13vw, 66px); }
  .hero-art { width: min(100%, 340px); height: 246px; }
  .hero-sun { width: 200px; height: 200px; }
  .hero-chocolate { width: 175px; height: 116px; }
  .hero-chocolate::after { height: 57px; }
  .hero-chocolate-back { top: 42px; left: 18px; }
  .hero-chocolate-front { bottom: 20px; }
  .collection-section { padding: 53px 5% 62px; }
  .section-heading { display: block; }
  .section-heading h2 { font-size: 37px; }
  .section-aside { margin-top: 11px; }
  .catalog-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; }
  .search-field { grid-column: 1 / -1; }
  .sort-field { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: 1fr; gap: 15px; }
  .product-image-link { height: auto; aspect-ratio: 1 / 1; }
  .about-section { grid-template-columns: 1fr; gap: 18px; padding: 44px 7%; }
  .about-stamp { width: 62px; height: 62px; font-size: 27px; }
  .about-stamp span { font-size: 13px; }
  .about-section .text-link { grid-column: auto; }
  .site-footer { min-height: 100px; padding: 18px 5%; flex-wrap: wrap; }
  .site-footer p { order: 3; width: 100%; }
  .detail-main { padding: 27px 5% 60px; }
  .detail-layout { grid-template-columns: 1fr; gap: 24px; }
  .detail-image-wrap { position: static; min-height: 0; }
  .detail-gallery-image { min-height: 0; max-height: none; aspect-ratio: 1 / 1; }
  .detail-copy { padding-top: 0; }
  .detail-copy h1 { font-size: 43px; }
}
