/* SL CAT TOPUP CENTER - Modern Gaming Web Store Style */
:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #131b2e;
  --bg-card: #182238;
  --bg-card-hover: #1f2c49;
  --border-color: #273656;
  --border-focus: #3b82f6;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.35);
  --accent-gold: #f59e0b;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header & Navbar */
.navbar {
  background: rgba(19, 27, 46, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 20px;
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.navbar-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
}

.navbar-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.navbar-sub-row::-webkit-scrollbar {
  display: none;
}

.pill-spin {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  border: none;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.45);
  flex-shrink: 0;
  touch-action: manipulation;
  text-decoration: none;
}

.pill-leaderboard {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid #f59e0b;
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  touch-action: manipulation;
  text-decoration: none;
}

.pill-link {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.pill-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.5px;
}

.brand-badge {
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
  margin-left: 18px;
}

.nav-links a:hover {
  color: var(--accent-cyan);
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
  padding: 40px 20px 24px;
  text-align: center;
}

.hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Main Container */
.container {
  max-width: 1050px;
  margin: 0 auto;
  padding: 0 16px 60px;
  width: 100%;
}

/* Step Card Wrapper */
.step-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-lg);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.step-num {
  background: var(--accent-cyan);
  color: #0b0f19;
  font-weight: 800;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Step 1: UID Input */
.uid-box {
  display: flex;
  gap: 12px;
  max-width: 520px;
}

.uid-input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.1rem;
  padding: 14px 18px;
  outline: none;
  transition: all 0.2s;
}

.uid-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-glow);
}

.btn-check {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0 24px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-check:hover {
  opacity: 0.92;
}

.btn-check:active {
  transform: scale(0.98);
}

.player-info-card {
  margin-top: 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: none;
  align-items: center;
  justify-content: space-between;
}

.player-info-card.active {
  display: flex;
}

.player-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #34d399;
}

.player-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Category Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab-btn.active, .tab-btn:hover {
  background: var(--border-focus);
  color: #fff;
  border-color: var(--border-focus);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .product-card {
    padding: 14px 8px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 195px;
    justify-content: flex-start;
    box-sizing: border-box;
    border-radius: 16px;
    position: relative;
  }
  .card-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 5px;
    letter-spacing: 0.3px;
    z-index: 2;
  }
  .card-inner-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 6px;
  }
  .card-thumb-box {
    width: 76px;
    height: 60px;
    margin: 2px auto 4px;
    padding: 4px;
    border-radius: 12px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(0, 0, 0, 0.5) 80%);
  }
  .card-info-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .product-card .card-name {
    font-size: 0.88rem;
    font-weight: 800;
    color: #ffffff;
    white-space: normal;
    line-height: 1.25;
    margin-bottom: 4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4em;
    overflow: visible;
    word-break: break-word;
  }
  .diamond-pill-badge {
    font-size: 0.72rem;
    padding: 2px 8px;
    white-space: nowrap;
    margin-bottom: 4px;
    border-radius: 6px;
  }
  .product-card .card-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: #34d399;
    white-space: nowrap;
    margin-top: 2px;
  }
}

.product-card {
  background: linear-gradient(145deg, #101726, #0b0f19);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.product-card:hover {
  background: linear-gradient(145deg, #172238, #0e1626);
  border-color: #38bdf8;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px -4px rgba(56, 189, 248, 0.35);
}

.product-card.selected {
  border-color: #00f0ff;
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.14), rgba(15, 23, 42, 0.95));
  box-shadow: 0 0 0 2px #00f0ff, 0 8px 30px rgba(0, 240, 255, 0.35);
}

.card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
  z-index: 2;
}

.card-inner-flex {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-thumb-box {
  width: 84px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(0, 0, 0, 0.4) 80%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
  position: relative;
  transition: transform 0.25s;
}

.product-card:hover .card-thumb-box,
.product-card.selected .card-thumb-box {
  transform: scale(1.08);
  border-color: rgba(56, 189, 248, 0.45);
}

.card-thumb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.card-icon-fallback {
  font-size: 2rem;
}

.card-info-box {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.card-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: normal;
  line-height: 1.35;
  word-break: break-word;
}

.card-details {
  margin-bottom: 6px;
}

.diamond-pill-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: 6px;
}

.card-price {
  font-size: 1.15rem;
  font-weight: 900;
  color: #34d399;
  letter-spacing: 0.3px;
}

