/* Mobile storefront overrides. Keep the stylesheet after the page's own CSS. */
.mobile-cart-identity { display: none; }

@media (max-width: 900px) {
  main .page-hero h1,
  main .category-hero h1,
  main .utility-page h1,
  main .utility-page h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .site-header .header-row {
    grid-template-columns: 48px minmax(0, 1fr) minmax(60px, auto);
    gap: 10px;
    min-height: 72px;
    padding-inline: 14px;
  }

  .site-header .header-row .brand { justify-self: center; min-width: 0; }
  .site-header .header-row .menu-button { display: grid; width: 44px; height: 44px; }
  .site-header .header-actions { justify-self: end; }
  .site-header .main-nav:not(.is-open) { display: none; }
  .site-header .main-nav.is-open {
    position: absolute;
    inset: 100% 0 auto;
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: min(70vh, 520px);
    max-height: min(70dvh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .site-header .main-nav.is-open a { min-height: 44px; }

  /* Let touches reach the carousel controls beneath the full-width copy layer. */
  main .beauty-hero .hero-copy { pointer-events: none; }
  main .beauty-hero .hero-copy :is(a, button) { pointer-events: auto; }

  main .product-grid,
  main .pdp-related-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row;
    align-items: stretch;
    gap: clamp(9px, 2.65vw, 18px);
    max-width: 100%;
    overflow: visible;
    scroll-snap-type: none;
  }

  main .product-grid > :is(.empty-state, .catalogue-loading, .product-reveal) {
    grid-column: 1 / -1;
    min-width: 0;
  }
  main .product-grid > article.product-card,
  main .pdp-related-grid > article.pdp-related-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: auto;
    max-width: none;
    margin: 0 !important;
  }

  main :is(.product-card .product-media, .pdp-related-card .pdp-related-media) {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
  }
  main :is(.product-card .product-media img, .pdp-related-card .pdp-related-media img) {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  main .product-grid .product-card .product-copy,
  main .pdp-related-card > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    position: relative;
    inset: auto;
    padding: 10px;
    pointer-events: auto;
  }
  main .product-grid .product-card h3,
  main .pdp-related-card h3 {
    display: -webkit-box;
    min-height: 2.5em;
    max-width: 100%;
    margin: 0 0 9px;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: clamp(.875rem, 2.8vw, 1.05rem);
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  main .product-grid .editorial-product-meta,
  main .pdp-related-card footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 8px;
  }
  main .product-grid .product-price,
  main .pdp-related-card footer strong {
    font-size: clamp(1rem, 3.6vw, 1.3rem);
    white-space: nowrap;
  }
  main .product-grid .product-card .editorial-index { display: none; }
  main .product-grid .product-card .product-price {
    display: block;
    color: #75243f;
  }
  main .product-card :is(button.editorial-add, button[data-add], button[data-store-add], a.mobile-select-options) {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 7px 5px;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.2;
  }
  main .product-card a.mobile-select-options {
    background: #77253e;
    color: #fff;
    font: 800 10px/1.2 Arial, sans-serif;
    letter-spacing: .045em;
    text-decoration: none;
    text-transform: uppercase;
  }
  main .product-card .wishlist-button { width: 44px; height: 44px; }

  main .pdp-related-products,
  main .pdp-related-group,
  main .pdp-related-grid {
    min-width: 0;
    margin-inline: 0;
  }
  main .pdp-related-group.pdp-gift-group {
    width: auto;
    max-width: 100%;
    margin-inline: 0;
    padding-inline: clamp(10px, 3vw, 24px);
  }
  main .pdp-related-grid { padding-inline: 0; }
  main .pdp-related-head { grid-template-columns: minmax(0, 1fr); }
  main .pdp-related-head h2 { font-size: clamp(2.2rem, 9vw, 4rem); }
  main .pdp-gallery-controls button,
  main :is(.pdp-zoom, .pdp-function-tabs button, [data-product-qty]) {
    min-width: 44px;
    min-height: 44px;
  }
  main .pdp-size-picker,
  main .pdp-size-options,
  main .pdp-purchase,
  main .pdp-details-layout > * { min-width: 0; }
  main .pdp-size-option { min-width: 0; min-height: 44px; overflow-wrap: anywhere; }
  main .pdp-size-option img { max-width: 100%; object-fit: cover; }
  main .pdp-main-image > img { height: auto; }
  main .pdp-thumbnails { max-width: 100%; }
  .pdp-lightbox {
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
  }
  .pdp-lightbox img { max-width: 100%; max-height: calc(100dvh - 90px); object-fit: contain; }
  .pdp-lightbox button { min-width: 44px; min-height: 44px; }
  .pdp-sticky-buy,
  main .cart-mobile-checkout { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .pdp-sticky-buy:not(.mobile-purchase-past) { visibility: hidden; pointer-events: none; }
  .pdp-sticky-buy button { flex-shrink: 0; min-height: 44px; }

  main .cart-item > *,
  main .cart-content > *,
  .checkout-main #customer_details,
  .checkout-main #order_review,
  .checkout-main .form-row,
  .checkout-main .woocommerce-input-wrapper { min-width: 0; }
  main .cart-item :is(h3, .cart-item-size, .cart-item-labels),
  .checkout-main .product-name,
  .checkout-main .woocommerce-error { overflow-wrap: anywhere; }
  main .cart-item-actions { flex-wrap: wrap; }
  main .cart-item .mobile-cart-identity {
    display: block;
    margin: 0 0 8px;
    color: #66545a;
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  main .cart-item :is([data-store-qty], [data-store-remove]),
  main .cart-mobile-checkout a { min-height: 44px; }
  .checkout-main .woocommerce form .form-row :is(input.input-text, textarea, select),
  .checkout-main .select2-selection__rendered { font-size: 16px; }
  .checkout-main .woocommerce table.shop_table { width: 100%; }
  .checkout-main .woocommerce table.shop_table td:last-child { padding-left: 6px; }
  .checkout-main .koa-paypal-button iframe { max-width: 100%; }

  .site-footer .footer-main > *,
  .site-footer .newsletter-form input { min-width: 0; }
  .site-footer .newsletter-form button { min-width: 44px; min-height: 44px; }
  .site-footer .footer-bottom nav { flex-wrap: wrap; }
}

@media (max-width: 600px) {
  main .page-hero h1 { font-size: clamp(2.35rem, 10vw, 4rem); line-height: .96; }
  .beauty-hero .hero-copy {
    min-height: clamp(560px, 84svh, 720px);
    padding: clamp(125px, 23svh, 220px) clamp(14px, 5vw, 24px) 78px;
  }
  main .beauty-hero { min-height: clamp(560px, 84svh, 720px); }
  main .beauty-hero .gift-headline { font-size: clamp(2.35rem, 10.5vw, 3.45rem); }
  main .beauty-hero .hero-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
  }
  main .beauty-hero .hero-price-lockup { min-width: 0; padding: 10px 8px 11px 10px; }
  main .beauty-hero .hero-price-lockup strong {
    font-size: clamp(1.6rem, 7.3vw, 2.35rem);
    white-space: nowrap;
  }
  main .beauty-hero .hero-price-lockup small { font-size: 9px; }
  main .beauty-hero .hero-gift-link {
    min-width: 0;
    min-height: 48px;
    padding: 7px 8px 7px 11px;
    gap: 6px;
    white-space: normal;
  }
  main .beauty-hero .hero-gift-link > span { flex: 0 0 27px; width: 27px; height: 27px; }
  main .beauty-hero .gift-terms { font-size: 11px; line-height: 1.45; }
  main .beauty-hero .hero-carousel-controls { bottom: 12px; }
  main .collection-shelf > .product-deck-grid { width: 100%; padding-inline: 0; }
  main .pdp-purchase h1 { overflow-wrap: anywhere; }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 480px) {
  .site-header .main-nav.is-open { max-height: calc(100dvh - 85px); }
  main .beauty-hero .hero-copy { padding-block: 48px 78px; }
}
