body {
  font-family: 'Hind Siliguri', 'Noto Sans Bengali', 'Plus Jakarta Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Guarantee Admin/Wallet buttons and unauthorized tabs stay invisible (zero flash) */
#header-admin-btn.hidden,
#header-wallet-btn.hidden,
.admin-tab-btn.hidden {
  display: none !important;
}

/* Custom Dark & Gold Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #09090b;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #f59e0b;
}

.text-gold-gradient {
  background: linear-gradient(135deg, #fde68a 0%, #f59e0b 50%, #eab308 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-hero-grid {
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(245, 158, 11, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(245, 158, 11, 0.045) 1px, transparent 1px);
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Guarantee hidden modals never intercept pointer events in sandboxed frames */
.hidden {
  display: none !important;
  pointer-events: none !important;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.animate-modal {
  animation: modalPop 0.22s ease-out forwards;
}

@keyframes supportPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.animate-support-widget {
  animation: supportPop 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@media print {
  body * {
    visibility: hidden;
  }
  #printable-receipt-area,
  #printable-receipt-area * {
    visibility: visible;
  }
  #printable-receipt-area {
    position: fixed;
    inset: 0;
    background: #09090b !important;
    color: #ffffff !important;
    padding: 24px;
  }
}


/* GoldenFlix BD upgrade: refined storefront, focus states and mobile polish */
:root { color-scheme: dark; }
html { scroll-padding-top: 96px; overflow-x: hidden; }
body { min-height: 100vh; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #fbbf24; outline-offset: 3px;
}
.product-card, [data-product-card] { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.product-card:hover, [data-product-card]:hover { transform: translateY(-3px); border-color: rgba(245,158,11,.42); box-shadow: 0 16px 38px rgba(0,0,0,.24); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media (max-width: 640px) { .modal-panel { max-height: calc(100dvh - 24px); overflow-y: auto; } }

/* =====================================================================
   Phase 1 Responsive Fixes (360px, 390px, 768px, 1024px, 1440px)
   Preserves dark & gold visual identity while preventing overflow
====================================================================== */
img, svg {
  max-width: 100%;
}

#store-product-grid > article {
  min-width: 0;
}

#toast-container {
  max-width: calc(100vw - 2rem);
}

/* Mobile navbar & compact controls (< 480px: 360px and 390px phones) */
@media (max-width: 479px) {
  #storefront-view header > div {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #storefront-view header > div > div:first-child {
    gap: 0.25rem;
  }

  #storefront-view header > div > div:first-child > a[href="/"] {
    gap: 0.35rem;
    min-width: 0;
  }

  #storefront-view header > div > div:first-child > a[href="/"] > div:first-child {
    width: 1.95rem;
    height: 1.95rem;
  }

  #storefront-view header > div > div:first-child > a[href="/"] > div:last-child > span:first-child {
    font-size: 0.92rem;
  }

  #storefront-view header > div > div:first-child > a[href="/"] > div:last-child > span:last-child {
    font-size: 7.5px;
    letter-spacing: 0.015em;
    white-space: nowrap;
  }

  #storefront-view header > div > div:first-child > a[href="/"] ~ div:last-of-type {
    gap: 0.2rem;
    flex-shrink: 0;
  }

  #storefront-view header > div > div:first-child > a[href="/"] ~ div:last-of-type > button,
  #storefront-view header > div > div:first-child > a[href="/"] ~ div:last-of-type > a {
    min-height: 36px;
    padding: 0.35rem 0.38rem;
    gap: 0.2rem;
  }

  /* Position live ping dot neatly in corner of Live Support button on narrow mobile */
  #storefront-view #header-support-link {
    min-width: 34px;
    justify-content: center;
  }

  #storefront-view #header-support-link > span:first-child {
    position: absolute;
    top: 5px;
    right: 5px;
  }

  #storefront-view #header-auth-btn,
  #storefront-view #header-notif-btn,
  #storefront-view #header-history-btn {
    min-width: 34px;
    justify-content: center;
  }

  /* Match Live Support, My History, Account, Wallet & Admin icon-compact style on narrow mobile */
  #storefront-view #header-admin-btn > span.md\:hidden {
    display: none;
  }

  #storefront-view #header-admin-btn,
  #storefront-view #header-wallet-btn {
    min-width: 34px;
    justify-content: center;
  }

  #storefront-view #header-wallet-btn.hidden,
  #storefront-view #header-notif-btn.hidden,
  #storefront-view #header-admin-btn.hidden {
    display: none !important;
  }

  #storefront-view #my-orders-badge {
    min-width: 17px;
    height: 17px;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
    font-size: 10px;
  }

  /* Keep 2-column product card full-width Order CTA clean at 360px */
  #storefront-view #store-product-grid > article button {
    min-height: 38px;
    white-space: nowrap;
  }
}

/* Mobile touch target polish (< 640px) without altering desktop appearance */
@media (max-width: 639px) {
  footer button {
    min-height: 36px;
  }

  #live-chat-customer-name {
    min-height: 32px;
  }
}

/* =====================================================================
   Reusable Financial Action Processing & Uncertain Recovery Button States
   ====================================================================== */
.gfb-btn-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 9999px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  display: inline-block;
  animation: gfbBtnSpin 0.72s linear infinite;
  flex-shrink: 0;
}

@keyframes gfbBtnSpin {
  to {
    transform: rotate(360deg);
  }
}

.gfb-btn-processing,
button[data-processing="true"],
button[data-processing="uncertain"] {
  background: #3f3f46 !important;
  background-image: none !important;
  color: #e4e4e7 !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: none !important;
  opacity: 0.86 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  transform: none !important;
}

button[data-processing="completed"] {
  background: rgba(16, 185, 129, 0.22) !important;
  background-image: none !important;
  color: #6ee7b7 !important;
  border: 1px solid rgba(16, 185, 129, 0.45) !important;
  box-shadow: none !important;
  cursor: default !important;
  pointer-events: none !important;
}

/* Recent Sales feed active nav & mobile polish */
.admin-sales-nav-btn[aria-current="page"] {
  background: #f59e0b;
  color: #09090b;
  border-color: #f59e0b;
}

.admin-sales-nav-btn[aria-current="page"] svg {
  color: #09090b;
}

@media (max-width: 639px) {
  .admin-sale-row {
    padding: 0.85rem;
  }

  #admin-sale-detail-modal .sale-payment-breakdown-row {
    flex-wrap: wrap;
  }
}
