/* ==========================================================================
   AVYRA - Luxury Modern E-Commerce Platform Inspired by Amazon.in
   Design System & Component Styling
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Color Palette */
  --bg-main: #0B0F19;
  --bg-surface: #111827;
  --bg-card: #1E293B;
  --bg-card-hover: #26334D;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(99, 102, 241, 0.4);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent-indigo: #6366F1;
  --accent-indigo-hover: #4F46E5;
  --accent-amber: #F59E0B;
  --accent-amber-hover: #D97706;
  --accent-emerald: #10B981;
  --whatsapp-green: #25D366;
  --whatsapp-hover: #20BA56;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.3);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #0B0F19;
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

/* Typography Helpers */
h1, h2, h3, h4, .brand-font {
  font-family: var(--font-heading);
}

/* Top Notification Banner */
.top-notice-bar {
  background: linear-gradient(90deg, #1E1B4B, #0F172A, #064E3B);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8125rem;
  padding: 6px 16px;
}

/* Navigation Header */
.main-header {
  background: #0F172A;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.nav-hover-box {
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
}
.nav-hover-box:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
}

/* Amazon-style Search Bar with Modern Glass & Glow */
.search-wrapper {
  background: #1E293B;
  border: 2px solid transparent;
  border-radius: 12px;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.search-wrapper:focus-within {
  border-color: var(--accent-amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.search-category-select {
  background: #334155;
  color: #E2E8F0;
  border: none;
  font-size: 0.825rem;
  font-weight: 500;
  cursor: pointer;
}

/* Subnav Category Bar */
.sub-nav {
  background: #111827;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  white-space: nowrap;
  overflow-x: auto;
}

.sub-nav-item {
  color: #CBD5E1;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  text-decoration: none;
}
.sub-nav-item:hover, .sub-nav-item.active {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}
.sub-nav-item.active {
  border-bottom: 2px solid var(--accent-amber);
  border-radius: 6px 6px 0 0;
  color: var(--accent-amber);
}

/* Hero Carousel */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
}

.hero-slide {
  display: none;
  animation: fadeInSlide 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-slide.active {
  display: block;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 4-in-1 Amazon Feature Cards */
.quad-grid-card {
  background: #161F33;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.quad-grid-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.quad-item-thumb {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #0F172A;
}
.quad-item-thumb img {
  transition: transform 0.3s ease;
}
.quad-item-thumb:hover img {
  transform: scale(1.08);
}

/* Product Cards */
.product-card {
  background: #161F33;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 15px rgba(245, 158, 11, 0.1);
}

.product-img-box {
  position: relative;
  padding-top: 80%;
  background: #0B0F19;
  overflow: hidden;
}
.product-img-box img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .product-img-box img {
  transform: scale(1.06);
}

.quick-view-btn {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
}
.product-card:hover .quick-view-btn {
  opacity: 1;
  transform: translateY(0);
}

/* Amazon's Choice / Best Seller Pill */
.badge-avyra-choice {
  background: linear-gradient(135deg, #1E293B, #0F172A);
  border-left: 4px solid var(--accent-amber);
  color: #F8FAFC;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 0 4px 4px 0;
}

.badge-deal {
  background: #DC2626;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* WhatsApp Buttons */
.btn-whatsapp {
  background: #25D366;
  color: #FFFFFF;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
}
.btn-whatsapp:hover {
  background: #20BA56;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  color: #FFFFFF;
}

.btn-primary {
  background: var(--accent-amber);
  color: #0B0F19;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: #FBBF24;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
  color: #0B0F19;
}

/* Cart Drawer */
.cart-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.cart-drawer-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 440px;
  background: #111827;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
.cart-drawer.active {
  transform: translateX(0);
}

/* Floating WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 80;
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.whatsapp-fab:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #25D366;
  opacity: 0.6;
  animation: waPulse 2s infinite;
  z-index: -1;
}

@keyframes waPulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.whatsapp-popover {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 290px;
  background: #1E293B;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.whatsapp-popover.active {
  display: block;
}

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

/* Modal Windows */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  max-width: 850px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-content {
  transform: scale(1);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: #1E293B;
  color: white;
  border-left: 4px solid var(--accent-amber);
  border-radius: 8px;
  padding: 12px 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.toast-wa {
  border-left-color: var(--whatsapp-green);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Amazon-Style Buy Box & Product Detail Elements */
.buy-box {
  background: #161F33;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.spec-table tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.spec-table td {
  padding: 10px 14px;
}

.accordion-header {
  cursor: pointer;
  user-select: none;
}

/* Mobile Sticky Bottom Bar */
@media (max-width: 768px) {
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0F172A;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 60;
    display: flex;
    justify-content: space-around;
    padding: 8px 12px;
  }
  body {
    padding-bottom: 65px;
  }
}
@media (min-width: 769px) {
  .mobile-bottom-bar {
    display: none;
  }
}
