/* ============================================
   KIDVANA E-COMMERCE — GLOBAL DESIGN SYSTEM
   ============================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Primary Palette - Soft Minimalist / Premium Sand Aesthetic */
  --primary: #D4A373;
  /* Elegant soft sand/caramel */
  --primary-dark: #B0865E;
  --primary-light: #EBD6C3;
  --primary-gradient: linear-gradient(135deg, #D4A373 0%, #EBD6C3 100%);
  --primary-gradient-horizontal: linear-gradient(90deg, #B0865E 0%, #D4A373 50%, #EBD6C3 100%);

  /* Secondary / Accent */
  --accent-orange: #E68A7D;
  /* Soft blush coral */
  --accent-yellow: #EED7A1;
  --accent-green: #CCD5AE;
  /* Muted sage green */
  --accent-red: #D58989;
  --accent-blue: #9DB4C0;

  /* Neutrals */
  --white: #FFFFFF;
  --gray-50: #FCFBF9;
  /* Creamy off-white base */
  --gray-100: #F5F3F0;
  --gray-200: #EAE6E1;
  --gray-300: #D8D2CB;
  --gray-400: #A8A19B;
  --gray-500: #827C76;
  --gray-600: #625C56;
  --gray-700: #46423C;
  --gray-800: #2D2A26;
  /* Softer than pure black */
  --gray-900: #1B1917;
  --black: #000000;

  /* Background */
  --bg-body: #FCFBF9;
  --bg-card: #FFFFFF;
  --bg-section-alt: #F8F9F8;
  --bg-deal: #FFF7F4;
  --bg-dark: #1A1A1A;

  /* New Premium Tokens */
  --primary-rgb: 166, 138, 114;
  --accent-orange-rgb: 255, 107, 53;
  --accent-green-rgb: 34, 197, 94;

  /* Shadows - Modern diffuse aesthetic */
  --shadow-xs: 0 2px 8px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 16px 32px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 32px 64px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.06);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Poppins', 'Inter', sans-serif;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Layout */
  --container-max: 1280px;
  --header-height: 64px;
  --nav-height: 48px;

  /* Animations & Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shimmer: 2s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -468px 0;
  }

  100% {
    background-position: 468px 0;
  }
}

.skeleton {
  background: #f6f7f8;
  background-image: linear-gradient(to right, #f6f7f8 0%, #edeef1 20%, #f6f7f8 40%, #f6f7f8 100%);
  background-repeat: no-repeat;
  background-size: 800px 104px;
  animation: shimmer var(--shimmer);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.5s var(--transition-smooth) forwards;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--bg-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: inherit;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.1rem;
}

h5 {
  font-size: 1rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
  padding: 0 var(--space-2);
}

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  position: relative;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-top: 2px;
}

.view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.view-all-link:hover {
  color: var(--primary-dark);
  gap: 8px;
}

.view-all-link::after {
  content: '→';
  transition: transform var(--transition-base);
}

.view-all-link:hover::after {
  transform: translateX(3px);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  transition: transform var(--transition-fast), box-shadow var(--transition-smooth);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--gray-700);
  border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-emi {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  color: var(--white);
}

.badge-deal {
  background: linear-gradient(135deg, #FF6B35 0%, #FF8C00 100%);
  color: var(--white);
}

.badge-trending {
  background: linear-gradient(135deg, #7B2D8E 0%, #A855C7 100%);
  color: var(--white);
}

.badge-new {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  color: var(--white);
}

/* ── Product Card ── */
.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-xs);
  border: none;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
}

.product-card .card-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.product-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform var(--transition-slow);
}

.product-card:hover .card-image img {
  transform: scale(1.08);
}

.product-card .card-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
}

/* ── Product Card Actions (Wishlist & Quick View) ── */
.card-actions {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-base);
}

.product-card:hover .card-actions {
  opacity: 1;
  transform: translateX(0);
}

.card-action-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--white);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.card-action-btn:hover {
  background: var(--primary);
  color: var(--white);
  transform: scale(1.1);
}

.card-wishlist.active {
  color: var(--accent-red);
}

.card-wishlist.active:hover {
  background: var(--white);
  color: var(--accent-red);
}

.product-card .card-wishlist.active {
  color: var(--accent-red);
  background: var(--white);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.product-card .card-wishlist:active {
  transform: scale(0.9);
}

.product-card .card-body {
  padding: var(--space-3) var(--space-4) var(--space-4);
}

.product-card .card-brand {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.product-card .card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--gray-800);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--space-2);
  min-height: 2.2em;
}

.product-card .card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--space-2);
}

