.mobile-purchase-bar { display: none; }
.item-share-box { margin-top: 20px; padding: 16px; background: rgba(25,79,70,.05); border-radius: 16px; }
.item-share-box[hidden] { display: none; }
.restock-overview { margin-bottom: 28px; }
.catalog-filter-details { margin-bottom: 18px; }
.catalog-filter-details summary { cursor: pointer; color: var(--accent); padding: 12px 0; }
.catalog-notice { margin: 12px 0; color: var(--muted); }
.catalog-notice > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; cursor: pointer; font-size: 14px; color: var(--accent); }
.catalog-notice > summary::-webkit-details-marker { display: none; }
.catalog-notice > summary span { font-size: 12px; opacity: .8; }
.catalog-notice-collapse, .catalog-notice[open] .catalog-notice-expand { display: none; }
.catalog-notice[open] .catalog-notice-collapse { display: inline; }
.catalog-notice .hero-notice { display: block; -webkit-line-clamp: unset; overflow: visible; white-space: pre-line; overflow-wrap: anywhere; margin: 12px 0 0; }
.catalog-notice:not([open]) .hero-notice { display: none; }
.catalog-results-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.catalog-results-meta strong { font-size: 16px; }
.catalog-clear-filters { font-size: 13px; color: var(--accent); white-space: nowrap; }
.catalog-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; min-width: 0; }
.catalog-active-filters a { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 11px; border: 1px solid rgba(25,79,70,.16); border-radius: 999px; background: rgba(25,79,70,.06); color: var(--accent); font-size: 13px; overflow-wrap: anywhere; text-decoration: none; }
.catalog-active-filters a span { flex: none; font-size: 17px; }
.catalog-empty-state { grid-column: 1 / -1; padding: 28px 20px; border: 1px dashed var(--border); border-radius: 20px; background: var(--panel); }
.catalog-empty-state p { margin: 8px 0 18px; color: var(--muted); line-height: 1.6; }
.catalog-discovery > summary { display: none; }
.catalog-discovery:not([open]) > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; color: var(--accent); cursor: pointer; }
.catalog-discovery .discovery-collapse-label, .catalog-discovery[open] .discovery-expand-label { display: none; }
.catalog-discovery[open] .discovery-collapse-label { display: inline; }
.order-progress { display: flex; flex-wrap: wrap; padding: 0; gap: 12px; list-style: none; margin: 20px 0; }
.order-progress li { display: grid; gap: 6px; padding: 12px; border-left: 3px solid #d9d6cc; color: var(--muted); }
.order-progress .is-done { border-color: var(--accent); color: var(--accent); }
.order-progress span { font-size: 12px; }
.support-thread { display: grid; gap: 14px; margin: 24px 0; }
.support-message { background: #fffaf0; border: 1px solid #e0d7c6; border-radius: 16px; padding: 16px; }
.support-message.is-staff { border-color: rgba(25,79,70,.35); background: rgba(25,79,70,.05); }
.support-message header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }
.support-message p { white-space: pre-wrap; overflow-wrap: anywhere; }
.frequent-products { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; }
.frequent-products article { display: grid; gap: 12px; padding: 16px; border: 1px solid #e0d7c6; border-radius: 16px; }
.sku-card-list { display: none; }
.sku-card-list.is-ready { display: grid; grid-template-columns: repeat(auto-fit, minmax(124px, 1fr)); gap: 10px; }
.sku-native-fallback { display: none; }
.sku-choice-card { display: grid; gap: 7px; padding: 14px; text-align: left; color: var(--ink); background: #fffaf0; border: 1px solid rgba(25,79,70,.18); border-radius: 16px; box-shadow: none; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
.sku-choice-card strong { font-size: 16px; }
#item-current-sku-placeholder[hidden], #item-current-sku-image[hidden] { display: none; }
.sku-choice-card[aria-pressed="true"] { border: 2px solid var(--accent); padding: 13px; background: rgba(25,79,70,.07); }
.sku-choice-card b { color: var(--accent); font-size: 21px; }
.sku-choice-card small, .sku-choice-card span { font-size: 12px; line-height: 1.5; }
.sku-choice-card:disabled { opacity: .55; cursor: not-allowed; }
.sku-choice-card:focus-visible { outline: 3px solid #cf9a42; outline-offset: 3px; }
.catalog-filter-bar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 18px; }
.catalog-filter-bar > label { display: grid; gap: 6px; }
.catalog-filter-bar > label:first-child { flex: 1; min-width: 180px; }
.catalog-filter-bar .catalog-stock-check { display: flex; align-items: center; align-self: center; }
.catalog-stock-check input { width: auto; }
.discovery-tabs { display: flex; gap: 10px; margin-bottom: 14px; }
.discovery-tabs button[aria-pressed="false"] { background: #fff9ed; color: var(--accent); box-shadow: none; }
.discovery-products { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 26px; }
.discovery-products[hidden] { display: none; }
.discovery-product { display: grid; gap: 10px; color: var(--ink); text-decoration: none; padding: 12px; background: #fffaf0; border-radius: 18px; min-width: 0; }
.discovery-product .product-cover { height: 140px; }
.discovery-product strong { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.discovery-product > span { color: var(--accent); font-size: 13px; }
@media (max-width: 768px) {
  /* At most two columns; the rem minimum gives narrow screens and enlarged text a single column. */
  .product-grid, .discovery-products { grid-template-columns: repeat(auto-fill,minmax(min(100%,max(9rem,calc((100% - 10px) / 2))),1fr)); gap: 10px; }
  .homepage-category-section { min-width: 0; padding: 10px; gap: 8px; border-radius: 20px; }
  .homepage-category-head { gap: 8px; align-items: center; flex-wrap: nowrap; }
  .homepage-category-head > div { min-width: 0; }
  .homepage-category-head .section-kicker { display: none; }
  .homepage-category-head h2 { font-size: 1.125rem; line-height: 1.3; overflow-wrap: anywhere; }
  .homepage-category-head > a { min-height: 44px; flex-shrink: 0; font-size: .8125rem; }
  .product-card { display: flex; flex-direction: column; min-width: 0; gap: 10px; padding: 10px; border-radius: 16px; }
  .product-card > a { display: block; min-width: 0; }
  .product-card .product-cover, .discovery-product .product-cover { height: auto; aspect-ratio: 4 / 3; border-radius: 12px; font-size: 2rem; }
  .product-card .product-cover { margin-bottom: 10px; }
  .product-card h3, .discovery-product strong { font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
  .product-card-bottom { display: grid; min-width: 0; gap: 8px; margin-top: auto; }
  .product-card-price { min-width: 0; gap: 4px; }
  .product-card-price .price { font-size: 1.25rem; line-height: 1.25; overflow-wrap: anywhere; }
  .product-card-price span { font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
  .product-card-price .member-price-preview { display: block; }
  .product-card-price .member-price-preview b { font-size: inherit; white-space: nowrap; }
  .product-card-price .member-price-meta { flex-wrap: wrap; gap: 0 6px; }
  .product-card-stats { gap: 4px 10px; font-size: .75rem; line-height: 1.5; font-weight: 500; }
  .discovery-product { padding: 10px; gap: 8px; border-radius: 16px; align-content: start; }
  .discovery-product .product-cover { margin-bottom: 0; }
  .discovery-product strong { display: block; overflow: visible; -webkit-line-clamp: unset; }
  .discovery-product > span { font-size: .75rem; line-height: 1.5; overflow-wrap: anywhere; }
  .catalog-filter-bar > label:first-child { flex-basis: 100%; }
  .catalog-filter-bar input, .catalog-filter-bar select { max-width: 100%; }
  .detail-buy-card .summary-badge { flex-shrink: 0; white-space: nowrap; }
  .detail-buy-card .buy-card-top > div { min-width: 0; }
  .main-body:has(.showcase-grid-simple) { padding-top: 12px; }
  .hero-shell { padding: 12px 14px; gap: 10px; margin-bottom: 10px; }
  .hero-shell .section-kicker { display: none; }
  .hero-copy h1 { font-size: 24px; line-height: 1.1; margin: 0; }
  .hero-actions { margin-top: 0; gap: 8px; flex-wrap: nowrap; }
  .hero-actions a { min-height: 44px; padding: 0 6px; font-size: 13px; line-height: 1.3; }
  .hero-notice { -webkit-line-clamp: 2; font-size: 13px; }
  .catalog-notice { margin: 0; }
  .catalog-notice > summary { min-height: 44px; font-size: 13px; }
  .showcase-grid-simple { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .showcase-grid-simple > * { grid-column: 1 / -1; }
  .showcase-grid-simple:not(:has(.catalog-active-filters)) > .catalog-results-meta { grid-column: 1; grid-row: 1; }
  .showcase-grid-simple:not(:has(.catalog-active-filters)) > .catalog-filter-details:not([open]) { grid-column: 2; grid-row: 1; }
  .catalog-filter-details { margin-bottom: 0; }
  .catalog-filter-details > summary { min-height: 44px; padding: 10px 0; }
  .catalog-results-meta { margin-bottom: 0; }
  .catalog-results-meta strong { font-size: 14px; }
  .catalog-discovery { margin: 0; padding: 0 12px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,250,241,.7); }
  .catalog-discovery > summary { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; padding: 6px 0; color: var(--accent); cursor: pointer; font-size: 13px; }
  .catalog-discovery > summary::-webkit-details-marker { display: none; }
  .catalog-discovery > summary span { font-size: 11px; color: var(--muted); }
  .catalog-discovery .discovery-collapse-label, .catalog-discovery[open] .discovery-expand-label { display: none; }
  .catalog-discovery[open] .discovery-collapse-label { display: inline; }
  .catalog-discovery .discovery-tabs { margin-bottom: 10px; gap: 8px; }
  .catalog-discovery .discovery-tabs button { padding: 8px 12px; min-width: 0; font-size: 13px; }
  .catalog-discovery .discovery-products { margin-bottom: 12px; }
  .catalog-discovery .discovery-product .product-cover { display: none; }
  .category-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: thin; }
  .category-bar .pill { flex: 0 0 auto; white-space: nowrap; }
  .detail-hero { padding: 18px 20px; gap: 10px; }
  .detail-hero h1 { font-size: 24px; }
  .detail-layout { gap: 16px; }
  .detail-showcase-card { padding: 14px; }
  .detail-showcase-card .product-cover.large { height: 160px; min-height: 0; }
  .detail-showcase-card .feature-points { margin-top: 12px; gap: 8px; font-size: 12px; }
  .detail-buy-card { padding: 20px; }
  body:has(.mobile-purchase-bar) { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
  body:has(.mobile-purchase-bar) .purchase-toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .mobile-purchase-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 35;
    display: flex; align-items: center; gap: 16px;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(25, 79, 70, .15); background: #fffcf5;
    box-shadow: 0 -8px 25px rgba(36, 31, 20, .08);
  }
  .mobile-purchase-bar > div { flex: 1; min-width: 0; }
  .mobile-purchase-bar small { display: block; color: var(--muted); }
  .mobile-purchase-bar strong { font-size: 22px; color: var(--accent); }
  .mobile-purchase-bar button { min-width: 126px; margin: 0; }
  body:has(.mobile-nav[open]) .mobile-purchase-bar { visibility: hidden; }
}
