/* ============================================================
   The Indian Legacy - Global Stylesheet
   Fonts: Poppins + Montserrat
   ============================================================ */

:root {
  --primary: #6c63ff;
  --primary-dark: #5E0006;
  --primary-light: color-mix(in srgb, var(--primary) 12%, transparent);
  --secondary: #ff6584;
  --accent: #43e97b;
  --dark: #5E0006;
  --dark-2: #9B0F06;
  --grey: #6c757d;
  --light-grey: #EED9B9;
  --border: rgba(0,0,0,0.06);
  --header-bg: #ffffff;
  --header-text: #1a1a2e;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.06);
  --shadow: 0 8px 30px rgba(0,0,0,0.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --transition: all 0.3s ease;
  --font-primary: 'Poppins', sans-serif;
  --font-heading: 'Montserrat', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-primary); color: var(--dark); overflow-x: hidden; background: #fff; }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }
.letter-spacing-1 { letter-spacing: 1px !important; }
.transition { transition: var(--transition) !important; }

/* ---- Marquee Bar ---- */
.marquee-bar {
  background: var(--primary);
  color: #fff;
  padding: 8px 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.marquee-inner {
  display: flex;
  animation: marqueeScroll 30s linear infinite;
  white-space: nowrap;
}
.marquee-inner span { padding-right: 80px; }
@keyframes marqueeScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-bar:hover .marquee-inner { animation-play-state: paused; }

/* ---- Top Bar ---- */
.top-bar {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 7px 0;
  font-size: 13px;
  position: relative;
  z-index: 1100; /* Ensure dropdowns are above header (z-index 1000) */
}
.top-bar a { color: rgba(255,255,255,0.8); }
.top-bar a:hover { color: #fff; }
.top-bar .btn { color: rgba(255,255,255,0.9); font-size: 12px; padding: 3px 10px; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; background: transparent; }
.top-bar .btn:hover { background: rgba(255,255,255,0.1); }
.top-bar .dropdown-menu { 
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 150px; 
  border-radius: var(--radius); 
  margin-top: 8px !important; 
  background: var(--dark-2); 
  border: 1px solid rgba(255,255,255,0.1) !important; 
  padding: 8px 0; 
  z-index: 9999 !important;
  pointer-events: none;
}
.top-bar .dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.top-bar .dropdown-item { color: rgba(255,255,255,0.8); padding: 8px 16px; transition: var(--transition); }
.top-bar .dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.top-bar .dropdown-item.active { background: var(--primary); color: #fff; }
.social-icon { color: rgba(255,255,255,0.8); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,0.1); transition: var(--transition); z-index: 10; }
.social-icon:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

/* ---- Header ---- */
.main-header {
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.main-header.scrolled { box-shadow: var(--shadow); }
.navbar { padding: 14px 0; gap: 20px; }

/* Logo */
.site-logo { height: 48px; object-fit: contain; }
.logo-text {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -1px;
  background: var(--primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Search */
.header-search { flex: 1; max-width: 520px; }
.search-form .input-group { border-radius: 5px; overflow: hidden; box-shadow: var(--shadow-sm); border: 2px solid var(--border); background: #fff; }
.search-form .input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.search-category { max-width: 130px; border-radius: 5px 0 0 5px !important; font-size: 13px; cursor: pointer; background: var(--light-grey); border: none !important; border-right: 1px solid var(--border) !important; color: var(--dark); }
.search-input { border: none !important; font-size: 14px; padding: 10px 16px; color: var(--dark); }
.search-input:focus { box-shadow: none !important; background: #fff; }
.search-btn { background: var(--primary); color: #fff; border-radius: 0 5px 5px 0 !important; padding: 0 20px; border: none; }
.search-btn:hover { opacity: 0.9; }

/* Action Buttons */
.header-actions { gap: 8px; }
.action-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--header-text);
  font-size: 14px; font-weight: 600;
  padding: 8px 14px;
  border-radius: 50px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  position: relative;
  text-decoration: none;
}
.action-btn:hover { background: var(--primary-light); color: var(--primary); }
.action-btn i { font-size: 18px; }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute;
  top: 2px; right: 2px;
  background: var(--secondary);
  color: #fff; font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 2px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.2); } }
.whatsapp-btn i { color: #25d366; font-size: 22px; }
.whatsapp-btn:hover { background: rgba(37,211,102,0.12); }
.user-menu a { cursor: pointer; }

/* Nav Links */
.navbar-nav .nav-link { color: var(--header-text) !important; font-weight: 600; font-size: 14px; padding: 8px 14px !important; border-radius: 8px; transition: var(--transition); }
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--primary) !important; background: var(--primary-light); }

/* ---- Buttons ---- */
.btn-primary { background: var(--primary) !important; color: #fff !important; border: none !important; font-weight: 600; border-radius: 8px; transition: var(--transition); }
.btn-primary:hover { background: var(--primary-dark) !important; color: #fff !important; opacity: 1; transform: translateY(-2px); box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 35%, transparent) !important; }
.btn-outline-primary { border-color: var(--primary) !important; color: var(--primary) !important; font-weight: 600; border-radius: 8px; }
.btn-outline-primary:hover { background: var(--primary-dark) !important; color: #fff !important; }
.btn-secondary { background: var(--secondary) !important; color: #fff !important; border: none !important; font-weight: 600; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.rounded-pill { border-radius: 50px !important; }

/* ---- Section Styles ---- */
section { padding: 50px 0; }
@media (min-width: 992px) { section { padding: 70px 0; } }
.section-compact { padding-top: 10px !important; padding-bottom: 10px !important; }
.section-header-compact { margin-bottom: 15px !important; }

/* ---- Section Card System & Heritage Palette ---- */
.section-card { 
  margin: 20px 15px 40px; 
  padding: 50px 0; 
  border-radius: 7px; 
  box-shadow: 0 10px 40px rgba(0,0,0,0.04); 
  position: relative;
  overflow: hidden;
}
@media (max-width: 768px) { .section-card { margin: 15px 5px 30px; padding: 30px 0; } }

/* Unique Backgrounds */
.bg-heritage-cream { background-color: #fdfcf0 !important; }
.bg-heritage-gold   { background-color: #fffaf0 !important; }
.bg-heritage-rose   { background-color: #fff5f5 !important; }
.bg-heritage-sage   { background-color: #f6faf6 !important; }
.bg-heritage-slate  { background-color: #f8f9fa !important; }
.bg-heritage-sand   { background-color: #fcf9f2 !important; }

/* Zig-Zag Header Logic */
.section-card:nth-of-type(even) .section-header { 
  flex-direction: row-reverse !important; 
  text-align: right !important; 
}
.section-card:nth-of-type(even) .section-title { margin-left: auto; }
.section-card:nth-of-type(even) .view-all-link { margin-right: auto; margin-left: 0; }

.section-header { text-align: center; margin-bottom: 35px; }
.section-badge { display: inline-block; padding: 6px 14px; background: var(--primary-light); color: var(--primary); border-radius: 20px; font-weight: 700; font-size: 13px; margin-bottom: 12px; letter-spacing: 1px; text-transform: uppercase; }
.section-title { font-size: clamp(24px, 4vw, 36px); font-weight: 800; margin-bottom: 10px; color: var(--dark); }
.section-title span { color: var(--primary); }
.section-subtitle { color: var(--grey); font-size: 15px; max-width: 600px; margin: 0 auto; }

/* ---- Hero / Swiper ---- */
.hero-swiper { height: 550px; border-radius: 7px; overflow: hidden; }
@media (max-width: 991px) { .hero-swiper { height: 420px; } }
@media (max-width: 576px) { .hero-swiper { height: 280px; } }
.hero-slide { position: relative; overflow: hidden; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-overlay {
  position: absolute; inset: 0;
  background: transparent;
  display: flex; align-items: center;
}
.hero-content { padding: 40px 60px; max-width: 600px; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-content h1 { font-size: clamp(28px, 5vw, 58px); font-weight: 900; color: #fff; line-height: 1.1; margin-bottom: 16px; }
.hero-content p { font-size: 18px; color: #fff; margin-bottom: 28px; font-weight: 500; }
.hero-content .btn { padding: 15px 36px; font-size: 16px; }
.swiper-button-prev, .swiper-button-next { background: rgba(255,255,255,0.2); backdrop-filter: blur(10px); width: 48px !important; height: 48px !important; border-radius: 50%; color: #fff !important; }
.swiper-button-prev::after, .swiper-button-next::after { font-size: 16px !important; font-weight: 900; }
.swiper-pagination-bullet-active { background: #fff !important; }

/* ---- Product Cards ---- */
.product-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: #fff;
  transition: var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
  position: relative;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-img-wrap { position: relative; overflow: hidden; aspect-ratio: 1; background: var(--light-grey); }
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.badge-sale { background: var(--secondary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-new { background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-trending { background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.product-actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateX(20px); transition: var(--transition); z-index: 2; }
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.product-action-btn { width: 36px; height: 36px; border-radius: 50%; background: #fff; border: none; box-shadow: var(--shadow-sm); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--dark); transition: var(--transition); }
.product-action-btn:hover { background: var(--primary); color: #fff; transform: scale(1.1); }
.product-info { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; justify-content: space-between; }
.product-category { font-size: 11px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.product-name { font-size: 14px; font-weight: 700; color: var(--dark); margin-bottom: 6px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; font-size: 12px; color: var(--grey); }
.product-price { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.product-price .current { font-size: 16px; font-weight: 800; color: var(--dark); }
.product-price .original { font-size: 13px; color: var(--grey); text-decoration: line-through; }
.product-price .discount-pct { font-size: 12px; font-weight: 700; color: var(--secondary); background: color-mix(in srgb, var(--secondary) 10%, transparent); padding: 2px 8px; border-radius: 20px; }
.add-to-cart-btn { width: 100%; margin-top: 14px; border-radius: 8px; font-weight: 600; font-size: 14px; }

/* ---- Category Cards ---- */
.category-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3.2 / 1;
  cursor: pointer;
  display: block;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.05);
}
.view-all-link {
  font-size: 13px;
  color: var(--primary);
  border-bottom: 1.5px solid transparent;
  transition: var(--transition);
  padding-bottom: 2px;
}
.view-all-link:hover {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-card:hover img { transform: scale(1.06); }
.category-overlay {
  position: absolute; inset: 0;
  background: rgba(94, 0, 6, 0.4);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 6px;
  text-align: center;
}
.category-icon { font-size: 16px; color: rgba(255,255,255,0.9); margin-bottom: 2px; }
.category-name { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.2; margin-bottom: 0; }
.category-count { display: none; } /* Hidden for micro-size */

/* ---- Responsive Category Adjustments ---- */
@media (max-width: 991px) {
  .category-swiper { padding-bottom: 10px !important; }
  .category-swiper .swiper-pagination { display: none !important; }
  
  .category-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    aspect-ratio: auto !important;
    transform: none !important;
    height: auto !important;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .category-card:hover { transform: translateY(-3px) !important; box-shadow: none !important; }
  .category-card img, .category-card > div:first-child { display: none !important; }
  
  .category-card .category-overlay {
    position: relative !important;
    background: transparent !important;
    padding: 0 !important;
    inset: auto !important;
    opacity: 1 !important;
  }
  
  /* Icon Size Scaling */
  .category-icon { 
    color: var(--primary) !important; 
    margin-bottom: 8px !important; 
    width: 54px; height: 54px; 
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(94, 0, 6, 0.05); /* Very subtle circle hint */
    transition: var(--transition);
  }
  .category-icon i { font-size: 22px !important; }
  
  .category-name { 
    color: var(--dark) !important; 
    font-size: 12px !important; 
    font-weight: 600 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* Specific Mobile Adjustment */
  @media (max-width: 576px) {
    .category-icon { width: 48px; height: 48px; }
    .category-icon i { font-size: 18px !important; }
    .category-name { font-size: 11px !important; }
  }
}

/* ---- Brand Badge Section ---- */
.brands-section { background: var(--light-grey); }
.brand-card { display: flex; align-items: center; justify-content: center; height: 80px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 16px; border: 1px solid var(--border); transition: var(--transition); }
.brand-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.brand-card img { max-height: 50px; max-width: 140px; object-fit: contain; filter: grayscale(0.5); transition: var(--transition); }
.brand-card:hover img { filter: none; }

/* ---- Shop Page ---- */
.shop-sidebar { position: sticky; top: 90px; }
.filter-card { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow-sm); }
.filter-title { font-weight: 700; font-size: 15px; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--primary-light); color: var(--dark); }
.filter-item { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; cursor: pointer; }
.filter-item input[type=checkbox] { accent-color: var(--primary); width: 16px; height: 16px; }
.filter-item label { cursor: pointer; font-size: 14px; color: var(--dark); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 14px 18px; margin-bottom: 24px; box-shadow: var(--shadow-sm); flex-wrap: wrap; gap: 12px; }
.sort-select { border: 1px solid var(--border); border-radius: 8px; padding: 8px 14px; font-family: var(--font-primary); font-size: 14px; cursor: pointer; }
.sort-select:focus { outline: none; border-color: var(--primary); }
.view-switcher .btn { border: 1px solid var(--border) !important; background: transparent !important; color: var(--grey) !important; padding: 8px 12px; }
.view-switcher .btn.active { background: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }

/* ---- Price Range Slider ---- */
.price-range input[type=range] { accent-color: var(--primary); width: 100%; }
.price-range input[type=range]::-webkit-slider-thumb { background: var(--primary) !important; }
.price-range input[type=range]::-moz-range-thumb { background: var(--primary) !important; }

/* ---- Product Detail ---- */
.product-gallery .main-img { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--light-grey); }
.product-gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery .thumb-list { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product-gallery .thumb-item { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; transition: var(--transition); }
.product-gallery .thumb-item:hover, .product-gallery .thumb-item.active { border-color: var(--primary); }
.product-gallery .thumb-item img { width: 100%; height: 100%; object-fit: cover; }
.product-info-panel { padding: 0 20px; }
.breadcrumb-custom { font-size: 13px; color: var(--grey); margin-bottom: 12px; }
.breadcrumb-custom a { color: var(--primary); }
.product-title-main { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin-bottom: 10px; }
.star-rating-display { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.star-rating-display .reviews-link { font-size: 13px; color: var(--grey); }
.product-price-main { font-size: 32px; font-weight: 900; color: var(--primary); margin-bottom: 8px; }
.product-price-original { font-size: 18px; color: var(--grey); text-decoration: line-through; margin-left: 10px; }
.product-meta-info { background: var(--light-grey); border-radius: var(--radius); padding: 16px 20px; margin: 20px 0; }
.product-meta-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 0; font-size: 14px; }
.product-meta-info dt { font-weight: 700; color: var(--dark); }
.product-meta-info dd { color: var(--grey); margin: 0; }
.variation-group { margin-bottom: 16px; }
.variation-label { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.variation-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variation-opt { padding: 6px 16px; border: 2px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 500; transition: var(--transition); }
.variation-opt:hover, .variation-opt.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.qty-selector { 
  display: flex; align-items: center; 
  border: 1px solid var(--border); 
  border-radius: var(--radius); 
  overflow: hidden; 
  width: 220px; /* Increased length/width */
  background: #fff;
  transition: var(--transition);
}
.qty-selector:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.qty-selector button { 
  flex: 1;
  border: none; background: #fdfdfd; 
  padding: 16px 0; 
  font-size: 20px; 
  cursor: pointer; 
  font-weight: 800; 
  transition: var(--transition); 
  display: flex; align-items: center; justify-content: center;
}
.qty-selector button:hover { background: var(--primary-light); color: var(--primary); }
.qty-selector input { 
  flex: 1.5;
  border: none; 
  border-left: 1px solid var(--border); 
  border-right: 1px solid var(--border); 
  padding: 16px 0; 
  width: auto; 
  text-align: center; 
  font-weight: 800; 
  font-size: 20px; 
  background: #fff;
  appearance: none;
  -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button, .qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.product-actions-group { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.product-tabs .nav-link { font-weight: 600; color: var(--grey); border-radius: 8px 8px 0 0 !important; }
.product-tabs .nav-link.active { color: var(--primary) !important; background: var(--primary-light) !important; border-color: var(--primary-light) transparent !important; }

/* ---- Cart Page ---- */
.cart-table th { font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--grey); border-bottom: 2px solid var(--border); }
.cart-table td { vertical-align: middle; padding: 16px 12px; }
.cart-product-img { width: 80px; height: 80px; object-fit: cover; border-radius: 10px; }
.cart-product-name { font-weight: 600; font-size: 15px; }
.cart-product-variation { font-size: 12px; color: var(--grey); }
.cart-quantity { display: flex; align-items: center; gap: 8px; }
.cart-quantity input { width: 60px; text-align: center; border: 2px solid var(--border); border-radius: 8px; padding: 6px; font-weight: 600; }
.cart-remove { color: var(--secondary); background: none; border: none; cursor: pointer; font-size: 18px; transition: var(--transition); }
.cart-remove:hover { transform: scale(1.2); }
.cart-summary-card { background: var(--light-grey); border-radius: var(--radius-lg); padding: 28px; border: 1px solid var(--border); }
.cart-summary-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.cart-summary-row:last-child { border-bottom: none; font-size: 18px; font-weight: 700; }
.coupon-form { display: flex; gap: 10px; }
.coupon-form input { flex: 1; border: 2px solid var(--border); border-radius: 8px; padding: 10px 16px; font-family: var(--font-primary); }
.coupon-form input:focus { outline: none; border-color: var(--primary); }

/* ---- Checkout ---- */
.checkout-card { background: #fff; border-radius: var(--radius-lg); padding: 30px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.checkout-card h5 { font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.form-label { font-size: 13px; font-weight: 600; color: var(--dark); margin-bottom: 6px; }
.form-control, .form-select {
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-primary);
  font-size: 14px;
  transition: var(--transition);
}
.form-control:focus, .form-select:focus { border-color: var(--primary) !important; box-shadow: 0 0 0 4px var(--primary-light) !important; outline: none; }
.payment-method-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 16px 20px; cursor: pointer; transition: var(--transition); }
.payment-method-card.selected { border-color: var(--primary); background: var(--primary-light); }
.razorpay-logo { height: 30px; }


/* ---- Dashboard ---- */
.dashboard-wrapper { min-height: 100vh; background: var(--light-grey); }
.stat-card { background: #fff; border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 18px; transition: var(--transition); }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon { width: 56px; height: 56px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.secondary { background: color-mix(in srgb, var(--secondary) 12%, transparent); color: var(--secondary); }
.stat-icon.success { background: color-mix(in srgb, var(--accent) 12%, transparent); color: #2ecc71; }
.stat-icon.warning { background: rgba(255,193,7,0.12); color: #f39c12; }
.stat-value { font-size: 28px; font-weight: 900; line-height: 1; }
.stat-label { font-size: 13px; color: var(--grey); font-weight: 500; }

/* ---- Admin Sidebar ---- */
.admin-wrapper { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 260px; min-height: 100vh;
  background: var(--dark);
  position: fixed; top: 0; left: 0; z-index: 100;
  transition: var(--transition); overflow-y: auto;
  display: flex; flex-direction: column;
}
.sidebar-brand { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); display: flex; align-items: center; gap: 12px; }
.sidebar-brand .logo-text { font-size: 22px; }
.sidebar-brand .badge { background: var(--secondary); font-size: 10px; padding: 3px 8px; }
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section-title { font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.35); letter-spacing: 2px; text-transform: uppercase; padding: 12px 8px 6px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 2px;
  border-radius: var(--radius); color: rgba(255,255,255,0.7);
  font-size: 14px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
}
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: var(--primary); color: #fff; box-shadow: 0 4px 15px color-mix(in srgb, var(--primary) 35%, transparent); }
.sidebar-link i { width: 20px; text-align: center; font-size: 16px; }
.sidebar-link .badge { margin-left: auto; }
.admin-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; transition: var(--transition); }
.admin-topbar { background: #fff; padding: 14px 28px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 99; }
.admin-content { padding: 28px; background: var(--light-grey); min-height: calc(100vh - 65px); }
.admin-card { background: #fff; border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.admin-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--primary-light); }
.admin-card-title { font-weight: 700; font-size: 17px; }
.sidebar-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; }
@media (max-width: 992px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-toggle { display: block; }
}

/* ---- Table Styles ---- */
.table-shopx th { font-weight: 700; font-size: 13px; color: var(--grey); text-transform: uppercase; letter-spacing: 0.5px; background: var(--light-grey); }
.table-shopx td { vertical-align: middle; font-size: 14px; }
.table-shopx a { color: var(--primary); font-weight: 600; }
.badge-status { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.badge-pending { background: rgba(255,193,7,0.15); color: #f39c12; }
.badge-processing { background: var(--primary-light); color: var(--primary); }
.badge-shipped { background: color-mix(in srgb, var(--accent) 12%, transparent); color: #2ecc71; }
.badge-delivered { background: color-mix(in srgb, var(--accent) 25%, transparent); color: #27ae60; }
.badge-cancelled { background: color-mix(in srgb, var(--secondary) 12%, transparent); color: var(--secondary); }

/* ---- About Page ---- */
.about-hero { background: var(--dark); padding: 100px 0; color: #fff; }
.about-image-wrap { border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.about-image-wrap::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 20%, transparent), transparent); z-index: 1; pointer-events: none; }

/* ---- Contact Page ---- */
.contact-info-card { background: var(--primary); border-radius: var(--radius-xl); padding: 40px; color: #fff; height: 100%; }
.contact-info-item { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; }
.contact-info-icon { width: 44px; height: 44px; border-radius: 12px; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.contact-info-text h6 { font-weight: 700; margin-bottom: 4px; }
.contact-info-text a { color: rgba(255,255,255,0.85); font-size: 14px; }
.contact-form-card { background: #fff; border-radius: var(--radius-xl); padding: 40px; border: 1px solid var(--border); box-shadow: var(--shadow); }

/* ---- Footer ---- */
.footer-newsletter { padding: 40px 0; background: #EED9B9 !important; border-bottom: none; color: #9B0F06 !important; }
.footer-newsletter h4, .footer-newsletter p { color: #9B0F06 !important; }
.newsletter-form input { border-radius: 8px; border: 1px solid rgba(155, 15, 6, 0.4); background: #fff !important; color: #9B0F06 !important; flex: 1; padding: 12px 18px; font-weight: 500; }
.newsletter-form input::placeholder { color: rgba(155, 15, 6, 0.5) !important; font-weight: 400; }
.footer-main { padding: 60px 0 40px; }
.footer-logo { font-size: 30px; }
.footer-about { font-size: 14px; color: rgba(255,255,255,0.65); line-height: 1.8; }
.footer-heading { font-size: 15px; font-weight: 700; color: #fff; margin-bottom: 20px; position: relative; }
.footer-heading::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 32px; height: 3px; background: var(--primary); border-radius: 2px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { font-size: 14px; color: rgba(255,255,255,0.65); transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-links a i { font-size: 10px; color: var(--primary); }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact-list { list-style: none; padding: 0; }
.footer-contact-list li { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; font-size: 14px; color: rgba(255,255,255,0.65); }
.footer-contact-list li i { color: var(--primary); font-size: 16px; min-width: 20px; margin-top: 2px; }
.footer-contact-list a { color: rgba(255,255,255,0.65); }
.footer-contact-list a:hover { color: #fff; }
.social-link-pill { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 50px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.8); font-size: 13px; font-weight: 500; transition: var(--transition); }
.social-link-pill:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }
.social-link-pill.whatsapp:hover { background: #25d366; }
.footer-bottom { padding: 20px 0; border-top: 1px solid rgba(255,255,255,0.08); font-size: 13px; color: rgba(255,255,255,0.5); }
.footer-bottom a { color: rgba(255,255,255,0.6); margin: 0 4px; transition: var(--transition); }
.footer-bottom a:hover { color: #fff; }

/* ---- Back to Top ---- */
.back-to-top {
  position: fixed; bottom: 100px; right: 24px;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff; border: none; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; z-index: 500;
  box-shadow: var(--shadow);
  transition: var(--transition);
  animation: fadeInUp 0.3s ease;
}
.back-to-top:hover { transform: translateY(-4px); }
.back-to-top.show { display: flex; }

/* ---- WhatsApp Float ---- */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 24px;
  width: 54px; height: 54px;
  background: #25d366;
  color: #fff; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 600; transition: var(--transition);
  animation: whatsappPulse 2s infinite;
}
.whatsapp-float:hover { background: #128C7E; transform: scale(1.1); color: #fff; }
@keyframes whatsappPulse { 0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.5); } 50% { box-shadow: 0 4px 35px rgba(37,211,102,0.8); } }

/* ---- Toast Notifications ---- */
.shopx-toast { min-width: 280px; border-radius: var(--radius); border: none; box-shadow: var(--shadow-lg) !important; }
.shopx-toast .toast-header { border-radius: var(--radius) var(--radius) 0 0; font-weight: 600; border-bottom: 1px solid var(--border); }

/* ---- Pagination ---- */
.pagination .page-link { border-radius: 8px !important; margin: 0 3px; border: 2px solid var(--border); color: var(--dark); font-weight: 600; font-size: 14px; }
.pagination .page-link:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .page-item.active .page-link { background: var(--primary); border-color: transparent; color: #fff; }

/* ---- Stars ---- */
.text-warning { color: #ffc107 !important; }

/* ---- Breadcrumb ---- */
.page-breadcrumb { background: var(--light-grey); padding: 16px 0; border-bottom: 1px solid var(--border); margin-bottom: 40px; }
.page-breadcrumb .breadcrumb { margin: 0; font-size: 13px; }
.page-breadcrumb .breadcrumb-item a { color: var(--primary); }

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-up { animation: fadeInUp 0.6s ease both; }

/* ---- Loading Spinner ---- */
.spinner-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.9); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.spinner-brand { text-align: center; }
.spinner-brand .logo-text { font-size: 36px; display: block; margin-top: 16px; }

/* ---- Responsive ---- */
@media (max-width: 992px) {
  .header-search { display: none !important; }
  .hero-content { padding: 30px; }
  section { padding: 60px 0; }
}
@media (max-width: 768px) {
  .hero-content h1 { font-size: 28px; }
  .hero-content p { font-size: 15px; }
  .auth-card { padding: 32px 24px; }
  .checkout-card { padding: 20px; }
  .contact-info-card { margin-bottom: 24px; }
  .product-info-panel { padding: 0; margin-top: 24px; }
}
@media (max-width: 576px) {
  .action-btn span { display: none; }
  .top-bar { display: none; }
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ---- Misc ---- */
.text-gradient { background: var(--primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.bg-gradient-primary { background: var(--primary) !important; }
.border-radius-xl { border-radius: var(--radius-xl) !important; }
.shadow-custom { box-shadow: var(--shadow) !important; }
.section-divider { height: 3px; width: 60px; background: var(--primary); border-radius: 2px; margin: 16px auto 32px; }
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 64px; color: var(--border); margin-bottom: 20px; }
.empty-state h5 { color: var(--grey); font-weight: 600; }
.no-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: var(--light-grey); color: var(--grey); font-size: 32px; }


/* RTL Support Refinements */
[dir="rtl"] { text-align: right; }
[dir="rtl"] .ms-auto { margin-right: auto !important; margin-left: 0 !important; }
[dir="rtl"] .me-auto { margin-left: auto !important; margin-right: 0 !important; }
[dir="rtl"] .me-1, [dir="rtl"] .me-2, [dir="rtl"] .me-3 { margin-left: inherit !important; margin-right: 0 !important; }
[dir="rtl"] .ms-1, [dir="rtl"] .ms-2, [dir="rtl"] .ms-3 { margin-right: inherit !important; margin-left: 0 !important; }

/* In RTL, margin-end (me) should be margin-left */
[dir="rtl"] .me-1 { margin-left: 0.25rem !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; }
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; }

[dir="rtl"] .text-end { text-align: left !important; }
[dir="rtl"] .text-start { text-align: right !important; }

/* Header & Dropdowns */
[dir="rtl"] .dropdown-menu { text-align: right; }
[dir="rtl"] .dropdown-toggle::after { margin-right: 0.5em; margin-left: 0; }
[dir="rtl"] .navbar-nav { padding-right: 0; }
[dir="rtl"] .nav-link i { margin-left: 5px; margin-right: 0; }

[dir="rtl"] .fa-chevron-right::before { content: "\f053" !important; } /* Left Chevron */
[dir="rtl"] .fa-arrow-right::before { content: "\f060" !important; } /* Left Arrow */
[dir="rtl"] .feat-icon { margin-left: 15px; margin-right: 0 !important; }

/* Vanilla JS Dropdown Lockdown - Global Rules */
.dropdown-menu {
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 9999 !important;
  pointer-events: none;
}
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-item { padding: 8px 16px; cursor: pointer; transition: all 0.2s; }
.dropdown-item:hover { background: rgba(0,0,0,0.04); }
.dropdown-item.active { background: var(--primary) !important; color: #fff !important; }

/* In RTL, margin-end (me) should be margin-left */
[dir="rtl"] .me-1 { margin-left: 0.25rem !important; }

/* ---- Mobile Menu Fix ---- */
.navbar-toggler:focus { box-shadow: none; }
@media (max-width: 992px) {
  .navbar-collapse {
    flex-basis: 100%;
    flex-grow: 1;
    align-items: center;
  }
  .navbar-collapse.show {
    display: block !important;
    background: var(--header-bg);
    padding: 1rem 0;
    margin-top: 10px;
    border-top: 1px solid var(--border);
    animation: menuSlideDown 0.3s ease-out;
  }
  .navbar-nav { gap: 10px; padding: 10px 0; }
  .header-actions { flex-direction: column; align-items: stretch !important; gap: 10px !important; }
}
@keyframes menuSlideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