.product-card .card-rating .stars {
  color: var(--accent-yellow);
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.product-card .card-rating .count {
  font-size: 0.7rem;
  color: var(--gray-400);
}

.product-card .card-pricing {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.product-card .emi-price {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  background: var(--bg-section-alt);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(123, 45, 142, 0.1);
}

.product-card .emi-price .currency {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
}

.product-card .emi-price .amount {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  font-family: var(--font-display);
}

.product-card .emi-price .per-month {
  font-size: 0.7rem;
  color: var(--primary-light);
  font-weight: 500;
}

.product-card .original-price {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 2px;
}

.product-card .original-price .mrp {
  font-size: 0.78rem;
  color: var(--gray-400);
  text-decoration: line-through;
}

.product-card .original-price .discount {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-green);
}

.product-card .card-add-btn {
  width: 100%;
  margin-top: var(--space-3);
  padding: 8px 0;
  border-radius: var(--radius-md);
  background: var(--primary-gradient);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  opacity: 0;
  transform: translateY(8px);
}

.product-card:hover .card-add-btn {
  opacity: 1;
  transform: translateY(0);
}

.card-add-btn:hover {
  box-shadow: 0 4px 12px rgba(123, 45, 142, 0.3);
}

/* ── Product Scroll Row ── */
.product-scroll-row {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: var(--space-2) var(--space-2) var(--space-4);
  scrollbar-width: none;
}

.product-scroll-row::-webkit-scrollbar {
  display: none;
}

.product-scroll-row .product-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

/* Scroll arrows container */
.scroll-section {
  position: relative;
}

.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-700);
  font-size: 1.2rem;
  z-index: 10;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 1px solid var(--gray-100);
}

.scroll-arrow:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.scroll-arrow.left {
  left: -12px;
}

.scroll-arrow.right {
  right: -12px;
}

/* ── Product Grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  padding: var(--space-2);
}

/* ── Sections ── */
.section {
  padding: var(--space-10) 0;
}

.section-alt {
  background: var(--bg-section-alt);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--white);
}

/* ── Specialized Section Styles ── */
.section-deal {
  background: linear-gradient(to bottom, var(--bg-deal), #fff);
  border-top: 1px solid rgba(var(--accent-orange-rgb), 0.1);
}

.deals-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(var(--accent-orange-rgb), 0.15);
}

.deals-banner-left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.deals-banner-icon {
  font-size: 2.5rem;
  background: rgba(var(--accent-orange-rgb), 0.1);
  padding: 12px;
  border-radius: var(--radius-lg);
}

.deals-banner-text h3 {
  color: #c2410c;
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.deals-banner-text p {
  color: var(--gray-500);
  font-size: 0.9rem;
}

/* ── Toast Notification ── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--gray-900);
  color: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  font-size: 0.85rem;
  font-weight: 500;
  animation: toastIn 0.4s var(--transition-bounce) forwards;
  max-width: 360px;
}

.toast.success {
  border-left: 4px solid var(--accent-green);
}

.toast.error {
  border-left: 4px solid var(--accent-red);
}

.toast.info {
  border-left: 4px solid var(--accent-blue);
}

.toast-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  width: 90%;
  max-width: 440px;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  font-size: 1.1rem;
}

.modal-close:hover {
  background: var(--gray-200);
  color: var(--gray-800);
}

/* ── Form Elements ── */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: var(--space-1);
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--gray-800);
  background: var(--white);
  transition: all var(--transition-fast);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

/* ── Scrollbar (for desktop) ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* ── Utility Classes ── */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--primary);
}

.text-muted {
  color: var(--gray-500);
}

.fw-bold {
  font-weight: 700;
}

.fw-semibold {
  font-weight: 600;
}

.d-flex {
  display: flex;
}

.align-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: var(--space-1);
}

.gap-2 {
  gap: var(--space-2);
}

.gap-3 {
  gap: var(--space-3);
}

.gap-4 {
  gap: var(--space-4);
}

.mt-2 {
  margin-top: var(--space-2);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.hidden {
  display: none !important;
}

/* ── Animations ── */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease forwards;
}

.animate-slideInLeft {
  animation: slideInLeft 0.5s ease forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease forwards;
}

/* ── Quick View Modal ── */
.quick-view-modal {
  max-width: 800px;
  padding: 32px;
}

@media (max-width: 768px) {
  .quick-view-content {
    grid-template-columns: 1fr !important;
  }
}

/* ── Reviews Section ── */
.reviews-section {
  margin-top: var(--space-10);
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  border: 1px solid var(--gray-100);
}

.review-form {
  background: var(--gray-50);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-8);
}

.rating-input {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.rating-input select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-300);
  background: var(--white);
}

.review-comment-input {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  margin-bottom: var(--space-4);
  resize: vertical;
  min-height: 100px;
}