/* LUPON mobile storefront refresh — shared responsive system, with a focused products.html layout. */
@media (max-width: 1080px) {
  .lupon-store-header { top: 0; }
  .store-header-main {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 72px;
    gap: 12px;
    padding-top: 7px;
  }
  .store-header-main .brand { grid-column: 1; grid-row: 1; }
  .store-header-main .menu-toggle {
    display: grid;
    grid-column: 3;
    grid-row: 1;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #dce5dc;
    border-radius: 50%;
    background: #eff4ec;
    color: #183e2b;
    font-size: 22px;
    cursor: pointer;
  }
  .store-header-main .store-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin: 0 0 10px;
  }
  .store-header-main .store-quick-links { display: none; }
  .store-nav-wrap { position: relative; padding: 0; }
  .store-nav-wrap .customer-nav-links {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 160;
    max-height: min(72dvh, 620px);
    overflow: auto;
    overscroll-behavior: contain;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
    padding: 11px;
    border: 1px solid #e2eae1;
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(255,255,255,.985);
    box-shadow: 0 18px 38px rgba(20,48,29,.15);
    backdrop-filter: blur(16px);
  }
  .store-nav-wrap .customer-nav-links.open { display: flex; animation: lupon-mobile-menu-in .18s ease both; }
  .store-nav-wrap .customer-nav-links > a {
    display: flex;
    width: 100%;
    min-height: 46px;
    justify-content: space-between;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 13px;
    white-space: normal;
  }
  .store-nav-wrap .customer-nav-links > a.current { background: #edf4eb; color: #123d2b; }
  .store-nav-wrap .customer-nav-links .nav-cta { margin: 6px 0 0; justify-content: center; }
}

