/* WA Store - Compact Premium Amazon-Style Storefront */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #f8fafc;
  --bg-subtle: #ffffff;
  --card: #ffffff;
  --line: #e2e8f0;
  --primary: #0b6f45;
  --primary-hover: #085534;
  --primary-light: #e6f4ed;
  --accent-gold: #FF9900;
  --accent-blue: #146EB4;
  --text: #0f172a;
  --muted: #64748b;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 10px 24px rgba(0, 0, 0, 0.08);
  --font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Announcement Marquee Ticker */
.store-announcement {
  height: 34px;
  overflow: hidden;
  background: linear-gradient(90deg, #087a3e, #10a34f, #087a3e);
  box-shadow: 0 2px 10px rgba(16, 163, 79, 0.25);
  color: #ffffff;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.announcement-track {
  display: flex;
  width: max-content;
  min-width: max-content;
  animation: scrollMarquee 22s linear infinite;
}

.announcement-track span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 32px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.035em;
}

.announcement-track b {
  color: #ffe46b;
  background: rgba(0,0,0,0.15);
  padding: 2px 6px;
  border-radius: 4px;
}

@keyframes scrollMarquee {
  to { transform: translateX(-50%); }
}

/* Amazon Header */
.site-header {
  min-height: 66px;
  height: 66px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #131921;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.site-header .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 800;
}

.site-header .logo img {
  height: 38px;
  width: 38px;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  padding: 2px;
  display: inline-block;
  vertical-align: middle;
}

