/* One.v2.43 — compact two-card mobile product grid.
   Final override loaded after all public marketplace styles. */
@media (max-width: 820px) {
  body.reference-storefront-v415 .reference-products-panel {
    padding-left: 8px !important;
    padding-right: 8px !important;
    overflow: hidden !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style],
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="classic-vertical"],
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="modern-horizontal"],
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="premium-showcase"],
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="compact-market"],
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="luxury-gold"] {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style] .product-card,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="modern-horizontal"] .product-card {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style] .product-img,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="modern-horizontal"] .product-img {
    flex: 0 0 138px !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 138px !important;
    min-height: 138px !important;
    max-height: 138px !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(255,255,255,.08) !important;
    background: #f4f1e9 !important;
    overflow: hidden !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img img,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img picture,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img canvas {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-shortlist-actions {
    top: 5px !important;
    right: 5px !important;
    gap: 4px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-shortlist-actions button {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    font-size: 14px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img .tag {
    top: 6px !important;
    left: 6px !important;
    max-width: calc(100% - 74px) !important;
    padding: 4px 6px !important;
    font-size: 6.5px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .discount-chip {
    left: 6px !important;
    bottom: 6px !important;
    padding: 4px 6px !important;
    font-size: 8px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-gallery-count {
    left: 6px !important;
    bottom: 6px !important;
    min-height: 20px !important;
    padding: 3px 6px !important;
    font-size: 8px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-gallery-dots {
    bottom: 5px !important;
    max-width: 72% !important;
    padding: 3px 5px !important;
    gap: 3px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-gallery-dots i {
    width: 6px !important;
    height: 6px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style] .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="classic-vertical"] .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="premium-showcase"] .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="compact-market"] .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style="luxury-gold"] .product-body,
  body.reference-storefront-v415 .reference-products-panel .product-card[data-cross-border="true"] .product-body {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 8px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-identity,
  body.reference-storefront-v415 .reference-products-panel .product-grid .seller-card-note,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-feature-strip {
    display: none !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    min-height: 28px !important;
    max-height: 28px !important;
    margin: 0 0 5px !important;
    overflow: hidden !important;
    font-family: Arial, sans-serif !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1.27 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-code-line,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-code-line {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 5px !important;
    min-height: 15px !important;
    margin: 0 0 5px !important;
    overflow: hidden !important;
    font-size: 7px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-code-line > span:first-child {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-stock {
    flex: 0 0 auto !important;
    font-size: 7px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .price-row,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-price-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-end !important;
    justify-content: space-between !important;
    gap: 4px !important;
    min-height: 22px !important;
    margin: 0 0 7px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .price-row strong,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-price {
    min-width: 0 !important;
    font-size: 14px !important;
    line-height: 1 !important;
    white-space: normal !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .price-row > span {
    flex: 0 0 auto !important;
    font-size: 7px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .estimated-local-price {
    display: none !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
    margin-top: auto !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-actions .btn {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 31px !important;
    height: 31px !important;
    padding: 4px 3px !important;
    border-radius: 7px !important;
    overflow: hidden !important;
    font-size: 8px !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .catalog-loading,
  body.reference-storefront-v415 .reference-products-panel .product-grid .catalog-empty,
  body.reference-storefront-v415 .reference-products-panel .product-grid .catalog-error,
  body.reference-storefront-v415 .reference-products-panel .product-grid .catalog-loading-recovery {
    grid-column: 1 / -1 !important;
  }

  body.reference-storefront-v415 .support-whatsapp-float,
  body.reference-storefront-v415 .whatsapp-float,
  body.reference-storefront-v415 [data-whatsapp-floating] {
    bottom: calc(88px + env(safe-area-inset-bottom)) !important;
    transform: scale(.86) !important;
    transform-origin: right bottom !important;
  }
}

@media (max-width: 360px) {
  body.reference-storefront-v415 .reference-products-panel .product-grid,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style] {
    gap: 6px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-img,
  body.reference-storefront-v415 .reference-products-panel .product-grid[data-card-style] .product-img {
    flex-basis: 124px !important;
    height: 124px !important;
    min-height: 124px !important;
    max-height: 124px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-body {
    padding: 7px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-title {
    min-height: 26px !important;
    max-height: 26px !important;
    font-size: 10px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .price-row strong,
  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-price {
    font-size: 12px !important;
  }

  body.reference-storefront-v415 .reference-products-panel .product-grid .product-card-actions .btn {
    min-height: 29px !important;
    height: 29px !important;
    font-size: 7px !important;
  }
}

html::after { content: "One.v2.43-mobile-two-card-grid"; display: none; }

/* High-specificity final guard against legacy card-style rules. */
@media (max-width: 820px) {
  body.reference-storefront-v415 #productGrid.product-grid,
  body.reference-storefront-v415 #productGrid.product-grid[data-card-style] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .product-card-identity,
  body.reference-storefront-v415 #productGrid .product-card .seller-card-note,
  body.reference-storefront-v415 #productGrid .product-card .product-card-feature-strip {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .product-body {
    min-height: 0 !important;
    height: auto !important;
    padding: 8px !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .product-card-title {
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    min-height: 28px !important;
    max-height: 28px !important;
    height: 28px !important;
    margin: 0 0 5px !important;
    overflow: hidden !important;
    font: 900 11px/1.27 Arial, sans-serif !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .product-code-line,
  body.reference-storefront-v415 #productGrid .product-card .product-card-code-line {
    min-height: 15px !important;
    height: 15px !important;
    margin: 0 0 5px !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .price-row,
  body.reference-storefront-v415 #productGrid .product-card .product-card-price-row {
    min-height: 22px !important;
    height: 22px !important;
    margin: 0 0 7px !important;
  }

  body.reference-storefront-v415 #productGrid .product-card .product-card-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    height: 31px !important;
    min-height: 31px !important;
  }
}

@media (max-width: 360px) {
  body.reference-storefront-v415 #productGrid .product-card .product-body { padding: 7px !important; }
  body.reference-storefront-v415 #productGrid .product-card .product-card-title {
    min-height: 26px !important;
    max-height: 26px !important;
    height: 26px !important;
    font-size: 10px !important;
  }
}
