/**
 * Loom Indica — Brand CSS Override
 * Deep Indigo + Saffron Gold + Warm Ivory palette
 * Cormorant Garamond / Inter typography
 *
 * Loaded AFTER style.css to override Hazy defaults.
 */

/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,600&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ─── CSS Custom Properties ────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --loom-primary:       #3D2B6B;   /* Deep Indigo */
  --loom-primary-light: #5A4090;
  --loom-primary-dark:  #291B4A;
  --loom-accent:        #D4A017;   /* Saffron Gold */
  --loom-accent-light:  #F0BF3A;
  --loom-secondary:     #B85C38;   /* Terracotta */
  --loom-bg:            #FAF7F2;   /* Warm Ivory */
  --loom-bg-card:       #FFFFFF;
  --loom-text:          #1A1A2E;
  --loom-text-muted:    #6C6C80;
  --loom-text-light:    #A0A0B0;
  --loom-border:        #E8E2D8;
  --loom-success:       #4CAF7D;
  --loom-error:         #E05252;
  --loom-warning:       #F0A500;

  /* Typography */
  --font-heading: 'Cormorant Garamond', 'Playfair Display', serif;
  --font-body:    'Inter', sans-serif;
  --font-sub:     'Playfair Display', serif;

  /* Spacing */
  --section-gap: 80px;
  --card-radius:  12px;
  --btn-radius:    6px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(61,43,107,0.08);
  --shadow-md: 0 4px 20px rgba(61,43,107,0.12);
  --shadow-lg: 0 8px 40px rgba(61,43,107,0.16);

  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode overrides */
body.dark-mode {
  --loom-bg:       #0F0B1A;
  --loom-bg-card:  #1C1530;
  --loom-text:     #F0EDE8;
  --loom-border:   #2E2550;
}

/* ─── Theme Color Override (replaces #456173) ──────────────────────────────── */
body.color-5 {
  --theme-color: var(--loom-primary) !important;
}

/* ─── Global Base ──────────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  background-color: var(--loom-bg);
  color: var(--loom-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--loom-text);
  line-height: 1.2;
}

a { transition: color var(--transition); }

/* ─── Header ───────────────────────────────────────────────────────────────── */
.header-5 {
  background: #fff;
  box-shadow: 0 1px 0 var(--loom-border);
}

.header-5 .navbar-nav .nav-link {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--loom-text);
  transition: color var(--transition);
}

.header-5 .navbar-nav .nav-link:hover { color: var(--loom-primary); }

.header-5 .logo img { height: 48px; width: auto; }

/* Header icons */
.header-icons .icon-btn { color: var(--loom-text); transition: color var(--transition); }
.header-icons .icon-btn:hover { color: var(--loom-primary); }

/* Cart / Wishlist badge */
.loom-cart-count,
.loom-wishlist-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--loom-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;
  border: 2px solid #fff;
}

/* ─── Buttons ──────────────────────────────────────────────────────────────── */
.btn-cart, .btn-theme,
.btn-animation, .add-to-cart-btn {
  background: var(--loom-primary) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--btn-radius) !important;
  font-family: var(--font-body) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  letter-spacing: 0.04em !important;
  transition: all var(--transition) !important;
}

.btn-cart:hover, .btn-theme:hover,
.btn-animation:hover, .add-to-cart-btn:hover {
  background: var(--loom-primary-light) !important;
  box-shadow: 0 4px 12px rgba(61,43,107,0.3) !important;
  transform: translateY(-1px) !important;
}

.btn-outline-primary {
  border-color: var(--loom-primary) !important;
  color: var(--loom-primary) !important;
}
.btn-outline-primary:hover {
  background: var(--loom-primary) !important;
  color: #fff !important;
}

/* ─── Product Cards ────────────────────────────────────────────────────────── */
.product-box {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

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

.product-box .product-image { overflow: hidden; position: relative; }
.product-box .product-image img { transition: transform 0.5s ease; }
.product-box .product-image .hover-image {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  opacity: 0; transition: opacity 0.4s ease;
}
.product-box:hover .product-image img:first-child { opacity: 0; }
.product-box:hover .product-image .hover-image    { opacity: 1; }
.product-box:hover .product-image img             { transform: scale(1.04); }

.product-box .product-name {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--loom-text);
  margin-bottom: 4px;
}

.product-box .price {
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--loom-primary);
  font-size: 15px;
}

.product-box .price-old {
  font-size: 13px;
  color: var(--loom-text-muted);
  margin-left: 4px;
}

.product-box .product-category {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--loom-accent);
}

/* Badges */
.badge-new, .badge-sale, .badge-hot,
.status-tag, .tag-new, .tag-hot, .tag-sale {
  border-radius: 4px !important;
  font-family: var(--font-body) !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  padding: 3px 8px !important;
}

