/* Phase 37 · Storefront v2 mobile repair
   ordering.html only · loaded after 30-storefront.css.
   Purpose: keep the new Storefront v2 mobile layout independent from legacy
   body.view-grid/body.view-list CSS. */

@media (max-width: 760px) {
  body.storefront-v2 .section-products {
    padding-inline: 10px;
  }

  body.storefront-v2 .product-section-content {
    min-width: 0;
  }

  body.storefront-v2 #coinsList,
  body.storefront-v2 #barsList,
  body.storefront-v2 #blistersList,
  body.storefront-v2 .coins-list {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 8px 0 12px !important;
    max-width: none !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  body.storefront-v2 .sf-card,
  body.storefront-v2 .coin-card.sf-card {
    min-width: 0 !important;
    width: 100% !important;
    padding: 10px !important;
    border-radius: 14px !important;
    min-height: 0 !important;
    cursor: pointer;
  }

  body.storefront-v2 .sf-card .badge-row {
    gap: 5px !important;
    margin-block-end: 7px !important;
    min-width: 0 !important;
  }

  body.storefront-v2 .sf-card .badge-row .badge,
  body.storefront-v2 .sf-card .badge-row .status-chip {
    max-width: 100%;
    padding: 4px 7px !important;
    font-size: 8px !important;
    letter-spacing: .06em !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.storefront-v2 .sf-card .card-img {
    aspect-ratio: 1 / 1 !important;
    border-radius: 10px !important;
    margin-inline: 0 !important;
  }

  body.storefront-v2 .sf-card.blister-card .card-img {
    aspect-ratio: 3 / 2 !important;
    margin-inline: -10px !important;
  }

  /* Bars fall through to the generic 1/1 square above, but the real bar photo
     is portrait (matches desktop's 340/481) · squaring it letterboxes the sides
     and shrinks the visible photo. Restore the real ratio so it fills the box. */
  body.storefront-v2 .sf-card.bars-item .card-img {
    aspect-ratio: 340 / 481 !important;
    margin-inline: -6px !important;
  }

  body.storefront-v2 .sf-card .sf-face img {
    width: 86% !important;
    height: 86% !important;
  }

  body.storefront-v2 .sf-card.blister-card .sf-face img,
  body.storefront-v2 .sf-card.bars-item .sf-face img {
    width: 100% !important;
    height: 100% !important;
  }

  body.storefront-v2 .sf-card .sf-dremt-slot {
    margin-top: 7px !important;
    min-width: 0 !important;
  }

  body.storefront-v2 .sf-card .sf-dremt-slot .badge--dremt {
    max-width: 100%;
  }

  body.storefront-v2 .sf-card .nm,
  body.storefront-v2 .sf-card .nm.coin-name {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    hyphens: auto;
    min-height: 2.5em !important;
    max-height: 2.5em !important;
    margin: 9px 0 3px !important;
    font-size: clamp(12px, 3.45vw, 14px) !important;
    line-height: 1.25 !important;
    cursor: pointer;
    touch-action: manipulation;
  }

  /* No :hover on touch - keep the "opens details" chevron statically visible
     instead of relying on the desktop hover-reveal (operator 2026-07-06: mobile
     had no affordance at all, customers didn't know the name was tappable). */
  body.storefront-v2 .sf-card .nm.coin-name::after {
    content: '\203A' !important;
    color: var(--sf-gold-2, #d8b35f) !important;
    font-weight: 600 !important;
    margin-inline-start: 5px !important;
  }

  body.storefront-v2 .sf-card .nm.coin-name:focus-visible {
    outline: 2px solid var(--sf-gold-2, #d8b35f) !important;
    outline-offset: 3px;
    border-radius: 6px;
    text-decoration: none !important;
  }

  body.storefront-v2 .sf-card .spec {
    min-height: 1.35em;
    font-size: 10px !important;
    line-height: 1.35 !important;
    gap: 2px !important;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  body.storefront-v2 .sf-card .price-row {
    margin-block-start: auto !important;
    padding-top: 8px !important;
    gap: 7px !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  body.storefront-v2 .sf-card .price-cell {
    min-width: 0;
    gap: 1px !important;
  }

  body.storefront-v2 .sf-card .price-cell .lab {
    font-size: 8px !important;
    letter-spacing: .11em !important;
  }

  body.storefront-v2 .sf-card .price-display {
    max-width: 100%;
    font-size: clamp(16px, 4.8vw, 20px) !important;
    line-height: 1 !important;
    white-space: nowrap;
  }

  body.storefront-v2 .sf-card .price-display .currency-sym {
    font-size: .68em !important;
  }

  body.storefront-v2 .sf-card .price-display .price-cents {
    font-size: .62em !important;
  }

  body.storefront-v2 .sf-card .stepper {
    width: 100% !important;
    min-height: 42px;
    justify-content: space-between !important;
    padding: 4px !important;
    border-radius: 999px !important;
  }

  body.storefront-v2 .sf-card .stepper .qty-btn {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    font-size: 18px !important;
  }

  body.storefront-v2 .sf-card .stepper .qty-val {
    width: 38px !important;
    min-width: 30px !important;
    font-size: 15px !important;
  }

  body.storefront-v2 .sf-card .bulk-disc-chip {
    padding: 7px 9px !important;
    font-size: 10px !important;
    line-height: 1.25 !important;
    border-radius: 10px !important;
  }
}

@media (min-width: 761px) {
  body.storefront-v2 .auth-header-buttons {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
  }

  body.storefront-v2 .auth-header-panel {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }
}

@media (max-width: 360px) {
  body.storefront-v2 #coinsList,
  body.storefront-v2 #barsList,
  body.storefront-v2 #blistersList,
  body.storefront-v2 .coins-list {
    gap: 8px !important;
  }

  body.storefront-v2 .sf-card,
  body.storefront-v2 .coin-card.sf-card {
    padding: 8px !important;
  }

  body.storefront-v2 .sf-card.blister-card .card-img {
    margin-inline: -8px !important;
  }

  body.storefront-v2 .sf-card .stepper .qty-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
  }
}

body.storefront-v2 .auth-menu-trigger {
  display: none;
}

body.storefront-v2 .auth-header-panel {
  display: contents;
}

@media (max-width: 760px) {
  body.storefront-v2 .auth-header-buttons {
    position: relative !important;
    justify-content: flex-end !important;
    align-items: center !important;
    padding: 6px 12px 2px !important;
    min-height: 42px;
    z-index: 45;
  }

  body.storefront-v2 .auth-menu-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(212, 165, 116, 0.36);
    background: rgba(8, 14, 26, 0.82);
    color: rgba(255, 255, 255, 0.88);
    cursor: pointer;
    padding: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24);
  }

  body.storefront-v2 .auth-menu-avatar {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    line-height: 1;
  }

  body.storefront-v2 .auth-header-panel {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 12px;
    inset-inline-start: auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: min(220px, calc(100vw - 32px));
    max-width: calc(100vw - 32px);
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(212, 165, 116, 0.22);
    background: rgba(8, 14, 26, 0.96);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 46;
  }

  body.storefront-v2 #authHeaderButtons.open .auth-header-panel {
    display: flex;
  }

  body.storefront-v2 .auth-header-panel .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 4px;
    font-size: 13px !important;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
  }

  body.storefront-v2 .auth-header-buttons.is-authenticated .auth-menu-trigger {
    border-color: rgba(212, 165, 116, 0.56);
    color: #d4a574;
    background: rgba(20, 35, 55, 0.92);
  }

  body.storefront-v2 .auth-header-panel .login-btn,
  body.storefront-v2 .auth-header-panel .logout-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 10px 12px !important;
    min-height: 40px;
    border-radius: 12px !important;
    font-size: 12px !important;
  }

  body.storefront-v2 .lang-dropdown-wrap {
    position: relative;
    justify-content: center;
    overflow: visible;
    z-index: 40;
  }

  body.storefront-v2 .lang-dropdown-trigger {
    min-height: 38px;
    max-width: calc(100vw - 32px);
    padding-inline: 12px;
  }

  body.storefront-v2 .lang-wheel-panel {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    inset-inline-start: auto !important;
    inset-inline-end: auto !important;
    margin-inline: auto !important;
    width: min(280px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    height: 220px !important;
    transform: translateY(-6px) !important;
  }

  body.storefront-v2 .lang-dropdown-wrap.open .lang-wheel-panel {
    transform: translateY(0) !important;
  }

  body.storefront-v2 .hero-cat-tabs {
    direction: ltr !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    gap: 8px !important;
    padding: 0 10px !important;
    align-items: stretch;
    -ms-overflow-style: none;
    scrollbar-width: none;
    mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
  }

  body.storefront-v2 .hero-cat-tabs::-webkit-scrollbar {
    display: none;
  }

  body.storefront-v2 .hero-cat-tab {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 9px 14px !important;
    border-radius: 16px !important;
    justify-content: center;
    gap: 6px !important;
    scroll-snap-align: start;
  }

  body.storefront-v2 .hero-cat-tab .tab-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: auto;
    min-width: 0;
    padding: 0 !important;
  }

  body.storefront-v2 .hero-cat-tab .tab-label-en {
    min-width: 0;
    font-size: clamp(13px, 3.5vw, 15px) !important;
    line-height: 1.15 !important;
    text-align: center;
    white-space: nowrap !important;
  }

  body.storefront-v2 .hero-cat-tab .tab-count {
    flex: 0 0 auto;
    font-size: 10px !important;
    padding: 3px 7px !important;
  }

  body.storefront-v2 .section-tab-title {
    text-align: center;
    font-size: 12px !important;
    letter-spacing: .24em !important;
  }
}


