/* The storefront follows the compact three-column shelf of the original shop. */
:root {
  --display-font: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
}

.app[data-page="home"] header {
  gap: 12px;
  border-bottom-color: transparent;
}
.brand { gap: 7px; font-family: var(--display-font); font-size: 1.42rem; letter-spacing: .04em; }
.brand img { width: 32px; height: 32px; }
.app[data-page="home"] .search-link {
  width: 52%; background: var(--paper); border-color: var(--line); justify-content: flex-start;
}
.app[data-page="home"] main { padding-top: 0; }
.app[data-page="home"] .banner { border-radius: 15px; background: #203a2d; box-shadow: none; }
.banner-frame, .banner-link { min-height: 0; }
.banner-link {
  display: flex; align-items: center; min-height: clamp(202px, 53vw, 262px);
  padding: 24px clamp(19px, 5vw, 31px) 38px;
  color: #fffdf3; background: #213e2e; overflow: hidden;
}
.banner-link::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #102319d1, #11241ab0 29%, #15281b0f 72%);
}
.scene-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 58%; }
.banner-copy { width: 76%; gap: 5px; }
.banner-copy strong {
  font: 700 clamp(1.8rem, 8vw, 2.75rem)/1.24 var(--display-font); letter-spacing: .038em;
  text-wrap: balance; text-shadow: 0 2px 14px #0f211969;
}
.banner-copy > span { font-size: .86rem; color: #f5f4e9; }
.banner-copy b {
  display: inline-flex; gap: 6px; width: fit-content; align-items: center; min-height: 32px;
  margin-top: 9px; padding: 4px 12px; border-radius: 99px; color: #193d2e; background: #fffbec;
  font-size: .79rem; letter-spacing: .02em;
}
.slide-controls { inset: auto 7px 0 auto; max-width: calc(100% - 14px); background: none; padding: 0; }
.slide-controls .dot, .slide-controls .banner-pause { position: relative; }
.slide-controls .dot span { width: 12px; height: 3px; background: #ffffffba; box-shadow: 0 1px 3px #182b20; }
.slide-controls .dot[aria-pressed="true"] span { width: 23px; background: white; }
.slide-controls .banner-pause svg { padding: 4px; width: 21px; height: 21px; border-radius: 50%; background: #14291dbd; }

.home-shortcuts { gap: 0; padding: 0; border: 0; background: none; }
.home-shortcuts .shortcut-link { gap: 5px; font-size: .78rem; color: var(--ink); }
.home-shortcuts .shortcut-link > span { border-radius: 50%; width: 42px; height: 42px; background: var(--soft-strong); color: var(--brand-dark); }
.home-shortcuts .shortcut-link:nth-child(2) > span, .home-shortcuts .shortcut-link:nth-child(4) > span {
  background: var(--warm); color: var(--accent);
}
.home-shortcuts svg { width: 21px; height: 21px; }
.home-promos { gap: 8px; }
.home-promos .promo { position: relative; min-height: 69px; padding: 10px 11px; border-radius: 10px; gap: 7px; }
.home-promos .promo > svg:first-child { width: 21px; height: 21px; }
.home-promos .promo b { display: block; font-size: .94rem; }
.home-promos .promo small { font-size: .73rem; padding-top: 1px; }
.shelf-nav { padding: 0; }
.shelf-heading { display: flex; align-items: baseline; gap: 8px; }
.shelf-heading h2, .catalog-head h1 { font: 700 1.55rem/1.4 var(--display-font); color: var(--brand-dark); letter-spacing: .05em; }
.shelf-heading > small { color: var(--muted); font-size: .78rem; }
.view-toggle { font-size: .77rem; gap: 5px; color: var(--muted); }
.shelf-heading .view-toggle { margin-left: auto; align-self: center; }
.view-toggle svg { width: 15px; height: 15px; }
.list-symbol { width: 14px; height: 10px; border-block: 1.5px solid currentColor; position: relative; }
.list-symbol::before { content: ""; position: absolute; inset: 50% 0 auto; border-top: 1.5px solid currentColor; transform: translateY(-50%); }
.shelf-nav .tabs, .app:is([data-page="cat"], [data-page="search"]) #view > .tabs {
  gap: 3px; padding: 0; border-bottom: 1px solid var(--line); scrollbar-width: thin;
}
.shelf-nav .tabs button, .app:is([data-page="cat"], [data-page="search"]) #view > .tabs button {
  position: relative; flex: 0 0 auto; padding: 8px 12px; border: 0; border-radius: 0;
  max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: transparent;
}
.shelf-nav .tabs [aria-pressed="true"], .app:is([data-page="cat"], [data-page="search"]) #view > .tabs [aria-pressed="true"] {
  color: var(--brand-dark);
}
.shelf-nav .tabs [aria-pressed="true"]::after, .app:is([data-page="cat"], [data-page="search"]) #view > .tabs [aria-pressed="true"]::after {
  content: ""; position: absolute; inset: auto 15% 0; background: var(--brand); height: 3px; border-radius: 4px 4px 0 0;
}
.goods-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.goods-grid.list { grid-template-columns: 1fr; }
.goods-grid .sku { border-radius: 9px; box-shadow: none; }
.sku-photo .picture { aspect-ratio: 1; }
.goods-grid .sku-info { padding: 7px 6px 0; }
.goods-grid .sku-name { gap: 3px; }
.goods-grid .sku-name b { font-size: .84rem; line-height: 1.38; }
.goods-grid .sku-name b, .goods-grid .sku-name small {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.goods-grid .sku-name small { font-size: .70rem; line-height: 1.42; }
.goods-grid .sku-bottom { column-gap: 0; margin-right: -5px; min-height: 44px; }
.goods-grid .amount { font-size: 1.08rem; letter-spacing: -.035em; }
.goods-grid .amount small { font-size: .7em; }
.goods-grid .quick { width: 44px; height: 44px; background: transparent; color: var(--on-brand); }
.goods-grid .quick svg { padding: 4px; width: 24px; height: 24px; color: var(--on-brand); border-radius: 50%; background: var(--brand); }
.goods-grid .quick:hover svg, .goods-grid .quick:focus-visible svg { background: var(--brand-dark); }
.goods-grid.list .sku { grid-template-columns: minmax(80px, 26%) minmax(0, 1fr); }
.goods-grid.list .sku-info { padding: 10px 13px 4px; }
.goods-grid.list .sku-photo .picture { min-height: 95px; height: 100%; }
.goods-grid.list .sku-photo img { object-fit: contain; }
.goods-grid.list .sku-name b { font-size: 1rem; }
.goods-grid.list .sku-name small { font-size: var(--text-xs); }
.goods-grid.list .amount { font-size: 1.22rem; }
.home-brand { padding: 20px 8px; margin-top: 23px; text-align: center; }
.home-brand > div { display: flex; align-items: center; justify-content: center; gap: 6px; }
.home-brand img { width: 24px; height: 24px; }
.home-brand h2 { font-family: var(--display-font); letter-spacing: .08em; }
.home-brand > p { max-width: 29em; margin: 9px auto 0; color: var(--muted); font-size: .78rem; }
.home-brand .plain { font-size: .78rem; }
.catalog-head { display: grid; gap: 12px; }
.catalog-head h1 { font-size: 1.7rem; }
.catalog-search-link, .search-field { display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); background: var(--paper); }
.catalog-search-link svg, .search-field svg { width: 19px; height: 19px; }
.search-field .field { padding: 0; border: 0; background: transparent; }
.search-field:focus-within { outline: 2px solid var(--focus); }
.search-field .field:focus { outline: none; }
.app:is([data-page="cat"], [data-page="search"]) #hits { margin-top: 3px; }
.catalog-toolbar { border-bottom: 1px solid var(--line); }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-block: 2px 8px; color: var(--muted); font-size: .81rem; }
.filter-row select, .filter-row label { min-height: 44px; }
.filter-row select { padding: 0 4px; border: 0; background: var(--canvas); cursor: pointer; }
.filter-row label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.filter-row input { margin: 0; width: 17px; height: 17px; }
.catalog-empty { margin-top: 12px; }