.badge-new, .tag-new  { background: var(--loom-primary) !important; color: #fff !important; }
.badge-sale, .tag-sale{ background: var(--loom-secondary) !important; color: #fff !important; }
.badge-hot, .tag-hot  { background: var(--loom-accent) !important; color: var(--loom-text) !important; }

/* Star ratings */
.loom-stars i { color: var(--loom-accent); font-size: 13px; }
.loom-review-count { font-size: 12px; color: var(--loom-text-muted); margin-left: 4px; }

/* Color dots */
.color-dot {
  display: inline-block; width: 14px; height: 14px;
  border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  cursor: pointer; transition: transform var(--transition);
}
.color-dot:hover { transform: scale(1.3); }

/* ─── Section Headings ─────────────────────────────────────────────────────── */
.section-title,
.title-wrapper h2,
.customize-title h2 {
  font-family: var(--font-heading) !important;
  font-weight: 700 !important;
  color: var(--loom-text) !important;
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--loom-accent);
  margin-bottom: 8px;
}

/* ─── Hero Section ─────────────────────────────────────────────────────────── */
.home-section-5 { background: var(--loom-bg); }

.hero-content h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--loom-text);
}

.hero-content .hero-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--loom-accent);
}

.hero-content .hero-desc {
  font-size: 16px;
  color: var(--loom-text-muted);
  line-height: 1.7;
}

/* ─── Category Boxes ───────────────────────────────────────────────────────── */
.category-box {
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.category-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.category-box h6 {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--loom-text);
}

/* ─── Swiper / Slider ──────────────────────────────────────────────────────── */
.swiper-pagination-bullet-active { background: var(--loom-primary) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--loom-primary) !important; }

/* ─── Newsletter ───────────────────────────────────────────────────────────── */
.newsletter-section {
  background: linear-gradient(135deg, var(--loom-primary) 0%, var(--loom-primary-dark) 100%);
}
.newsletter-section h2 { color: #fff !important; }
.newsletter-section p  { color: rgba(255,255,255,0.8); }

.newsletter-input-wrap input {
  border: 2px solid rgba(255,255,255,0.2) !important;
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
  border-radius: var(--btn-radius) 0 0 var(--btn-radius) !important;
}
.newsletter-input-wrap input::placeholder { color: rgba(255,255,255,0.6) !important; }
.newsletter-input-wrap .btn {
  background: var(--loom-accent) !important;
  color: var(--loom-text) !important;
  font-weight: 700 !important;
  border-radius: 0 var(--btn-radius) var(--btn-radius) 0 !important;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
footer { background: var(--loom-text) !important; }
footer h5, footer .footer-title { color: #fff !important; font-family: var(--font-body) !important; font-weight: 700 !important; }
footer a, footer p { color: rgba(255,255,255,0.65) !important; transition: color var(--transition) !important; }
footer a:hover { color: var(--loom-accent) !important; }
footer .footer-logo img { filter: brightness(10); }

/* ─── Loader ───────────────────────────────────────────────────────────────── */
.page-loader { background: var(--loom-bg) !important; }
.custom-loader {
  border-color: var(--loom-border) transparent var(--loom-primary) transparent !important;
}

/* ─── Cart Offcanvas ───────────────────────────────────────────────────────── */
.cart-offcanvas .offcanvas-title { font-family: var(--font-heading); color: var(--loom-text); }
.cart-offcanvas .btn-checkout { background: var(--loom-primary) !important; color: #fff !important; }

/* ─── Skeleton Loaders ─────────────────────────────────────────────────────── */
.loom-skeleton .skeleton-img { height: 260px; background: #e8e2d8; border-radius: var(--card-radius); }
.loom-skeleton .skeleton-line { height: 14px; background: #e8e2d8; border-radius: 4px; margin: 8px 0; }
.loom-skeleton .skeleton-line.short  { width: 40%; }
.loom-skeleton .skeleton-line.medium { width: 65%; }
.pulse { animation: pulse 1.5s ease-in-out infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── Toast Notifications ──────────────────────────────────────────────────── */
#loom-toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 99999; display: flex; flex-direction: column; gap: 10px;
}

.loom-toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  background: #fff; border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 280px; max-width: 380px;
  border-left: 4px solid var(--loom-primary);
  font-family: var(--font-body); font-size: 14px;
  transform: translateX(120%); opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.loom-toast.show { transform: translateX(0); opacity: 1; }
.loom-toast--success { border-color: var(--loom-success); }
.loom-toast--success i { color: var(--loom-success); }
.loom-toast--error   { border-color: var(--loom-error); }
.loom-toast--error   i { color: var(--loom-error); }
.loom-toast--warning { border-color: var(--loom-warning); }
.loom-toast--warning i { color: var(--loom-warning); }
.loom-toast--info    i { color: var(--loom-primary); }
.loom-toast i { font-size: 18px; flex-shrink: 0; }
.loom-toast span { flex: 1; }
.loom-toast-close { background: none; border: none; cursor: pointer; color: var(--loom-text-light); font-size: 16px; }

/* ─── Empty / Error States ─────────────────────────────────────────────────── */
.loom-empty-state,
.loom-error-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 60px 20px; gap: 12px;
  color: var(--loom-text-muted); text-align: center;
}
.loom-empty-state i, .loom-error-state i { font-size: 48px; opacity: 0.4; }

/* ─── Wishlist Heart Active ────────────────────────────────────────────────── */
.loom-wishlist-btn.active i { color: var(--loom-secondary) !important; }
.loom-wishlist-btn.active   { color: var(--loom-secondary) !important; }

/* ─── Mega Menu Cleanup ─────────────────────────────────────────────────────── */
.nav-item .mega-menu { border-top: 3px solid var(--loom-primary); }

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --section-gap: 48px; }
  .hero-content h1 { font-size: 2rem; }
  #loom-toast-container { bottom: 80px; right: 12px; left: 12px; }
  .loom-toast { min-width: unset; }
}
