:root {
  --ink: #231b17;
  --muted: #746860;
  --cream: #f7f3ee;
  --paper: #fffdf9;
  --brown: #70442f;
  --brown-dark: #3f2519;
  --camel: #b78b67;
  --line: #e1d8d0;
  --green: #325c49;
  --shadow: 0 18px 50px rgba(50, 30, 19, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  line-height: 1.5;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.shell { width: min(1440px, calc(100% - 48px)); margin-inline: auto; }

.notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 18px;
  color: #f4e9df;
  background: var(--brown-dark);
  font-size: 11px;
  letter-spacing: .035em;
  text-align: center;
}
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: #d9ad84; box-shadow: 0 0 0 4px rgba(217,173,132,.13); }

.site-header { position: sticky; top: 0; z-index: 30; background: rgba(255,253,249,.97); box-shadow: 0 2px 18px rgba(58,35,22,.07); backdrop-filter: blur(14px); }
.header-main { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 30px; min-height: 88px; }
.brand { display: flex; align-items: center; gap: 13px; width: max-content; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--brown); border-radius: 50%; color: var(--brown); font-family: Georgia, serif; font-size: 13px; }
.brand strong { display: block; font-family: Georgia, serif; font-size: 20px; font-weight: 500; letter-spacing: .025em; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.search-box { position: relative; display: block; }
.search-box span { position: absolute; top: 6px; left: 13px; color: var(--brown); font-size: 23px; }
.search-box input { width: 280px; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: 999px; outline: 0; background: #fff; }
.search-box input:focus { border-color: var(--camel); box-shadow: 0 0 0 3px rgba(183,139,103,.14); }
.share-button { height: 42px; padding: 0 18px; border: 0; border-radius: 999px; color: #fff; background: var(--brown); cursor: pointer; }
.share-button:hover { background: var(--brown-dark); }
.mobile-toggle { display: none; border: 0; background: none; font-size: 23px; cursor: pointer; }

.main-nav { border-top: 1px solid #eee7e1; }
.nav-inner { display: flex; align-items: stretch; justify-content: center; min-height: 48px; }
.nav-item { position: relative; }
.nav-button { display: flex; align-items: center; gap: 7px; height: 48px; padding: 0 22px; border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.nav-button:hover, .nav-button.active { color: var(--brown); border-bottom-color: var(--brown); }
.nav-button .chevron { color: var(--muted); font-size: 9px; }
.dropdown { position: absolute; top: calc(100% - 1px); left: 50%; display: none; min-width: 255px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 12px 12px; background: var(--paper); box-shadow: var(--shadow); transform: translateX(-50%); }
.nav-item:hover .dropdown, .nav-item:focus-within .dropdown { display: block; }
.dropdown button { display: flex; justify-content: space-between; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none; cursor: pointer; text-align: left; font-size: 13px; }
.dropdown button:hover, .dropdown button.active { color: var(--brown); background: #f4ede7; }
.menu-count { color: #9a8c82; font-variant-numeric: tabular-nums; }

.category-hero { overflow: hidden; color: #fff; background: linear-gradient(110deg, #44291d, #77503a 68%, #9d7458); }
.hero-inner { position: relative; display: flex; align-items: end; justify-content: space-between; gap: 40px; min-height: 270px; padding-top: 48px; padding-bottom: 48px; }
.hero-inner::after { content: ""; position: absolute; right: 7%; bottom: -220px; width: 440px; height: 440px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 55px rgba(255,255,255,.025), 0 0 0 115px rgba(255,255,255,.015); }
.breadcrumb { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 7px; min-height: 22px; color: rgba(255,255,255,.7); font-size: 11px; }
.breadcrumb button { padding: 0; border: 0; color: inherit; background: none; cursor: pointer; }
.breadcrumb button:hover { color: #fff; }
.eyebrow { position: relative; z-index: 1; margin: 22px 0 9px; color: #e4c8b2; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1 { position: relative; z-index: 1; max-width: 900px; margin: 0; font-family: Georgia, serif; font-size: clamp(38px, 5vw, 66px); font-weight: 400; letter-spacing: -.03em; line-height: 1.04; }
.category-intro { position: relative; z-index: 1; max-width: 720px; margin: 16px 0 0; color: rgba(255,255,255,.72); font-size: 14px; }
.hero-count { position: relative; z-index: 1; min-width: 150px; text-align: right; }
.hero-count strong { display: block; font-family: Georgia, serif; font-size: 58px; font-weight: 400; line-height: .9; }
.hero-count span { color: rgba(255,255,255,.67); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.catalog-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 38px; padding-top: 42px; padding-bottom: 80px; }
.sidebar { align-self: start; position: sticky; top: 170px; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.sidebar-head span { font-family: Georgia, serif; font-size: 20px; }
.sidebar-head button { padding: 0; border: 0; color: var(--brown); background: none; cursor: pointer; font-size: 11px; }
.side-group { padding: 16px 0; border-bottom: 1px solid var(--line); }
.side-group > button { display: flex; justify-content: space-between; width: 100%; padding: 6px 0; border: 0; background: none; cursor: pointer; text-align: left; font-weight: 650; }
.side-group > button.active, .side-group .side-child.active { color: var(--brown); }
.side-children { margin-top: 5px; }
.side-child { display: flex; justify-content: space-between; width: 100%; padding: 6px 0 6px 13px; border: 0; color: var(--muted); background: none; cursor: pointer; text-align: left; font-size: 12px; }
.side-child:hover { color: var(--brown); }
.sidebar-note { margin-top: 24px; padding: 16px; border-radius: 10px; color: #f5ece5; background: var(--brown-dark); font-size: 11px; }
.sidebar-note strong { display: block; margin-bottom: 6px; font-size: 12px; }
.sidebar-note p { margin: 0; color: rgba(255,255,255,.7); }

.catalog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 40px; margin-bottom: 18px; color: var(--muted); font-size: 12px; }
.catalog-toolbar p { margin: 0; }
.catalog-toolbar strong { color: var(--ink); font-size: 14px; }
.sort-control { display: flex; align-items: center; gap: 8px; }
.sort-control select { padding: 8px 32px 8px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
.active-filter { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 8px 9px 8px 13px; border-radius: 999px; color: var(--brown); background: #eadfd5; font-size: 12px; }
.active-filter button { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(112,68,47,.13); cursor: pointer; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 18px; }
.product-card { min-width: 0; }
.product-image { position: relative; overflow: hidden; aspect-ratio: 1 / 1.06; border: 1px solid #ebe2db; border-radius: 9px; background: #fff; cursor: pointer; }
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 10px; transition: transform .35s ease; }
.product-card:hover .product-image img { transform: scale(1.035); }
.gender-badge { position: absolute; top: 10px; left: 10px; padding: 5px 8px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; color: #fff; background: rgba(63,37,25,.72); backdrop-filter: blur(7px); font-size: 9px; letter-spacing: .05em; }
.details-button { position: absolute; right: 10px; bottom: 10px; padding: 7px 10px; border: 0; border-radius: 999px; color: var(--brown-dark); background: rgba(255,255,255,.92); box-shadow: 0 4px 15px rgba(43,25,16,.12); cursor: pointer; font-size: 10px; opacity: 0; transform: translateY(4px); transition: .2s ease; }
.product-card:hover .details-button, .details-button:focus { opacity: 1; transform: none; }
.product-info { padding: 12px 3px 0; }
.product-info h2 { min-height: 40px; margin: 0; font-family: Georgia, serif; font-size: 15px; font-weight: 500; line-height: 1.32; }
.product-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.category-preview { overflow: hidden; margin-top: 8px; color: var(--brown); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.empty-state { padding: 80px 20px; border: 1px dashed #cfbfb2; border-radius: 12px; text-align: center; }
.empty-state strong { font-family: Georgia, serif; font-size: 26px; }
.empty-state p { color: var(--muted); }
.empty-state button { padding: 10px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--brown); cursor: pointer; }

.product-dialog { width: min(860px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 16px; color: var(--ink); background: var(--paper); box-shadow: 0 30px 90px rgba(35,20,12,.32); }
.product-dialog::backdrop { background: rgba(27,18,13,.65); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); cursor: pointer; font-size: 22px; }
.dialog-grid { display: grid; grid-template-columns: 42% 58%; }
.dialog-image { display: grid; place-items: center; min-height: 500px; padding: 24px; background: #f1e9e2; }
.dialog-image img { max-width: 100%; max-height: 450px; object-fit: contain; }
.dialog-copy { padding: 48px 42px; }
.dialog-copy .sku { color: var(--muted); font-size: 11px; }
.dialog-copy h2 { margin: 8px 0 22px; font-family: Georgia, serif; font-size: 32px; font-weight: 400; line-height: 1.1; }
.dialog-copy h3 { margin: 20px 0 8px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { padding: 6px 9px; border-radius: 999px; color: var(--green); background: #e4eee9; font-size: 10px; }
.old-tag { color: #796b61; background: #eee8e3; }
.dialog-footnote { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.mobile-panel, .mobile-backdrop { display: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; padding: 12px 16px; border-radius: 8px; color: #fff; background: var(--green); box-shadow: var(--shadow); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.show { opacity: 1; transform: none; }
footer { padding: 26px 0; color: rgba(255,255,255,.68); background: #2d1e17; font-size: 11px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-button { padding-inline: 14px; }
}

@media (max-width: 900px) {
  .shell { width: min(100% - 28px, 720px); }
  .site-header { top: 0; }
  .header-main { grid-template-columns: auto 1fr auto; min-height: 72px; gap: 12px; }
  .mobile-toggle { display: block; }
  .brand small { display: none; }
  .brand strong { font-size: 16px; }
  .brand-mark { width: 40px; height: 40px; font-size: 11px; }
  .main-nav, .share-button { display: none; }
  .header-actions { justify-self: end; }
  .search-box input { width: min(36vw, 240px); }
  .category-hero { margin-top: 0; }
  .hero-inner { min-height: 230px; padding-block: 38px; }
  .hero-count { min-width: 95px; }
  .hero-count strong { font-size: 44px; }
  .catalog-layout { display: block; padding-top: 28px; }
  .sidebar { display: none; }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mobile-panel { position: fixed; inset: 0 auto 0 0; z-index: 60; display: block; overflow-y: auto; width: min(360px, 88vw); padding: 24px; background: var(--paper); box-shadow: 10px 0 40px rgba(35,20,12,.22); transform: translateX(-105%); transition: transform .25s ease; }
  .mobile-panel.open { transform: none; }
  .mobile-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-family: Georgia, serif; font-size: 23px; }
  .mobile-panel-head button { border: 0; background: none; cursor: pointer; font-size: 28px; }
  .mobile-menu-group { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .mobile-menu-group > button { width: 100%; padding: 4px 0; border: 0; background: none; text-align: left; font-weight: 700; }
  .mobile-menu-children { margin-top: 8px; }
  .mobile-menu-children button { display: flex; justify-content: space-between; width: 100%; padding: 8px 0 8px 14px; border: 0; color: var(--muted); background: none; text-align: left; }
  .mobile-backdrop { position: fixed; inset: 0; z-index: 50; width: 100%; border: 0; background: rgba(30,19,13,.5); }
  .mobile-backdrop.open { display: block; }
}

@media (max-width: 640px) {
  .notice { font-size: 9px; }
  .header-main { grid-template-columns: auto 1fr auto; }
  .brand span:last-child { display: none; }
  .search-box input { width: 47vw; }
  .hero-inner { display: block; min-height: 255px; }
  .hero-count { margin-top: 25px; text-align: left; }
  .category-intro { font-size: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 10px; }
  .product-info h2 { font-size: 13px; }
  .catalog-toolbar { align-items: end; }
  .sort-control { display: block; text-align: right; }
  .sort-control select { display: block; margin-top: 4px; max-width: 132px; }
  .dialog-grid { display: block; }
  .dialog-image { min-height: 310px; }
  .dialog-image img { max-height: 280px; }
  .dialog-copy { padding: 30px 24px; }
  .footer-inner { display: block; }
  .footer-inner span { display: block; margin: 4px 0; }
}
