/* Ibom-Oil V56 responsive layout and spacing. */
/* `clip` prevents horizontal spill while leaving the page itself scrollable. */
html { max-width: 100%; overflow-x: clip; scroll-padding-top: calc(var(--ibom-nav-height) + 12px); }
body { max-width: 100%; overflow-x: clip; }

@supports not (overflow: clip) {
  html { overflow-x: hidden; }
  body { overflow-x: visible; }
}

/* Homepage palm-fruit atmosphere: the supplied image remains visible without
   competing with headings, pricing, buttons or charts. */
body.ibom-home-page.ibom-site {
  position: relative;
  isolation: isolate;
  background: #030302 !important;
}

body.ibom-home-page.ibom-site::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(2, 6, 12, .78) 0%, rgba(3, 7, 11, .88) 48%, rgba(0, 0, 0, .94) 100%),
    radial-gradient(circle at 18% 8%, rgba(244, 180, 26, .2), transparent 34%),
    url('../images/fruit.jpg') !important;
  background-position: center, center, center !important;
  background-size: cover, cover, cover !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
}

body:is(.ibom-home-page, .ibom-page-products, .ibom-page-product) .product-image-wrap {
  width: 100% !important;
  overflow: hidden !important;
  background: linear-gradient(145deg, #261409, #0d0805) !important;
}

body:is(.ibom-home-page, .ibom-page-products, .ibom-page-product) .product-image {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  object-position: center !important;
  padding: 0 !important;
  background: transparent !important;
}

body.ibom-home-page > header,
body.ibom-site > header,
body.admin-page > .header {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100% !important;
}

body.ibom-home-page .hero {
  min-height: 0 !important;
  padding: calc(var(--ibom-nav-height) + 14px) 0 clamp(42px, 6vw, 76px) !important;
}
body.ibom-home-page .hero-grid { min-height: 0 !important; }
body.ibom-home-page .hero-image { aspect-ratio: 3 / 2 !important; }
body.ibom-home-page .hero-image img { width: 100% !important; height: 100% !important; object-fit: cover !important; object-position: center !important; }
body.ibom-home-page .product-image { object-fit: cover !important; object-position: center !important; padding: 0 !important; background: transparent !important; }

body.ibom-auth-page > .ibom-auth-stage { min-height: auto !important; }
body.ibom-auth-page .ibom-auth-logo img { box-shadow: none !important; }

body.product-manager-page > .topbar {
  height: 64px !important;
  min-height: 64px;
  padding: 0 16px !important;
}
body.product-manager-page > .sidebar {
  top: 64px !important;
  height: calc(100svh - 64px) !important;
}
body.product-manager-page > .main {
  width: auto !important;
  min-width: 0 !important;
  margin-left: 260px !important;
  padding: calc(var(--ibom-nav-height) + 18px) 18px 32px !important;
}

body.admin-page .layout > .main,
body.ibom-customer-page .dashboard-main { min-width: 0 !important; }

body.ibom-page-fund-wallet .wallet-page { width: 100%; max-width: 100%; overflow-x: hidden; }
body.ibom-page-fund-wallet .wallet-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: start;
}
body.ibom-page-fund-wallet :where(.wallet-card, .direct-bank-box) { min-width: 0; overflow-wrap: anywhere; }
body.ibom-page-fund-wallet .bank-copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

:where(.table-wrap, .terms-scroll, .role-section) { max-width: 100%; }
:where(table) { border-collapse: collapse; }
:where(td, th) { overflow-wrap: anywhere; }

/* Keep the two primary product purchase choices on one row on desktop and
   mobile. Labels may wrap within their own half without forcing a third row. */
body.ibom-site .product-purchase-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 8px !important;
}
body.ibom-site .product-purchase-actions > :where(.btn, button, a) {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px;
  padding-inline: 10px !important;
  white-space: normal !important;
  line-height: 1.25;
  text-align: center;
}

@media (max-width: 1100px) {
  body.ibom-page-fund-wallet .wallet-grid { grid-template-columns: 1fr !important; gap: 14px; }
  body.product-manager-page > .main {
    width: 100% !important;
    margin-left: 0 !important;
    padding: calc(var(--ibom-nav-height) + 14px) 14px 28px !important;
  }

  body.admin-page .layout,
  body.ibom-customer-page .dashboard-shell { display: block !important; }

  body.admin-page .layout > .main,
  body.ibom-customer-page .dashboard-main {
    width: 100% !important;
    margin-left: 0 !important;
    padding: 18px 14px 28px !important;
  }

  body.product-manager-page .kpis,
  body.admin-page .kpis,
  body.ibom-customer-page :where(.dashboard-kpis, .wallet-kpis, .referral-stats) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  body.ibom-home-page.ibom-site::before {
    background-position: center, center, 48% center !important;
  }

  .container { width: calc(100% - 20px) !important; padding-inline: 0 !important; }
  body.ibom-home-page section { padding-block: 42px !important; }
  body.ibom-home-page .hero { padding: calc(var(--ibom-nav-height) + 12px) 0 42px !important; }
  body.ibom-home-page .hero h1 { font-size: clamp(2rem, 10vw, 2.55rem) !important; }
  body.ibom-home-page .hero-image img { height: 100% !important; }

  body:is(.ibom-page-products, .ibom-page-product) .products-grid,
  .products-grid,
  .features,
  .brand-gallery-grid,
  .about-grid,
  .form-grid,
  .two-col { grid-template-columns: 1fr !important; }

  body.product-manager-page .kpis,
  body.admin-page .kpis,
  body.ibom-customer-page :where(.dashboard-kpis, .wallet-kpis, .referral-stats) {
    grid-template-columns: 1fr !important;
  }

  :where(.hero-actions, .card-actions, .cta-band, .page-heading, .dashboard-title-row) {
    align-items: stretch !important;
  }
  :where(.hero-actions, .card-actions, .cta-band) > :where(.btn, button, a) { width: 100% !important; }

  body.ibom-site .product-purchase-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.admin-page .tabs { overflow-x: auto; flex-wrap: nowrap !important; }
  body.admin-page .tab-btn { flex: 0 0 auto; }
}

@media (max-width: 420px) {
  body.admin-page .layout > .main,
  body.ibom-customer-page .dashboard-main,
  body.product-manager-page > .main { padding-inline: 10px !important; }
  .card, .panel { border-radius: 12px !important; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
