/* Renforts mobiles de la boutique publique. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
}

.store-header,
.store-footer,
.container,
.hero,
.product-layout,
.product-gallery,
.product-info,
.gallery-main,
.gallery-thumbs,
.checkout-layout,
.checkout-layout > * {
  min-width: 0;
  max-width: 100%;
}

.gallery-variant-rail,
.selected-variant {
  display: none;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
}

.rating-stars {
  position: relative;
  display: inline-block;
  color: #d8d0c4;
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.rating-stars::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rating-percent);
  overflow: hidden;
  color: var(--gold);
  content: "★★★★★";
  white-space: nowrap;
}

.product-rating--card {
  margin: -5px 0 17px;
}

.product-rating--hero {
  margin: 0 0 2px;
  font-size: 12px;
}

.product-rating--hero .rating-stars {
  font-size: 16px;
}

.variant-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 9px;
}

.variant-list > .eyebrow {
  grid-column: 1 / -1;
}

.variant-choice {
  min-width: 0;
}

.variant-choice span {
  min-width: 0;
  line-height: 1.25;
}

@media (max-width: 850px) {
  .product-page {
    padding-top: 28px;
  }

  .product-info {
    display: flex;
    flex-direction: column;
  }

  .product-info > .eyebrow { order: 0; }
  .product-info > h1 { order: 1; }
  .product-info > .product-rating { order: 2; }
  .product-info > .price { order: 3; }
  .product-info > .product-description { order: 6; }
  .product-info > .product-specs { order: 7; }
  .product-info form { display: contents; }

  .product-info .variant-list {
    order: 4;
    margin: 14px 0 20px;
  }

  .product-info .button {
    order: 5;
    width: 100%;
    margin-top: 2px;
  }
}

@media (max-width: 560px) {
  .notice {
    overflow: hidden;
    padding: 9px 12px;
    font-size: 9px;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .store-header {
    gap: 10px;
  }

  .store-header nav {
    flex-shrink: 0;
    gap: 10px;
  }

  .store-header nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    white-space: nowrap;
  }

  .container {
    width: calc(100% - 32px);
  }

  .product-page {
    padding: 16px 0 56px;
  }

  .product-gallery {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    grid-template-areas:
      "variants main"
      ". thumbs";
    gap: 7px 8px;
    align-items: start;
    width: 100%;
  }

  .gallery-variant-rail {
    display: grid;
    grid-area: variants;
    gap: 7px;
    align-content: start;
    width: 52px;
    max-height: calc(100vw - 84px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .gallery-variant-rail button {
    width: 52px;
    height: 52px;
    padding: 3px;
    border: 1px solid var(--line);
    background: #fff;
  }

  .gallery-variant-rail button[aria-pressed="true"] {
    border: 2px solid var(--ink);
  }

  .gallery-variant-rail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .gallery-main {
    grid-area: main;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fff;
  }

  .gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  .gallery-thumbs {
    grid-area: thumbs;
    grid-template-columns: none;
    grid-template-rows: 50px;
    grid-auto-flow: column;
    grid-auto-columns: 52px;
    width: 100%;
    min-width: 0;
    margin-top: 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .gallery-thumbs img {
    height: 48px;
    object-position: center;
  }

  .product-info {
    padding-top: 14px;
  }

  .product-info > .eyebrow {
    margin-bottom: 7px;
  }

  .product-info h1 {
    margin-bottom: 5px;
    font-size: clamp(34px, 10vw, 42px);
  }

  .product-info .variant-list {
    display: none;
  }

  .product-info .selected-variant {
    display: block;
    order: 4;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
  }

  .product-info .selected-variant strong {
    color: var(--ink);
  }

  .product-info .price {
    margin: 8px 0 9px;
    font-size: 29px;
  }

  .product-rating--hero {
    margin-bottom: 2px;
  }

  .variant-choice {
    grid-template-columns: 50px minmax(0, 1fr);
    min-height: 60px;
    gap: 10px;
  }

  .variant-choice img {
    width: 50px;
    height: 46px;
  }

  .variant-choice span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .benefit-row {
    margin: 38px 0;
  }

  .catalog-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .catalog-filter a {
    display: grid;
    min-width: 0;
    min-height: 40px;
    place-items: center;
    padding: 8px;
    text-align: center;
  }

  .product-card__meta {
    flex-wrap: wrap;
  }

  .product-card img,
  .hero img {
    object-position: center;
  }

  .checkout-layout {
    gap: 28px;
  }

  .checkout-summary {
    padding: 20px;
  }

  .checkout-summary__line,
  .checkout-summary__total {
    align-items: flex-start;
  }

  .checkout-summary__line span,
  .checkout-summary__total span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .checkout-summary__line strong,
  .checkout-summary__total strong {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 360px) {
  .store-header .brand {
    font-size: 17px;
  }

  .store-header nav {
    gap: 8px;
    font-size: 9px;
  }
}