/* Step 3: LankaQR Payment Banner */
.pay-banner {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.qr-preview-box {
  background: #ffffff;
  padding: 14px;
  border-radius: var(--radius-md);
  display: inline-block;
  margin: 16px 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.qr-preview-box img {
  display: block;
  width: 220px;
  height: 220px;
}

.supported-apps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 12px 0 20px;
}

.app-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Checkout Button */
.btn-pay {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1.15rem;
  padding: 16px 36px;
  width: 100%;
  max-width: 420px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-pay:hover {
  opacity: 0.95;
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(16, 185, 129, 0.45);
}

/* Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99995;
  padding: 16px;
}

.modal-overlay.active {
  display: flex !important;
}

.modal-card,
.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 480px;
  width: 100%;
  padding: 28px;
  position: relative;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn,
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #94a3b8;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  z-index: 100;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.close-btn:hover,
.modal-close:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  transform: scale(1.08);
}

.close-btn:active,
.modal-close:active {
  transform: scale(0.94);
}

.order-code-badge {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
  margin-bottom: 12px;
}

.countdown {
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 0.95rem;
  margin-top: 8px;
}

.form-group {
  text-align: left;
  margin-top: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 12px 14px;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent-cyan);
}

/* Footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Responsive & Adaptive Layouts */
@media (min-width: 900px) {
  .nav-mobile-wrapper {
    display: none !important;
  }
  .nav-desktop-wrapper {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 12px 24px;
    box-sizing: border-box;
  }
  .desktop-quick-spin, #floatingQuickSpin {
    display: block !important;
    position: fixed !important;
    bottom: 24px !important;
    left: 24px !important;
    z-index: 99990 !important;
  }
  .wa-desktop-card, .wa-online-card {
    display: flex !important;
  }
  #floatingWhatsAppSupport {
    bottom: 80px !important;
    right: 24px !important;
  }
  #livePurchaseTicker {
    bottom: 78px !important;
    left: 20px !important;
    max-width: 260px !important;
  }
}

@media (max-width: 899px) {
  .nav-desktop-wrapper {
    display: none !important;
  }
  .nav-mobile-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .uid-box {
    flex-direction: column;
  }
  .btn-check {
    padding: 14px;
  }
  .brand {
    font-size: 1.05rem;
    gap: 8px;
  }
  .brand-badge {
    font-size: 0.65rem;
    padding: 2px 7px;
  }
  .navbar {
    padding: 0 !important;
  }
  /* Hide colliding floating elements on mobile */
  #floatingQuickSpin,
  .desktop-quick-spin,
  .desktop-only {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .wa-desktop-card,
  .wa-online-card {
    display: none !important;
  }
  #floatingWhatsAppSupport {
    bottom: 78px !important;
    right: 14px !important;
  }
  #floatingWhatsAppSupport a {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.5rem !important;
  }
  #livePurchaseTicker {
    bottom: 76px !important;
    left: 10px !important;
    max-width: 220px !important;
    font-size: 0.70rem !important;
  }
  .hero {
    padding: 24px 16px 16px !important;
  }
  .hero h1 {
    font-size: 1.6rem !important;
    line-height: 1.25 !important;
  }
}

/* ========================================================================= */
/* 🛍️ ADVANCED STICKY BOTTOM CHECKOUT ACTION BAR (Image 2 Style) */
/* ========================================================================= */
body {
  padding-bottom: 85px !important;
}

.sticky-checkout-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99980;
  background: rgba(13, 19, 33, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(139, 92, 246, 0.28);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.7), 0 -2px 12px rgba(139, 92, 246, 0.15);
  padding: 10px 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.sticky-bar-inner {
  width: 100%;
  max-width: 1100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticky-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.sticky-bar-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(59, 130, 246, 0.15));
  border: 1px solid rgba(139, 92, 246, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
  overflow: hidden;
  padding: 4px;
}

.sticky-bar-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sticky-bar-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sticky-bar-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.sticky-bar-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.sticky-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.sticky-bar-price-box {
  display: flex;
  align-items: baseline;
  gap: 4px;
  text-align: right;
}

.sticky-bar-curr {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
}

.sticky-bar-val {
  font-size: 1.3rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

/* Buy Now Pill Button - Perfectly matching Image 2 */
.btn-floating-buy {
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.96rem;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-floating-buy:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.65);
}

.btn-floating-buy:active {
  transform: translateY(1px) scale(0.98);
}

.btn-floating-buy.unready {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  box-shadow: none;
}