.site-header .logo span b {
  color: var(--accent-gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-btn-badge {
  background: var(--accent-gold);
  color: #111111;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.3);
  transition: transform 0.2s ease;
}

.cart-btn-badge:hover {
  transform: translateY(-1px);
  background: #f3a847;
}

.cart-btn-badge b {
  background: #111111;
  color: #ffffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.btn {
  background: #ffffff;
  color: var(--text);
  border: none;
  padding: 7px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover { background: #f1f5f9; }

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover { background: var(--primary-hover); }

/* Amazon Hero Banner */
.hero-slider {
  background: linear-gradient(180deg, #131921 0%, #232f3e 70%, #f8fafc 100%);
  padding: 30px 20px 24px;
  color: #ffffff;
  text-align: center;
}

.hero-content-box {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero-content-box h1 {
  font-size: clamp(24px, 3.5vw, 44px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero-content-box h1 span { color: var(--accent-gold); }

.hero-content-box p {
  font-size: clamp(13px, 1.3vw, 16px);
  color: rgba(255, 255, 255, 0.85);
  max-width: 600px;
  margin: 0 auto 16px;
}

/* Layered Filter Bar */
.layered-filter-bar {
  width: min(1200px, calc(100% - 24px));
  margin: -16px auto 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.search-input-group {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
}
.search-input:focus { border-color: var(--accent-blue); background: #ffffff; }

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  width: 16px;
  height: 16px;
}

.filter-selects {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.select-control {
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

/* Main Section Layout */
.section {
  width: min(1200px, calc(100% - 24px));
  margin: 0 auto;
  padding: 14px 0;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}

.section-head h2 {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* COMPACT PRODUCT CARDS GRID (MIN 200px) */
.product-row-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.cat-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--muted);
}

.stock-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
}
.stock-tag.in-stock { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }
.stock-tag.out-stock { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* COMPACT LOGO MEDIA BOX */
.product-media-box {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  padding: 4px;
}

.product-media-box img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain !important;
}

.product-card h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text);
  line-height: 1.25;
}

.rating-stars {
  font-size: 0.8rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
  font-weight: 700;
}
.rating-stars span { color: var(--muted); font-size: 0.7rem; margin-left: 2px; }

.price-text {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.price-currency {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 800;
  margin-right: 2px;
}

/* COMPACT DUAL ACTION BUTTONS */
.dual-btn-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: auto;
}

.btn-add-cart {
  background: #ffa41c;
  color: #111111;
  border: none;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.btn-add-cart:hover { background: #fa8900; }

.btn-buy-now {
  background: #FFD814;
  color: #111111;
  border: none;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.btn-buy-now:hover { background: #f7ca00; }

/* Slide-out Cart Drawer */
.cart-drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.cart-drawer-overlay.active { opacity: 1; pointer-events: auto; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(400px, 90vw);
  background: #ffffff;
  box-shadow: -10px 0 30px rgba(0,0,0,0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cart-drawer-overlay.active .cart-drawer { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer-header h3 { font-size: 1.15rem; font-weight: 800; }

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 10px;
}

.cart-item-info h4 { font-size: 0.85rem; font-weight: 800; margin-bottom: 2px; }
.cart-item-info p { font-size: 0.75rem; color: var(--primary); font-weight: 700; }

.cart-qty-ctrl {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 2px 6px;
  border-radius: 6px;
}
.cart-qty-btn { background: none; border: none; font-weight: 800; cursor: pointer; font-size: 0.9rem; padding: 0 4px; }

.cart-drawer-footer {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: #f1f5f9;
  border: none;
  color: var(--muted);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }

.form-control {
  width: 100%;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  font-family: inherit;
}
.form-control:focus { border-color: var(--primary); background: #ffffff; }

.payment-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.payment-radio { border: 2px solid var(--line); border-radius: 10px; padding: 10px; text-align: center; cursor: pointer; background: #f8fafc; }
.payment-radio.active { border-color: var(--primary); background: var(--primary-light); }

.credentials-view { background: #f8fafc; border: 2px solid #bbf7d0; border-radius: 14px; padding: 16px; margin-top: 14px; }
.cred-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid #e2e8f0; }
.cred-label { color: var(--muted); font-size: 12px; font-weight: 600; }
.cred-value { font-weight: 800; font-family: monospace; font-size: 13px; }
.copy-btn { background: #e2e8f0; border: none; padding: 3px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; cursor: pointer; }
.copy-btn:hover { background: var(--primary); color: #fff; }

.alert { padding: 10px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; margin-bottom: 14px; }
.alert-danger { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }
.alert-success { background: #f0fdf4; color: var(--success); border: 1px solid #bbf7d0; }

/* Toast Notification */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #111111;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 2000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}
.toast-msg.active { opacity: 1; transform: translateY(0); }

/* Floating WhatsApp Button */
.floating-wa-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  text-decoration: none;
}
.floating-wa-btn:hover { transform: scale(1.08); }

footer {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  margin-top: auto;
}

/* ───────────────────────────────────────────────────────────── */
/* 🌐 RESPONSIVE LAYOUT ENGINE (ALL DEVICE SCREEN RESOLUTIONS)  */
/* ───────────────────────────────────────────────────────────── */

/* 1. Ultra-Wide Desktops (> 1366px) */
@media (min-width: 1366px) {
  .hero-content-box,
  .layered-filter-bar,
  .section {
    width: min(1380px, calc(100% - 40px));
  }
  .product-row-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

/* 2. Standard Laptops & Desktops (1024px - 1365px) */
@media (min-width: 1024px) and (max-width: 1365px) {
  .product-row-grid {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  }
}

/* 3. Tablets & Small Laptops (768px - 1023px) */
@media (max-width: 1023px) {
  .site-header {
    padding: 8px 14px;
  }
  .hero-slider {
    padding: 24px 16px 20px;
  }
  .layered-filter-bar {
    padding: 10px 14px;
    margin-top: -12px;
  }
  .filter-selects {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .select-control {
    width: 100%;
  }
  .product-row-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
  }
}

/* 4. Mobile Devices & Foldables (Up to 767px) */
@media (max-width: 767px) {
  .store-announcement {
    height: 30px;
  }
  .announcement-track span {
    font-size: 11px;
    padding: 0 18px;
  }

  .site-header {
    height: 58px;
    min-height: 58px;
    padding: 6px 10px;
  }
  .site-header .logo span {
    font-size: 1.05rem;
  }
  .site-header .logo img {
    height: 32px;
    width: 32px;
  }

  .header-actions {
    gap: 6px;
  }
  .header-actions .btn,
  .cart-btn-badge {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
  #userBalanceContainer {
    display: none !important; /* Mobile header space saver */
  }

  .hero-slider {
    padding: 18px 12px 16px;
  }
  .hero-content-box h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
  }
  .hero-content-box p {
    font-size: 0.8rem;
    margin-bottom: 10px;
  }

  .layered-filter-bar {
    width: calc(100% - 16px);
    margin: -10px auto 14px;
    padding: 10px;
    border-radius: 12px;
    gap: 8px;
  }
  .search-input-group {
    min-width: 100%;
  }
  .search-input {
    font-size: 0.82rem;
    padding: 8px 12px 8px 36px;
  }
  .filter-selects {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .select-control {
    font-size: 0.72rem;
    padding: 6px 6px;
    border-radius: 6px;
  }

  .section {
    width: calc(100% - 16px);
    padding: 8px 0;
  }

  /* 2-Column Responsive Product Grid on Phones */
  .product-row-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    padding: 10px;
    border-radius: 12px;
  }
  .product-media-box {
    height: 56px;
    margin-bottom: 6px;
  }
  .product-card h3 {
    font-size: 0.82rem;
  }
  .price-text {
    font-size: 1.02rem;
    margin-bottom: 6px;
  }
  .dual-btn-bar {
    gap: 4px;
  }
  .btn-cart-add,
  .btn-buy-now {
    padding: 6px 4px;
    font-size: 0.72rem;
    border-radius: 6px;
  }

  /* Bottom-Sheet Style Modals on Mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }
  .modal-card {
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    padding: 18px 16px 24px;
    max-width: 100%;
  }

  /* Slide-Out Cart Drawer Full Width */
  .cart-drawer {
    width: 100%;
  }

  .floating-wa-btn {
    width: 46px;
    height: 46px;
    font-size: 1.3rem;
    bottom: 16px;
    right: 16px;
  }
  .toast-msg {
    bottom: 16px;
    left: 16px;
    right: 16px;
    text-align: center;
  }
}

/* 5. Extra Small Compact Mobile Screens (< 360px) */
@media (max-width: 359px) {
  .product-row-grid {
    grid-template-columns: 1fr;
  }
  .filter-selects {
    grid-template-columns: 1fr;
  }
}

