/*
 * Phase 20.5.14.25 — Full Mobile UX Sweep & Remaining Page Source-Level Polish
 * Scope: remaining high-risk mobile pages after notifications/my-orders refactor.
 * Principle: page-scoped selectors only; no global emergency overrides.
 */
@media (max-width: 900px){
  :where(.cart-page-pro,.checkout-v16-page,.product-super-page,.storefront-pro-hero,.storefront-top-rail-v155,.storefront-products-themed-v1331,.vendor-pro-page,.admin-pro-page,.customer-address-center-v1895271,.wallet-pro-ledger-center,.page-hero-lite){
    overflow-x:hidden!important;
  }
  :where(.cart-page-pro,.checkout-v16-page,.product-super-page,.storefront-pro-hero,.storefront-products-themed-v1331,.vendor-pro-page,.admin-pro-page,.customer-address-center-v1895271,.wallet-pro-ledger-center) :where(.container,.wrap,.admin-shell,.vendor-shell-pro,.wallet-shell,.address-shell-v1895271){
    width:min(100% - 16px, 1180px)!important;
    max-width:100%!important;
    min-width:0!important;
    padding-inline:0!important;
  }

  /* Cart: single-store and multi-store cards must stack, not squeeze. */
  .cart-page-pro .section-head.split,
  .cart-page-pro .vendor-carts-head-v172,
  .cart-page-pro .cart-address-preview-v1895271,
  .cart-page-pro .cart-layout-pro,
  .cart-page-pro .cart-line-pro,
  .cart-page-pro .cart-actions-pro,
  .cart-page-pro .vendor-card-meta-v1724,
  .cart-page-pro .vendor-card-body-v1724,
  .cart-page-pro .vendor-cart-actions-v172,
  .cart-page-pro .summary-line{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .cart-page-pro .vendor-cart-grid-v172,
  .cart-page-pro .cart-lines,
  .cart-page-pro .cart-stores-mini{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }
  .cart-page-pro :where(.cart-main-pro,.cart-summary-pro,.vendor-cart-card-v172,.cart-line-pro,.cart-info-v16,.cart-price-v16,.cart-address-copy-v1895271){
    width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;
  }
  .cart-page-pro :where(.btn,.mini-btn,button,.cart-address-actions-v1895271 a){width:100%;justify-content:center;text-align:center;white-space:normal!important;line-height:1.55!important}
  .cart-page-pro :where(h1,h2,h3,p,span,b,strong,small,a){word-break:normal!important;overflow-wrap:normal!important;line-height:1.65!important}
  .cart-page-pro :where(.qty-control-v16){justify-content:center!important}

  /* Checkout: every checkout block becomes a full-width step on mobile. */
  .checkout-v16-page .checkout-hero-v16,
  .checkout-v16-page .checkout-split-router-v171,
  .checkout-v16-page .checkout-grid-v16,
  .checkout-v16-page .checkout-fields-v16,
  .checkout-v16-page .address-book-head-pro,
  .checkout-v16-page .address-book-grid-pro,
  .checkout-v16-page .checkout-address-fields-grid-v1895272,
  .checkout-v16-page .map-actions,
  .checkout-v16-page .digital-policy-grid-v189541,
  .checkout-v16-page .proof-store-grid-v170,
  .checkout-v16-page .settings-grid.two,
  .checkout-v16-page .checkout-coupon-input-row-v1895172,
  .checkout-v16-page .checkout-item-v16,
  .checkout-v16-page .summary-line,
  .checkout-v16-page .legal-links-v123{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
  }
  .checkout-v16-page :where(.checkout-card-v16,.checkout-payment-option,.global-payment-option,.address-choice-pro,.checkout-map-card,.checkout-delivery-real-card,.checkout-payment-pro-card,.proof-store-card-v170,.order-summary-v16,.checkout-items-v16,.checkout-stores-v16){
    width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important;
  }
  .checkout-v16-page :where(input,select,textarea,button,.btn){width:100%;min-width:0!important;max-width:100%;white-space:normal!important;text-align:center}
  .checkout-v16-page :where(h1,h2,h3,p,span,b,strong,small,label,a){word-break:normal!important;overflow-wrap:normal!important;line-height:1.65!important}
  .checkout-v16-page :where(.order-code,.coupon-code-badge-v18951741,.egypt-wallet-input){overflow-wrap:break-word!important;word-break:break-word!important;direction:ltr;unicode-bidi:plaintext}

  /* Product detail: gallery, buy panel, variants and share controls stack cleanly. */
  .product-super-page .product-super-grid,
  .product-super-page .product-top-actions-v29,
  .product-super-page .product-quick-icons-v29,
  .product-super-page .product-buy-panel,
  .product-super-page .product-gallery-pro,
  .product-super-page .gallery-thumbs,
  .product-super-page .safe-alerts,
  .product-super-page .product-specs-table-v28,
  .product-super-page .variant-options,
  .product-super-page .product-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
    width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .product-super-page :where(.gallery-stage,.main-media-box,.info-panel,.product-buy-panel,.product-long-description,.product-detail-verified-exact-v189385){max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .product-super-page :where(.btn,button,a.store-mini-btn-v29){width:100%;justify-content:center;text-align:center;white-space:normal!important}
  .product-super-page :where(h1,h2,h3,p,span,b,strong,small,a,label){word-break:normal!important;overflow-wrap:normal!important;line-height:1.65!important}

  /* Storefront: hero, tabs, filters and products become controlled mobile strips/cards. */
  .storefront-pro-hero .storefront-cover,
  .storefront-pro-hero .storefront-identity-row,
  .storefront-pro-hero .storefront-actions,
  .storefront-products-themed-v1331 .storefront-products-layout-v155,
  .storefront-products-themed-v1331 .storefront-products-head-v114,
  .storefront-products-themed-v1331 .section-head.split,
  .storefront-category-showcase-v155 .section-head.split{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .storefront-top-rail-v155 .store-tabs,
  .storefront-products-themed-v1331 .store-tabs,
  .storefront-category-track-v157{
    display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;gap:8px!important;-webkit-overflow-scrolling:touch!important;padding-bottom:8px!important;max-width:100%!important;
  }
  .storefront-top-rail-v155 .store-tabs button,
  .storefront-category-card-v155{flex:0 0 auto!important;white-space:nowrap!important;width:auto!important;min-width:max-content!important}
  .storefront-products-themed-v1331 :where(.storefront-filter-panel-v155,.products-grid,.product-grid,.storefront-products-count-v114){width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .storefront-products-themed-v1331 :where(.products-grid,.product-grid){display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .storefront-pro-hero :where(.btn,button), .storefront-products-themed-v1331 :where(.btn,button,input,select){max-width:100%;white-space:normal!important}
  .storefront-pro-hero :where(h1,h2,h3,p,span,b,strong,small,a), .storefront-products-themed-v1331 :where(h1,h2,h3,p,span,b,strong,small,a){word-break:normal!important;overflow-wrap:normal!important;line-height:1.65!important}

  /* Admin pages: sidebar, hero actions, KPIs and detail grids stack safely. */
  .admin-pro-page .admin-shell,
  .admin-pro-page .admin-main-pro,
  .admin-pro-page .order-detail-hero,
  .admin-pro-page .hero-actions,
  .admin-pro-page .detail-grid,
  .admin-pro-page .orders-filter-grid,
  .admin-pro-page .admin-dashboard-grid,
  .admin-pro-page .return-settlement-audit-summary-grid-v2051215161,
  .admin-pro-page .audit-head{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .admin-pro-page :where(.admin-sidebar,.admin-main-pro,.admin-card,.detail-card,.orders-filter-panel,.return-settlement-audit-v205121516,.vendor-order-kpi,.table-pro-wrap){width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .admin-pro-page .table-pro-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .admin-pro-page .table-pro-wrap table{min-width:720px!important}
  .admin-pro-page :where(.btn,.btn-soft,.btn-print,button,input,select,textarea){max-width:100%;min-width:0!important;white-space:normal!important;text-align:center}
  .admin-pro-page :where(h1,h2,h3,p,span,b,strong,small,a,label,td,th){word-break:normal!important;overflow-wrap:normal!important;line-height:1.6!important}
  .admin-pro-page :where(.order-code,.copy-order-code-host-v20512542,code){overflow-wrap:break-word!important;word-break:break-word!important;direction:ltr;unicode-bidi:plaintext}

  /* Vendor orders/detail: command cards, stage timeline and action panels do not squeeze. */
  .vendor-pro-page .vendor-shell-pro,
  .vendor-pro-page .vendor-main-pro,
  .vendor-pro-page .vendor-hero-pro,
  .vendor-pro-page .hero-actions,
  .vendor-pro-page .vendor-order-kpi-grid,
  .vendor-pro-page .vendor-pro-toolbar,
  .vendor-pro-page .vendor-orders-card-grid,
  .vendor-pro-page .vofc-head,
  .vendor-pro-page .vofc-grid,
  .vendor-pro-page .vofc-badges,
  .vendor-pro-page .vofc-actions,
  .vendor-pro-page .order-detail-grid-pro,
  .vendor-pro-page .deposit-flow-grid-v18958,
  .vendor-pro-page .remaining-balance-grid-v1895285,
  .vendor-pro-page .return-settlement-audit-summary-grid-v2051215161,
  .vendor-pro-page .cr-decision-grid-v205127,
  .vendor-pro-page .proof-actions-v175,
  .vendor-pro-page .delivery-grid-v20929,
  .vendor-pro-page .phase10-lifecycle-grid{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:12px!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .vendor-pro-page :where(.vendor-sidebar-pro,.vendor-panel-pro,.vendor-order-final-card,.vofc-box,.vofc-proof,.vofc-action-banner,.vendor-order-tracker-v187,.return-settlement-audit-v205121516,.vendor-proof-card-v175,.delivery-card-v20929,.table-pro-wrap){width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .vendor-pro-page .vendor-order-tabs-final{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:8px!important;padding-bottom:8px!important;-webkit-overflow-scrolling:touch!important}
  .vendor-pro-page .vendor-order-tabs-final a{flex:0 0 auto!important;white-space:nowrap!important;min-width:max-content!important}
  .vendor-pro-page .trackline{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto!important;gap:10px!important;padding-bottom:10px!important;-webkit-overflow-scrolling:touch!important}
  .vendor-pro-page .trackline .stage{flex:0 0 128px!important;width:128px!important;min-width:128px!important;max-width:128px!important;text-align:center!important}
  .vendor-pro-page .table-pro-wrap{overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .vendor-pro-page .table-pro-wrap table{min-width:720px!important}
  .vendor-pro-page :where(.btn,.mini-btn,button,input,select,textarea){max-width:100%;min-width:0!important;white-space:normal!important;text-align:center;justify-content:center}
  .vendor-pro-page :where(h1,h2,h3,p,span,b,strong,small,a,label,td,th){word-break:normal!important;overflow-wrap:normal!important;line-height:1.6!important}
  .vendor-pro-page :where(.order-code-copy-anchor-v2051255,.vofc-code,code){overflow-wrap:break-word!important;word-break:break-word!important;direction:ltr;unicode-bidi:plaintext}

  /* Address book and wallet/account centers. */
  .customer-address-center-v1895271 .address-hero-v1895271,
  .customer-address-center-v1895271 .address-actions-v1895271,
  .customer-address-center-v1895271 .address-layout-v1895271,
  .customer-address-center-v1895271 .address-list-v1895271,
  .customer-address-center-v1895271 .address-card-v1895271,
  .customer-address-center-v1895271 .address-card-actions-v1895271,
  .customer-address-center-v1895271 .address-form-grid-v1895271,
  .customer-address-center-v1895271 .map-buttons-v1895271,
  .wallet-pro-ledger-center .wallet-hero,
  .wallet-pro-ledger-center .wallet-stats,
  .wallet-pro-ledger-center .main-grid,
  .wallet-pro-ledger-center .two,
  .wallet-pro-ledger-center .wallet-code-row{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important;max-width:100%!important;min-width:0!important;
  }
  .customer-address-center-v1895271 :where(.address-card-v1895271,.address-list-card-v1895271,.address-form-card-v1895271,.map-panel-v1895271),
  .wallet-pro-ledger-center :where(.card,.stat-card,.balance-panel){width:100%!important;max-width:100%!important;min-width:0!important;overflow:hidden!important}
  .customer-address-center-v1895271 :where(input,button,.btn,a), .wallet-pro-ledger-center :where(input,button,.btn,a){max-width:100%;min-width:0!important;white-space:normal!important;text-align:center;justify-content:center}
  .customer-address-center-v1895271 :where(h1,h2,h3,p,span,b,strong,small,a,label), .wallet-pro-ledger-center :where(h1,h2,h3,p,span,b,strong,small,a,label){word-break:normal!important;overflow-wrap:normal!important;line-height:1.65!important}
}

@media (max-width: 520px){
  .storefront-products-themed-v1331 :where(.products-grid,.product-grid){grid-template-columns:minmax(0,1fr)!important}
  .notifications-page .notif-mini-stats,
  .customer-orders-v177 .mini-stats,
  .wallet-pro-ledger-center .wallet-stats{grid-template-columns:minmax(0,1fr)!important}
  .cart-page-pro .cart-img-link{width:100%!important;max-height:220px!important;display:block!important}
  .product-super-page .gallery-thumbs{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