@media (max-width: 760px) {
  :root { --lupon-gutter: 16px; }
  html { scroll-padding-top: 118px; }
  .topbar {
    min-height: 32px;
    justify-content: center;
    gap: 5px;
    padding: 7px 9px;
    font-size: 9px;
    line-height: 1.35;
    text-align: center;
  }
  .topbar-right { display: none; }
  .topbar a { margin-left: 2px; }
  .store-header-main {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 64px;
    column-gap: 9px;
    padding-top: 8px;
  }
  .store-header-main .brand { min-width: 0; }
  .store-header-main .brand-name { font-size: 24px; }
  .store-header-main .brand-sub { font-size: 7px; letter-spacing: .19em; }
  .store-header-main .store-quick-links {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    gap: 10px;
  }
  .store-header-main .store-quick-links a {
    min-width: 25px;
    min-height: 40px;
    justify-content: center;
    font-size: 0;
  }
  .store-header-main .store-quick-links a small { display: none; }
  .store-header-main .quick-icon { font-size: 21px; }
  .store-header-main .quick-icon b { top: -5px; right: -8px; min-width: 15px; height: 15px; font-size: 8px; }
  .store-header-main .menu-toggle {
    grid-column: 3;
    grid-row: 1;
    width: 39px;
    height: 39px;
    font-size: 20px;
  }
  .store-header-main .store-search {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 47px !important;
    margin: 0 0 9px;
  }
  .store-search { grid-template-columns: 32px minmax(0, 1fr) auto; gap: 7px; }
  .store-search .store-search-icon { width: 32px; height: 32px; }
  .store-search button { min-width: 58px; padding-inline: 9px !important; }
  .store-nav-wrap .customer-nav-links { left: 0; right: 0; }
  .storefront-collection-rail { padding: 8px 0 10px; }
  .storefront-collection-rail-inner {
    display: flex;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    padding: 0 var(--lupon-gutter) 3px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .storefront-collection-rail-inner::-webkit-scrollbar { display: none; }
  .storefront-collection-rail-lead { display: none; }
  .storefront-collection-chip {
    flex: 0 0 148px;
    min-width: 148px;
    min-height: 58px;
    grid-template-columns: 42px minmax(0, 1fr) 12px;
    gap: 7px;
    padding: 6px 8px;
    border-radius: 13px;
    scroll-snap-align: start;
  }
  .storefront-collection-chip img { width: 42px; height: 42px; border-radius: 9px; }
  .storefront-collection-chip span { min-width: 0; }
  .storefront-collection-chip span small { font-size: 6.5px; }
  .storefront-collection-chip span strong { font-size: 10px; }
  main > section { padding-block: 34px; }
  .customer-hero-inner { padding-block: 30px; }
  .customer-hero h1, .listing-hero h1, .wishlist-hero h1 { font-size: clamp(34px, 9vw, 46px); line-height: 1.04; }
  .customer-hero p, .listing-hero p, .wishlist-hero p { font-size: 13px; line-height: 1.7; }
  .customer-section, .listing-main, .wishlist-content { padding-block: 32px; }
  .customer-panel, .cart-panel, .cart-summary-panel { padding: 16px; border-radius: 16px; }
  .customer-grid, .customer-grid.two, .customer-grid.three { grid-template-columns: 1fr !important; }
  .hero-actions .button, .hero-actions .text-link, .listing-hero-links .button, .listing-hero-links .text-link { min-height: 44px; }

  /* Product list page — touch-first controls and compact two-column merchandising cards. */
  body[data-lupon-page="products"] .listing-hero { padding: 30px 0 34px; }
  body[data-lupon-page="products"] .listing-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 21px;
    min-height: 0;
  }
  body[data-lupon-page="products"] .listing-hero-inner > div:first-child { padding: 0 2px; }
  body[data-lupon-page="products"] .listing-hero h1 { max-width: 520px; margin: 13px 0 12px; font-size: clamp(35px, 9.4vw, 47px); }
  body[data-lupon-page="products"] .listing-hero p { max-width: 560px; margin-bottom: 0; font-size: 13px; }
  body[data-lupon-page="products"] .listing-hero-links { gap: 8px; margin-top: 17px; }
  body[data-lupon-page="products"] .listing-hero-links .button,
  body[data-lupon-page="products"] .listing-hero-links .text-link { min-height: 43px; padding: 10px 14px; font-size: 11px; }
  body[data-lupon-page="products"] .listing-hero-art.storefront-listing-editorial { width: 100%; height: clamp(195px, 58vw, 245px); max-height: none; border-radius: 18px !important; }
  body[data-lupon-page="products"] .listing-hero-art .storefront-editorial-main { left: 10%; width: 55%; height: 87%; }
  body[data-lupon-page="products"] .listing-hero-art .storefront-editorial-side { right: 7%; width: 36%; height: 68%; border-width: 4px; }
  body[data-lupon-page="products"] .storefront-editorial-stamp { right: 5%; bottom: 6%; padding: 7px 9px; }
  body[data-lupon-page="products"] .listing-main { padding-block: 31px 48px; }
  body[data-lupon-page="products"] .listing-heading {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 17px;
  }
  body[data-lupon-page="products"] .listing-heading h2 { margin: 6px 0 5px; font-size: clamp(25px, 7vw, 32px); }
  body[data-lupon-page="products"] .listing-heading p { max-width: 38ch; font-size: 11px; line-height: 1.55; }
  body[data-lupon-page="products"] .listing-heading-count { flex: 0 0 auto; padding: 8px 10px; font-size: 9px; }
  body[data-lupon-page="products"] .listing-category-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 7px;
    margin: 18px 0 12px;
    padding: 2px 1px 8px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  body[data-lupon-page="products"] .listing-category-tabs::-webkit-scrollbar { display: none; }
  body[data-lupon-page="products"] .listing-category-tabs button {
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: 40px;
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 10px;
    white-space: nowrap;
    scroll-snap-align: start;
  }
  body[data-lupon-page="products"] .listing-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px;
    margin: 12px 0 17px;
    padding: 12px;
    border-radius: 16px;
  }
  body[data-lupon-page="products"] .listing-filters > * { min-width: 0; }
  body[data-lupon-page="products"] .listing-filters > .listing-search { grid-column: 1 / -1; height: 45px; }
  body[data-lupon-page="products"] .listing-filters > label:not(.listing-search):not(.listing-range) {
    display: grid;
    gap: 5px;
    min-width: 0;
    font-size: 10px;
  }
  body[data-lupon-page="products"] .listing-filters select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding: 0 26px 0 10px;
    border-radius: 10px;
    font-size: 11px;
  }
  body[data-lupon-page="products"] .listing-search { padding-inline: 9px; }
  body[data-lupon-page="products"] .listing-search input { height: 40px; font-size: 11px !important; }
  body[data-lupon-page="products"] .listing-filters .listing-range {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 4px 7px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid #e3ebe1;
    border-radius: 11px;
    background: #fbfcfa;
    font-size: 9px;
  }
  body[data-lupon-page="products"] .listing-filters .listing-range strong { font-size: 9px; white-space: nowrap; }
  body[data-lupon-page="products"] .listing-filters .listing-range input { grid-column: 1 / -1; width: 100%; min-width: 0; margin: 3px 0 0; }
  body[data-lupon-page="products"] .listing-filters .reset-filters {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 43px;
    height: auto;
    border-radius: 999px;
    background: #edf4eb;
    border-color: #dce8da;
    font-size: 11px;
  }
  body[data-lupon-page="products"] .listing-notice { font-size: 11px; line-height: 1.5; }
  body[data-lupon-page="products"] .listing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 11px;
  }
  body[data-lupon-page="products"] .listing-card { min-width: 0; border-radius: 14px; }
  body[data-lupon-page="products"] .listing-card-visual {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 4.8;
  }
  body[data-lupon-page="products"] .listing-card-visual > img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; }
  body[data-lupon-page="products"] .listing-card-tag { top: 8px; left: 8px; max-width: calc(100% - 52px); padding: 5px 7px; font-size: 7px; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body[data-lupon-page="products"] .listing-favorite { top: 7px; right: 7px; width: 34px; height: 34px; font-size: 18px; }
  body[data-lupon-page="products"] .listing-card-body { display: flex; flex-direction: column; min-width: 0; padding: 10px 10px 11px; }
  body[data-lupon-page="products"] .listing-card-body > small { font-size: 8px; letter-spacing: .1em; }
  body[data-lupon-page="products"] .listing-card-body h3 {
    display: -webkit-box;
    min-height: 36px;
    margin: 5px 0 5px;
    overflow: hidden;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  body[data-lupon-page="products"] .listing-card-body > p {
    display: -webkit-box;
    min-height: 0;
    margin: 0 0 8px;
    overflow: hidden;
    color: #6a766c;
    font-size: 9px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }
  body[data-lupon-page="products"] .listing-card-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    padding: 8px 0;
    font-size: 8px;
  }
  body[data-lupon-page="products"] .listing-card-meta strong { font-size: 12px; }
  body[data-lupon-page="products"] .listing-card-meta span { font-size: 8px; }
  body[data-lupon-page="products"] .listing-detail-button {
    width: 100%;
    min-height: 39px;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 9px;
    line-height: 1.2;
  }
  body[data-lupon-page="products"] .listing-empty { padding: 31px 15px; }
  body[data-lupon-page="products"] .listing-catalog-shortcuts { margin-top: 25px; padding: 16px; border-radius: 15px; }
  body[data-lupon-page="products"] .listing-catalog-shortcuts > div { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 11px; }
  body[data-lupon-page="products"] .listing-catalog-shortcuts a { padding: 8px 10px; border: 1px solid #dce7da; border-radius: 999px; background: #fff; font-size: 10px; }

  /* Product-detail dialog becomes a comfortable mobile sheet. */
  body[data-lupon-page="products"] .listing-detail-dialog {
    width: calc(100% - 16px);
    max-width: 560px;
    max-height: 94dvh;
    margin: auto;
    border-radius: 18px;
  }
  body[data-lupon-page="products"] .listing-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; }
  body[data-lupon-page="products"] .listing-detail-gallery { min-height: 0; }
  body[data-lupon-page="products"] .listing-detail-gallery > img { width: 100%; height: clamp(190px, 55vw, 260px); min-height: 0; max-height: none; object-fit: cover; }
  body[data-lupon-page="products"] .detail-thumbnails { gap: 7px; padding: 8px; overflow-x: auto; }
  body[data-lupon-page="products"] .detail-thumb { flex: 0 0 54px; width: 54px; height: 54px; }
  body[data-lupon-page="products"] .listing-detail-content { padding: 22px 18px 20px; }
  body[data-lupon-page="products"] .listing-detail-content h2 { margin: 8px 0; font-size: 25px; line-height: 1.15; }
  body[data-lupon-page="products"] .listing-detail-content > p:not(.listing-detail-stock):not(.listing-detail-disclaimer) { font-size: 11px; line-height: 1.6; }
  body[data-lupon-page="products"] .listing-detail-price { margin: 12px 0; font-size: 17px; }
  body[data-lupon-page="products"] .listing-detail-specs { margin: 10px 0; }
  body[data-lupon-page="products"] .listing-detail-specs > div { padding: 7px 0; }
  body[data-lupon-page="products"] .listing-variant-fields { gap: 8px; }
  body[data-lupon-page="products"] .listing-variant-fields select { min-height: 43px; font-size: 12px; }
  body[data-lupon-page="products"] .listing-detail-add { min-height: 45px; margin: 12px 0; }

  /* Catalogue detail pages and customer pages share comfortable mobile controls. */
  body[data-lupon-page^="catalog-"] .catalog-hero { padding: 23px 16px 19px; border-radius: 17px; }
  body[data-lupon-page^="catalog-"] .catalog-hero-copy h1 { font-size: clamp(31px, 8.5vw, 40px); }
  body[data-lupon-page^="catalog-"] .catalog-hero-art { height: 205px; border-radius: 15px; }
  body[data-lupon-page^="catalog-"] .catalog-page-section { padding-block: 30px; }
  body[data-lupon-page^="catalog-"] .catalog-page-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 11px;
  }
  body[data-lupon-page^="catalog-"] .catalog-page-tools > .catalog-page-search,
  body[data-lupon-page^="catalog-"] .catalog-page-tools > .reset-filters { grid-column: 1 / -1; }
  body[data-lupon-page^="catalog-"] .catalog-page-tools label { min-width: 0; font-size: 10px; }
  body[data-lupon-page^="catalog-"] .catalog-page-tools select { width: 100%; min-width: 0; min-height: 43px; font-size: 11px; }
  body[data-lupon-page^="catalog-"] .catalog-page-search { min-height: 44px; }
  body[data-lupon-page^="catalog-"] .catalog-page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  body[data-lupon-page^="catalog-"] .catalog-product-card { display: flex; flex-direction: column; min-width: 0; border-radius: 13px; }
  body[data-lupon-page^="catalog-"] .catalog-product-visual { width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 4.8; }
  body[data-lupon-page^="catalog-"] .catalog-product-visual img { width: 100%; height: 100%; object-fit: cover; }
  body[data-lupon-page^="catalog-"] .catalog-product-body { padding: 10px; }
  body[data-lupon-page^="catalog-"] .catalog-product-body h3 { font-size: 12px; }
  body[data-lupon-page^="catalog-"] .catalog-dialog-grid { grid-template-columns: minmax(0, 1fr); }
  body[data-lupon-page^="catalog-"] .catalog-dialog-gallery > img { height: 230px; min-height: 0; }
  body[data-lupon-page^="catalog-"] .catalog-dialog-info { padding: 19px 16px; }
  body[data-lupon-page^="catalog-"] .catalog-review-section { grid-template-columns: minmax(0, 1fr); }
  body[data-lupon-page^="catalog-"] .catalog-help-strip .container { align-items: flex-start; flex-direction: column; gap: 14px; }
  body[data-lupon-page^="catalog-"] .catalog-help-strip .button { width: 100%; justify-content: center; }
  body[data-lupon-page="tracking"] .timeline { grid-template-columns: minmax(0, 1fr) !important; }
  body[data-lupon-page="payment-result"] .result-main { padding: 32px 12px 55px; }
  .listing-detail-dialog[open], .catalog-product-dialog[open] { overscroll-behavior: contain; }
  .footer-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-block: 22px; }
}

@media (max-width: 390px) {
  .store-header-main { column-gap: 7px; }
  .store-header-main .brand-name { font-size: 22px; }
  .store-header-main .store-quick-links { gap: 7px; }
  .store-header-main .quick-icon { font-size: 19px; }
  .store-header-main .menu-toggle { width: 36px; height: 36px; }
  .store-search { grid-template-columns: 29px minmax(0, 1fr) auto; gap: 5px; }
  .store-search .store-search-icon { width: 29px; height: 29px; }
  .store-search button { min-width: 51px; gap: 3px; padding-inline: 7px !important; font-size: 10px !important; }
  body[data-lupon-page="products"] .listing-heading { align-items: flex-start; flex-direction: column; }
  body[data-lupon-page="products"] .listing-heading-count { align-self: flex-start; }
  body[data-lupon-page="products"] .listing-card-body { padding: 9px 8px 10px; }
  body[data-lupon-page="products"] .listing-card-body h3 { font-size: 11px; }
  body[data-lupon-page="products"] .listing-card-body > p { font-size: 8px; }
  body[data-lupon-page="products"] .listing-detail-button { font-size: 8px; }
}

@keyframes lupon-mobile-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .store-nav-wrap .customer-nav-links.open { animation: none !important; }
}
