/* Narrow mobile UX corrections for storefront, cart and checkout only. */
@media (max-width: 760px) {
  body.lom-body .lom-wrap,
  body.lom-body .lom-head-main,
  body.lom-body .lom-search,
  body.lom-body .lom-store-section,
  body.product-catalog-page .catalog-utility-head,
  body.product-catalog-page .product-grid-v966,
  body.product-catalog-page .product-card-v966,
  .product-detail-v966,
  .product-detail-v966 .pdv17-market-shell,
  .product-detail-v966 .pdv17-market-grid,
  .product-detail-v966 .pdv17-gallery-col,
  .hb-cart,
  .hb-cart .hb-layout,
  .hb-cart .hb-main,
  .hb-cart .hb-summary,
  #luxorCheckoutForm,
  #luxorCheckoutForm .co-shell,
  #luxorCheckoutForm .co-card,
  #luxorCheckoutForm .co-summary {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  body.lom-body .lom-section-head h2,
  body.lom-body .lom-showcase-head h2,
  body.product-catalog-page .product-card-body h2,
  .product-detail-v966 .pdv17-title-row h1,
  .hb-cart .hb-name,
  #luxorCheckoutForm .co-section-title h2,
  #luxorCheckoutForm .co-summary b {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }

  body.product-catalog-page .product-card-image,
  body.lom-body .lom-showcat-media.is-product,
  body.lom-body .lom-product-media,
  body.lom-body .lom-hero-product {
    display: grid !important;
    place-items: center !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  body.product-catalog-page .product-card-image > img,
  body.lom-body .lom-showcat-media.is-product > img,
  body.lom-body .lom-product-media > a > img,
  body.lom-body .lom-hero-product .lom-hero-slide > img,
  body.lom-body .lom-hero-product > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  html body .product-detail-v966 .pdv17-gallery-col .pdv17-main-image.product-main-image {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    padding: 8px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  html body .product-detail-v966 .pdv17-gallery-col .pdv17-main-image.product-main-image #productMainImage {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  html body .product-detail-v966 .pdv17-gallery-col .pdv17-main-image.product-main-image .product-placeholder.big {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  html body .product-detail-v966 .pdv17-thumbs button > img,
  html body .product-detail-v966 .pdv17-thumbs .variant-thumb > span > img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  .hb-cart {
    width: 100% !important;
    padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
    padding-bottom: calc(156px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .hb-cart .hb-top { min-width: 0 !important; flex-wrap: wrap !important; gap: 6px 10px !important; }
  .hb-cart .hb-top h1 { min-width: 0 !important; overflow-wrap: anywhere !important; }
  .hb-cart .hb-row { min-width: 0 !important; }
  .hb-cart .hb-row > a { display: grid !important; place-items: center !important; }
  .hb-cart .hb-img { object-fit: contain !important; object-position: center center !important; }
  .hb-cart .hb-info, .hb-cart .hb-qty, .hb-cart .hb-price { min-width: 0 !important; }
  .hb-cart .hb-qty { flex-wrap: wrap !important; row-gap: 7px !important; }
  .hb-cart .mc-qty-stepper button,
  .hb-cart .hb-remove,
  .hb-cart .hb-update { touch-action: manipulation !important; }
  .hb-cart .hb-meta span { overflow-wrap: anywhere !important; }
  .hb-cart .mc-cart-sticky[data-mobile-cart-sticky] {
    bottom: calc(var(--lx21-nav-h, 76px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
    pointer-events: auto !important;
  }

  #luxorCheckoutForm .co-shell {
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: max(8px, env(safe-area-inset-left, 0px)) !important;
    padding-right: max(8px, env(safe-area-inset-right, 0px)) !important;
    padding-bottom: calc(164px + env(safe-area-inset-bottom, 0px)) !important;
  }
  #luxorCheckoutForm .co-card,
  #luxorCheckoutForm .co-summary { overflow-wrap: anywhere !important; }
  #luxorCheckoutForm .co-grid { grid-template-columns: minmax(0, 1fr) !important; }
  #luxorCheckoutForm .co-grid input:not([type="checkbox"]):not([type="radio"]),
  #luxorCheckoutForm .co-grid select,
  #luxorCheckoutForm .co-grid textarea {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }
  #luxorCheckoutForm .co-grid textarea { min-height: 88px !important; }
  #luxorCheckoutForm .co-grid label { min-width: 0 !important; overflow-wrap: anywhere !important; }
  #luxorCheckoutForm .co-product { grid-template-columns: 44px minmax(0, 1fr) auto !important; }
  #luxorCheckoutForm .co-product img {
    display: block !important;
    width: 42px !important;
    height: 42px !important;
    object-fit: contain !important;
    object-position: center center !important;
  }
  #luxorCheckoutForm .co-line,
  #luxorCheckoutForm .co-transparency > div,
  #luxorCheckoutForm .co-total { min-width: 0 !important; gap: 8px !important; }
  #luxorCheckoutForm .co-line > *,
  #luxorCheckoutForm .co-transparency > div > *,
  #luxorCheckoutForm .co-total > * { min-width: 0 !important; overflow-wrap: anywhere !important; }
  #luxorCheckoutForm .mc-checkout-sticky {
    bottom: calc(var(--lx21-nav-h, 76px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
    pointer-events: auto !important;
  }
  #luxorCheckoutForm .mc-checkout-submit { touch-action: manipulation !important; }

  html.lx-mobile-keyboard-open #luxorCheckoutForm > .mc-checkout-sticky,
  html.lx-mobile-keyboard-open .mc-cart-sticky[data-mobile-cart-sticky],
  html.lx-mobile-keyboard-open .pdv17-mobile-buybar,
  html.lx-mobile-keyboard-open .app-bottom-nav { display: none !important; }
}

@media (max-width: 360px) {
  .hb-cart .hb-row { grid-template-columns: 68px minmax(0, 1fr) !important; gap: 7px 8px !important; }
  .hb-cart .hb-row > a { width: 68px !important; height: 88px !important; min-height: 88px !important; }
  .hb-cart .hb-name { font-size: 12px !important; line-height: 1.35 !important; }
  .hb-cart .mc-qty-label { display: none !important; }
  #luxorCheckoutForm > .mc-checkout-sticky {
    grid-template-columns: minmax(82px, .72fr) minmax(0, 1.55fr) !important;
    gap: 6px !important;
    padding: 6px !important;
  }
  #luxorCheckoutForm > .mc-checkout-sticky > .mc-checkout-submit {
    min-height: 48px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 10px !important;
  }
}

/* Mobile product frame and five-item storefront dock. */
@media (max-width: 760px) {
  body.lom-body .lom-product-media,
  body.product-catalog-page a.product-card-image,
  body.lom-body .lom-showcat-media.is-product,
  html body .product-detail-v966 .pdv17-main-image.product-main-image {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.lom-body .lom-product-media > a,
  body.product-catalog-page a.product-card-image > img,
  body.lom-body .lom-showcat-media.is-product > img,
  html body .product-detail-v966 .pdv17-main-image.product-main-image > #productMainImage {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  body.lom-body .lom-product-media > a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }

  body.lom-body .lom-product-media > a > img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  .app-bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  }
  .app-bottom-nav .app-favorites-tab,
  .app-bottom-nav .app-message-tab {
    min-width: 0 !important;
    overflow: hidden !important;
  }
  .app-bottom-nav .app-favorites-tab span:last-child,
  .app-bottom-nav .app-message-tab span:last-child {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
    font-size: clamp(8px, 2.35vw, 10px) !important;
    letter-spacing: -.03em !important;
  }
  .app-bottom-nav a,
  .app-bottom-nav button {
    background: transparent !important;
    border-radius: 0 !important;
  }
  .app-bottom-nav .active,
  .app-bottom-nav .app-message-tab[aria-expanded="true"] {
    color: var(--lx21-orange, #ed6b12) !important;
    background: transparent !important;
  }
  .app-bottom-nav .active::after { display: none !important; }
  .app-bottom-nav .app-cart-tab {
    margin: 0 !important;
    background: transparent !important;
  }
  .app-bottom-nav .app-cart-tab .app-nav-icon-wrap {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
  }
  .app-bottom-nav .app-cart-tab .app-nav-icon-wrap svg { width: 26px !important; height: 26px !important; }
  .app-bottom-nav .app-cart-tab.active::after { display: none !important; }
  .app-bottom-nav .app-message-tab[aria-expanded="true"] {
    color: var(--lx21-orange, #ed6b12) !important;
    background: transparent !important;
  }
}

/* Page-scoped polish for narrow phones; desktop styles are not affected. */
@media (max-width: 760px) {
  body.lom-body .lom-head-main,
  body.lom-body .lom-search,
  body.product-catalog-page .catalog-toolbar,
  body.product-catalog-page .catalog-search,
  .product-detail-v966 .pdv17-title-row,
  .product-detail-v966 .pdv17-purchase,
  .hb-cart .hb-row,
  #luxorCheckoutForm .co-shell,
  #luxorCheckoutForm .co-summary { min-width: 0 !important; }

  body.lom-body .lom-head-main > *,
  body.lom-body .lom-search input,
  body.product-catalog-page .catalog-toolbar > *,
  .product-detail-v966 .pdv17-title-row > *,
  .product-detail-v966 .pdv17-purchase > *,
  .hb-cart .hb-info,
  .hb-cart .hb-qty,
  .hb-cart .hb-price,
  #luxorCheckoutForm .co-product > *,
  #luxorCheckoutForm .co-line > *,
  #luxorCheckoutForm .co-total > * { min-width: 0 !important; }

  body.lom-body .lom-search input,
  body.product-catalog-page .catalog-search input,
  .product-detail-v966 .pdv17-title-row h1,
  .hb-cart .hb-name,
  #luxorCheckoutForm .co-summary,
  #luxorCheckoutForm .co-safe,
  #luxorCheckoutForm .co-legal-links { overflow-wrap: anywhere !important; }

  body.product-catalog-page .product-card-image,
  body.product-catalog-page .category-showcase-media,
  body.lom-body .lom-showcat-media.is-product,
  body.lom-body .lom-product-media,
  body.lom-body .lom-hero-product,
  .product-detail-v966 .pdv17-main-image.product-main-image,
  .hb-cart .hb-row > a {
    display: grid !important;
    place-items: center !important;
    overflow: hidden !important;
  }

  body.product-catalog-page .product-card-image > img,
  body.product-catalog-page .category-showcase-media > img,
  body.lom-body .lom-showcat-media.is-product > img,
  body.lom-body .lom-product-media > a > img,
  body.lom-body .lom-hero-product .lom-hero-slide > img,
  body.lom-body .lom-hero-product > img,
  .product-detail-v966 .pdv17-main-image.product-main-image > #productMainImage,
  .product-detail-v966 .pdv17-thumbs img,
  .product-detail-v966 .variant-thumb img,
  .hb-cart .hb-row > a > .hb-img,
  #luxorCheckoutForm .co-product img {
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform: none !important;
  }

  body.product-catalog-page .product-card-image > .product-placeholder,
  body.lom-body .lom-showcat-media.is-product > .product-placeholder,
  .product-detail-v966 .pdv17-main-image .product-placeholder {
    display: grid !important;
    place-items: center !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    text-align: center !important;
  }

  html body .product-detail-v966 .pdv17-mobile-buybar {
    left: max(8px, env(safe-area-inset-left, 0px)) !important;
    right: max(8px, env(safe-area-inset-right, 0px)) !important;
    bottom: calc(var(--lx21-nav-h, 76px) + env(safe-area-inset-bottom, 0px) + 8px) !important;
    width: auto !important;
    box-sizing: border-box !important;
  }
  .product-detail-v966 { padding-bottom: 64px !important; }
  .product-detail-v966 .pdv17-mobile-buybar button,
  body.product-catalog-page .product-card-bottom .product-add-btn,
  body.lom-body .lom-search button,
  body.product-catalog-page .catalog-search button,
  .hb-cart .hb-remove,
  .hb-cart .hb-update,
  #luxorCheckoutForm .mc-checkout-submit { min-height: 44px !important; touch-action: manipulation !important; }

  html body .hb-cart .mc-qty-stepper { grid-template-columns: auto 42px 44px 42px !important; }
  html body .hb-cart .mc-qty-stepper > button { width: 42px !important; min-width: 42px !important; height: 42px !important; min-height: 42px !important; }
  html body .hb-cart .mc-qty-stepper > input[type="number"] { width: 44px !important; min-width: 44px !important; height: 42px !important; }
  html body .hb-cart .hb-remove { min-width: 46px !important; }
  #luxorCheckoutForm .co-legal-links { gap: 8px 12px !important; line-height: 1.4 !important; }
}
