body {
  --shop-paper: #faf8f3;
  --shop-ink: #252d29;
  --shop-muted: #596059;
  --shop-rule: #dcdad1;
  --shop-pine: #293c32;
  background: var(--shop-paper);
}

.header.shop-mast {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 15px;
  height: 85px;
  padding: 0 max(4.8%, calc((100% - 1446px) / 2));
  background: var(--shop-paper);
  color: var(--shop-ink);
  border: 0;
}

.shop-mast .brand {
  justify-self: center;
  gap: 10px;
  white-space: nowrap;
}
.shop-mast .brand svg { width: 33px; height: 29px; }
.shop-mast .brand > span { font: 600 29px/1 var(--serif); letter-spacing: .09em; }
.shop-mast .brand-tagline {
  display: block;
  margin-top: 5px;
  color: var(--shop-muted);
  font: 400 11px/1.25 var(--sans);
  text-align: center;
  letter-spacing: .08em;
}
.shop-mast nav, .shop-mast .header-actions {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.75vw, 27px);
  font-size: 13px;
}
.shop-mast .header-actions { justify-content: flex-end; }
.shop-mast .member-entry, .shop-mast .cart-button {
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  padding: 0;
  min-height: 44px;
}
.shop-mast .member-entry:hover, .shop-mast .member-entry:focus-visible,
.shop-mast .cart-button:hover {
  color: var(--shop-ink);
  background: none;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.shop-mast .cart-button { width: auto; gap: 4px; }
.shop-mast .cart-button svg { display: none; }
.shop-mast .cart-button > .cart-title, .shop-mast #cart-count {
  position: static;
  display: inline;
  width: auto;
  height: auto;
  background: none;
  color: inherit;
  font: inherit;
}
.shop-mast #cart-count::before { content: "("; }
.shop-mast #cart-count::after { content: ")"; }
.shop-mast #cart-open[aria-label="打开购物车，0件商品"] #cart-count { display: none; }
.shop-mast #search-toggle { width: 35px; height: 44px; }
.shop-mast + .search-wrap { top: 85px; background-color: #efede5; }
html:has(.shop-mast) { scroll-padding-top: 92px; }
html:has(#search-wrap:not([hidden])) { scroll-padding-top: 185px; }

#collection {
  padding: 0 min(4.8vw, 77px) clamp(48px, 6vw, 96px);
  color: var(--shop-ink);
}
#collection .category-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0 clamp(12px, 2.5vw, 45px);
  margin: 0;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid var(--shop-rule);
}
#collection .category-caption {
  color: var(--shop-muted);
  font-size: 12px;
}
#collection .category-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 0 3px;
  font-size: 13px;
  color: var(--shop-ink);
}
#collection .category-count:not([hidden]) {
  display: inline-grid;
  place-items: center;
  min-width: 2em;
  padding: 2px 6px;
  border-radius: 99px;
  background-color: #e9e8e0;
  color: #4c564c;
  font: 600 11px/1.25 var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
}
#collection .category-tabs button[aria-pressed="true"] .category-count {
  background-color: var(--shop-pine);
  color: #fff;
}
#collection .category-tabs button:hover,
.seasonal-showcase a:hover h3,
.showcase-heading a:hover,
#collection .product-topline h3 :is(a,button):hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
#collection .category-tabs button[aria-pressed="true"] { color: var(--shop-pine); }
#collection .category-tabs button[aria-pressed="true"]::after {
  inset: auto 3px 5px;
  height: 1px;
  background: var(--shop-pine);
}