@media (max-width: 600px) {
  .sticky-checkout-bar {
    padding: 8px 12px;
  }
  .sticky-bar-thumb {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
  .sticky-bar-title {
    font-size: 0.86rem;
    max-width: 140px;
  }
  .sticky-bar-sub {
    font-size: 0.68rem;
    max-width: 140px;
  }
  .sticky-bar-val {
    font-size: 1.12rem;
  }
  .sticky-bar-curr {
    font-size: 0.72rem;
  }
  .btn-floating-buy {
    padding: 8px 20px;
    font-size: 0.88rem;
    border-radius: 20px;
  }
}

/* 🔢 QUANTITY SELECTOR STYLES */
.quantity-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 20px;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
  box-sizing: border-box;
}
.qty-stepper-box {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(13, 19, 33, 0.9);
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  border-radius: 18px;
  padding: 6px 12px;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}
.btn-qty-step {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: none;
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  touch-action: manipulation;
  user-select: none;
}
.btn-qty-minus {
  background: rgba(139, 92, 246, 0.2);
  color: #fff;
}
.btn-qty-minus:hover {
  background: rgba(139, 92, 246, 0.4);
}
.btn-qty-plus {
  background: linear-gradient(135deg, #a855f7, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}
.btn-qty-plus:hover {
  transform: scale(1.05);
}
.qty-input {
  width: 65px;
  text-align: center;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  font-family: inherit;
}
.qty-pills-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.qty-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  padding: 6px 16px;
  border-radius: 16px;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.qty-pill:hover, .qty-pill.active {
  background: linear-gradient(135deg, #a855f7, #6366f1) !important;
  border-color: #a855f7 !important;
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4) !important;
}

/* =====================================================================
   SL CAT ADVANCED 24/7 AI LIVE CHAT ASSISTANT
   ===================================================================== */
#floatingAiAssistantBtn {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.ai-btn-pulse-circle {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.55), 0 0 15px rgba(59, 130, 246, 0.4);
  position: relative;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid rgba(255, 255, 255, 0.3);
}
#floatingAiAssistantBtn:hover .ai-btn-pulse-circle {
  transform: scale(1.1) rotate(5deg);
}
.ai-btn-pulse-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  border: 2px solid #06b6d4;
  animation: aiPulseRing 2.2s infinite;
  pointer-events: none;
}
@keyframes aiPulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}
.ai-btn-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #10b981;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 8px;
  border: 2px solid #0f172a;
  letter-spacing: 0.5px;
}
.ai-btn-tooltip {
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 12px;
  padding: 8px 14px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: aiFloatTooltip 3s ease-in-out infinite;
}
@keyframes aiFloatTooltip {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Proactive floating greeting toast */
.ai-proactive-toast {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 280px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(6, 182, 212, 0.45);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(16px);
  z-index: 99997;
  display: none;
  animation: aiToastSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  color: #fff;
  cursor: pointer;
  text-align: left;
}
@keyframes aiToastSlideUp {
  from { opacity: 0; transform: translateY(14px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.ai-proactive-toast .toast-close {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  transition: color 0.2s;
}
.ai-proactive-toast .toast-close:hover {
  color: #ef4444;
}

/* AI Chat Window Modal */
#aiChatWindow {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 560px;
  max-height: calc(100vh - 120px);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.98), rgba(11, 15, 25, 0.98));
  border: 1.5px solid rgba(6, 182, 212, 0.35);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(6, 182, 212, 0.2);
  backdrop-filter: blur(20px);
  z-index: 100005;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: aiSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Guarantee that launcher button and its tooltip NEVER overlap the chat window or input bar */
body.ai-chat-open #floatingAiAssistantBtn,
body.ai-chat-active #floatingAiAssistantBtn,
#aiChatWindow[style*="display: flex"] ~ #floatingAiAssistantBtn,
#aiChatWindow[style*="display:flex"] ~ #floatingAiAssistantBtn {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

@keyframes aiSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Chat Header */
.ai-chat-header {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.15), rgba(59, 130, 246, 0.15));
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ai-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-avatar-box {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}
.ai-header-title {
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-header-subtitle {
  color: #94a3b8;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  display: inline-block;
}
.ai-verified-badge {
  font-size: 0.65rem;
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.ai-agent-name-tag {
  font-size: 0.70rem;
  color: #94a3b8;
  margin-bottom: 5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ai-header-actions button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.9rem;
}
.ai-header-actions button:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

/* Quick Suggestion Chips */
.ai-quick-chips-wrapper {
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 12px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}
.ai-quick-chips-wrapper::-webkit-scrollbar {
  display: none;
}
.ai-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 5px 11px;
  border-radius: 12px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-chip:hover {
  background: rgba(6, 182, 212, 0.2);
  border-color: #06b6d4;
  color: #38bdf8;
  transform: translateY(-1px);
}

/* Messages Area */
.ai-messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.ai-messages-container::-webkit-scrollbar {
  width: 5px;
}
.ai-messages-container::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 10px;
}

.ai-msg {
  display: flex;
  flex-direction: column;
  max-width: 86%;
  animation: aiFadeInMsg 0.2s ease-out;
}
@keyframes aiFadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.ai-msg.user {
  align-self: flex-end;
}
.ai-msg.bot {
  align-self: flex-start;
}

.ai-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
}
.ai-msg.user .ai-bubble {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.ai-msg.bot .ai-bubble {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #06b6d4;
  color: #e2e8f0;
  border-bottom-left-radius: 4px;
}

.ai-bubble strong {
  color: #38bdf8;
}
.ai-bubble a {
  color: #34d399;
  font-weight: 700;
  text-decoration: underline;
}
.ai-bubble code {
  background: rgba(0, 0, 0, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
  color: #fbbf24;
  font-family: monospace;
}

/* Interactive Order Card in Chat */
.ai-order-card {
  background: linear-gradient(145deg, rgba(16, 24, 39, 0.95), rgba(11, 15, 25, 0.95));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 12px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}
.ai-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.8rem;
}
.ai-card-label {
  color: #94a3b8;
}
.ai-card-val {
  color: #f8fafc;
  font-weight: 700;
}
.ai-status-pill {
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.ai-status-completed { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid #10b981; }
.ai-status-pending { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid #f59e0b; }
.ai-status-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; border: 1px solid #ef4444; }

/* Typing indicator */
.ai-typing-indicator-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid #06b6d4;
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.ai-typing-text {
  color: #94a3b8;
  font-size: 0.75rem;
  font-style: italic;
  font-weight: 500;
}
.ai-typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.ai-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #38bdf8;
  animation: aiBounceDot 1.4s infinite ease-in-out;
}
.ai-dot:nth-child(1) { animation-delay: -0.32s; }
.ai-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes aiBounceDot {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

/* Chat Input Bar */
.ai-chat-input-bar {
  background: rgba(15, 23, 42, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 100010;
  box-sizing: border-box;
}
#aiChatInputField {
  flex: 1;
  min-width: 0;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 11px 14px;
  color: #fff;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}
#aiChatInputField:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.35);
}
#aiChatSendBtn {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}
#aiChatSendBtn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.6);
}

/* Mobile responsive full-screen bottom sheet */
@media (max-width: 600px) {
  #aiChatWindow {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 85vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    border-bottom: none;
  }
  #floatingAiAssistantBtn {
    bottom: 92px;
    right: 18px;
    z-index: 99999;
  }
  .ai-btn-tooltip {
    display: none !important;
  }
}

/* =====================================================================
   FLASH SALE COUNTDOWN BANNER & PROMO COUPONS
===================================================================== */
.flash-sale-banner {
  background: linear-gradient(90deg, #180e29, #2b1123, #221235, #180e29);
  background-size: 300% 100%;
  animation: flashSaleGradient 10s ease infinite;
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: #fff;
  padding: 6px 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 999;
}
@keyframes flashSaleGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.flash-sale-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.flash-sale-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid #fbbf24;
  color: #fef08a;
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 0.76rem;
  letter-spacing: 0.5px;
}
.flash-sale-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  animation: pulseDot 1s infinite alternate;
}
@keyframes pulseDot {
  from { opacity: 0.5; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.2); }
}
.flash-sale-text {
  flex: 1;
  text-align: center;
  min-width: 260px;
}
.coupon-chip {
  background: rgba(0, 0, 0, 0.5);
  border: 1px dashed #fbbf24;
  color: #fef08a;
  padding: 2px 7px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.coupon-chip:hover {
  background: #fbbf24;
  color: #000;
}
.flash-sale-timer-box {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}
.timer-label {
  font-size: 0.72rem;
  color: #fef08a;
  margin-right: 2px;
}
.timer-pill {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  padding: 2px 6px;
  font-family: monospace;
  font-size: 0.85rem;
  color: #fff;
}

/* Chat Slip Attachment & Star Rating */
.ai-attach-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ai-attach-btn:hover {
  background: rgba(6, 182, 212, 0.25);
  border-color: #06b6d4;
  transform: scale(1.05);
}
.ai-chat-rating-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.74rem;
  color: #94a3b8;
}
.ai-stars {
  display: inline-flex;
  gap: 4px;
  cursor: pointer;
  font-size: 0.95rem;
}
.ai-stars span {
  transition: transform 0.15s;
}
.ai-stars span:hover {
  transform: scale(1.25);
}