body.storefront-v2 .about-tab-content {
  max-width: 980px;
  margin: 0 auto;
}

body.storefront-v2 .about-preview {
  background: linear-gradient(180deg, rgba(12,20,38,.82), rgba(8,14,26,.94));
  border: 1px solid rgba(216,179,95,.18);
  border-radius: 24px;
  padding: 28px 22px;
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
}

body.storefront-v2 .about-preview-head {
  text-align: center;
  margin-bottom: 26px;
}

body.storefront-v2 .about-preview-head::after {
  content: "";
  display: block;
  width: 92px;
  height: 1px;
  margin: 20px auto 0;
  background: linear-gradient(90deg, transparent, var(--sf-gold-1, #d8b35f), transparent);
}

body.storefront-v2 .about-preview-eyebrow {
  display: inline-block;
  color: var(--sf-gold-1, #f6e3a8);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

body.storefront-v2 .about-preview-title {
  margin: 0 0 10px;
  color: var(--sf-txt, #eef3fb);
  font-family: var(--display,'Fraunces',serif);
  font-size: clamp(28px, 4.5vw, 42px);
  line-height: 1.08;
}

body.storefront-v2 .about-preview-note {
  margin: 0 auto;
  max-width: 700px;
  color: var(--sf-muted, #9aa7c2);
  font-size: 14px;
  line-height: 1.7;
}

body.storefront-v2 .about-preview-entry {
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  text-align: center;
}

body.storefront-v2 .about-preview-entry:first-of-type {
  border-top: 0;
}

body.storefront-v2 .about-preview-entry .field {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--sf-gold-2, #d8b35f);
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
}

body.storefront-v2 .about-preview-entry p {
  margin: 0 auto;
  max-width: 720px;
  color: #d4deeb;
  font-size: 16px;
  line-height: 1.85;
}

body.storefront-v2 .about-preview-cta-row {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

body.storefront-v2 .about-preview-cta {
  min-width: 220px;
  text-align: center;
}

@media (max-width: 760px) {
  body.storefront-v2 .about-preview {
    padding: 22px 16px;
    border-radius: 20px;
  }

  body.storefront-v2 .about-preview-title {
    font-size: clamp(22px, 6vw, 30px);
  }

  body.storefront-v2 .about-preview-note,
  body.storefront-v2 .about-preview-entry p {
    font-size: 14px;
    line-height: 1.7;
  }
}