.product-card { border-radius: 12px; box-shadow: none; }
.photo-button .picture { aspect-ratio: 1; }
.product-intro { padding: 16px; }
.product-category { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: var(--text-xs); }
.product-group { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-weight: 650; }
.product-group::after { content: "›"; margin-left: 5px; }
.product-intro h1 { margin: 0 0 4px; color: var(--ink); font-size: clamp(1.3rem, 5vw, 1.65rem); }
.product-spec { color: var(--muted); font-size: var(--text-sm); }
.product-intro .amount { font-size: 2rem; margin: 10px 0 14px; }
.product-intro .line { border-top: 1px solid var(--line); border-bottom: 0; padding: 10px 0 0; }
.detail-share { display: flex; align-items: center; gap: 5px; margin-top: 10px; }
.app[data-page="product"] .card dl .line { align-items: baseline; }
.app[data-page="product"] .card dt { flex: none; }
@media (max-width: 365px) {
  .goods-grid { gap: 5px; }
  .goods-grid:not(.list) .sku-info { padding-inline: 4px; }
  .goods-grid:not(.list) .sku-bottom { margin-right: -4px; }
  .goods-grid:not(.list) .amount { font-size: .94rem; }
  .home-promos .promo { padding: 8px; gap: 4px; }
  .home-promos .promo > svg:first-child { width: 17px; height: 17px; }
  .home-shortcuts .shortcut-link { font-size: .73rem; }
}

