/* Desktop foundation and the home / catalogue / product reference pages.
   Keep this layer last. Existing small-screen rules remain in storefront-redesign.css. */
@media (min-width: 1024px) {
  :root {
    --th-content: 1600px;
    --th-gutter: 48px;
    --th-grid-gap: 24px;
    --th-section-gap: 72px;
    --th-ink: #111;
    --th-muted: #666;
    --th-line: #dfdfdf;
    --th-surface: #f5f5f5;
    --th-blue: #0058a3;
    --th-control-height: 48px;
    --th-font: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  }

  /* Shared shell: a single alignment line from search to footer. */
  .topbar .wrap, .header .wrap, .sf-primary-nav .wrap,
  #page-home > .wrap, #page-list > .wrap, #page-detail > .wrap,
  .sf-mega-inner, .sf-footer-inner, .page-back-bar {
    width: min(calc(100% - var(--th-gutter) * 2), var(--th-content)) !important;
    max-width: var(--th-content) !important;
    margin-inline: auto;
  }
  .header { min-height: 88px !important; background: #fff !important; }
  .header .wrap { min-height: 88px !important; grid-template-columns: 190px minmax(240px, 1fr) auto !important; gap: 32px !important; padding-inline: 0 !important; }
  .topbar .wrap, .sf-primary-nav .wrap { padding-inline: 0 !important; }
  .sf-global-search { height: var(--th-control-height); background: var(--th-surface); }
  .sf-primary-nav .wrap { min-height: 52px; gap: 32px; }
  .sf-nav-shell { top: 88px; }
  .sf-primary-nav button { font-size: 14px; }
  .page-back-bar { padding: 16px 0 0; }
  body:has(#page-list.active) .page-back-bar { display: none; }
  .page-back-button { border: 0; padding: 6px 0; color: var(--th-muted); font-size: 12px; }
  #compareTray:not(.visible) { visibility: hidden; pointer-events: none; }
  .sf-footer-inner { padding-block: 56px 28px; }
  .site-footer { background: var(--th-surface) !important; }
  .sf-footer-brand h2 { font-family: var(--th-font); }
  :is(#page-home, #page-list, #page-detail, .sf-nav-shell, .header) :is(button, a, [tabindex]):focus-visible {
    outline: 3px solid var(--th-blue); outline-offset: 4px;
  }

  /* Home: edge-to-edge first screen; lower sections retain the reading width. */
  #page-home > .storefront-home { width: 100% !important; max-width: none !important; padding: 0 0 80px; }
  #page-home .storefront-home > :not(.sf-hero-carousel) { width: min(calc(100% - var(--th-gutter) * 2), var(--th-content)); margin-inline: auto; }
  #page-home .sf-hero-carousel { width: 100%; height: clamp(560px, calc(100svh - 176px), 840px); min-height: 560px; margin: 0 0 60px; overflow: visible; }
  #page-home .sf-hero-track { overflow: hidden; }
  #page-home .sf-hero-slide { grid-template-columns: minmax(0, 35fr) minmax(0, 65fr); }
  #page-home .sf-hero-slide-copy { padding: 40px 40px 84px max(48px, calc((100vw - var(--th-content)) / 2)); clip-path: none; }
  #page-home .sf-hero-slide-copy h1 { margin: 16px 0; font-size: clamp(32px, 2.6vw, 46px); line-height: 1.22; letter-spacing: -.04em; }
  #page-home .sf-hero-slide-copy > p { max-width: 360px; font-size: 14px; line-height: 1.8; }
  #page-home .sf-hero-slide-copy .sf-actions { gap: 12px; margin-top: 24px; }
  #page-home .sf-hero-slide-copy .sf-button { min-height: 46px; padding-inline: 20px; font-size: 13px; }
  #page-home .sf-hero-scene { margin-left: 0; }
  #page-home .sf-hero-product { bottom: 88px; right: max(48px, calc((100vw - var(--th-content)) / 2)); width: 300px; box-shadow: none; }
  #page-home .sf-hero-product-image img { object-fit: contain; }
  #page-home .sf-hero-arrow { top: auto; bottom: 20px; width: 36px; height: 36px; transform: none; font-size: 25px; }
  #page-home .sf-hero-arrow.prev { left: auto; right: max(94px, calc((100vw - var(--th-content)) / 2 + 46px)); }
  #page-home .sf-hero-arrow.next { right: max(48px, calc((100vw - var(--th-content)) / 2)); }
  #page-home .sf-hero-controls { left: max(48px, calc((100vw - var(--th-content)) / 2)); bottom: 24px; gap: 10px; transform: none; }
  #page-home .sf-hero-controls button { width: 28px; height: 20px; border-block: 8px solid transparent; background: #b2a961; background-clip: padding-box; }
  #page-home .sf-hero-controls button span { background: #111; }
  #page-home .sf-hero-pause { display: block; position: absolute; left: max(168px, calc((100vw - var(--th-content)) / 2 + 120px)); bottom: 20px; z-index: 6; border: 0; border-radius: 999px; padding: 8px 12px; background: #fff; color: var(--th-ink); font-size: 11px; cursor: pointer; }
  #page-home .sf-hero-stats { position: absolute; top: 100%; left: 0; bottom: auto; width: 100%; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 8px; padding: 20px max(48px, calc((100vw - var(--th-content)) / 2)); color: var(--th-muted); border-bottom: 1px solid var(--th-line); background: #fff; }
  #page-home .sf-hero-stats strong { color: var(--th-ink); font-size: 14px; }
  #page-home .sf-hero-stats span { margin-right: 24px; font-size: 12px; }
  #page-home .sf-section, #page-home .sf-campaign { margin-top: var(--th-section-gap) !important; }
  #page-home .sf-section-head { align-items: end; margin-bottom: 24px; }
  #page-home .sf-section-head h2 { font-family: var(--th-font); font-size: 30px; font-weight: 750; line-height: 1.3; letter-spacing: -.025em; }
  #page-home .sf-section-head p { max-width: 700px; font-size: 14px; line-height: 1.7; }
  #page-home .sf-eyebrow { font-size: 11px; letter-spacing: .12em; }
  #page-home .sf-room-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
  #page-home .sf-room-art { aspect-ratio: 4 / 5; }
  #page-home .sf-room-copy strong { font-size: 16px; }
  #page-home .sf-featured-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--th-grid-gap); }
  #page-home .sf-featured-product:nth-child(n+5) { display: none; }
  #page-home .sf-featured-media, #page-home .sf-ranked-media { aspect-ratio: 1; background: var(--th-surface); }
  #page-home :is(.sf-featured-media, .sf-ranked-media) > img { object-fit: contain; padding: 24px; }
  #page-home .sf-featured-media > span, #page-home .sf-rank-number { display: none; }
  #page-home .sf-featured-copy h3 { font-size: 16px; line-height: 1.5; min-height: 48px; }
  #page-home .sf-featured-copy strong, #page-home .sf-ranked-copy strong { font-size: 24px; }
  #page-home .sf-ranking-grid { gap: 32px var(--th-grid-gap); border: 0; }
  #page-home .sf-ranked-product { padding: 0; border: 0; }
  #page-home .sf-ranked-copy h3 { font-size: 15px; min-height: 46px; }
  #page-home .sf-campaign-panel { min-height: 400px; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  #page-home .sf-campaign-media { min-height: 400px; }
  #page-home .sf-campaign-copy { padding: 40px; }
  #page-home .sf-campaign-copy h2 { font-size: 36px; line-height: 1.25; }

  /* Product-shaped illustrations, with quiet surfaces instead of app-icon tiles. */
  #page-home .category-grid { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 36px 24px !important; }
  #page-home .category-card { padding: 0 !important; min-height: 0 !important; border: 0 !important; border-radius: 0 !important; overflow: visible; background: transparent !important; }
  #page-home .category-card::after, #page-home .category-card-icon { display: none; }
  #page-home .category-card-art { display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3; background: #f5f4f1; overflow: hidden; }
  #page-home .category-card-art svg { width: 88%; height: 88%; transition: transform .2s ease; }
  #page-home .category-card:hover .category-card-art svg { transform: scale(1.035); }
  #page-home .category-card:hover .category-card-name { text-decoration: underline; text-underline-offset: 5px; }
  #page-home .category-card-name { margin-top: 16px !important; font-size: 16px !important; letter-spacing: 0; }
  #page-home .category-card-desc { margin-top: 4px !important; font-size: 12px !important; }
  @media (prefers-reduced-motion: reduce) { #page-home .category-card-art svg { transition: none; } }

  /* Catalogue: four generous cards; filters remain one readable control group. */
  #page-list .list-page, #page-detail .detail-page { padding-top: 24px !important; padding-bottom: 80px !important; }
  #page-list .list-header { margin: 0 0 28px !important; padding: 0 !important; }
  #page-list .list-breadcrumb, #page-detail .detail-breadcrumb { margin-bottom: 24px; color: var(--th-muted); font-size: 12px; }
  #page-list .list-title { font-family: var(--th-font) !important; font-size: 36px !important; font-weight: 750; line-height: 1.25; }
  #page-list .list-title-sub { margin-top: 12px; font-size: 14px; }
  #page-list .list-filters { padding: 16px 0 !important; box-shadow: none; top: 140px; }
  #page-list .filter-row { align-items: flex-start; gap: 20px; padding: 0; }
  #page-list .filter-label { padding-top: 12px; min-width: 32px; }
  #page-list .filter-options { display: flex; flex-wrap: wrap; gap: 8px; }
  #page-list .filter-chip { min-height: 44px !important; padding: 0 20px; border: 1px solid var(--th-line); background: #fff; color: var(--th-ink); font-size: 13px; }
  #page-list .filter-chip.active { background: var(--th-ink) !important; border-color: var(--th-ink) !important; }
  #page-list .list-toolbar { margin: 20px 0 28px !important; min-height: 44px; }
  #page-list .sort-tabs { gap: 8px; }
  #page-list .sort-tab { padding: 10px 18px; font-size: 13px; }
  #page-list .sort-tab.active { background: var(--th-surface) !important; color: var(--th-ink) !important; box-shadow: inset 0 -2px var(--th-ink); border-radius: 0 !important; }
  #page-list .list-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 44px var(--th-grid-gap) !important; }
  #page-list .product-card { border: 0; border-radius: 0; overflow: visible; box-shadow: none; }
  #page-list .product-card:hover { transform: none; box-shadow: none; }
  #page-list .product-image { aspect-ratio: 1; border-radius: 0 !important; background: var(--th-surface) !important; }
  #page-list .product-image img { object-fit: contain !important; padding: 16px; }
  #page-list .product-compare-toggle { right: 56px; top: 12px; min-height: 34px; border-radius: 999px; background: #fff; }
  #page-list .product-compare-toggle.selected { background: var(--th-ink); border-color: var(--th-ink); color: #fff; }
  #page-list .product-favorite-toggle { box-shadow: none; }
  #page-list .product-card:hover .product-image img { transform: none; }
  #page-list .product-info { padding: 18px 0 0 !important; }
  #page-list .product-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px !important; line-height: 1.5 !important; height: 48px; min-height: 48px; margin: 0; }
  #page-list .product-price-row { margin-top: 12px !important; flex-wrap: wrap; gap: 8px; }
  #page-list .product-price { color: var(--th-ink) !important; font-size: 28px !important; line-height: 1.1; }
  #page-list .product-original { font-size: 11px; text-decoration: none; }
  #page-list .product-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12px; }
  #page-list .product-quick { background: rgba(255,255,255,.96) !important; }
  #page-list .product-quick-btn { color: var(--th-ink); border: 1px solid var(--th-line); }
  #page-list .product-quick-btn.primary { color: #fff; }
  #page-list .product-card:focus-within .product-quick { opacity: 1; transform: none; }
  #page-list .list-pagination { margin-top: 48px; }

  /* Product: 60/40 reading order, full object silhouette, one primary action. */
  #page-detail .detail-container { padding: 0; border: 0; background: #fff; box-shadow: none; }
  #page-detail .detail-main { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: clamp(32px, 4vw, 64px); }
  #page-detail .detail-gallery { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 16px; background: #fff !important; }
  #page-detail .gallery-main { grid-column: 1; grid-row: 1; aspect-ratio: 6 / 5; border-radius: 0; background: var(--th-surface); }
  #page-detail .gallery-main > img { object-fit: contain; padding: 32px; }
  #page-detail .gallery-main:hover > img { transform: none; }
  #page-detail .gallery-thumbs { grid-column: 1; grid-row: 2; position: static; display: flex; flex-direction: row; max-height: none; overflow-x: auto; gap: 12px; padding: 2px; }
  #page-detail .gallery-thumb { width: 80px; height: 80px; border-radius: 0; background: var(--th-surface); }
  #page-detail .gallery-thumb img { object-fit: contain; padding: 4px; }
  #page-detail .gallery-thumb.active::after { border-radius: 0; }
  #page-detail .gallery-share { grid-column: 1; grid-row: 3; padding: 0; justify-content: flex-start; }
  #page-detail .gallery-arrow { opacity: 1; }
  #page-detail .detail-right { gap: 16px; padding: 4px 0 0; min-width: 0; }
  #page-detail .detail-title { font-family: var(--th-font) !important; font-size: 30px; line-height: 1.35; font-weight: 750; }
  #page-detail .detail-subtitle:empty { display: none; }
  #page-detail .detail-subtitle { margin: 0; color: var(--th-muted); font-size: 14px; line-height: 1.7; }
  #page-detail .detail-meta { flex-wrap: wrap; gap: 8px 16px; color: var(--th-muted); font-size: 12px; }
  #page-detail .price-section { padding: 20px 0; border-block: 1px solid var(--th-line); background: transparent; border-radius: 0; }
  #page-detail .price-label { flex-wrap: wrap; gap: 6px; font-size: 12px; }
  #page-detail .price-main { margin-top: 12px; }
  #page-detail .price-amount { font-family: var(--th-font); font-size: 40px; font-weight: 800; color: var(--th-ink) !important; }
  #page-detail .spec-section { gap: 12px; }
  #page-detail .spec-row { gap: 16px; }
  #page-detail .spec-label { min-width: 40px; }
  #page-detail .spec-item { border-radius: 4px; padding: 10px 16px; font-size: 13px; }
  #page-detail .spec-delivery { flex-wrap: wrap; font-size: 12px; }
  #page-detail .detail-actions { margin-top: 8px; gap: 12px; }
  #page-detail .actions-primary { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; }
  #page-detail .action-button { min-height: 52px !important; font-size: 14px; }
  #page-detail .action-button.cart { border: 1px solid var(--th-blue); background: var(--th-blue); color: #fff; }
  #page-detail .action-button.buy { border: 1px solid var(--th-ink) !important; background: #fff !important; color: var(--th-ink) !important; }
  #page-detail .actions-secondary .action-button { background: #fff; border: 1px solid var(--th-line); color: var(--th-ink); }
  #page-detail .service-list { order: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 16px; border-top: 1px solid var(--th-line); }
  #page-detail .service-item { font-size: 11px; color: var(--th-muted); }
  #page-detail .detail-tabs { top: 140px; margin-top: 48px; padding: 0; gap: 32px; border-top: 1px solid var(--th-line); border-radius: 0; box-shadow: none; }
  #page-detail .detail-tab { padding: 20px 0; font-family: var(--th-font); font-size: 14px; }
  #page-detail .detail-tab.active { color: var(--th-ink); }
  #page-detail .detail-tab.active::after { background: var(--th-ink); border-radius: 0; }
  #page-detail .detail-content { padding: 32px 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  #page-detail .params-table { max-width: 960px; }
}
