/*
  NexoPlay · Mobile responsive finish V1
  Scope: mobile/tablet only (max-width: 900px).
  Desktop layout is intentionally not changed by this stylesheet.
*/

/* Shared viewport and center canvas */
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body:has(.admin-sidebar),
  body:has(.provider-sidebar),
  body:has(.distributor-sidebar),
  body:has(.affiliate-sidebar) {
    overflow-x: hidden;
  }

  body:has(.admin-sidebar) .app-shell,
  body:has(.provider-sidebar) .app-shell,
  body:has(.distributor-sidebar) .app-shell,
  body:has(.affiliate-sidebar) .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: clip;
  }

  body:has(.admin-sidebar) .main,
  body:has(.provider-sidebar) .main,
  body:has(.distributor-sidebar) .main,
  body:has(.affiliate-sidebar) .main {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 calc(18px + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
  }

  body:has(.admin-sidebar) .main > main,
  body:has(.provider-sidebar) .main > main,
  body:has(.distributor-sidebar) .main > main,
  body:has(.affiliate-sidebar) .main > main {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 0 env(safe-area-inset-bottom) !important;
    overflow-x: clip;
    box-sizing: border-box;
  }

  body:has(.admin-sidebar) .admin-page,
  body:has(.provider-sidebar) .provider-page,
  body:has(.distributor-sidebar) .dist-center,
  body:has(.affiliate-sidebar) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }

  .admin-page,
  .provider-page,
  .dist-center,
  {
    overflow-wrap: anywhere;
  }

  *,
  *,
  *,
  * {
    min-width: 0;
  }

  img,
  img,
  img,
  img {
    max-width: 100%;
  }

  /* Center top bars become a two-row, non-clipping control strip. */
  .admin-topbar,
  .provider-topbar,
  .distributor-topbar,
  .affiliate-topbar {
    position: sticky !important;
    top: 0;
    z-index: 120;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 7px !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    height: auto !important;
    padding: 8px 10px !important;
    box-sizing: border-box;
    overflow: visible !important;
  }

  .admin-topbar .center-sidebar-mobile-toggle,
  .provider-topbar .center-sidebar-mobile-toggle,
  .distributor-topbar .center-sidebar-mobile-toggle,
  .affiliate-topbar .nx-aff-sidebar-toggle {
    order: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 10px;
    touch-action: manipulation;
  }

  .admin-topbar .center-back-catalog,
  .provider-topbar .center-back-catalog,
  .distributor-topbar .center-back-catalog,
  .affiliate-topbar .center-back-catalog {
    order: 1;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    gap: 0 !important;
    border-radius: 10px;
    font-size: 0 !important;
    box-sizing: border-box;
  }

  .admin-topbar .center-back-catalog b,
  .provider-topbar .center-back-catalog b,
  .distributor-topbar .center-back-catalog b,
  .affiliate-topbar .center-back-catalog b {
    display: none !important;
  }

  .admin-topbar .center-back-catalog span,
  .provider-topbar .center-back-catalog span,
  .distributor-topbar .center-back-catalog span,
  .affiliate-topbar .center-back-catalog span {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
    line-height: 1;
  }

  .provider-topbar .mobile-brand,
  .distributor-topbar .mobile-brand,
  .affiliate-topbar .mobile-brand,
  .admin-topbar .admin-mobile-title {
    order: 2;
    display: flex !important;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    max-width: min(34vw, 150px);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 13px !important;
    line-height: 1.1;
  }

  .admin-topbar .admin-mobile-title b {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-topbar .admin-mobile-title span {
    flex: 0 0 auto;
    font-size: 8px !important;
  }

  .provider-topbar .top-actions,
  .distributor-topbar .top-actions,
  .affiliate-topbar .top-actions {
    order: 4;
    display: flex !important;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: auto !important;
    gap: 6px !important;
    position: relative;
  }

  .provider-topbar .provider-search,
  .distributor-topbar .distributor-search,
  .affiliate-topbar .affiliate-search {
    order: 5;
    display: flex !important;
    flex: 1 0 100% !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 1px 0 0 !important;
    padding: 0 11px !important;
    border-radius: 11px;
    box-sizing: border-box;
  }

  .provider-topbar .provider-search input,
  .distributor-topbar .distributor-search input,
  .affiliate-topbar .affiliate-search input {
    width: 100%;
    min-width: 0;
    font-size: 11px !important;
  }

  .provider-topbar .circle-btn,
  .distributor-topbar .circle-btn,
  .affiliate-topbar .circle-btn,
  .provider-topbar .top-actions .nx-notification-trigger,
  .distributor-topbar .top-actions .nx-notification-trigger,
  .affiliate-topbar .top-actions .nx-notification-trigger {
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }

  .provider-topbar .nx-account-trigger,
  .distributor-topbar .nx-account-trigger,
  .affiliate-topbar .nx-account-trigger,
  .admin-topbar .admin-profile-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 40px !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 3px !important;
    gap: 0 !important;
    border-radius: 50% !important;
    overflow: hidden !important;
  }

  .provider-topbar .nx-account-trigger-label,
  .provider-topbar .nx-account-trigger > .icon:last-child,
  .distributor-topbar .nx-account-trigger-label,
  .distributor-topbar .nx-account-trigger > .icon:last-child,
  .affiliate-topbar .nx-account-trigger-label,
  .affiliate-topbar .nx-account-trigger > .icon:last-child,
  .admin-topbar .admin-profile-trigger .nx-account-trigger-label,
  .admin-topbar .admin-profile-trigger > .icon:last-child {
    display: none !important;
  }

  .provider-topbar .nx-account-trigger .user-avatar-img,
  .provider-topbar .nx-account-trigger .avatar-placeholder,
  .distributor-topbar .nx-account-trigger .user-avatar-img,
  .distributor-topbar .nx-account-trigger .avatar-placeholder,
  .affiliate-topbar .nx-account-trigger .user-avatar-img,
  .affiliate-topbar .nx-account-trigger .avatar-placeholder,
  .admin-topbar .admin-profile-trigger .user-avatar-img,
  .admin-topbar .admin-profile-trigger .avatar-placeholder {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    flex: 0 0 32px !important;
  }

  .admin-topbar .admin-search,
  .admin-topbar .admin-top-status,
  .admin-topbar .admin-date,
  .admin-topbar .nx-logs-topbar-spacer {
    display: none !important;
  }

  .admin-topbar .center-sidebar-mobile-toggle { order: 0; }
  .admin-topbar .center-back-catalog { order: 1; }
  .admin-topbar .admin-mobile-title { order: 2; }
  .admin-topbar .admin-global-wallet-pill { order: 3; margin-left: auto; }
  .admin-topbar .nx-notification-trigger {
    order: 4;
    flex: 0 0 38px !important;
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
  }
  .admin-topbar .admin-profile-trigger { order: 5; margin-left: 0; }

  /* Drawer sidebars: every menu opens fully and can scroll to its bottom actions. */
  body:has(.admin-sidebar) .admin-sidebar,
  body:has(.provider-sidebar) .provider-sidebar,
  body:has(.distributor-sidebar) .distributor-sidebar,
  body:has(.affiliate-sidebar) .affiliate-sidebar {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1600 !important;
    width: min(292px, 87vw) !important;
    max-width: 87vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
    scrollbar-width: thin;
  }

  body:has(.admin-sidebar) .admin-sidebar {
    transform: translateX(-105%) !important;
    transition: transform .22s ease;
    pointer-events: none;
  }
  body:has(.admin-sidebar) .admin-sidebar.open {
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  body:has(.provider-sidebar) .provider-sidebar {
    transform: translateX(-105%) !important;
    transition: transform .22s ease;
    pointer-events: none;
  }
  body.provider-menu-open:has(.provider-sidebar) .provider-sidebar {
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  body:has(.distributor-sidebar) .distributor-sidebar {
    transform: translateX(-105%) !important;
    transition: transform .22s ease;
    pointer-events: none;
  }
  body.distributor-sidebar-open:has(.distributor-sidebar) .distributor-sidebar {
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  body:has(.affiliate-sidebar) .affiliate-sidebar {
    transform: translateX(-105%) !important;
    transition: transform .22s ease;
    pointer-events: none;
  }
  body.menu-open:has(.affiliate-sidebar) .affiliate-sidebar {
    display: flex !important;
    transform: translateX(0) !important;
    pointer-events: auto;
  }

  body:has(.admin-sidebar.open)::after,
  body.provider-menu-open:has(.provider-sidebar)::after,
  body.distributor-sidebar-open:has(.distributor-sidebar)::after,
  body.menu-open:has(.affiliate-sidebar)::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 0, 0, .56);
  }

  body:has(.admin-sidebar) .admin-sidebar nav,
  body:has(.provider-sidebar) .provider-sidebar nav,
  body:has(.distributor-sidebar) .distributor-sidebar nav,
  body:has(.affiliate-sidebar) .affiliate-sidebar nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding-bottom: 12px;
  }

  body:has(.admin-sidebar) .admin-sidebar-bottom,
  body:has(.provider-sidebar) .provider-sidebar .sidebar-bottom,
  body:has(.distributor-sidebar) .distributor-sidebar .sidebar-bottom,
  body:has(.affiliate-sidebar) .affiliate-sidebar .sidebar-bottom {
    position: relative !important;
    inset: auto !important;
    flex: 0 0 auto !important;
    margin-top: auto !important;
    padding-bottom: 3px;
  }

  body:has(.provider-sidebar) .provider-sidebar nav a,
  body:has(.distributor-sidebar) .distributor-sidebar nav a,
  body:has(.affiliate-sidebar) .affiliate-sidebar nav a,
  body:has(.admin-sidebar) .admin-sidebar nav a {
    min-height: 43px;
    height: auto;
    flex: 0 0 auto;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Avoid narrow center pages and cut-off action rows. */
  { padding: 16px 12px 30px !important; }
  { padding: 16px 12px 28px !important; }
  { padding: 16px 12px 28px !important; }
  { padding: 14px 12px 28px !important; }

  .pv-head,
  .admin-page-head,
  .dist-page-header,
  .nx-aff-v3-welcome {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .pv-head-actions,
  .admin-page-head > div:last-child,
  .admin-page-head-actions,
  .dist-page-header-actions,
  .pv-toolbar,
  .pv-row-actions,
  .pv-publish-footer,
  .admin-placeholder-actions,
  .nx-aff-v3-share-actions {
    display: flex;
    flex-wrap: wrap !important;
    align-items: center;
    gap: 8px;
    max-width: 100%;
  }

  .pv-head-actions > *,
  .admin-page-head > div:last-child > *,
  .admin-page-head-actions > *,
  .dist-page-header-actions > *,
  .pv-row-actions > *,
  .admin-placeholder-actions > * {
    max-width: 100%;
    min-width: 0;
  }

  button,
  button,
  button,
  button,
  .button,
  .admin-primary,
  .admin-secondary,
  .dist-btn,
  .nx-aff-v3-outline-btn,
  .nx-aff-v3-primary-btn {
    max-width: 100%;
    touch-action: manipulation;
  }

  input,
  select,
  textarea,
  input,
  select,
  textarea,
  input,
  select,
  textarea,
  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .pv-form-grid,
  .pv-profile-grid,
  .pv-support-grid,
  .pv-delivery-grid,
  .pv-plan-grid,
  .pv-wallet-grid,
  .pv-sales-cards,
  .ad-publish-grid,
  .ad-wallet-rules,
  .ad-support-cards,
  .ad-role-grid {
    min-width: 0;
  }

  .ad-table-wrap,
  .pv-table-wrap,
  .dist-table-wrap,
  .provider-table-wrap,
  .nx-pw-overview-table-card .ad-table-wrap,
  .nx-bm-item-list,
  [class*="table-wrap"] {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .nx-modal-layer,
  .modal-backdrop,
  .modal-overlay {
    padding: 12px !important;
    box-sizing: border-box;
  }

  .nx-modal,
  .modal,
  .modal-card {
    width: min(100%, 640px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
  }
}

@media (max-width: 700px) {
  .provider-topbar .top-actions .global-wallet-pill,
  .provider-topbar .top-actions .provider-wallet-mini,
  .admin-topbar .admin-global-wallet-pill,
  .distributor-topbar .distributor-online,
  .affiliate-topbar .nx-aff-online {
    display: none !important;
  }

  .provider-topbar .mobile-brand,
  .distributor-topbar .mobile-brand,
  .affiliate-topbar .mobile-brand,
  .admin-topbar .admin-mobile-title {
    max-width: 30vw;
  }
}

@media (max-width: 640px) {
  .pv-head h1,
  .dist-page-header h1,
  .admin-page-head h1,
  h1 {
    font-size: clamp(22px, 6vw, 28px);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .pv-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .pv-product-row { grid-template-columns: minmax(0, 1fr) !important; }
  .pv-profile-stats { flex-wrap: wrap; gap: 8px; }
  .pv-publish-footer { flex-direction: column; align-items: stretch; }
  .pv-publish-footer > * { width: 100%; }

  .dist-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .dist-dashboard-grid,
  .dist-detail-grid,
  .dist-money-summary,
  .distributor-purchase-mode-options,
  .distributor-resale-client-fields {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .dist-page-header-actions { justify-content: stretch; }
  .dist-page-header-actions > button,
  .dist-page-header-actions > a { flex: 1 1 135px; }

  .admin-page-head > div:last-child { width: 100%; }
  .admin-page-head > div:last-child > button,
  .admin-page-head > div:last-child > a { flex: 1 1 130px; }
  .ad-filterbar { flex-wrap: wrap; }
  .ad-filterbar label { flex: 1 1 100%; max-width: none; }
  .ad-filterbar select { flex: 1 1 100%; width: 100%; }

  .nx-aff-v3-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nx-affiliate-two-col { grid-template-columns: minmax(0, 1fr) !important; }
}

@media (max-width: 420px) {
  .admin-topbar,
  .provider-topbar,
  .distributor-topbar,
  .affiliate-topbar {
    gap: 5px !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .admin-topbar .center-sidebar-mobile-toggle,
  .provider-topbar .center-sidebar-mobile-toggle,
  .distributor-topbar .center-sidebar-mobile-toggle,
  .affiliate-topbar .nx-aff-sidebar-toggle,
  .admin-topbar .center-back-catalog,
  .provider-topbar .center-back-catalog,
  .distributor-topbar .center-back-catalog,
  .affiliate-topbar .center-back-catalog {
    flex-basis: 35px !important;
    width: 35px !important;
    min-width: 35px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .admin-topbar .admin-mobile-title,
  .provider-topbar .mobile-brand,
  .distributor-topbar .mobile-brand,
  .affiliate-topbar .mobile-brand {
    max-width: 26vw;
    font-size: 12px !important;
  }

  .provider-topbar .top-actions,
  .distributor-topbar .top-actions,
  .affiliate-topbar .top-actions { gap: 5px !important; }

  .provider-topbar .circle-btn,
  .distributor-topbar .circle-btn,
  .affiliate-topbar .circle-btn,
  .provider-topbar .top-actions .nx-notification-trigger,
  .distributor-topbar .top-actions .nx-notification-trigger,
  .affiliate-topbar .top-actions .nx-notification-trigger,
  .provider-topbar .nx-account-trigger,
  .distributor-topbar .nx-account-trigger,
  .affiliate-topbar .nx-account-trigger,
  .admin-topbar .admin-profile-trigger {
    flex-basis: 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .pv-stats,
  .dist-metric-grid,
  .nx-aff-v3-metrics {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Public home: use the actual 1080×720 mobile banner ratio and show the whole asset. */
@media (max-width: 780px) {
  .hero-ref.hero-carousel {
    width: calc(100% - 24px) !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 3 / 2 !important;
    margin: 14px 12px 16px !important;
    border-radius: 14px !important;
    background: #050a13;
  }

  .hero-carousel .hero-slides,
  .hero-carousel .hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: inherit;
  }

  .hero-carousel .hero-slide > .hero-picture {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .hero-carousel .hero-slide > .hero-picture > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center center !important;
    background: #050a13;
  }

  .hero-carousel .hero-dots { z-index: 4; }

  /* Promo cards share one wide frame and one image source on every device. */
  .promos {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 11px !important;
    margin: 0 12px 17px !important;
  }

  .promos .promo-card {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    aspect-ratio: 1200 / 460 !important;
    overflow: hidden;
    border-radius: 13px;
    background: #080d18;
  }

  .promos .promo-card > img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #080d18;
  }

  .promos .promo-card .promo-button {
    z-index: 5;
    left: 6.5%;
    bottom: 15%;
    width: auto;
    min-width: 0;
    max-width: 62%;
    min-height: 29px;
    max-height: 36px;
    height: auto;
    aspect-ratio: auto;
    padding: 0 11px;
    border-radius: 9px;
    font-size: clamp(10px, 2.7vw, 12px);
    white-space: nowrap;
  }

  /* In the banner manager the promo phone preview must match its real wide card. */
  .nx-bm-preview-image-wrap.mobile-mode {
    width: 100% !important;
    max-width: 440px !important;
    aspect-ratio: 3 / 2 !important;
    align-self: center;
  }

  .nx-bm-preview-image-wrap.mobile-mode img {
    object-fit: contain !important;
    object-position: center center !important;
    background: #050a13;
  }

  .nx-bm-preview-promo.mobile-mode {
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: 1200 / 460 !important;
    align-self: stretch;
  }

  .nx-bm-preview-promo img,
  .nx-bm-editor-promo-preview > img {
    object-fit: contain !important;
    object-position: center center !important;
    background: #080d18;
  }

  .nx-bm-editor-promo-preview {
    aspect-ratio: 1200 / 460 !important;
  }

  .nx-bm-image-editor-grid.is-single-image {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .nx-bm-image-editor-grid.is-single-image .nx-bm-image-field {
    width: 100%;
    max-width: 520px;
  }

  .nx-bm-image-editor-grid.is-single-image .nx-bm-image-preview {
    aspect-ratio: 1200 / 460;
  }
}



/* =========================================================
   NexoPlay mobile storefront: visible USD + usable wallet
   and desktop-style product cards in a two-column grid.
   All rules are mobile-only; desktop presentation is unchanged.
   ========================================================= */
@media (max-width: 980px) {
  .storefront-topbar .storefront-currency {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 5px;
    font-size: 10px;
    order: 1;
  }

  .storefront-topbar .storefront-icon-btn[href="#cart"] { order: 2; }
  .storefront-topbar .storefront-wallet { order: 3; }
  .storefront-topbar .nx-notification-trigger { order: 4; }
  .storefront-topbar .storefront-profile-btn { order: 5; }

  /* The old broad `span { display:none }` rule hid the wallet SVG too.
     Target the text wrapper only, keeping the clickable wallet icon visible. */
  .storefront-topbar .storefront-wallet > .icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
  }

  .storefront-topbar .storefront-wallet .storefront-wallet-copy {
    display: flex !important;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    overflow: hidden;
  }

  .storefront-topbar .storefront-wallet-copy small,
  .storefront-topbar .storefront-wallet-copy b {
    display: block !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 780px) {
  /*
    Product cards — mobile layout V3.
    Keep two columns, reduce vertical density, and let the artwork finish
    halfway through the delivery badge / favorite button. The hero carousel,
    its swipe/timer behavior, and the product-title ticker are intentionally
    untouched.
  */
  .storefront-home-products .product-grid,
  .product-grid.page-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch;
    gap: 9px !important;
    margin: 0 10px 38px !important;
    width: auto;
    min-width: 0;
  }

  .storefront-home-products .product-grid > .store-product-card,
  .product-grid.page-grid > .store-product-card {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
  }

  /* The art itself is not clipped, so the badge and heart can overlap
     the image/body boundary. The image and its gradients remain clipped
     to the card's rounded top corners. */
  .storefront-home-products .store-product-art,
  .product-grid.page-grid .store-product-art {
    position: relative;
    z-index: 4 !important;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1.55 !important;
    overflow: visible !important;
    border-radius: 13px 13px 0 0;
  }

  .storefront-home-products .store-product-art > img,
  .product-grid.page-grid .store-product-art > img {
    position: absolute !important;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    border-radius: 13px 13px 0 0;
  }

  .storefront-home-products .store-product-art::after,
  .product-grid.page-grid .store-product-art::after,
  .storefront-home-products .store-product-art-gradient,
  .product-grid.page-grid .store-product-art-gradient {
    border-radius: 13px 13px 0 0;
  }

  /* Delivery / category chips sit across the bottom edge of the artwork. */
  .storefront-home-products .store-product-badges,
  .product-grid.page-grid .store-product-badges {
    top: auto !important;
    bottom: -13px !important;
    left: 7px !important;
    right: 43px !important;
    display: flex;
    align-items: center;
    align-content: center;
    flex-wrap: wrap;
    gap: 3px;
    max-width: calc(100% - 50px);
    z-index: 7 !important;
  }

  .storefront-home-products .store-product-badges .store-badge,
  .product-grid.page-grid .store-product-badges .store-badge {
    max-width: 100%;
    min-width: 0;
    gap: 3px;
    padding: 5px 6px;
    border-radius: 7px;
    font-size: 7.5px;
    line-height: 1;
    white-space: nowrap;
  }

  .storefront-home-products .store-product-badges .store-badge .icon,
  .product-grid.page-grid .store-product-badges .store-badge .icon {
    width: 9px;
    height: 9px;
  }

  /* Favorite remains fully tappable and overlaps the same image edge. */
  .storefront-home-products .store-heart,
  .product-grid.page-grid .store-heart {
    top: auto !important;
    right: 7px !important;
    bottom: -17px !important;
    z-index: 8 !important;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    font-size: 19px;
  }

  /* Reserve room for the half-overlapping controls, then compact the body. */
  .storefront-home-products .store-product-body,
  .product-grid.page-grid .store-product-body {
    position: relative;
    z-index: 1 !important;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 22px 8px 9px !important;
  }

  .storefront-home-products .store-product-title-row h3.store-title-ticker,
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker {
    height: 19px !important;
    min-height: 19px !important;
    line-height: 19px !important;
    font-size: 12px !important;
  }

  .storefront-home-products .store-product-title-row p,
  .product-grid.page-grid .store-product-title-row p {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.2;
  }

  .storefront-home-products .store-provider-row,
  .product-grid.page-grid .store-provider-row {
    gap: 6px;
    margin-top: 7px;
    padding-top: 7px;
    min-width: 0;
  }

  .storefront-home-products .store-provider-avatar,
  .product-grid.page-grid .store-provider-avatar {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .storefront-home-products .store-provider-name-wrap,
  .product-grid.page-grid .store-provider-name-wrap {
    flex: 1 1 0%;
    min-width: 0;
    overflow: hidden;
  }

  .storefront-home-products .store-provider-name-wrap > small,
  .product-grid.page-grid .store-provider-name-wrap > small {
    font-size: 7px;
    line-height: 1.1;
  }

  .storefront-home-products .store-provider-name-wrap > strong,
  .storefront-home-products .store-provider-name-link,
  .product-grid.page-grid .store-provider-name-wrap > strong,
  .product-grid.page-grid .store-provider-name-link {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
    font-size: 9px !important;
    line-height: 1.2;
  }

  .storefront-home-products .store-online,
  .product-grid.page-grid .store-online {
    display: none;
  }

  /* Price and stock stay side-by-side, as in the desktop card. */
  .storefront-home-products .store-product-stats,
  .product-grid.page-grid .store-product-stats {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
    margin-top: 8px;
  }

  .storefront-home-products .store-product-stats > span,
  .product-grid.page-grid .store-product-stats > span {
    min-width: 0;
    grid-template-columns: 11px minmax(0, 1fr);
    column-gap: 4px;
    padding: 6px 5px;
    border-radius: 8px;
  }

  .storefront-home-products .store-product-stats .icon,
  .product-grid.page-grid .store-product-stats .icon {
    width: 11px;
    height: 11px;
  }

  .storefront-home-products .store-product-stats small,
  .product-grid.page-grid .store-product-stats small {
    font-size: 7px;
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .storefront-home-products .store-product-stats b,
  .product-grid.page-grid .store-product-stats b {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .storefront-home-products .store-product-rating,
  .product-grid.page-grid .store-product-rating {
    min-height: 12px;
    gap: 4px;
    margin: 6px 0 7px;
    font-size: 8px;
    line-height: 1.2;
  }

  .storefront-home-products .store-product-rating .store-rating-empty,
  .product-grid.page-grid .store-product-rating .store-rating-empty {
    font-size: 13px;
  }

  .storefront-home-products .store-product-rating em,
  .product-grid.page-grid .store-product-rating em {
    display: block;
    min-width: 0;
    margin-top: 0;
    font-size: 8px;
  }

  .storefront-home-products .store-product-body > .store-primary-btn,
  .product-grid.page-grid .store-product-body > .store-primary-btn {
    min-height: 32px;
    height: 32px;
    margin-top: auto;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 9px;
  }

  .storefront-home-products .store-terms-btn,
  .product-grid.page-grid .store-terms-btn {
    min-height: 28px;
    height: 28px;
    margin-top: 5px;
    padding: 0 5px;
    border-radius: 8px;
    font-size: 8px;
    gap: 4px;
  }

  .storefront-home-products .store-terms-btn .icon,
  .product-grid.page-grid .store-terms-btn .icon {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 560px) {
  .storefront-topbar {
    padding: 8px 8px !important;
    gap: 7px !important;
  }

  .storefront-brand {
    gap: 4px;
    font-size: 18px !important;
    letter-spacing: -.9px;
  }

  .storefront-brand i .icon {
    width: 13px;
    height: 13px;
  }

  .storefront-actions {
    gap: 3px !important;
    flex-wrap: nowrap;
  }

  .storefront-topbar .storefront-currency {
    flex-basis: 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    font-size: 9px;
    border-radius: 9px;
  }

  .storefront-topbar .storefront-icon-btn,
  .storefront-topbar .storefront-profile-btn {
    flex: 0 0 34px;
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 2px;
    border-radius: 10px;
  }

  .storefront-topbar .storefront-wallet {
    display: flex !important;
    flex: 0 0 78px;
    width: 78px !important;
    min-width: 78px !important;
    max-width: 78px;
    height: 34px !important;
    min-height: 34px;
    padding: 0 5px !important;
    gap: 4px;
    border-radius: 9px;
  }

  .storefront-topbar .storefront-wallet > .icon {
    flex-basis: 14px;
    width: 14px;
    height: 14px;
  }

  .storefront-topbar .storefront-wallet-copy small {
    font-size: 7px;
    line-height: 1;
  }

  .storefront-topbar .storefront-wallet-copy b {
    font-size: 9px;
    line-height: 1.1;
  }

  .storefront-topbar .storefront-profile-btn .user-avatar-img,
  .storefront-topbar .storefront-profile-btn .avatar-placeholder {
    width: 27px;
    height: 27px;
  }
}

@media (max-width: 380px) {
  .storefront-topbar {
    padding-left: 6px !important;
    padding-right: 6px !important;
    gap: 5px !important;
  }

  .storefront-brand {
    font-size: 16px !important;
  }

  .storefront-actions { gap: 2px !important; }

  .storefront-topbar .storefront-currency,
  .storefront-topbar .storefront-icon-btn,
  .storefront-topbar .storefront-profile-btn {
    flex-basis: 32px;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .storefront-topbar .storefront-wallet {
    flex-basis: 70px;
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px;
    height: 32px !important;
    min-height: 32px;
    padding: 0 4px !important;
    gap: 3px;
  }

  .storefront-topbar .storefront-wallet-copy small { font-size: 6px; }
  .storefront-topbar .storefront-wallet-copy b { font-size: 8px; }
}


/*
  NexoPlay · Mobile table scrolling V1
  Restore intrinsic table widths after the center-wide min-width:0 reset.
  Scroll is confined to each table wrapper; the page itself remains vertically scrollable.
  Desktop styles/layout are intentionally unchanged.
*/
@media (max-width: 900px) {
  /* Admin tables */
  .ad-table-wrap,
  .ad-provider-detail-table-wrap,
  .ad-users-table-scroll,
  .ad-wallet-ledger-table-wrap,
  .nx-topups-table-scroll,
  .nxa-act-table-wrap,
  .nxa-table-wrap,
  .nx-rbac-table-wrap,
  .nx-logs-table-wrap,
  .nx-coupons-table-wrap,
  .nx-coupons-history-table,
  .adp-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #31577e #091321;
  }

  /* Provider tables */
  .pv-table-wrap,
  .pv-taxonomy-table-wrap,
  .pv-mothers-table-wrap,
  .nx-deliveries-table-scroll,
  .nx-sales-table-wrap,
  .nx-delivery-history-table-wrap,
  .nxs-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #31577e #091321;
  }

  /* Affiliate tables */
  .nx-aff-table-wrap,
  .nx-aff-v3-table-scroll,
  .nxal-table-wrap,
  .nxar-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #31577e #091321;
  }

  /* Distributor table */
  .dist-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: #553483 #0b1020;
  }

  /*
    The blanket mobile rule * / * /
    * / * sets min-width:0 and was
    overriding the deliberate minimum widths on tables. Restore the table
    widths so columns no longer collapse into narrow, vertically wrapped text.
  */
  .ad-table-wrap > table,
  .ad-provider-detail-table-wrap > table,
  .ad-users-table-scroll > table,
  .ad-wallet-ledger-table-wrap > table,
  .nx-topups-table-scroll > table,
  .nxa-act-table-wrap > table,
  .nxa-table-wrap > table,
  .nx-rbac-table-wrap > table,
  .nx-logs-table-wrap > table,
  .nx-coupons-table-wrap > table,
  .nx-coupons-history-table > table,
  .adp-table-wrap > table,
  .pv-table-wrap > table,
  .pv-taxonomy-table-wrap > table,
  .pv-mothers-table-wrap > table,
  .nx-deliveries-table-scroll > table,
  .nx-sales-table-wrap > table,
  .nx-delivery-history-table-wrap > table,
  .nxs-table-wrap > table,
  .nx-aff-table-wrap > table,
  .nx-aff-v3-table-scroll > table,
  .nxal-table-wrap > table,
  .nxar-table-wrap > table,
  .dist-table-wrap > table {
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    table-layout: auto !important;
  }

  /* Retain the established minimum widths for the data-dense tables. */
  .ad-table.large { min-width: 900px !important; }
  .ad-products-table { min-width: 1040px !important; }
  .ad-categories-table { min-width: 760px !important; }
  .ad-subcategories-table { min-width: 730px !important; }
  .ad-providers-table { min-width: 880px !important; }
  .ad-users-table { min-width: 900px !important; }
  .ad-orders-table { min-width: 960px !important; }
  .ad-deliveries-table { min-width: 900px !important; }
  .ad-mothers-table { min-width: 790px !important; }
  .nx-pw-provider-table { min-width: 1060px !important; }
  .ad-provider-detail-table { min-width: 510px !important; }
  .ad-users-detail-table { min-width: 460px !important; }
  .nx-rbac-table { min-width: 680px !important; }
  .nx-rbac-users-table { min-width: 700px !important; }
  .nx-logs-table { min-width: 940px !important; }
  .nxa-support-table { min-width: 850px !important; }
  .nxa-act-table { min-width: 900px !important; }
  .adp-table { min-width: 1260px !important; }

  .pv-table { min-width: 700px !important; }
  .pv-taxonomy-table { min-width: 630px !important; }
  .pv-mothers-table { min-width: 1000px !important; }
  .pv-orders-table { min-width: 980px !important; }
  .nx-deliveries-table { min-width: 1120px !important; }
  .nx-sales-table { min-width: 960px !important; }
  .nx-delivery-history-table { min-width: 560px !important; }
  .nxs-table { min-width: 920px !important; }

  .nx-aff-v3-table { min-width: 430px !important; }
  .nxal-table { min-width: 1020px !important; }
  .nxar-table { min-width: 770px !important; }
  .dist-table { min-width: 1160px !important; }

  /* Scrollbars remain discoverable on desktop browsers and simulators. */
  .ad-table-wrap::-webkit-scrollbar,
  .ad-provider-detail-table-wrap::-webkit-scrollbar,
  .ad-users-table-scroll::-webkit-scrollbar,
  .ad-wallet-ledger-table-wrap::-webkit-scrollbar,
  .nx-topups-table-scroll::-webkit-scrollbar,
  .nxa-act-table-wrap::-webkit-scrollbar,
  .nxa-table-wrap::-webkit-scrollbar,
  .nx-rbac-table-wrap::-webkit-scrollbar,
  .nx-logs-table-wrap::-webkit-scrollbar,
  .nx-coupons-table-wrap::-webkit-scrollbar,
  .nx-coupons-history-table::-webkit-scrollbar,
  .adp-table-wrap::-webkit-scrollbar,
  .pv-table-wrap::-webkit-scrollbar,
  .pv-taxonomy-table-wrap::-webkit-scrollbar,
  .pv-mothers-table-wrap::-webkit-scrollbar,
  .nx-deliveries-table-scroll::-webkit-scrollbar,
  .nx-sales-table-wrap::-webkit-scrollbar,
  .nx-delivery-history-table-wrap::-webkit-scrollbar,
  .nxs-table-wrap::-webkit-scrollbar,
  .nx-aff-table-wrap::-webkit-scrollbar,
  .nx-aff-v3-table-scroll::-webkit-scrollbar,
  .nxal-table-wrap::-webkit-scrollbar,
  .nxar-table-wrap::-webkit-scrollbar,
  .dist-table-wrap::-webkit-scrollbar {
    height: 7px;
  }

  .ad-table-wrap::-webkit-scrollbar-thumb,
  .ad-provider-detail-table-wrap::-webkit-scrollbar-thumb,
  .ad-users-table-scroll::-webkit-scrollbar-thumb,
  .ad-wallet-ledger-table-wrap::-webkit-scrollbar-thumb,
  .nx-topups-table-scroll::-webkit-scrollbar-thumb,
  .nxa-act-table-wrap::-webkit-scrollbar-thumb,
  .nxa-table-wrap::-webkit-scrollbar-thumb,
  .nx-rbac-table-wrap::-webkit-scrollbar-thumb,
  .nx-logs-table-wrap::-webkit-scrollbar-thumb,
  .nx-coupons-table-wrap::-webkit-scrollbar-thumb,
  .nx-coupons-history-table::-webkit-scrollbar-thumb,
  .adp-table-wrap::-webkit-scrollbar-thumb,
  .pv-table-wrap::-webkit-scrollbar-thumb,
  .pv-taxonomy-table-wrap::-webkit-scrollbar-thumb,
  .pv-mothers-table-wrap::-webkit-scrollbar-thumb,
  .nx-deliveries-table-scroll::-webkit-scrollbar-thumb,
  .nx-sales-table-wrap::-webkit-scrollbar-thumb,
  .nx-delivery-history-table-wrap::-webkit-scrollbar-thumb,
  .nxs-table-wrap::-webkit-scrollbar-thumb,
  .nx-aff-table-wrap::-webkit-scrollbar-thumb,
  .nx-aff-v3-table-scroll::-webkit-scrollbar-thumb,
  .nxal-table-wrap::-webkit-scrollbar-thumb,
  .nxar-table-wrap::-webkit-scrollbar-thumb,
  .dist-table-wrap::-webkit-scrollbar-thumb {
    background: #31577e;
    border-radius: 999px;
  }
}

/* NexoPlay mobile-only polish — static product titles, no title ticker.
   This affects product-card title text only; the top hero/banner carousel
   and its autoplay/swipe behavior remain untouched. Desktop title ticker stays as-is. */
@media (max-width: 780px) {
  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-track,
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-track {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    animation: none !important;
    transform: none !important;
    will-change: auto !important;
    overflow: hidden !important;
  }

  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-group,
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-group {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-group:not(:first-child),
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-group:not(:first-child),
  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-group .store-title-segment:not(:first-child),
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-group .store-title-segment:not(:first-child),
  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-group .store-title-separator,
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-group .store-title-separator {
    display: none !important;
  }

  .storefront-home-products .store-product-title-row h3.store-title-ticker .store-title-group .store-title-segment:first-child,
  .product-grid.page-grid .store-product-title-row h3.store-title-ticker .store-title-group .store-title-segment:first-child {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}



/* NexoPlay performance pass — product cards on mobile only.
   Product titles are rendered as a single plain heading by app.js at mobile width.
   The hero/banner carousel is intentionally untouched. */
@media (max-width: 780px) {
  .storefront-home-products .store-product-title-row h3.store-product-title-static,
  .product-grid.page-grid .store-product-title-row h3.store-product-title-static {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    line-height: 19px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -.2px;
  }

  /* Avoid per-card image filters, animated transitions and backdrop blur on touch devices. */
  .store-product-card,
  .store-product-card:hover {
    animation: none !important;
    transform: none !important;
    transition: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .16) !important;
  }

  .store-product-card .store-product-art > img,
  .store-product-card:hover .store-product-art > img {
    filter: none !important;
    transform: none !important;
    transition: none !important;
  }

  .store-product-card .store-heart {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .2) !important;
  }

  .store-product-card .store-badge,
  .store-product-card .store-provider-avatar {
    box-shadow: none !important;
  }

  .store-product-card .store-primary-btn,
  .store-product-card .store-terms-btn {
    transition: none !important;
  }
}