.picture > picture { display: contents; }
#view h1[tabindex="-1"]:focus { outline: none; }
.purchase-bar { grid-template-columns: 44px 44px minmax(0, 1.12fr) minmax(0, 1fr); gap: 5px; }
.purchase-bar > a.soft { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px; min-height: 48px; padding: 2px; background: transparent; font-size: .68rem; }
.purchase-bar > a svg { width: 19px; height: 19px; }
.purchase-bar > button { min-height: 45px; padding-inline: 4px; font-size: .9rem; white-space: nowrap; }
.purchase-bar > button.soft { background: var(--soft-strong); }
@media (max-width: 429px) {
  .goods-grid:not(.list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .goods-grid:not(.list) .sku-info { padding: 7px 8px 1px; }
  .goods-grid:not(.list) .sku-name b { font-size: .92rem; }
  .goods-grid:not(.list) .sku-name small { font-size: .75rem; }
  .goods-grid:not(.list) .amount { font-size: 1.15rem; }
  .banner-link { min-height: clamp(166px, 46vw, 196px); padding-top: 20px; padding-bottom: 26px; }
  .home-shortcuts .shortcut-link { min-height: 64px; gap: 3px; }
  .home-shortcuts .shortcut-link > span { width: 38px; height: 38px; }
  .home-promos .promo { min-height: 55px; padding-block: 6px; }
}
.banner-link:has(.featured-photos) .banner-copy { width: 52%; }
.featured-photos { position: absolute; display: flex; flex-direction: column; justify-content: center; align-items: flex-end; gap: 4px; right: 5%; top: 10%; bottom: 16%; width: 35%; z-index: -1; }
.featured-photos .picture { width: auto; height: 100%; max-width: 100%; min-height: 0; aspect-ratio: 1; border-radius: 7px; border: 1px solid #f6ead0; }
.featured-photos .picture:nth-last-child(2) { align-self: flex-start; }
.product-subtotal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding-top: 8px; font-size: var(--text-sm); color: var(--muted); }
.product-subtotal strong { color: var(--accent); font-size: 1rem; }
.subsidy-link { display: flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--radius-sm); background: var(--warm); color: var(--accent); font-size: var(--text-xs); }
.delivery-picker { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 8px; border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.delivery-picker label { display: flex; align-items: center; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.delivery-picker svg { width: 17px; height: 17px; }
.delivery-picker select { justify-self: end; max-width: 100%; min-height: 44px; padding-inline: 4px; color: var(--brand); border: none; background: var(--paper); font-size: var(--text-sm); }
.delivery-picker p:not(:empty) { grid-column: 1 / -1; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--soft); color: var(--brand-dark); font-size: var(--text-xs); }
