/* Shared storefront presentation plus product-detail refinements. */
@layer storefront {
/* Shared tokens and component roles live in forma.css; reference rules stay scoped below. */
html { scroll-padding-top: var(--storefront-anchor-offset); }
.service-bar .wrap { min-height: 34px; }
.service-bar, .service-bar a { font-size: var(--type-small); font-weight: 400; }
.hero { min-height: 0; grid-template-columns: .86fr 1.14fr; gap: 24px; padding: 0; }
.hero-copy { padding: 52px 0 28px; }
.hero .hero-title { font-size: var(--type-hero); line-height: 1.05; letter-spacing: -.04em; font-weight: 550; margin-bottom: 24px; }
.hero-context { font-size: var(--type-small); letter-spacing: .3em; margin-bottom: 24px; }
.hero-copy > p:not(.hero-context) { max-width: 35ch; font-size: var(--type-body); line-height: 1.65; }
.hero-actions { gap: 20px; margin-top: 30px; }
.button { min-height: 56px; border-radius: 10px; font-weight: 500; gap: 15px; }
.button-secondary { background: #f3f4f6; color: var(--ink); }
.button-secondary:hover { background: #e9ebef; }
.hero-note { margin-top: 45px; max-width: 33ch; }
.hero-visual { min-height: 530px; border-radius: 16px; background: #f7f7f7; box-shadow: none; justify-content: flex-start; }
.hero-visual::before { left: 6%; width: 65%; }
.hero-word { top: 0; right: 12%; color: #ebebeb; font-size: 220px; }
.hero-visual > img { width: 68%; height: 440px; margin: 35px 0 0; filter: drop-shadow(0 14px 12px #00000012); }
.hero-caption { left: 68%; right: 20px; bottom: 65px; flex-direction: column; align-items: flex-start; gap: 20px; }
.hero-caption span { color: var(--accent); font-size: var(--type-small); letter-spacing: .25em; margin-bottom: 14px; }
.hero-caption strong { font-size: 21px; line-height: 1.25; }
.hero-caption p { margin: 15px 0 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.round-btn { width: 48px; height: 48px; box-shadow: 0 5px 15px #00000008; }
.advantages { padding: 38px 0 30px; border-top: 0; }
.advantages > div { gap: 22px; font-size: 13px; }
.advantage-icon, .advantage-icon svg { width: 30px; height: 30px; color: var(--ink); }
.section { padding-top: 44px; }
.section + .section { padding-top: 70px; }
.section-heading { margin-bottom: 30px; gap: 20px; }
.section-lede { max-width: none; margin-top: 8px; font-size: 14px; }
.categories { gap: 14px; }
.category { padding: 18px 8px 14px; }
.category-media, .category img { height: 105px; min-height: 0; }
.category h3 { font-size: 14px; }
.category p { font-size: 12px; }
.filter-pills { padding: 5px; }
.filter-pills [data-filter] { font-size: 12px; padding: 8px 16px; }
.stock { color: var(--ink-soft); font-size: var(--type-small); margin-top: 10px; }
.stock::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #29b44a; }
.add-button { min-height: 44px; padding: 0 12px; background: var(--accent); color: white; font-size: var(--type-action); font-weight: 500; }
/* A favorite already in the cart: its button opens the cart instead of adding again. */
.add-button.is-in-cart { background: #e8f5ec; color: #237a3b; }
.add-button.is-in-cart svg { transform: none; }
@media (hover: hover) and (pointer: fine) { .add-button.is-in-cart:hover, .add-button.is-in-cart:focus-visible { background: #237a3b; color: white; box-shadow: none; } }
.promo { position: relative; min-height: 320px; margin-top: 30px; grid-template-columns: 40% 42% 18%; background: #eef1f5; }
.promo-copy { padding: 38px 44px; }
.promo h2 { font-size: 42px; font-weight: 500; }
.promo-kicker { margin-top: 12px; text-transform: none; font-size: 14px; letter-spacing: .05em; }
.promo-copy > p:not(.promo-kicker) { margin: 10px 0 16px; line-height: 1.5; }
.promo .button { min-height: 44px; font-size: var(--type-action); }
.promo-image { min-height: 0; overflow: visible; }
.promo-image::before { display: block; content: "Air"; position: absolute; left: -15%; top: -8%; color: #e2e7ef; font-size: 210px; font-style: italic; letter-spacing: -.1em; }
.promo-image img { height: 290px; width: 110%; max-width: none; }
.promo-features { display: flex; flex-direction: column; justify-content: center; gap: 30px; padding: 20px; }
.promo-features span { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-soft); }
.promo-features svg { flex-shrink: 0; width: 18px; }
.services { margin-top: 42px; padding-bottom: 40px; }
.services .section-heading { margin-bottom: 28px; }
.services .section-heading > p { font-size: 12px; }
.service-grid { gap: 32px; }
.service-grid article { border: 0; padding-top: 0; }
.service-grid h3 { font-size: 14px; margin: 12px 0 6px; }
.service-grid p { font-size: 12px; }
footer { margin-top: 0; }
.footer-main { padding: 34px 0 26px; }
footer h3 { margin-bottom: 10px; }
.footer-bottom { padding-top: 14px; padding-bottom: 20px; font-size: var(--type-small); }
.related-product-image { height: 155px; }
.related-product strong { font-size: 15px; }
.related-product-description { font-size: 12px; }
.related-product-purchase b { font-size: 18px; }
@media (max-width: 1100px) {
  .hero .hero-title { font-size: var(--type-hero); }
  .hero-visual { min-height: 430px; }
  .hero-visual > img { height: 340px; }
  .hero-caption { right: 12px; bottom: 40px; }
  .hero-caption strong { font-size: 16px; }
  .hero-copy > p:not(.hero-context) { font-size: var(--type-body); }
  .hero-actions { gap: 10px; }
  .hero-actions .button { font-size: 12px; padding: 0 14px; }
    .promo-copy { padding: 28px; }
  .promo h2 { font-size: var(--type-section); }
  .promo-features { padding: 10px; }
        }

@media (max-width: 760px) {
  .header { height: 66px; }
  .hero { grid-template-columns: 1fr; gap: 22px; }
  .hero-copy { padding: 30px 0 0; }
  .hero .hero-title { font-size: var(--type-hero); }
  .hero-context { font-size: var(--type-small); letter-spacing: .22em; margin-bottom: 18px; }
  .hero-copy > p:not(.hero-context) { font-size: var(--type-body); }
  .hero-actions { width: 100%; margin-top: 24px; gap: 12px; }
  .hero-actions .button { flex: 1; min-height: 50px; }
  .hero-note { margin-top: 22px; }
  .hero-visual { min-height: 330px; }
  .hero-visual > img { width: 67%; height: 290px; margin-top: 16px; }
  .hero-word { font-size: 145px; }
  .hero-caption { left: 66%; bottom: 35px; gap: 14px; }
  .hero-caption strong { font-size: 17px; }
  .hero-caption p { font-size: var(--type-small); margin-top: 10px; }
  .hero-caption span { font-size: var(--type-small); }
  .round-btn { width: 40px; height: 40px; }
  .advantages { padding: 26px 0; gap: 20px; grid-template-columns: 1fr 1fr; }
  .advantages > div { font-size: var(--type-small); gap: 12px; }
  .advantage-icon, .advantage-icon svg { width: 24px; height: 24px; }
  .section, .section + .section { padding-top: 38px; }
    .section-heading { margin-bottom: 20px; }
  .section-lede { font-size: 12px; }
  .categories { grid-template-columns: repeat(8, 112px); overflow-x: auto; gap: 10px; padding-bottom: 8px; }
  .category { padding: 12px 6px; }
  .category-media, .category img { height: 85px; }
  .category h3 { font-size: 12px; }
  .category p { font-size: var(--type-small); }
  .add-button { min-height: 40px; width: 100%; }
  .promo { margin-top: 26px; grid-template-columns: 1fr; }
  .promo-copy { padding: 28px 26px 0; }
  .promo h2 { font-size: var(--type-section); }
  .promo-image { height: 220px; }
  .promo-image img { width: 85%; height: 220px; }
  .promo-image::before { font-size: 170px; left: 8%; }
  .promo-features { flex-direction: row; justify-content: space-between; gap: 12px; padding: 16px 22px 24px; }
  .promo-features span { font-size: var(--type-small); gap: 7px; }
  .services { margin-top: 36px; padding-top: 0; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .service-grid h3 { font-size: 13px; }
  .service-grid p { font-size: var(--type-small); }
  .footer-main { padding: 30px 0; gap: 28px; }
                              .related-product strong { font-size: 13px; }
  .related-product-description { font-size: var(--type-small); }
  .related-product-image { height: 135px; }
}
/* Extra categories remain in the same horizontal rail. */
.categories { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: calc((100% - 98px) / 8); overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.category { scroll-snap-align: start; }
.section.services { padding-top: 0; }
@media (max-width: 760px) {
  .categories { grid-auto-columns: 112px; }
}
@media (max-width: 760px) {
  .hero-actions { flex-direction: row; align-items: stretch; }
  .hero-actions .button { min-width: 0; gap: 8px; padding: 0 10px; font-size: var(--type-action); }
  .hero-visual > img { padding: 16px 8px; }
}

/* Same roles use the same metrics across the catalog and detail templates. */
.section-heading { align-items: center; gap: 24px; margin-bottom: 24px; }
.section-heading h2 { max-width: none; font-size: var(--type-section); line-height: 1.2; letter-spacing: -.04em; font-weight: 550; }
.section-heading > div { min-width: 0; }
#popular .section-heading { flex-wrap: wrap; align-items: flex-start; }
#popular .section-heading > div { flex: 1 1 100%; }
#popular .filter-pills { max-width: 100%; min-width: 0; overflow-x: auto; }
.section-lede { line-height: 1.5; }
.section + .section { padding-top: var(--section-gap); }
.hero { align-items: center; }
.hero-copy { padding: 32px 0; }
.hero-visual { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: center; padding: 24px; min-height: 490px; }
.hero-visual > img { width: 100%; height: 410px; margin: 0; }
.hero-caption { position: relative; inset: auto; padding-left: 12px; gap: 20px; }
.hero-caption strong { overflow-wrap: anywhere; }
.related-product strong { font-size: var(--type-card); min-height: 2.6em; line-height: 1.3; white-space: normal; overflow: visible; letter-spacing: -.025em; }
.related-product-description { font-size: var(--type-small); line-height: 1.5; }
.related-product-purchase b { font-size: var(--type-price); line-height: 1.2; }
.add-button, .related-add { min-height: 44px; font-size: var(--type-action); }
.related-product { display: flex; flex-direction: column; }
.related-product-purchase { margin-top: auto; padding-top: 16px; }
.related-product-image { height: 190px; }
.footer-main .footer-link { display: flex; width: fit-content; min-height: 24px; }
.footer-main > div > a:not(.logo) { display: flex; align-items: center; gap: 8px; }
.footer-nav { display: grid; gap: 2px; }
.footer-nav a,
.footer-main .footer-contact > a { display: flex; min-height: 30px; align-items: center; gap: 8px; margin: 0; }
.footer-bottom { gap: 24px; flex-wrap: wrap; }
@media (max-width: 1100px) {
  .hero-visual { min-height: 410px; padding: 16px; }
  .hero-visual > img { height: 340px; }
  .hero-caption { padding-left: 8px; }
  .hero-caption strong { font-size: 18px; }
  .related-product strong { font-size: 15px; }
  }
@media (max-width: 760px) {
  .section-heading { flex-direction: column; align-items: flex-start; gap: 16px; }
  .hero-copy { padding: 24px 0 0; }
  .hero-visual { min-height: 310px; padding: 12px; }
  .hero-visual > img { height: 280px; padding: 0; }
  .hero-caption { padding-left: 8px; }
  .hero-caption strong { font-size: 16px; }
  .hero-caption p { font-size: 12px; }
  .hero-caption span { font-size: 10px; letter-spacing: .12em; }
  .hero-context { font-size: 10px; }
  .related-product strong { font-size: var(--type-card); }
      .related-product-image { height: 150px; }
  .footer-main { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-main > div { order: initial; }
  .footer-main .footer-contact > a { min-height: 40px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Product detail hierarchy: the mobile path follows the customer's decision. */

@media (max-width: 760px) {

  .storefront-product .breadcrumbs {
    max-width: 100%;
    padding-bottom: 2px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    white-space: nowrap;
  }

  .storefront-product .related-product-image {
    height: auto;
    aspect-ratio: 212 / 132;
    margin-bottom: 8px;
  }

  .storefront-product .related-product strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .storefront-product .related-product-link > span:not(.related-product-image) {
    font-size: 11px;
  }

  .storefront-product .related-product-purchase {
    align-items: flex-start;
    flex-direction: column;
    margin-top: 10px;
  }

  .storefront-product .related-product-purchase b {
    font-size: 18px;
  }

  }

/* Keep availability text quiet and centered with the price at every desktop width. */

/* Desktop density: keep the complete purchase path inside a short viewport. */

/* Desktop gallery rhythm: let the gallery and purchase panel share one baseline. */

/* Related products reuse the complete catalog card and its managed media. */

/* Compact product configuration: keep the decision path visible without turning
   options into oversized cards. Both breakpoints share the same language; mobile
   keeps larger touch-first targets. */

@media (min-width: 1200px) {
  /* Long option families deserve the full purchase-column width instead of
     creating a tall half-column with an unrelated empty half beside it. */
  }

/* Product detail finishing pass: make media, title actions, and configuration
   read as one calm purchase path at every breakpoint. */

/* Match the visible headphone scale despite different transparent source margins. */

/* Samsung's Jetblack press shot has wide side margins around a single phone. */

/* Keep one gallery frame size as photos change, while preserving each source's
   original proportions in the stage and in the full-size view. */

/* Product facts are generated from the catalog options, so every model gets
   the same factual presentation without hand-written marketing copy. */

/* A color is a swatch, not another card inside the configuration panel. Keep
   the button target generous while letting the selected ring belong to the
   color itself. */

}
