/* ============================================================
   SP Tech — Storefront Styles
   Plain CSS (no Tailwind) — works on any cPanel hosting
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --orange: #f97316;
  --orange-dark: #ea580c;
  --pink-bkash: #e2136e;
  --orange-nagad: #f47216;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --white: #fff;
  --green: #16a34a;
  --amber: #f59e0b;
  --blue: #2563eb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #fff; color: var(--gray-900); line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* ---- Container ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---- Top Bar ---- */
.top-bar { background: var(--gray-900); color: #fff; font-size: 12px; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; height: 32px; }
.top-bar a:hover { color: #f87171; }
.top-bar .sep { color: #6b7280; margin: 0 12px; }
.top-bar .live { color: #fbbf24; font-weight: 600; }

/* ---- Header (mobile: logo LEFT, search+cart+fav RIGHT; desktop: logo LEFT, search CENTER, cart+fav RIGHT) ---- */
.header { position: sticky; top: 0; z-index: 40; background: #fff; border-bottom: 1px solid var(--gray-200); box-shadow: var(--shadow); }
.header-main { display: flex; align-items: center; gap: 12px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.logo img.logo-img-dyn { width: auto; height: 40px; max-width: 200px; object-fit: contain; }
@media(min-width:1024px){ .logo img.logo-img-dyn { height: 56px; max-width: 260px; } }
.desktop-only { display: none; }
@media(min-width:1024px){ .desktop-only { display: inline; } }
.header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-shrink: 0; }
.search-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 18px; }
@media(min-width:1024px){ .search-toggle { display: none; } }

.search-form { flex: 1; max-width: 560px; display: flex; }
.search-form input {
  flex: 1; height: 44px; padding: 0 12px; border: 1px solid var(--gray-300);
  border-right: none; border-radius: var(--radius-sm) 0 0 var(--radius-sm); outline: none;
}
.search-form input:focus { border-color: var(--red); }
.search-form button {
  background: linear-gradient(to right, var(--red), var(--orange)); color: #fff;
  padding: 0 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; height: 44px;
}
.desktop-search { display: none; }
@media(min-width:1024px){ .desktop-search { display: flex; flex: 1; max-width: 560px; margin: 0 auto; } }

.cart-btn, .fav-header-btn { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px; font-weight: 500; font-size: 18px; background: transparent; }
@media(min-width:1024px){ .cart-btn, .fav-header-btn { font-size: 20px; padding: 8px 12px; } }
.cart-badge, .fav-badge {
  position: absolute; top: 0; right: 0; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

.menu-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 22px; }
@media(min-width:1024px){ .menu-btn { display: none; } }

/* Mobile expandable search */
.mobile-search { padding: 0 0 12px; }
.mobile-search .search-form { max-width: 100%; }

/* ---- Hero Carousel (clean image-only, dynamic banners from settings) ---- */
.hero { position: relative; overflow: hidden; padding: 12px 0; background: linear-gradient(to bottom, var(--gray-50), #fff); }
.hero-track { display: flex; transition: transform 0.4s ease; }
.hero-slide { flex: 0 0 100%; position: relative; }
.hero-slide-clean { padding: 0 12px; }
.hero-slide-clean .hero-slide-bg { border-radius: 16px; overflow: hidden; box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
@media(min-width:640px){ .hero-slide-clean { padding: 0 16px; } }
.hero-slide-bg { position: relative; }
.hero-slide-bg img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 10; object-fit: cover; }
@media(min-width:640px){ .hero-slide-bg img { aspect-ratio: 16 / 9; } }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 20; width: 40px; height: 40px; border-radius: 999px; background: rgba(255,255,255,0.3); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.4); color: #fff; display: none; align-items: center; justify-content: center; font-size: 22px; }
@media(min-width:640px){ .hero-arrow { display: flex; } }
.hero-arrow.prev { left: 24px; }
.hero-arrow.next { right: 24px; }
.hero-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; gap: 6px; align-items: center; }
.hero-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.5); transition: all 0.3s; border: none; padding: 0; cursor: pointer; }
.hero-dot.active { width: 24px; background: #fff; }
.hero-playpause { width: 28px; height: 28px; border-radius: 999px; background: rgba(255,255,255,0.3); border: 1px solid rgba(255,255,255,0.4); color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; margin-left: 6px; }

/* ---- Section ---- */
.section { padding: 40px 0; }
.section-gray { background: var(--gray-50); }
.section-title { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.section-title .bar { width: 4px; height: 28px; background: linear-gradient(to bottom, var(--red), var(--orange)); border-radius: 999px; }
.section-title h2 { font-size: 24px; font-weight: 700; }
.section-title .count { color: var(--gray-500); font-size: 14px; margin-left: 8px; }
.section-title-center { text-align: center; flex-direction: column; gap: 4px; }
.section-title-center h2 { font-size: 24px; font-weight: 700; }
.section-title-center .subtitle { font-size: 14px; color: var(--gray-500); margin-top: 4px; }

/* ---- Categories (4 mobile / 6 tablet / 8 desktop, square cards, bold text, 70% image height) ---- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media(min-width:640px){ .cat-grid { grid-template-columns: repeat(6,1fr); gap: 12px; } }
@media(min-width:1024px){ .cat-grid { grid-template-columns: repeat(8,1fr); gap: 16px; } }
.cat-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: #fff; border-radius: var(--radius); padding: 10px; border: 1px solid transparent; transition: all 0.2s; text-align: center; aspect-ratio: 1; }
.cat-card:hover { box-shadow: var(--shadow-lg); border-color: #fecaca; transform: translateY(-2px); }
.cat-img-wrap { width: 100%; height: 70%; border-radius: var(--radius-sm); background: var(--gray-50); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.cat-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 4px; transition: transform 0.3s; }
.cat-card:hover .cat-img-wrap img { transform: scale(1.1); }
.cat-name { font-size: 11px; font-weight: 700; color: var(--gray-800); line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media(min-width:640px){ .cat-name { font-size: 13px; } }
@media(min-width:1024px){ .cat-name { font-size: 15px; } }

/* ---- Flash Banner ---- */
.flash-banner { background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; text-align: center; padding: 12px 16px; font-weight: 600; font-size: 14px; }
.flash-banner .code { background: rgba(255,255,255,0.2); padding: 2px 8px; border-radius: var(--radius-sm); font-family: monospace; }

/* ---- Product Grid (2 mobile / 3 tablet / 4 desktop) ---- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media(min-width:640px){ .product-grid { grid-template-columns: repeat(3,1fr); gap: 16px; } }
@media(min-width:1024px){ .product-grid { grid-template-columns: repeat(4,1fr); } }

/* ---- Product Card (NEW design: no add-to-cart button, heart favourite, price+discount at bottom) ---- */
.product-card { position: relative; background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-100); overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s; display: flex; flex-direction: column; cursor: pointer; }
.product-card:hover { box-shadow: var(--shadow-lg); border-color: #fecaca; }
.product-img-wrap { position: relative; display: block; aspect-ratio: 1; background: linear-gradient(135deg, var(--gray-50), var(--gray-100)); cursor: pointer; overflow: hidden; }
.product-img-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 16px; transition: transform 0.3s; }
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.fav-btn { position: absolute; top: 8px; left: 8px; z-index: 5; width: 32px; height: 32px; border-radius: 999px; background: rgba(255,255,255,0.85); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); color: var(--gray-600); transition: all 0.2s; border: none; cursor: pointer; }
.fav-btn:hover { background: #fff; color: var(--red); }
.fav-btn.is-fav { background: var(--red); color: #fff; }
.fav-btn.is-fav .fav-icon path { fill: #fff; }
.stock-badge { position: absolute; bottom: 8px; right: 8px; z-index: 5; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 999px; }
.stock-badge.low { background: var(--amber); color: #fff; }
.stock-badge.out { background: var(--gray-700); color: #fff; }
.product-body { padding: 10px; display: flex; flex-direction: column; flex: 1; }
@media(min-width:640px){ .product-body { padding: 12px; } }
.product-brand { font-size: 10px; color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
@media(min-width:640px){ .product-brand { font-size: 11px; } }
.product-name { font-size: 13px; font-weight: 700; color: var(--gray-900); line-height: 1.3; margin: 4px 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 34px; cursor: pointer; transition: color 0.2s; }
@media(min-width:640px){ .product-name { font-size: 14px; min-height: 36px; } }
.product-name:hover { color: var(--red); }
.sold-row { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; }
@media(min-width:640px){ .sold-row { font-size: 12px; } }
.sold-num { font-weight: 700; color: var(--gray-700); }
.sold-lbl { color: var(--gray-500); }
.price-row { margin-top: auto; padding-top: 12px; display: flex; align-items: center; gap: 8px; }
.discount-chip { background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); flex-shrink: 0; }
@media(min-width:640px){ .discount-chip { font-size: 12px; } }
.price-stack { display: flex; flex-direction: column; min-width: 0; }
.price-stack .price-deal { font-size: 16px; font-weight: 800; color: var(--gray-900); line-height: 1; }
@media(min-width:640px){ .price-stack .price-deal { font-size: 18px; } }
.price-stack .price-original { font-size: 11px; color: var(--gray-400); text-decoration: line-through; line-height: 1; margin-top: 2px; }
@media(min-width:640px){ .price-stack .price-original { font-size: 12px; } }
/* Legacy card fields kept for backward-compat with product detail page */
.product-price { margin-top: 8px; }
.price-deal { font-size: 18px; font-weight: 700; color: var(--red); }
.price-original { font-size: 12px; color: var(--gray-300); text-decoration: line-through; margin-left: 6px; }
.price-save { font-size: 11px; color: var(--green); font-weight: 500; margin-top: 2px; }
.sold-bar { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
.sold-track { flex: 1; height: 6px; background: var(--gray-100); border-radius: 999px; overflow: hidden; }
.sold-fill { height: 100%; background: linear-gradient(to right, var(--orange), var(--red)); border-radius: 999px; }
.sold-text { font-size: 10px; color: var(--gray-500); white-space: nowrap; }
.countdown-compact { display: flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; color: var(--gray-700); }
.countdown-compact .cd-box { background: var(--red); color: #fff; border-radius: var(--radius-sm); padding: 2px 6px; font-family: monospace; font-weight: 700; }
.btn-add-cart { margin-top: 12px; width: 100%; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; font-weight: 600; padding: 10px; border-radius: var(--radius-sm); font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: opacity 0.2s; }
.btn-add-cart:hover { opacity: 0.9; }
.btn-add-cart:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Product Detail Page ---- */
.breadcrumb { background: #fff; border-bottom: 1px solid var(--gray-200); padding: 10px 0; font-size: 12px; color: var(--gray-500); display: flex; align-items: center; gap: 6px; overflow-x: auto; white-space: nowrap; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { color: var(--gray-300); }
.detail-grid { display: grid; gap: 16px; }
@media(min-width:1024px){ .detail-grid { grid-template-columns: 5fr 7fr; } }
.detail-img-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 16px; }
.detail-img-main { position: relative; aspect-ratio: 1; background: var(--gray-50); border-radius: var(--radius-sm); overflow: hidden; }
.detail-img-main img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.detail-badge { position: absolute; bottom: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.detail-badge .b { font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: var(--radius-sm); color: #fff; display: flex; align-items: center; gap: 4px; }
.detail-badge .warranty { background: var(--green); }
.detail-badge .instock { background: var(--blue); }
.trust-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.trust-item { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; background: var(--gray-50); border-radius: var(--radius-sm); font-size: 10px; text-align: center; color: var(--gray-500); }
.detail-info { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 24px; }
.detail-brand { font-size: 12px; color: var(--red); font-weight: 700; text-transform: uppercase; }
.detail-title { font-size: 24px; font-weight: 700; margin-top: 4px; line-height: 1.3; }
.detail-meta { display: flex; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; font-size: 14px; color: var(--gray-500); }
.detail-meta .v-sep { width: 1px; height: 16px; background: var(--gray-200); }
.price-block { background: linear-gradient(to bottom, #fef2f2, #fff7ed); border-radius: var(--radius); padding: 16px; border: 1px solid #fecaca; margin-top: 16px; }
.price-big { font-size: 30px; font-weight: 800; color: var(--red); }
.price-reg { font-size: 16px; color: var(--gray-300); text-decoration: line-through; margin-left: 12px; }
.price-save-badge { background: #dcfce7; color: #15803d; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 999px; margin-left: 8px; }
.pay-options { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
@media(min-width:640px){ .pay-options { grid-template-columns: 1fr 1fr; } }
.pay-option { text-align: left; border-radius: var(--radius); border: 2px solid var(--gray-200); padding: 12px; cursor: pointer; background: rgba(255,255,255,0.6); transition: all 0.2s; }
.pay-option.active { border-color: var(--red); background: #fff; box-shadow: var(--shadow); }
.pay-option-head { display: flex; justify-content: space-between; align-items: center; }
.pay-option-title { font-size: 14px; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
.pay-radio { width: 16px; height: 16px; border-radius: 999px; border: 2px solid var(--gray-300); }
.pay-option.active .pay-radio { border-color: var(--red); background: var(--red); }
.pay-amount { font-size: 18px; font-weight: 700; margin-top: 4px; }
.pay-amount.cash { color: var(--red); }
.pay-amount.emi { color: var(--orange); }
.pay-desc { font-size: 11px; color: var(--gray-500); }
.stock-row { display: flex; align-items: center; gap: 12px; margin-top: 16px; font-size: 14px; flex-wrap: wrap; }
.key-features { background: var(--gray-50); border-radius: var(--radius-sm); padding: 12px; margin-top: 16px; }
.key-features h4 { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.key-features ul { list-style: none; }
.key-features li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--gray-700); padding: 4px 0; }
.key-features li::before { content: "✓"; color: var(--green); font-weight: 700; }
.qty-row { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.qty-selector { display: flex; align-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.qty-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 18px; background: #fff; }
.qty-btn:hover { background: var(--gray-100); }
.qty-val { width: 48px; text-align: center; font-weight: 600; }
.btn-buy { flex: 1; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; font-weight: 700; padding: 12px 28px; border-radius: var(--radius-sm); font-size: 16px; }
.btn-add-detail { border: 1px solid #fecaca; color: var(--red); font-weight: 600; padding: 12px 20px; border-radius: var(--radius-sm); background: #fff; }
.btn-add-detail:hover { background: #fef2f2; }

/* ---- Tabs ---- */
.tabs-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); margin-top: 16px; overflow: hidden; }
.tabs-head { display: flex; border-bottom: 1px solid var(--gray-200); overflow-x: auto; scrollbar-width: none; }
.tabs-head::-webkit-scrollbar { display: none; }
.tab-btn { padding: 12px 20px; font-size: 14px; font-weight: 600; white-space: nowrap; border-bottom: 2px solid transparent; color: var(--gray-500); flex-shrink: 0; }
.tab-btn.active { border-color: var(--red); color: var(--red); background: rgba(239,68,68,0.05); }
.tab-body { padding: 24px; }
.spec-table { width: 100%; border-collapse: collapse; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.spec-table tr:nth-child(even) { background: var(--gray-50); }
.spec-table td { padding: 10px 16px; font-size: 14px; }
.spec-table td:first-child { font-weight: 600; color: var(--gray-700); width: 33%; }

/* ---- Cart Drawer ---- */
.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px; background: #fff; z-index: 60; transform: translateX(100%); transition: transform 0.3s; display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0,0,0,0.15); }
.cart-drawer.open { transform: translateX(0); }
.cart-header { padding: 16px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.cart-header .close { margin-left: auto; font-size: 24px; color: var(--gray-500); cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.cart-empty { text-align: center; padding: 40px 16px; color: var(--gray-500); }
.cart-empty .icon { width: 80px; height: 80px; border-radius: 999px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; font-size: 32px; }
.cart-item { display: flex; gap: 12px; background: var(--gray-50); border-radius: var(--radius); padding: 12px; }
.cart-item-img { width: 80px; height: 80px; background: #fff; border-radius: var(--radius-sm); overflow: hidden; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 500; color: var(--gray-700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item-price { font-size: 14px; font-weight: 700; color: var(--red); margin-top: 4px; }
.cart-qty { display: flex; align-items: center; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); background: #fff; margin-top: 8px; }
.cart-qty button { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.cart-qty button:hover { background: var(--gray-100); }
.cart-qty span { width: 32px; text-align: center; font-weight: 600; }
.cart-remove { color: var(--gray-400); padding: 4px; }
.cart-remove:hover { color: var(--red); }
.cart-footer { border-top: 1px solid var(--gray-200); padding: 16px; background: #fff; }
.cart-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.cart-line.total { font-weight: 700; font-size: 16px; margin-top: 8px; }
.cart-line.total .amount { color: var(--red); font-size: 20px; }
.btn-checkout { width: 100%; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; font-weight: 600; padding: 14px; border-radius: var(--radius); font-size: 16px; margin-top: 12px; }

/* ---- Checkout Page ---- */
.checkout-page { background: var(--gray-50); min-height: 100vh; padding: 16px 0 100px; }
.checkout-grid { display: grid; gap: 16px; }
@media(min-width:1024px){ .checkout-grid { grid-template-columns: 2fr 1fr; } }
.checkout-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 24px; box-shadow: var(--shadow); }
.checkout-card h2 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.form-grid { display: grid; gap: 16px; }
@media(min-width:640px){ .form-grid { grid-template-columns: 1fr 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 14px; font-weight: 500; color: var(--gray-700); }
.form-field input, .form-field select, .form-field textarea {
  height: 44px; padding: 0 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); outline: none;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--red); box-shadow: 0 0 0 2px rgba(220,38,38,0.2); }
.form-field textarea { height: auto; padding: 8px 12px; min-height: 60px; resize: vertical; }
.input-icon { position: relative; }
.input-icon input { padding-left: 36px; }
.input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.input-icon.textarea .icon { top: 12px; transform: none; }
.payment-methods { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media(min-width:640px){ .payment-methods { grid-template-columns: 1fr 1fr; } }
.pay-method { display: flex; align-items: center; gap: 12px; border: 2px solid var(--gray-200); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: left; transition: all 0.2s; }
.pay-method:hover { border-color: var(--gray-300); }
.pay-method.active { border-color: var(--red); background: #fef2f2; }
.pay-method-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.pay-method-icon.cod { background: var(--gray-500); }
.pay-method-icon.bkash { background: var(--pink-bkash); }
.pay-method-icon.nagad { background: var(--orange-nagad); }
.pay-method-icon.card { background: var(--blue); }
.pay-method-info { flex: 1; }
.pay-method-title { font-size: 14px; font-weight: 600; }
.pay-method-desc { font-size: 12px; color: var(--gray-500); }
.order-summary { background: #fff; border-radius: var(--radius); border: 1px solid var(--gray-200); padding: 24px; }
.summary-item { display: flex; gap: 10px; margin-bottom: 10px; }
.summary-item-img { width: 56px; height: 56px; background: var(--gray-50); border-radius: var(--radius-sm); border: 1px solid var(--gray-100); overflow: hidden; position: relative; flex-shrink: 0; }
.summary-item-img img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.summary-item-qty { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.summary-item-info { flex: 1; min-width: 0; }
.summary-item-name { font-size: 12px; font-weight: 500; color: var(--gray-700); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.summary-item-price { font-size: 12px; color: var(--gray-400); }
.summary-item-total { font-size: 14px; font-weight: 600; white-space: nowrap; }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-row input { flex: 1; height: 40px; padding: 0 12px; border: 1px solid var(--gray-300); border-radius: var(--radius-sm); }
.coupon-row button { background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; padding: 0 16px; border-radius: var(--radius-sm); font-weight: 600; }
.summary-totals { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--gray-200); }
.summary-line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; color: var(--gray-500); }
.summary-line.discount { color: var(--green); }
.summary-line.total { font-weight: 700; font-size: 18px; margin-top: 8px; }
.summary-line.total .amount { color: var(--red); font-size: 24px; }
.terms-check { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; cursor: pointer; }
.terms-check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); }
.terms-check span { font-size: 12px; color: var(--gray-600); }
.terms-check a { color: var(--red); text-decoration: underline; }
.btn-place-order { width: 100%; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; font-weight: 700; padding: 14px; border-radius: var(--radius); font-size: 16px; }

/* ---- Mobile Sticky Bar ---- */
.mobile-sticky { position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--gray-200); box-shadow: 0 -4px 12px rgba(0,0,0,0.08); padding: 12px; display: none; flex-direction: column; gap: 10px; }
@media(max-width:1023px){ .mobile-sticky.show { display: flex; } }
.mobile-sticky-top { display: flex; justify-content: space-between; align-items: baseline; }

/* ---- Floating Cart (mobile) ---- */
.float-cart { position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 30; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; border-radius: 999px; padding: 14px 20px; box-shadow: var(--shadow-lg); display: flex; justify-content: space-between; align-items: center; font-weight: 600; }

/* ---- Promo Section (only renders if admin has added content) ---- */
.promo-section { background: var(--gray-900); padding: 32px 0; }
@media(min-width:640px){ .promo-section { padding: 48px 0; } }
.promo-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: center; }
@media(min-width:768px){ .promo-grid { grid-template-columns: 1fr 1fr; } }
.promo-text { color: #fff; }
.promo-badge-chip { display: inline-block; background: #fbbf24; color: var(--gray-900); font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }
.promo-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: #fff; }
@media(min-width:640px){ .promo-title { font-size: 32px; } }
.promo-desc { color: #d1d5db; margin-bottom: 16px; font-size: 15px; line-height: 1.6; }
.promo-img-wrap { position: relative; height: 200px; }
@media(min-width:640px){ .promo-img-wrap { height: 256px; } }
.promo-img-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }

/* ---- Footer (no trust badges bar; real payment logos) ---- */
.footer { background: var(--gray-900); color: #d1d5db; margin-top: auto; }
.footer-main { padding: 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media(min-width:640px){ .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:1024px){ .footer-grid { grid-template-columns: repeat(4,1fr); } }
.footer-logo-link { display: inline-block; margin-bottom: 16px; }
.footer-logo-img { width: auto; height: 40px; max-width: 160px; object-fit: contain; filter: brightness(0) invert(1); }
.footer-brand-block p { font-size: 14px; color: #9ca3af; margin-top: 4px; line-height: 1.6; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 999px; background: #374151; display: flex; align-items: center; justify-content: center; font-size: 14px; color: #fff; }
.footer-social a:hover { background: var(--red); }
.footer h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; }
.footer li a { font-size: 14px; color: #9ca3af; }
.footer li a:hover { color: #f87171; }
.footer-contact-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; font-size: 14px; color: #9ca3af; }
.footer-contact-item .icon { color: #f87171; flex-shrink: 0; margin-top: 2px; }
.footer-newsletter { display: flex; gap: 8px; margin-top: 12px; }
.footer-newsletter input { flex: 1; height: 36px; padding: 0 12px; background: var(--gray-800); border: 1px solid var(--gray-700); border-radius: var(--radius-sm); color: #fff; outline: none; }
.footer-newsletter input:focus { border-color: var(--red); }
.footer-newsletter button { background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; padding: 0 12px; border-radius: var(--radius-sm); }
.footer-bottom { border-top: 1px solid #374151; padding: 16px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12px; color: #9ca3af; }
.footer-pay { display: flex; align-items: center; gap: 8px; }
.footer-pay .pay-label { font-size: 12px; color: #9ca3af; }
.footer-pay .pay-logo { height: 28px; width: auto; max-width: 64px; object-fit: contain; border-radius: var(--radius-sm); }

/* ---- Favourites Drawer (same shell as cart drawer) ---- */
.fav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.fav-overlay.open { opacity: 1; pointer-events: auto; }
.fav-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 420px; background: #fff; z-index: 60; transform: translateX(100%); transition: transform 0.3s; display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0,0,0,0.15); }
.fav-drawer.open { transform: translateX(0); }
.fav-drawer .cart-items .cart-empty { text-align: center; padding: 40px 16px; color: var(--gray-500); }
.fav-drawer .cart-item { cursor: pointer; }
.fav-drawer .cart-item:hover { background: var(--gray-100); }
.fav-drawer .cart-item-img { position: relative; }
.fav-drawer .cart-item-img .fav-remove-x { position: absolute; top: -4px; right: -4px; width: 18px; height: 18px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---- Payment Gateway ---- */
.payment-page { min-height: 100vh; display: flex; flex-direction: column; }
.payment-topbar { background: rgba(255,255,255,0.95); padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.payment-card-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 16px; }
@media(min-width:640px){ .payment-card-wrap { align-items: center; } }
.payment-card { background: #fff; border-radius: 16px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); max-width: 384px; width: 100%; overflow: hidden; }
.payment-header { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.payment-logo { padding: 6px 10px; border-radius: var(--radius-sm); color: #fff; font-weight: 700; font-size: 14px; }
.payment-logo.bkash { background: var(--pink-bkash); }
.payment-logo.nagad { background: var(--orange-nagad); }
.payment-acct { font-size: 12px; font-weight: 700; text-transform: uppercase; }
.payment-acct.bkash { color: var(--pink-bkash); }
.payment-acct.nagad { color: var(--orange-nagad); }
.payment-divider { height: 2px; }
.payment-divider.bkash { background: var(--pink-bkash); }
.payment-divider.nagad { background: var(--orange-nagad); }
.payment-merchant { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; }
.payment-merchant-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.payment-merchant-icon { width: 36px; height: 36px; border-radius: 999px; background: var(--gray-100); display: flex; align-items: center; justify-content: center; }
.payment-merchant-name { font-size: 14px; font-weight: 700; }
.payment-invoice { font-size: 10px; color: var(--gray-400); text-transform: uppercase; font-family: monospace; }
.payment-amount { font-size: 20px; font-weight: 800; text-align: right; }
.payment-body { padding: 20px 16px; color: #fff; }
.payment-body.bkash { background: var(--pink-bkash); }
.payment-body.nagad { background: var(--orange-nagad); }
.payment-label-bn { text-align: center; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.payment-label-en { text-align: center; font-size: 11px; color: rgba(255,255,255,0.8); margin-bottom: 16px; }
.payment-input { background: #fff; text-align: center; font-size: 16px; font-weight: 600; height: 48px; border: none; border-radius: var(--radius-sm); width: 100%; outline: none; letter-spacing: 1px; }
.payment-input.mono { font-family: monospace; text-transform: uppercase; }
.payment-note { font-size: 10px; color: rgba(255,255,255,0.7); margin-top: 12px; text-align: center; line-height: 1.5; }
.payment-merchant-box { background: #fff; border-radius: var(--radius-sm); padding: 12px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.payment-merchant-num { font-size: 16px; font-weight: 700; font-family: monospace; letter-spacing: 1px; }
.payment-merchant-num-label { font-size: 10px; color: var(--gray-400); text-transform: uppercase; }
.payment-btns { display: flex; gap: 10px; margin-top: 20px; }
.payment-btn { flex: 1; background: #fff; font-weight: 600; font-size: 14px; padding: 12px; border-radius: 999px; height: 44px; }
.payment-btn.bkash { color: var(--pink-bkash); }
.payment-btn.nagad { color: var(--orange-nagad); }
.payment-btn:hover { background: #f3f4f6; }
.payment-footer { padding: 12px 16px; background: var(--gray-50); display: flex; align-items: center; gap: 8px; font-size: 10px; color: var(--gray-500); }

/* ---- Success Screen ---- */
.success-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.success-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); max-width: 400px; width: 100%; padding: 40px 24px; text-align: center; }
.success-icon { width: 80px; height: 80px; border-radius: 999px; background: #dcfce7; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 40px; color: var(--green); }
.success-title { font-size: 24px; font-weight: 700; }
.success-text { color: var(--gray-500); margin-top: 8px; font-size: 14px; }
.success-order-box { background: linear-gradient(to bottom, #fef2f2, #fff7ed); border: 1px solid #fecaca; border-radius: var(--radius); padding: 16px; margin-top: 20px; }
.success-order-label { font-size: 12px; color: var(--gray-500); text-transform: uppercase; }
.success-order-num { font-size: 20px; font-weight: 700; color: var(--red); font-family: monospace; }

/* ---- Responsive ---- */
@media(max-width:1023px){
  .desktop-search { display: none !important; }
}
@media(max-width:767px){
  .hero-title { font-size: 28px; }
  .hero-subtitle { font-size: 16px; }
  .hero-arrow { width: 36px; height: 36px; }
  .detail-title { font-size: 20px; }
}

/* ---- Mobile Menu Drawer ---- */
.menu-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 50; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.menu-overlay.open { opacity: 1; pointer-events: auto; }
.menu-drawer { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; background: #fff; z-index: 60; transform: translateX(-100%); transition: transform 0.3s; overflow-y: auto; }
.menu-drawer.open { transform: translateX(0); }
.menu-drawer-header { padding: 16px; background: linear-gradient(to right, var(--red), var(--orange)); color: #fff; display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 18px; }
.menu-drawer-header .close { font-size: 20px; cursor: pointer; }
.menu-drawer-item { display: block; width: 100%; text-align: left; padding: 12px 16px; font-size: 14px; color: var(--gray-700); border: none; background: #fff; }
.menu-drawer-item:hover { background: var(--gray-50); }
.menu-drawer-item.featured { color: var(--red); font-weight: 600; }

/* ---- Helpers ---- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mt-8 { margin-top: 32px; }
.mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