.seasonal-showcase { padding: 31px 0 54px; border-bottom: 1px solid var(--shop-rule); }
.showcase-heading, .catalog-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.showcase-heading { margin-bottom: 22px; }
.showcase-heading h2, .catalog-heading h2 {
  margin: 0;
  font: 500 clamp(27px, 2.3vw, 42px)/1.2 var(--serif);
  letter-spacing: .1em;
}
.showcase-heading p { margin-top: 7px; color: var(--shop-muted); font-size: 12px; }
.showcase-heading a { padding-block: 8px; font-size: 12px; white-space: nowrap; }
.showcase-grid, #collection .product-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 35px clamp(10px, 1vw, 16px);
}
.showcase-card, .showcase-card > a { display: block; min-width: 0; }
.showcase-photo {
  position: relative;
  overflow: hidden;
  background: #eee9df;
  container-type: inline-size;
}
#collection .showcase-photo .product-shot { aspect-ratio: 4 / 5; }
.showcase-card h3 {
  margin: 11px 0 3px;
  font: 600 18px/1.3 var(--serif);
}
.showcase-meta {
  display: flex;
  gap: 4px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--shop-muted);
  font-size: 12px;
}
.showcase-price, #collection .product-topline strong {
  color: var(--shop-ink);
  font: 500 15px/1.35 var(--sans);
  font-variant-numeric: lining-nums tabular-nums;
}
#collection .showcase-photo .product-labels,
#collection .showcase-photo .factory-label {
  gap: 3px;
  font-size: clamp(8px, 4.4cqi, 11px);
  line-height: 1.4;
}
#collection .showcase-photo .product-labels { inset: 6px auto auto 6px; }
#collection .showcase-photo .factory-label { inset: auto 6px 6px auto; }
#collection .product-labels > span, #collection .factory-label {
  padding: 2px 4px;
  border-radius: 2px;
}
#collection .product-labels > span { background: rgb(42 48 42 / 92%); }
#collection .factory-label { color: #383f38; background: rgb(250 249 240 / 94%); }
.catalog-heading { margin-top: 32px; }
#collection .catalog-facets { gap: 18px; margin: 0; }
#collection .catalog-facets select {
  color: var(--shop-ink);
  background-color: var(--shop-paper);
  border-color: var(--shop-rule);
}
#collection .catalog-count, #collection .demo-note { font-size: 12px; color: var(--shop-muted); }
#collection .demo-note { margin: 10px 0 20px; }
#collection .product-card { display: flex; flex-direction: column; border: 0; background: none; }
#collection .product-image-button { container-type: inline-size; }
#collection .product-topline {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 0;
  margin: 11px 0 0;
  padding: 0;
  gap: 7px;
}
#collection .product-topline h3 { font: 600 clamp(15px, 1.15vw, 18px)/1.45 var(--serif); }
#collection .product-topline strong { margin: 0; }
#collection .product-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; margin: 5px 0 0; padding: 0; font-size: 11px; color: var(--shop-muted); }
#collection .product-meta > span:last-child { margin: 0; }
#collection :is(a, button, select):focus-visible, .shop-mast :is(a, button):focus-visible {
  outline: 2px solid #916936;
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .header.shop-mast {
    height: 61px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    padding: 0 5%;
  }
  .shop-mast .brand { grid-column: 1; grid-row: 1; justify-self: start; gap: 6px; }
  .shop-mast .brand > span { font-size: 23px; letter-spacing: .06em; }
  .shop-mast .brand-tagline { margin-top: 3px; font-size: 10px; letter-spacing: .02em; }
  .shop-mast .brand svg { width: 24px; height: 23px; }
  .header.shop-mast nav {
    position: static;
    grid-column: 2;
    justify-self: end;
    height: auto;
    font-size: 12px;
  }
  .shop-mast nav a { display: none; }
  .shop-mast nav .mast-support { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
  .shop-mast .header-actions { gap: 8px; font-size: 12px; }
  .shop-mast #search-toggle { width: 30px; }
  .shop-mast .cart-button { min-width: 34px; }
  .shop-mast + .search-wrap { top: 61px; }
  html:has(.shop-mast) { scroll-padding-top: 69px; }
  html:has(#search-wrap:not([hidden])) { scroll-padding-top: 152px; }
  #collection { padding-inline: 5%; }
  #collection .category-tabs { gap: 0 10px; justify-content: center; padding-block: 4px; }
  #collection .category-caption { display: none; }
  #collection .category-tabs button { gap: 4px; min-height: 44px; padding-inline: 2px; font-size: 12px; }
  .seasonal-showcase { padding: 24px 0 32px; }
  .showcase-heading { margin-bottom: 15px; }
  .showcase-heading h2, .catalog-heading h2 { font-size: 26px; }
  .showcase-heading p, .showcase-heading a { font-size: 11px; }
  .showcase-grid, #collection .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 27px 12px; }
  .showcase-card h3 { font-size: 17px; }
  .showcase-meta { margin-bottom: 9px; }
  #collection .showcase-photo .product-labels, #collection .showcase-photo .factory-label { font-size: 9px; }
  .catalog-heading { align-items: center; margin-top: 24px; }
  #collection .catalog-facets { flex-wrap: wrap; column-gap: 8px; row-gap: 4px; justify-content: flex-end; }
  #collection .catalog-facets label { gap: 5px; font-size: 12px; }
  #collection .catalog-facets select { min-width: 0; min-height: 38px; }
  #collection .catalog-count { font-size: 11px; }
  #collection .demo-note { font-size: 11px; margin-bottom: 16px; }
  #collection .product-topline { gap: 12px; }
  #collection .product-meta { margin-bottom: 8px; }
}

@media (max-width: 600px) {
  #collection .category-tabs {
    display: grid;
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0 4px;
  }
  #collection .category-count:not([hidden]) { padding-inline: 5px; }
}

@media (max-width: 440px) {
  .shop-mast .cart-button svg { display: block; }
  .shop-mast .cart-button > .cart-title { display: none; }
  .shop-mast #cart-count {
    position: absolute;
    top: 1px;
    right: -4px;
    padding: 1px 3px;
    border-radius: 3px;
    background: var(--shop-pine);
    color: #fff;
    font-size: 9px;
  }
  .shop-mast #cart-count::before, .shop-mast #cart-count::after { content: ""; }
}

@media (max-width: 360px) {
  #collection .category-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 380px) {
  .header.shop-mast { gap: 4px; padding-inline: 3%; }
  .shop-mast .brand { gap: 4px; }
  .shop-mast .brand > span { font-size: 19px; letter-spacing: .04em; }
  .shop-mast .brand-tagline { font-size: 9px; }
  .shop-mast .brand svg { width: 21px; }
  .shop-mast .header-actions { gap: 3px; }
  .shop-mast nav .mast-support, .catalog-heading h2 { white-space: nowrap; }
  .catalog-heading { flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
}
