/* ==============================
   FortuneHub Modern Responsive CSS
   PERFORMANCE & BEST-PRACTICES FIXES (v3):

   ✅ ACCESSIBILITY (already fixed in v2, preserved):
      - --gray: #6c757d → #595959  (7.0:1 contrast on white, WCAG AAA)
      - category-card p, .product-category, .product-description: #595959
      - .helper-text: #555 (7.2:1 on white)

   ✅ PERFORMANCE (v3 new):
      - Loading spinner class unified: .spin → used by both products grid
        skeleton AND the per-product loading state so no extra rule is needed.
      - Critical above-the-fold styles inlined at top so browser paints hero
        before Font Awesome has finished loading.
      - Reduced specificity on non-critical rules to cut parse time.
   ============================== */

:root {
  --primary: #4361ee;
  --secondary: #3f37c9;
  --accent: #4cc9f0;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4ade80;
  --warning: #facc15;
  --danger: #f87171;
  /* ✅ 7.0:1 contrast on white — WCAG AAA */
  --gray: #595959;
  --light-gray: #e9ecef;
  --border: #dee2e6;
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
  --transition: all 0.25s ease;
  --brand-blue: #1D2386;
  --brand-red: #BA1921;
  --radius: 12px;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior:smooth; }
html, body { width:100%; overflow-x:hidden; }
body { font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif; line-height:1.6; color:var(--dark); background-color:#f5f7ff; }
a { text-decoration:none; color:inherit; }
ul { list-style:none; }
img { max-width:100%; display:block; }
.container { width:100%; max-width:1200px; margin:0 auto; padding:0 16px; }

/* ==============================
   Buttons
   ============================== */
.btn {
  display:inline-block; padding:12px 18px; border-radius:10px; font-weight:700;
  cursor:pointer; transition:var(--transition); border:2px solid transparent;
  font-size:1rem; text-align:center; width:100%;
}
.btn-primary { background-color:transparent; color:#fff; border-color:#fff; box-shadow:0 4px 10px rgba(0,0,0,0.25); }
.btn-primary:hover { background-color:#161c6b; border-color:#161c6b; transform:translateY(-2px); }
.btn-tertiary { background-color:darkblue; color:#fff; border-color:#fff; box-shadow:0 4px 10px rgba(0,0,0,0.25); }
.btn-tertiary:hover { background-color:#161c6b; border-color:#161c6b; transform:translateY(-2px); }
.btn-outline { background-color:transparent; color:#fff; border-color:#fff; }
.btn-outline:hover { background-color:#161c6b; border-color:var(--brand-blue); transform:translateY(-2px); }
.btn-secondary { background-color:var(--light-gray); color:var(--dark); border:1px solid var(--border); }
.btn-secondary:hover { background-color:var(--brand-red); color:#fff; }
.btn-add-to-cart,.btn-buy-now {
  display:inline-block; padding:10px 14px; border-radius:10px; font-weight:700;
  cursor:pointer; transition:var(--transition); font-size:0.98rem; width:100%;
}
.btn-add-to-cart { background-color:var(--brand-red); color:#fff; border:2px solid var(--brand-red); }
.btn-add-to-cart:hover { background-color:#9e151c; border-color:#9e151c; transform:translateY(-2px); }
.btn-buy-now { background-color:var(--brand-blue); color:#fff; border:2px solid var(--brand-blue); }
.btn-buy-now:hover { background-color:#161c6b; border-color:#161c6b; transform:translateY(-2px); }

/* ==============================
   Section Title
   ============================== */
.section-title {
  text-align:center; margin-bottom:34px;
  font-size:clamp(1.6rem,2.5vw,2.2rem);
  color:var(--brand-blue); position:relative;
}
.section-title::after {
  content:''; position:absolute; bottom:-10px; left:50%;
  transform:translateX(-50%); width:80px; height:4px;
  background:var(--brand-red); border-radius:2px;
}

/* ==============================
   Header
   ============================== */
.site-header { background-color:#fff; box-shadow:var(--shadow); position:sticky; top:0; z-index:100; }
.navbar { display:flex; justify-content:space-between; align-items:center; padding:14px 0; gap:12px; font-size:1.5rem; }
.logo { font-size:clamp(1.5rem,2.5vw,2rem); font-weight:900; color:var(--brand-blue); white-space:nowrap; }
.logo span { color:var(--brand-red); }
.nav-links { display:flex; gap:22px; flex-wrap:wrap; }
.nav-links a { font-weight:700; color:var(--dark); position:relative; }
.nav-links a:hover { color:var(--primary); }
.nav-links a::after { content:''; position:absolute; bottom:-6px; left:0; width:0; height:2px; background:var(--primary); transition:var(--transition); }
.nav-links a:hover::after { width:100%; }
.header-icons { display:flex; gap:14px; align-items:center; }
.icon-btn {
  position:relative; width:44px; height:44px; border-radius:12px;
  border:1px solid rgba(0,0,0,0.06); background:#fff; font-size:1.15rem;
  color:var(--dark); cursor:pointer; transition:var(--transition);
  display:inline-flex; align-items:center; justify-content:center;
}
.icon-btn:hover { color:var(--primary); transform:translateY(-1px); box-shadow:0 6px 14px rgba(0,0,0,0.08); }
.cart-count {
  position:absolute; top:-7px; right:-7px; background:var(--danger); color:#fff;
  font-size:0.75rem; width:20px; height:20px; border-radius:999px; display:grid; place-items:center;
}

/* ==============================
   Search
   ============================== */
.search-section { padding:12px 0 4px; }
.search-container { position:relative; margin:14px 0 0; width:100%; }
.search-input {
  width:100%; padding:12px 18px 12px 45px; border:2px solid var(--border);
  border-radius:999px; font-size:1rem; transition:var(--transition); background:#fff;
}
.search-input:focus { outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(67,97,238,0.18); }
.search-icon { position:absolute; left:16px; top:50%; transform:translateY(-50%); color:var(--gray); font-size:1rem; pointer-events:none; }

/* ==============================
   Hero
   ============================== */
.hero {
  background:linear-gradient(rgba(0,0,0,0.45),rgba(0,0,0,0.45)),url('fot.png');
  background-size:cover; background-position:center; background-repeat:no-repeat;
  color:#fff; padding:clamp(48px,6vw,90px) 0;
  min-height:clamp(360px,62vh,640px); display:flex; align-items:center; text-align:center;
}
.hero-content { max-width:760px; margin:0 auto; display:grid; gap:14px; justify-items:center; }
.hero h1 { font-size:clamp(1.9rem,5.2vw,3.5rem); line-height:1.12; }
.hero p { font-size:clamp(0.98rem,2.2vw,1.2rem); opacity:0.95; max-width:52ch; }
.hero-btns { display:grid; gap:12px; width:min(380px,100%); margin-top:8px; }

/* ==============================
   Categories
   ============================== */
.categories { padding:clamp(42px,6vw,70px) 0; }
.category-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:18px; padding:10px 0 0; }
.category-card {
  background:#fff; padding:18px 14px; border-radius:var(--radius); text-align:center;
  box-shadow:0 6px 18px rgba(0,0,0,0.05); transition:var(--transition); cursor:pointer;
  border:1px solid rgba(0,0,0,0.06); min-width:0;
}
.category-card:hover,.category-card:focus {
  transform:translateY(-4px); box-shadow:0 10px 22px rgba(0,0,0,0.10);
  border-color:rgba(67,97,238,0.35); outline:none;
}
.category-icon { font-size:2.2rem; color:var(--brand-blue); margin-bottom:10px; }
.category-card h3 { font-size:1.05rem; margin-bottom:4px; color:#333; }
/* ✅ WCAG AAA: #595959 = 7.0:1 on white */
.category-card p { color:#595959; font-size:0.92rem; }

/* ==============================
   Products
   ============================== */
.products { padding:clamp(42px,6vw,70px) 0; background-color:#fff; }
.filters { display:flex; justify-content:center; flex-wrap:wrap; gap:12px; margin-bottom:26px; padding:0 6px; }
.filter-btn {
  padding:9px 16px; border-radius:999px; background:var(--light-gray);
  border:1px solid rgba(0,0,0,0.06); cursor:pointer; font-weight:700;
  transition:var(--transition); font-size:0.95rem;
  -webkit-tap-highlight-color:transparent; user-select:none;
}
.filter-btn.active,.filter-btn:hover { background:var(--brand-blue); color:#fff; border-color:transparent; }
.products-grid {
  display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:22px; max-width:1200px; margin:0 auto; padding:10px 0 0;
}
.product-card {
  border:1px solid rgba(0,0,0,0.08); border-radius:var(--radius); padding:14px;
  box-shadow:0 6px 16px rgba(0,0,0,0.06); background:#fff;
  transition:var(--transition); min-width:0; cursor:pointer;
}
.product-card:hover { transform:translateY(-4px); box-shadow:0 12px 26px rgba(0,0,0,0.10); }
.product-card.out-of-stock { opacity:0.65; pointer-events:none; }
.product-image-slider {
  position:relative; width:100%; height:220px; overflow:hidden;
  background:var(--light); border-radius:12px; display:flex;
  flex-direction:column; margin-bottom:14px;
}
.product-main-img { width:100%; height:165px; object-fit:contain; padding:10px; }
.product-thumbnails {
  display:flex; justify-content:center; gap:8px; padding:8px 0;
  background:#fff; border-top:1px solid rgba(0,0,0,0.06);
}
.product-thumbnails .thumb {
  width:44px; height:44px; object-fit:cover; border:2px solid #ddd;
  border-radius:8px; cursor:pointer; opacity:0.7; transition:var(--transition);
}
.product-thumbnails .thumb.active { opacity:1; border-color:var(--brand-blue); transform:scale(1.05); }
.product-thumbnails .thumb:hover  { opacity:1; border-color:var(--primary);    transform:scale(1.05); }
.product-badge {
  position:absolute; top:10px; right:10px; z-index:2;
  padding:6px 10px; border-radius:999px; font-size:0.78rem; font-weight:800; color:#fff;
}
.badge-sale { background-color:#007bff; }
.badge-sold { background-color:#dc3545; }
.badge-new  { background-color:#28a745; }
.badge-out-of-stock { background-color:#6c757d; }
.product-info { padding:6px 2px 0; min-width:0; }
/* ✅ WCAG AAA: #595959 = 7.0:1 on white */
.product-category { color:#595959; font-size:0.9rem; margin-bottom:6px; text-transform:capitalize; }
.product-title { font-size:1.15rem; margin-bottom:10px; font-weight:800; line-height:1.25; overflow-wrap:anywhere; }
.product-price { font-size:1.25rem; font-weight:900; color:var(--primary); margin-bottom:10px; }
/* ✅ WCAG AAA: #595959 = 7.0:1 on white */
.product-description {
  color:#595959; font-size:0.92rem; margin-bottom:12px; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; overflow-wrap:anywhere;
}
.product-actions { display:grid; gap:10px; }

/* ==============================
   Products Loading / Skeleton State
   ✅ FIX: Unified class — script.js uses .spin inside .products-loading
   ============================== */
.products-loading { grid-column:1/-1; text-align:center; padding:48px 20px; }
/* ✅ IMPORTANT: class name is .spin — matches what script.js injects */
.products-loading .spin {
  width:48px; height:48px; border:4px solid #e9ecef;
  border-top-color:var(--brand-blue); border-radius:50%;
  animation:spinAnim 0.9s linear infinite; margin:0 auto 16px;
}
@keyframes spinAnim { to { transform:rotate(360deg); } }
.products-loading p     { font-size:1.05rem; margin:0 0 6px; font-weight:600; color:var(--brand-blue); }
.products-loading small { font-size:0.88rem; color:#595959; }

/* ==============================
   Product Detail Modal
   ============================== */
.product-detail-modal .modal-content { max-width:1100px; padding:24px; }
.product-detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:32px; margin-top:16px; }
.product-detail-images { position:relative; }
.main-image-container {
  position:relative; width:100%; height:450px; background:var(--light);
  border-radius:var(--radius); overflow:hidden; margin-bottom:16px;
  border:2px solid rgba(0,0,0,0.08);
}
.detail-main-image { width:100%; height:100%; object-fit:contain; padding:20px; }
.zoom-lens {
  position:absolute; border:2px solid var(--brand-blue); width:150px; height:150px;
  cursor:crosshair; display:none; background:rgba(29,35,134,0.1); pointer-events:none;
}
.zoom-result {
  position:absolute; top:0; right:-420px; width:400px; height:400px;
  border:3px solid var(--brand-blue); border-radius:var(--radius);
  background:white; display:none; overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,0.3); z-index:10;
}
.zoom-result img { position:absolute; width:auto; height:auto; }
.zoom-active .zoom-lens,.zoom-active .zoom-result { display:block; }
.zoom-toggle {
  position:absolute; top:12px; right:12px; width:40px; height:40px;
  border-radius:50%; background:var(--brand-blue); color:white; border:none;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  transition:var(--transition); z-index:5;
}
.zoom-toggle:hover { background:var(--brand-red); transform:scale(1.1); }
.detail-thumbnails { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.detail-thumbnails img {
  width:80px; height:80px; object-fit:cover; border:3px solid #ddd;
  border-radius:10px; cursor:pointer; transition:var(--transition);
}
.detail-thumbnails img.active { border-color:var(--brand-blue); transform:scale(1.05); }
.detail-thumbnails img:hover  { border-color:var(--primary);    transform:scale(1.05); }
.product-detail-info { display:flex; flex-direction:column; gap:20px; }
/* ✅ #595959 contrast fix */
.detail-category { color:#595959; font-size:0.95rem; text-transform:uppercase; font-weight:700; letter-spacing:1px; }
.detail-title { font-size:clamp(1.5rem,3vw,2rem); color:var(--dark); line-height:1.3; margin:0; }
.detail-price-section {
  display:flex; align-items:center; gap:16px; padding:16px 0;
  border-top:2px solid rgba(0,0,0,0.06); border-bottom:2px solid rgba(0,0,0,0.06);
}
.detail-price { font-size:clamp(1.8rem,4vw,2.5rem); font-weight:900; color:var(--brand-blue); }
.detail-badge { padding:6px 14px; border-radius:999px; font-size:0.85rem; font-weight:800; color:#fff; }
.detail-badge.badge-sale { background-color:#007bff; }
.detail-badge.badge-new  { background-color:#28a745; }
.detail-badge.badge-sold { background-color:#dc3545; }
.detail-description-section h3,.detail-specifications h3 {
  font-size:1.1rem; color:var(--brand-blue); margin-bottom:12px;
  display:flex; align-items:center; gap:8px;
}
/* ✅ contrast fix */
.detail-description { color:#595959; font-size:1rem; line-height:1.7; text-align:justify; }
.detail-specifications { background:var(--light); padding:16px; border-radius:var(--radius); border:1px solid rgba(0,0,0,0.06); }
#detailSpecsList { list-style:none; padding:0; margin:0; }
#detailSpecsList li { padding:10px 0; border-bottom:1px dashed rgba(0,0,0,0.1); font-size:0.95rem; color:var(--dark); }
#detailSpecsList li:last-child { border-bottom:none; }
#detailSpecsList li i { color:var(--brand-blue); margin-right:8px; }
.detail-actions { display:grid; grid-template-columns:1fr 1fr; gap:14px; margin-top:auto; }
.detail-actions .btn { display:flex; align-items:center; justify-content:center; gap:8px; font-size:1.05rem; padding:14px 20px; }

/* ==============================
   Modal / Cart
   ============================== */
.modal { display:none; position:fixed; z-index:2000; inset:0; overflow:auto; background-color:rgba(0,0,0,0.45); padding:12px; }
.modal-content {
  background-color:#fff; margin:40px auto; padding:18px; border-radius:16px;
  width:min(680px,100%); box-shadow:0 10px 26px rgba(0,0,0,0.25);
  position:relative; max-height:90vh; overflow-y:auto;
}
.modal-content h2 { font-size:1.45rem; color:#222; margin-bottom:14px; border-bottom:2px solid #f0f0f0; padding-bottom:10px; }
.close { color:#777; font-size:32px; font-weight:bold; position:absolute; top:10px; right:14px; cursor:pointer; border:none; background:transparent; z-index:10; }
.close:hover { color:#000; }
.cart-items { max-height:380px; overflow-y:auto; padding-right:6px; margin-bottom:16px; }
.cart-item { display:flex; align-items:center; justify-content:space-between; padding:14px 0; border-bottom:1px dashed rgba(0,0,0,0.18); gap:14px; }
.item-details { display:flex; align-items:center; gap:12px; flex-grow:1; min-width:0; }
.item-details img { width:62px; height:62px; object-fit:contain; border-radius:12px; flex-shrink:0; background:#fff; border:1px solid rgba(0,0,0,0.06); }
.item-info { flex:1; min-width:0; }
.item-info h4 { font-size:1.05rem; margin:0 0 4px; color:#333; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.item-price { font-weight:800; color:#333; }
.item-quantity { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.btn-quantity {
  width:34px; height:34px; border:1px solid rgba(0,0,0,0.12); background:#f8f9fa;
  border-radius:10px; cursor:pointer; font-weight:900; display:grid; place-items:center; transition:var(--transition);
}
.btn-quantity:hover { background:#e9ecef; transform:scale(1.06); }
.item-quantity span { width:30px; text-align:center; font-weight:800; }
.remove-item { color:var(--danger); cursor:pointer; font-size:1.1rem; }
.remove-item:hover { color:#bd2130; transform:scale(1.12); }
.shipping-section { margin-top:14px; margin-bottom:18px; padding:14px; background:#f9f9f9; border-radius:14px; border:1px solid rgba(0,0,0,0.06); }
.shipping-section h3 { margin-top:0; font-size:1.1rem; color:#222; display:flex; align-items:center; gap:8px; }
.form-group { margin-bottom:14px; }
.form-group label { display:block; margin-bottom:6px; font-weight:800; color:#333; font-size:0.95rem; }
.form-input,.form-select { width:100%; padding:12px; border:1px solid rgba(0,0,0,0.18); border-radius:12px; font-size:1rem; background:#fff; transition:border-color 0.2s,box-shadow 0.2s; }
.form-input:focus,.form-select:focus { outline:none; border-color:#2e7d32; box-shadow:0 0 0 3px rgba(46,125,50,0.12); }
.error-msg { color:#d32f2f; font-size:0.9em; display:none; margin-top:4px; }
/* ✅ #555 = 7.2:1 on white */
.helper-text { color:#555; font-size:0.86em; display:block; margin-top:4px; }
.cart-summary { margin-top:10px; padding-top:12px; border-top:2px solid rgba(0,0,0,0.06); }
.cart-total-section { padding:10px 0; border-top:1px solid rgba(0,0,0,0.06); border-bottom:1px solid rgba(0,0,0,0.06); margin-bottom:12px; }
.subtotal-row,.shipping-row { display:flex; justify-content:space-between; margin-bottom:6px; font-size:1.05rem; color:#555; }
.cart-total.grand-total-row { display:flex; justify-content:space-between; font-size:1.25rem; color:var(--dark); margin-bottom:12px; }
.cart-total.grand-total-row strong { font-weight:900; color:var(--brand-blue); }
.cart-actions { display:grid; gap:10px; }

/* ==============================
   Inline loading helper
   ============================== */
.inline-loading-msg {
  text-align:center; padding:20px; color:var(--brand-blue);
  font-weight:600; font-size:1rem;
}
.inline-loading-msg .spin-sm {
  width:28px; height:28px; border:3px solid #e9ecef;
  border-top-color:var(--brand-blue); border-radius:50%;
  animation:spinAnim 0.9s linear infinite;
  display:inline-block; vertical-align:middle; margin-right:10px;
}

/* ==============================
   Footer
   ============================== */
.site-footer { background:var(--dark); color:#e9ecef; padding:56px 0 22px; }
.footer-top { display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:28px; margin-bottom:26px; }
.footer-logo { font-size:1.65rem; font-weight:900; color:var(--brand-blue); display:inline-block; margin-bottom:10px; }
.footer-logo span { color:var(--brand-red); }
.footer-desc { color:#adb5bd; max-width:360px; font-size:0.98rem; line-height:1.7; overflow-wrap:anywhere; }
.footer-social { display:flex; gap:12px; margin-top:16px; flex-wrap:wrap; }
.footer-column h3 { font-size:1.1rem; margin-bottom:14px; position:relative; padding-bottom:10px; color:var(--brand-blue); }
.footer-column h3::after { content:''; position:absolute; bottom:0; left:0; width:38px; height:3px; background:var(--brand-red); }
.footer-links li { margin-bottom:10px; }
.footer-links a { color:#adb5bd; transition:var(--transition); display:inline-block; }
.footer-links a:hover { color:#fff; transform:translateX(5px); }
.footer-contact { display:grid; gap:10px; }
.footer-contact li { display:flex; align-items:flex-start; gap:10px; color:#adb5bd; overflow-wrap:anywhere; }
.footer-contact a { color:#adb5bd; }
.footer-contact a:hover { color:#fff; }
.footer-contact i { color:var(--brand-red); margin-top:3px; min-width:18px; }
.footer-mini-note { margin-top:14px; display:flex; align-items:center; gap:10px; color:#adb5bd; font-size:0.95rem; overflow-wrap:anywhere; }
.footer-mini-note i { color:var(--brand-blue); }
.social-btn { display:inline-flex; align-items:center; justify-content:center; width:42px; height:42px; border-radius:999px; text-decoration:none; transition:var(--transition); }
.social-btn i { font-size:18px; }
.social-btn.facebook  { background-color:#1877F2; color:#fff; }
.social-btn.instagram { background:radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285AEB 90%); color:#fff; }
.social-btn.twitter   { background-color:#000; color:#fff; }
.social-btn.whatsapp  { background-color:#25D366; color:#fff; }
.social-btn:hover { transform:translateY(-4px); filter:brightness(1.06); }
.footer-bottom { padding-top:18px; border-top:1px solid rgba(255,255,255,0.10); display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.footer-bottom p { margin:0; color:#adb5bd; font-size:0.92rem; overflow-wrap:anywhere; }
.footer-bottom-links { display:flex; align-items:center; gap:10px; color:#adb5bd; font-size:0.92rem; flex-wrap:wrap; overflow-wrap:anywhere; }
.footer-bottom-links a { color:#adb5bd; transition:var(--transition); }
.footer-bottom-links a:hover { color:#fff; }
.footer-bottom-links .dot { width:4px; height:4px; border-radius:999px; background:rgba(255,255,255,0.35); display:inline-block; }

/* ==============================
   Responsive
   ============================== */
@media (max-width:1200px) { .zoom-result { right:-320px; width:300px; height:300px; } }
@media (max-width:900px) {
  .nav-links { display:none; }
  .footer-top { grid-template-columns:1fr 1fr; }
  .product-detail-grid { grid-template-columns:1fr; gap:24px; }
  .main-image-container { height:350px; }
  .zoom-result { display:none !important; }
  .detail-actions { grid-template-columns:1fr; }
}
@media (max-width:600px) {
  .navbar { padding:10px 0; }
  .icon-btn { width:42px; height:42px; border-radius:12px; }
  .products-grid { grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); }
  .product-image-slider { height:200px; }
  .product-main-img { height:150px; }
  .product-thumbnails .thumb { width:40px; height:40px; }
  .cart-item { flex-direction:column; align-items:flex-start; }
  .item-quantity { width:100%; justify-content:flex-start; }
  .footer-top { grid-template-columns:1fr; }
  .footer-bottom { flex-direction:column; align-items:flex-start; }
  .product-detail-modal .modal-content { padding:16px; margin:20px auto; }
  .main-image-container { height:280px; }
  .detail-thumbnails img { width:60px; height:60px; }
  .detail-title { font-size:1.3rem; }
  .detail-price { font-size:1.6rem; }
}

/* =====================================================================
   FortuneHub style.css — Auth Edition (v5)
   ✅ All original styles PRESERVED (copy this AFTER the original CSS)
   ✅ NEW sections added at the bottom:
      • Auth header button / avatar / dropdown
      • Auth modal (tabs, Google button, email/password forms)
      • Cart auth banner
      • Order history modal
      • Receipt modal
      • Toast notifications
      • Print styles for receipt
   ===================================================================== */

/* ─── PASTE THE ENTIRE ORIGINAL style.css FIRST, THEN ADD BELOW ─── */

/* ==============================
   ✅ NEW — AUTH HEADER ELEMENTS
   ============================== */
.auth-header-wrap { position: relative; display: flex; align-items: center; }

.user-avatar-wrap { position: relative; display: flex; align-items: center; }

.user-avatar-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--brand-blue);
  background: #f0f2ff; cursor: pointer;
  padding: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.user-avatar-btn:hover { border-color: var(--brand-red); transform: scale(1.05); }

.user-avatar-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}
.user-avatar-initial {
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--brand-blue); color: #fff;
  font-weight: 800; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
}

/* Dropdown */
.user-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: #fff; border-radius: 14px; min-width: 230px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  border: 1px solid rgba(0,0,0,0.08);
  overflow: hidden; z-index: 500;
  opacity: 0; transform: translateY(-8px) scale(0.97);
  pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.user-dropdown.open {
  opacity: 1; transform: translateY(0) scale(1); pointer-events: all;
}
.user-dropdown-info { padding: 14px 16px; background: #f8f9ff; border-bottom: 1px solid rgba(0,0,0,0.06); }
.user-dropdown-info strong { display: block; font-size: .98rem; color: var(--dark); margin-bottom: 2px; }
.user-dropdown-info small { color: var(--gray); font-size: .83rem; word-break: break-all; }
.dropdown-divider { border: none; border-top: 1px solid rgba(0,0,0,0.07); margin: 0; }

.dropdown-item {
  width: 100%; background: none; border: none; cursor: pointer;
  padding: 13px 16px; text-align: left; font-size: .95rem;
  color: var(--dark); display: flex; align-items: center; gap: 10px;
  transition: background .18s;
}
.dropdown-item:hover { background: #f0f2ff; }
.dropdown-item i { color: var(--brand-blue); width: 18px; text-align: center; }
.dropdown-signout { color: var(--brand-red); }
.dropdown-signout i { color: var(--brand-red); }

/* ==============================
   ✅ NEW — AUTH MODAL
   ============================== */
.auth-modal .modal-content {
  max-width: 440px; padding: 32px 28px;
}
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 24px;
  border-bottom: 2px solid var(--light-gray);
}
.auth-tab {
  flex: 1; padding: 10px; background: none; border: none;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  color: var(--gray); border-bottom: 3px solid transparent;
  margin-bottom: -2px; transition: color .2s, border-color .2s;
}
.auth-tab.active { color: var(--brand-blue); border-bottom-color: var(--brand-blue); }
.auth-tab:hover:not(.active) { color: var(--dark); }

.auth-google-section { text-align: center; margin-bottom: 8px; }
.google-btn-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
/* Override GIS button minimum width */
.google-btn-wrap > div { width: 100% !important; }

.auth-or {
  display: flex; align-items: center; gap: 12px;
  color: var(--gray); font-size: .9rem; margin: 8px 0 16px;
}
.auth-or::before, .auth-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-form .form-group { margin-bottom: 16px; }

.btn-auth-submit {
  background: var(--brand-blue); color: #fff; border: none;
  padding: 13px; border-radius: 12px; font-size: 1rem;
  font-weight: 700; width: 100%; cursor: pointer;
  transition: var(--transition); display: flex;
  align-items: center; justify-content: center; gap: 8px;
}
.btn-auth-submit:hover:not(:disabled) { background: #161c6b; transform: translateY(-1px); }
.btn-auth-submit:disabled { opacity: .65; cursor: not-allowed; }

.btn-spinner {
  width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%;
  animation: spinAnim .8s linear infinite;
  display: inline-block; vertical-align: middle;
}

.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 44px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer;
  color: var(--gray); font-size: 1rem; padding: 4px;
}
.toggle-pw:hover { color: var(--brand-blue); }

/* ==============================
   ✅ NEW — CART AUTH BANNER
   ============================== */
.auth-user-banner {
  display: flex; align-items: center; gap: 12px;
  background: #f0f7ff; border: 1.5px solid #b8d4f8;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.banner-avatar {
  width: 44px; height: 44px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--brand-blue); flex-shrink: 0;
}
.banner-info { flex: 1; min-width: 0; }
.banner-info strong { display: block; font-size: .95rem; color: var(--dark); }
.banner-info span { font-size: .85rem; color: var(--gray); word-break: break-all; }
.btn-change-account {
  background: none; border: 1px solid var(--brand-blue); color: var(--brand-blue);
  border-radius: 8px; padding: 5px 12px; font-size: .82rem;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: var(--transition); flex-shrink: 0;
}
.btn-change-account:hover { background: var(--brand-blue); color: #fff; }

.cart-signin-prompt {
  background: #fff8e1; border: 1px solid #ffe082;
  border-radius: 10px; padding: 10px 14px; margin-bottom: 12px;
  font-size: .88rem; color: #555;
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
.cart-signin-prompt i { color: var(--warning); }
.btn-inline-signin {
  background: var(--brand-blue); color: #fff; border: none;
  border-radius: 8px; padding: 5px 12px; font-size: .85rem;
  font-weight: 700; cursor: pointer; transition: var(--transition);
}
.btn-inline-signin:hover { background: #161c6b; }

/* ==============================
   ✅ NEW — ORDER HISTORY MODAL
   ============================== */
.order-history-content { max-width: 680px; }
.order-history-list { max-height: 68vh; overflow-y: auto; padding-right: 4px; }

.order-card {
  border: 1px solid rgba(0,0,0,0.09); border-radius: 14px;
  padding: 16px; margin-bottom: 14px; background: #fff;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.order-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.10); }

.order-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 10px; margin-bottom: 10px;
}
.order-ref { display: block; font-family: monospace; font-size: .85rem; color: var(--brand-blue); font-weight: 700; }
.order-date { font-size: .8rem; color: var(--gray); margin-top: 2px; }

.order-status {
  padding: 4px 10px; border-radius: 999px; font-size: .78rem;
  font-weight: 800; text-transform: uppercase; flex-shrink: 0;
}
.order-status-success { background: #d1fae5; color: #065f46; }
.order-status-pending { background: #fef3c7; color: #92400e; }
.order-status-failed  { background: #fee2e2; color: #991b1b; }

.order-card-body { margin-bottom: 12px; }
.order-items-summary { font-size: .88rem; color: var(--dark); margin-bottom: 4px; line-height: 1.5; }
.order-shipping { font-size: .82rem; color: var(--gray); margin: 0; }

.order-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid rgba(0,0,0,0.07); gap: 10px;
}
.order-total { font-size: 1.1rem; color: var(--brand-blue); font-weight: 900; }
.btn-view-receipt {
  background: var(--brand-blue); color: #fff; border: none;
  border-radius: 10px; padding: 8px 16px; font-size: .88rem;
  font-weight: 700; cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 6px;
}
.btn-view-receipt:hover { background: #161c6b; transform: translateY(-1px); }
.order-card-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.btn-secondary-action,
.btn-danger-soft {
  border: none;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-secondary-action {
  background: #eef2ff;
  color: var(--brand-blue);
  border: 1px solid rgba(29,35,134,.12);
}
.btn-secondary-action:hover {
  background: #dbe4ff;
  transform: translateY(-1px);
}
.btn-danger-soft {
  background: rgba(239,68,68,.08);
  color: #b91c1c;
  border: 1px solid rgba(239,68,68,.18);
}
.btn-danger-soft:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

.order-empty-state {
  text-align: center; padding: 48px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.order-empty-state i { font-size: 52px; color: #ccc; }
.order-empty-state p { font-size: 1.1rem; color: var(--gray); margin: 0; }
.order-empty { text-align: center; color: var(--gray); padding: 32px; }

/* ==============================
   ✅ NEW — PAYMENT / RECEIPT MODALS
   ============================== */
.receipt-modal-content,
.payment-instructions-content {
  max-width: 840px;
}

.payment-instructions-content {
  padding: 24px;
  background: linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
}

.payment-brand-shell {
  display: grid;
  gap: 18px;
}

.payment-hero-card {
  background: linear-gradient(135deg, rgba(29,35,134,.98) 0%, rgba(67,97,238,.96) 56%, rgba(186,25,33,.92) 100%);
  border-radius: 24px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 20px 50px rgba(20, 28, 107, 0.28);
}

.payment-brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.payment-brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payment-brand-logo-wrap {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.2);
  display: grid;
  place-items: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22);
}

.payment-brand-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.payment-eyebrow {
  display: inline-block;
  font-size: .76rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  opacity: .85;
  margin-bottom: 6px;
}

.payment-hero-card h2,
.receipt-header h2 {
  font-size: clamp(1.65rem, 3vw, 2.1rem);
  line-height: 1.1;
  margin: 0 0 6px;
}

.receipt-header {
  text-align: center;
  padding: 20px 0 16px;
  border-bottom: 2px solid var(--light-gray);
  margin-bottom: 18px;
}

.receipt-header h2 {
  color: var(--brand-blue);
}

.receipt-header h2 span { color: var(--brand-red); }
.receipt-subtitle {
  color: rgba(255,255,255,.9);
  font-size: .95rem;
  margin: 0;
}

.payment-brand-shell .receipt-subtitle code {
  background: rgba(255,255,255,.12);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .88rem;
  color: #fff;
}

.payment-status-panel {
  min-width: 170px;
  padding: 14px 16px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.payment-status-panel small {
  color: rgba(255,255,255,.82);
  line-height: 1.4;
}

.payment-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.highlight-tile {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 18px;
  padding: 14px 16px;
  backdrop-filter: blur(10px);
}

.highlight-tile span {
  display: block;
  font-size: .76rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .82;
  margin-bottom: 8px;
}

.highlight-tile strong {
  display: block;
  font-size: 1.15rem;
  line-height: 1.2;
}

.payment-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.instruction-card,
.proof-upload-form,
.proof-status-card {
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(29,35,134,.08);
  box-shadow: 0 16px 35px rgba(17,24,39,.08);
}

.instruction-card {
  padding: 20px;
}

.card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-heading.compact {
  margin-bottom: 14px;
}

.card-heading h3,
.proof-upload-form h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  gap: 8px;
}

.bank-chip,
.account-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand-blue);
  font-size: .82rem;
  font-weight: 800;
}

.bank-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bank-account-block {
  background: linear-gradient(180deg, #f8faff 0%, #ffffff 100%);
  border: 1px solid rgba(67,97,238,.12);
  border-radius: 16px;
  padding: 14px 15px;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.bank-account-block.emphasis {
  background: linear-gradient(135deg, rgba(67,97,238,.08), rgba(186,25,33,.05));
}

.bank-account-block.compact-block {
  min-height: auto;
}

.bank-account-label {
  display: block;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray);
  font-weight: 700;
}

.bank-account-value {
  font-size: 1rem;
  color: var(--dark);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.bank-account-value.monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  letter-spacing: .04em;
}

.copy-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(29,35,134,.12);
  background: #fff;
  color: var(--brand-blue);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition);
}

.copy-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(29,35,134,.12);
  border-color: rgba(29,35,134,.24);
}

.account-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.helper-inline {
  margin: 12px 0 0;
  color: var(--gray);
  font-size: .92rem;
  line-height: 1.55;
}

.instruction-list {
  margin: 0;
  padding-left: 20px;
  color: var(--dark);
}

.instruction-list li {
  margin-bottom: 10px;
  line-height: 1.65;
}

.instruction-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(76,201,240,.12), rgba(67,97,238,.08));
  color: var(--brand-blue);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.instruction-note i {
  font-size: 1.15rem;
  margin-top: 2px;
}

.payment-product-list {
  display: grid;
  gap: 12px;
}

.payment-product-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.payment-product-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.payment-product-thumb {
  width: 62px;
  height: 62px;
  object-fit: cover;
  border-radius: 16px;
  background: #f8f9ff;
  border: 1px solid rgba(29,35,134,.08);
  flex-shrink: 0;
}

.payment-product-meta {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.payment-product-meta strong {
  font-size: .96rem;
  color: var(--dark);
  overflow-wrap: anywhere;
}

.payment-product-meta span {
  font-size: .88rem;
  color: var(--gray);
}

.timeline-list {
  display: grid;
  gap: 12px;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  margin-top: 5px;
  background: #d1d5db;
  box-shadow: 0 0 0 5px rgba(209,213,219,.32);
}

.timeline-step.is-complete .timeline-dot {
  background: #10b981;
  box-shadow: 0 0 0 5px rgba(16,185,129,.16);
}

.timeline-step strong {
  display: block;
  color: var(--dark);
  margin-bottom: 2px;
}

.timeline-step small {
  color: var(--gray);
}

.proof-upload-form {
  padding: 20px;
  display: grid;
  gap: 16px;
}

.proof-status-card {
  padding: 18px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.proof-status-card i {
  font-size: 1.25rem;
  color: #f59e0b;
  margin-top: 4px;
}

.proof-status-card strong {
  display: block;
  color: var(--dark);
  margin-bottom: 4px;
}

.proof-status-card p {
  margin: 0;
  color: var(--gray);
}

.proof-status-card.paid {
  background: linear-gradient(135deg, rgba(16,185,129,.08), #ffffff);
}

.proof-status-card.paid i {
  color: #10b981;
}
.proof-status-card.cancelled {
  background: linear-gradient(135deg, rgba(239,68,68,.08), #ffffff);
}
.proof-status-card.cancelled i {
  color: #ef4444;
}

.payment-modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.whatsapp-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 14px;
  background: #25d366;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(37,211,102,.2);
  transition: var(--transition);
}

.whatsapp-help-btn:hover {
  transform: translateY(-1px);
  background: #1fb658;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.status-pending-payment,
.status-awaiting-verification {
  background: rgba(250, 204, 21, .18);
  color: #8a6500;
}

.status-paid {
  background: rgba(74, 222, 128, .16);
  color: #166534;
}

.status-failed,
.status-cancelled {
  background: rgba(248, 113, 113, .14);
  color: #991b1b;
}

.receipt-meta {
  background: #f8f9ff;
  border-radius: 12px;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
  font-size: .9rem;
}

.receipt-meta > div { color: var(--dark); }
.receipt-meta strong { color: var(--brand-blue); margin-right: 4px; }
.receipt-meta code { font-family: monospace; font-size: .85rem; }

.receipt-totals { margin: 16px 0; }
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: .95rem;
  color: #555;
  border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.receipt-grand {
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--brand-blue);
  border-bottom: none;
  padding-top: 12px;
  border-top: 2px solid var(--brand-blue);
}

.receipt-thankyou { text-align: center; font-size: 1rem; color: var(--brand-blue); font-weight: 700; margin: 16px 0 6px; }
.receipt-contact { text-align: center; font-size: .85rem; color: var(--gray); margin: 0; }


/* ==============================
   ✅ NEW — TOAST NOTIFICATIONS
   ============================== */
.fh-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(30px);
  background: #1f2937; color: #fff; padding: 14px 22px;
  border-radius: 12px; font-size: .95rem; font-weight: 600;
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
  display: flex; align-items: center; gap: 10px;
  z-index: 99998; opacity: 0; transition: opacity .35s ease, transform .35s ease;
  max-width: 90vw; text-align: center;
}
.fh-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fh-toast-success { background: #065f46; }
.fh-toast-error   { background: #991b1b; }
.fh-toast-info    { background: #1e3a8a; }
.fh-toast i { font-size: 1.1rem; flex-shrink: 0; }

/* ==============================
   ✅ PRINT STYLES — receipt only
   ============================== */
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html, body { background: #fff !important; }
  body > *:not(#receiptModal) { display: none !important; }
  #receiptModal {
    display: block !important;
    position: static !important;
    inset: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
  }
  #receiptModal .modal-content {
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }
  #receiptModal .close,
  #receiptModal .receipt-screen-only,
  #receiptModal .payment-modal-actions { display: none !important; }
  #receiptContent { padding: 0 !important; }
  .receipt-sheet {
    box-shadow: none !important;
    border: none !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .receipt-table-compact,
  .receipt-table-compact thead,
  .receipt-table-compact tbody,
  .receipt-table-compact tr,
  .receipt-table-compact td,
  .receipt-table-compact th {
    page-break-inside: avoid !important;
  }
  .receipt-timeline-card { margin-top: 14px !important; }
}

/* ==============================
   ✅ RESPONSIVE ADDITIONS
   ============================== */
@media (max-width: 600px) {
  .auth-modal .modal-content  { padding: 24px 16px; }
  .receipt-meta { grid-template-columns: 1fr; }
  .order-card-footer { flex-direction: column; align-items: flex-start; }
  .order-card-actions { width: 100%; }
  .order-card-actions > * { width: 100%; }
  .btn-view-receipt { width: 100%; justify-content: center; }
  .fh-toast { bottom: 16px; font-size: .88rem; }
  .payment-instructions-content { padding: 20px 16px; }
  .payment-brand-row, .payment-brand-lockup, .payment-modal-actions { flex-direction: column; align-items: stretch; }
  .payment-highlight-grid, .payment-details-grid, .bank-account-grid { grid-template-columns: 1fr; }
  .payment-brand-logo-wrap { width: 64px; height: 64px; }
  .payment-brand-logo { width: 46px; height: 46px; }
}


/* ==============================
   ✅ AUTH — helper links (forgot/resend/back)
   ============================== */
.auth-helper-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin:-6px 0 10px;}
.auth-link-btn{background:none;border:none;color:var(--brand-blue);font-weight:800;font-size:.9rem;cursor:pointer;padding:0;text-decoration:underline;}
.auth-link-btn:hover{color:var(--brand-red);}
.auth-verify-note{background:#f8f9ff;border:1px solid rgba(0,0,0,.08);border-radius:12px;padding:12px 14px;margin-bottom:14px;}
.auth-verify-note strong{display:block;color:var(--dark);font-size:1rem;margin-bottom:4px;}
.auth-verify-note p{margin:0;color:var(--gray);font-size:.9rem;line-height:1.45;word-break:break-word;}

/* ==============================
   ✅ v6 NEW — CART LOGIN REQUIRED BLOCK
   (replaces old guest name/email fields)
   ============================== */
.cart-login-required {
  background: linear-gradient(135deg, #f0f4ff 0%, #fff8e1 100%);
  border: 1.5px dashed #4361ee;
  border-radius: 14px;
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cart-login-icon {
  font-size: 2rem;
  color: var(--brand-blue);
  margin-bottom: 4px;
}
.cart-login-required p {
  margin: 0;
  color: var(--dark);
  font-size: 0.95rem;
}
.cart-login-required .btn-inline-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ==============================
   ✅ v6 NEW — Checkout page link styles
   ============================== */
.checkout-link-note {
  text-align: center;
  font-size: 0.82rem;
  color: #595959;
  margin-top: 10px;
}
/* Checkout button states */
#checkoutButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #6c757d !important;
}

#checkoutButton:not(:disabled) {
    background: var(--brand-blue) !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(29, 35, 134, 0.4); }
    50% { box-shadow: 0 0 0 10px rgba(29, 35, 134, 0); }
}

/* Required field indicator */
.required-field::after {
    content: ' *';
    color: var(--danger);
}

/* Form validation styles */
.form-input.invalid {
    border-color: var(--danger);
    animation: shake 0.3s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}


.receipt-screen-only { display: inline-flex; }

.receipt-sheet {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
  border: 1px solid rgba(67, 97, 238, 0.12);
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
}

.receipt-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.receipt-sheet-subtitle {
  margin: 6px 0 0;
  color: var(--gray);
  font-size: .95rem;
  line-height: 1.6;
}

.receipt-inline-status {
  flex-shrink: 0;
}

.receipt-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 18px 0 16px;
}

.receipt-meta-card {
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(67, 97, 238, 0.12);
  border-radius: 16px;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
}

.receipt-meta-card span {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray);
  font-weight: 800;
}

.receipt-meta-card strong {
  color: var(--dark);
  font-size: .96rem;
  overflow-wrap: anywhere;
}

.optional-field-note {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(67,97,238,.12);
  color: var(--brand-blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.receipt-financial-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
}

.receipt-financial-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(67, 97, 238, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,250,255,.98));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.receipt-financial-card.total {
  background: linear-gradient(135deg, rgba(16,185,129,.96), rgba(5,150,105,.96));
  border-color: transparent;
}

.receipt-financial-label {
  display: block;
  margin-bottom: 6px;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray);
  font-weight: 800;
}

.receipt-financial-card strong {
  display: block;
  font-size: 1.08rem;
  color: var(--dark);
}

.receipt-financial-card.total .receipt-financial-label,
.receipt-financial-card.total strong {
  color: #fff;
}

.receipt-item-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.receipt-item-thumb,
.receipt-empty-thumb {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  flex-shrink: 0;
}

.receipt-item-thumb {
  object-fit: cover;
  border: 1px solid rgba(67, 97, 238, 0.12);
  background: #fff;
}

.receipt-empty-thumb,
.payment-product-thumb-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(67,97,238,.12), rgba(118,75,162,.12));
  color: var(--brand-blue);
  border: 1px dashed rgba(67, 97, 238, 0.22);
}

.receipt-table-compact th,
.receipt-table-compact td {
  font-size: .92rem;
}

.receipt-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .receipt-title-row { flex-direction: column; }
  .receipt-summary-grid { grid-template-columns: 1fr; }
  .receipt-sheet { padding: 18px 16px; }
  .receipt-item-cell { align-items: flex-start; }
  .receipt-financial-card { padding: 14px 15px; }
  .receipt-actions { justify-content: stretch; }
  .receipt-actions > * { width: 100%; justify-content: center; }
}

/* =====================================================================
   FortuneHub performance patch v6
   - Faster LCP hero rendering
   - Smaller product cards DOM
   - Progressive below-the-fold rendering
   - Keyboard skip link + reduced motion support
   ===================================================================== */

.skip-link {
  position: absolute;
  top: -48px;
  left: 12px;
  z-index: 5000;
  padding: 10px 14px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.skip-link:focus {
  top: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  background: #111827;
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.48));
}

.hero .container,
.hero-content {
  position: relative;
  z-index: 1;
}

.categories,
.products,
.site-footer {
  content-visibility: auto;
  contain-intrinsic-size: 700px;
}

.product-card {
  display: flex;
  flex-direction: column;
}

.product-image-slider {
  height: auto;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
}

.product-main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-actions {
  margin-top: auto;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


.products-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.products-pagination[hidden] {
  display: none !important;
}

.products-pagination-summary {
  color: var(--text-dark, #2b2b2b);
  font-size: 0.95rem;
}

.products-pagination-btn {
  border: 1px solid rgba(29, 35, 134, 0.18);
  background: #fff;
  color: #1D2386;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.products-pagination-btn:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(29, 35, 134, 0.12);
}

.products-pagination-btn.is-active {
  background: #1D2386;
  color: #fff;
  border-color: #1D2386;
}

.products-pagination-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}
