/* ============================================================
   CLOTH-STORE — Global Styles
   Premium Fashion Ecommerce — Myntra-Level Design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

:root {
  --primary:       #FF3F6C;
  --primary-dark:  #d62e58;
  --secondary:     #282C3F;
  --accent:        #ff6b35;
  --bg-light:      #F4F4F5;
  --bg-white:      #FFFFFF;
  --text-primary:  #282C3F;
  --text-muted:    #696B79;
  --text-light:    #94969F;
  --border:        #E9E9EB;
  --card-shadow:   0 2px 16px rgba(0,0,0,.08);
  --card-hover:    0 8px 32px rgba(0,0,0,.15);
  --radius:        8px;
  --radius-lg:     16px;
  --transition:    all .25s cubic-bezier(.4,0,.2,1);
}

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

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  font-size: 14px;
  line-height: 1.6;
}

/* ── Global Placeholders ── */
::placeholder {
  color: var(--text-light) !important;
  opacity: 0.7 !important;
  font-weight: 400 !important;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }

/* ── Navbar ── */
.cs-navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1050;
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}
.cs-navbar .navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: -0.5px;
}
.cs-navbar .nav-link {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary) !important;
  padding: 0 14px !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cs-navbar .nav-link:hover, .cs-navbar .nav-link.active { color: var(--primary) !important; }
.cs-search-bar {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: 24px;
  padding: 8px 18px;
  width: 340px;
  font-size: 13px;
  transition: var(--transition);
}
.cs-search-bar:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,63,108,.12);
}
.cs-navbar-icon { 
  position: relative; cursor: pointer; 
  display: flex !important; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none !important;
}
.cs-navbar-icon i { font-size: 1.25rem; color: var(--text-primary); transition: var(--transition);}
.cs-navbar-icon:hover i { color: var(--primary); transform: translateY(-2px); }
.cs-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--primary); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Mega Menu ── */
.cs-navbar { overflow: visible; }
.mega-menu-panel {
  display: none;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  transform: translateY(100%);
  background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.13);
  border-top: 3px solid var(--primary);
  z-index: 9999;
  padding: 20px 0 24px;
  animation: megaFadeIn .18s ease;
}
@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(calc(100% - 6px)); }
  to   { opacity: 1; transform: translateY(100%); }
}
.mega-menu-panel.visible { display: block; }
.mega-menu-inner {
  max-width: 1400px; margin: 0 auto;
  padding: 0 24px;
  display: flex; gap: 0;
  overflow-x: auto;
}
.mega-col {
  min-width: 130px; flex: 1;
  padding: 0 18px;
  border-right: 1px solid var(--border);
}
.mega-col:last-child { border-right: none; }
.mega-heading {
  display: block;
  font-size: 11px; font-weight: 800;
  color: var(--primary) !important;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 10px; text-decoration: none;
}
.mega-heading:hover { color: var(--primary-dark) !important; }
.mega-links { list-style: none; padding: 0; margin: 0; }
.mega-links li { margin-bottom: 6px; }
.mega-links li a {
  font-size: 12.5px; color: var(--text-muted);
  text-decoration: none; transition: var(--transition);
  display: block; line-height: 1.4;
}
.mega-links li a:hover { color: var(--primary); padding-left: 3px; }
.cs-navbar .sale-link { color: var(--primary) !important; }

/* ── Hero Banner / Swiper ── */
.hero-swiper { height: 480px; background: var(--secondary); }
.hero-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.swiper-pagination-bullet-active { background: var(--primary) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--primary) !important; }

/* ── Section Headings ── */
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem; font-weight: 700;
  color: var(--text-primary);
}
.section-subtitle { font-size: 13px; color: var(--text-muted); }
.section-divider {
  width: 48px; height: 3px;
  background: var(--primary);
  border-radius: 2px; margin: 6px 0 20px;
}

/* ── Category Pills ── */
.category-pill {
  display: inline-flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 12px 20px; border-radius: var(--radius-lg);
  background: var(--bg-white); border: 1.5px solid var(--border);
  cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.category-pill:hover, .category-pill.active {
  border-color: var(--primary); background: #fff5f7; color: var(--primary);
}
.category-pill .cat-icon { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.category-pill .cat-name { font-size: 12px; font-weight: 600; }

/* ── Product Card ── */
.product-card {
  background: var(--bg-white); border-radius: var(--radius-lg);
  overflow: hidden; border: 1px solid var(--border);
  transition: var(--transition); cursor: pointer; position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover);
  border-color: transparent;
}
.product-card .card-img-wrap {
  position: relative; overflow: hidden;
  padding-bottom: 125%; /* 4:5 ratio */
}
.product-card .card-img-wrap img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .4s ease;
}
.product-card:hover .card-img-wrap img { transform: scale(1.06); }
.product-card .badge-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px;
}
.product-card .btn-wishlist {
  position: absolute; top: 10px; right: 10px;
  background: rgba(255,255,255,.90); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.product-card .btn-wishlist:hover, .product-card .btn-wishlist.active { color: var(--primary); }
.product-card .card-body { padding: 12px 14px 16px; }
.product-card .brand-name { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.product-card .product-name { font-size: 12px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-card .price-wrap { margin-top: 8px; display: flex; align-items: center; gap: 8px; }
.product-card .price-sale { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.product-card .price-original { font-size: 12px; color: var(--text-light); text-decoration: line-through; }
.product-card .price-discount { font-size: 12px; font-weight: 600; color: #14958f; }
.product-card .color-swatches { margin-top: 8px; display: flex; gap: 6px; }
.color-swatch {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--border); cursor: pointer;
}
.color-swatch:hover { border-color: var(--text-muted); }

/* ── Filter Sidebar ── */
.cs-filter-sidebar {
  background: var(--bg-white); border-right: 1px solid var(--border);
  height: calc(100vh - 64px); padding: 20px 0;
  position: sticky; top: 64px; overflow-y: auto; z-index: 100;
}
.cs-filter-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-primary); }
.cs-filter-section { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.cs-filter-check .form-check-label { font-size: 13px; cursor: pointer; }
.price-range-handle { accent-color: var(--primary); }
.btn-filter-clear { background: none; border: none; font-size: 12px; color: var(--primary); font-weight: 600; cursor: pointer; }

/* ── Sort Bar ── */
.cs-sort-bar {
  background: var(--bg-white); border-bottom: 1px solid var(--border);
  padding: 10px 20px;
  display: flex; align-items: center; gap: 8px; font-size: 13px;
  position: sticky; top: 64px; z-index: 99;
}
.sort-btn {
  padding: 6px 16px; border: 1.5px solid var(--border);
  border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer;
  transition: var(--transition); background: transparent; color: var(--text-primary);
}
.sort-btn.active, .sort-btn:hover { border-color: var(--primary); color: var(--primary); background: #fff5f7; }

/* ── Mobile Sort Button ── */
.cs-mobile-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  background: #fff;
  cursor: pointer;
  transition: all .2s ease;
  white-space: nowrap;
}
.cs-mobile-sort-btn:hover,
.cs-mobile-sort-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f7; }
.cs-mobile-sort-btn i { font-size: 14px; }
.cs-sort-active-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  background: #fff0f5;
  border-radius: 10px;
  padding: 1px 8px;
  margin-left: 2px;
}

/* ── Sort Overlay ── */
.cs-sort-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0);
  z-index: 1199;
  pointer-events: none;
  transition: background .3s ease;
}
.cs-sort-overlay.active {
  background: rgba(0,0,0,.5);
  pointer-events: all;
}

/* ── Sort Bottom Sheet ── */
.cs-sort-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 1200;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  max-height: 80dvh;
  overflow-y: auto;
}
.cs-sort-sheet.open {
  transform: translateY(0);
}

/* Drag handle */
.cs-sort-sheet-handle {
  width: 40px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 10px;
  margin: 10px auto 4px;
}

/* Header */
.cs-sort-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 10px;
  border-bottom: 1px solid var(--border);
}
.cs-sort-sheet-header span {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .8px;
  color: var(--text-primary);
}
.cs-sort-sheet-close {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.cs-sort-sheet-close:hover { background: #f5f5f5; color: var(--primary); }

/* Options list */
.cs-sort-option-list {
  list-style: none;
  margin: 0;
  padding: 6px 0 16px;
}
.cs-sort-option {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 22px;
  cursor: pointer;
  transition: background .15s ease;
  border-bottom: 1px solid rgba(0,0,0,.04);
  -webkit-tap-highlight-color: transparent;
}
.cs-sort-option:last-child { border-bottom: none; }
.cs-sort-option:hover { background: #fafafa; }
.cs-sort-option:active { background: #fff5f7; }

.cs-sort-option-icon {
  font-size: 18px;
  color: var(--text-light);
  width: 22px;
  text-align: center;
  flex-shrink: 0;
  transition: color .2s;
}
.cs-sort-option-label {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color .2s;
}
.cs-sort-option-check {
  font-size: 14px;
  color: var(--primary);
  opacity: 0;
  transition: opacity .2s;
  flex-shrink: 0;
}

/* Active / selected state */
.cs-sort-option.active .cs-sort-option-icon { color: var(--primary); }
.cs-sort-option.active .cs-sort-option-label { color: var(--primary); font-weight: 700; }
.cs-sort-option.active .cs-sort-option-check { opacity: 1; }

/* Desktop: hide these entirely */
@media (min-width: 1024px) {
  .cs-sort-overlay,
  .cs-sort-sheet { display: none !important; }
}


/* ── Product Detail ── */
.pd-gallery-main { border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4; }
.pd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.pd-gallery-thumbs { display: flex; flex-direction: column; gap: 8px; }
.pd-gallery-thumbs img { width: 70px; height: 90px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; transition: var(--transition); }
.pd-gallery-thumbs img.active, .pd-gallery-thumbs img:hover { border-color: var(--primary); }
.pd-price-sale { font-size: 2rem; font-weight: 700; }
.pd-price-original { font-size: 1.1rem; color: var(--text-light); text-decoration: line-through; }
.pd-discount { font-size: 1.1rem; font-weight: 600; color: #14958f; }
.size-btn {
  padding: 8px 16px; border: 1.5px solid var(--border);
  border-radius: 24px; background: transparent; font-size: 13px;
  cursor: pointer; transition: var(--transition);
}
.size-btn:hover, .size-btn.active { border-color: var(--primary); color: var(--primary); background: #fff5f7; }
.size-btn.disabled { opacity: .4; pointer-events: none; text-decoration: line-through; }
.btn-atc {
  background: var(--primary); color: #fff; border: none;
  padding: 14px 32px; border-radius: 4px; font-size: 15px; font-weight: 700;
  letter-spacing: .5px; transition: var(--transition); width: 100%;
}
.btn-atc:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(255,63,108,.35); }
.btn-wishlist-lg {
  border: 2px solid var(--border); background: transparent; padding: 14px 32px;
  border-radius: 4px; font-size: 15px; font-weight: 700; color: var(--text-primary);
  cursor: pointer; transition: var(--transition); width: 100%;
}
.btn-wishlist-lg:hover { border-color: var(--primary); color: var(--primary); }

/* ── Review Card ── */
.review-card { background: var(--bg-light); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.star-filled { color: #FFB820; }

/* ── Cart ── */
.cart-item { background: var(--bg-white); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px; border: 1px solid var(--border); }
.cart-item img { width: 90px; height: 116px; object-fit: cover; border-radius: 8px; }
.qty-control { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: 24px; overflow: hidden; }
.qty-control button { background: none; border: none; padding: 4px 12px; cursor: pointer; font-size: 16px; font-weight: 700; }
.qty-control input { width: 36px; text-align: center; border: none; font-size: 14px; font-weight: 600; background: transparent; }
.order-summary { background: var(--bg-white); border-radius: var(--radius-lg); padding: 24px; border: 1px solid var(--border); position: sticky; top: 80px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.summary-row:last-child { border-bottom: none; }
.summary-total { font-size: 16px; font-weight: 700; }

/* ── Footer ── */
.cs-footer { background: var(--secondary); color: rgba(255,255,255,.7); padding: 48px 0 24px; }
.cs-footer h6 { color: #fff; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; margin-bottom: 16px; }
.cs-footer a { color: rgba(255,255,255,.65); font-size: 13px; display: block; margin-bottom: 8px; }
.cs-footer a:hover { color: var(--primary); }
.cs-footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; margin-top: 32px; font-size: 12px; }
.social-icon { 
  width: 36px; height: 36px; border-radius: 50%; 
  background: rgba(255,255,255,.1); 
  display: flex !important; align-items: center; justify-content: center; 
  color: #fff !important; transition: var(--transition); font-size: 16px;
  flex-shrink: 0;
  text-decoration: none;
}
.social-icon i { margin: 0; padding: 0; }
.social-icon:hover { background: var(--primary) !important; color: #fff !important; transform: translateY(-3px); }

/* ── Utility ── */
.bg-primary-light { background: #fff5f7; }
.text-primary { color: var(--primary) !important; }
.btn-primary-cs { background: var(--primary); color: #fff; border: none; border-radius: 4px; padding: 10px 24px; font-weight: 700; font-size: 14px; transition: var(--transition); }
.btn-primary-cs:hover { background: var(--primary-dark); color: #fff; }
.btn-outline-cs { border: 2px solid var(--primary); color: var(--primary); background: none; border-radius: 4px; padding: 10px 24px; font-weight: 700; font-size: 14px; transition: var(--transition); }
.btn-outline-cs:hover { background: var(--primary); color: #fff; }
.skeleton { animation: shimmer 1.4s infinite; background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%); background-size: 200% 100%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Responsive */
@media (max-width: 768px) {
  .cs-search-bar { width: 200px; }
  .cs-filter-sidebar { position: fixed; top: 0; left: -280px; width: 280px; height: 100vh; overflow-y: auto; transition: var(--transition); z-index: 1100; }
  .cs-filter-sidebar.open { left: 0; }
}

/* ══════════════════════════════════════════════
   ANIMATION SYSTEM
   ══════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

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

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes topBarProgress {
  from { width: 0; }
  to   { width: 100%; }
}

/* ── Animate-on-load helpers ── */
.anim-fade-in     { animation: fadeIn    .4s ease both; }
.anim-fade-up     { animation: fadeInUp  .5s ease both; }
.anim-slide-left  { animation: slideInLeft  .45s ease both; }
.anim-slide-right { animation: slideInRight .45s ease both; }
.anim-scale-in    { animation: scaleIn   .35s ease both; }

/* Staggered children delay */
.stagger > *:nth-child(1)  { animation-delay: .0s; }
.stagger > *:nth-child(2)  { animation-delay: .06s; }
.stagger > *:nth-child(3)  { animation-delay: .12s; }
.stagger > *:nth-child(4)  { animation-delay: .18s; }
.stagger > *:nth-child(5)  { animation-delay: .24s; }
.stagger > *:nth-child(6)  { animation-delay: .30s; }
.stagger > *:nth-child(7)  { animation-delay: .36s; }
.stagger > *:nth-child(8)  { animation-delay: .42s; }

/* ── Page-Entry Fade (apply on <main> or wrapper) ── */
.page-enter {
  animation: fadeInUp .45s cubic-bezier(.16,1,.3,1) both;
}

/* ── Product Card Enhanced ── */
.product-card {
  animation: fadeInUp .4s ease both;
  will-change: transform, box-shadow;
}
.product-card:hover .btn-wishlist {
  opacity: 1;
  transform: scale(1.1);
}
.product-card .btn-wishlist {
  transition: transform .2s ease, color .2s ease;
}
.product-card .card-img-wrap img {
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .card-img-wrap img {
  transform: scale(1.08);
}

/* ── Add-to-Cart Button Ripple ── */
.btn-atc {
  position: relative;
  overflow: hidden;
}
.btn-atc::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.3) 0%, transparent 70%);
  transform: scale(0);
  opacity: 0;
  transition: transform .4s ease, opacity .4s ease;
}
.btn-atc:active::after {
  transform: scale(2.5);
  opacity: 1;
  transition: 0s;
}

/* ── Cart Badge Pulse ── */
.cs-badge {
  animation: pulse .8s ease infinite;
}

/* ── Sort Button Transition ── */
.sort-btn {
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.sort-btn.active {
  animation: scaleIn .2s ease;
}

/* ── Category Pill Hover Up ── */
.category-pill {
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.category-pill:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,63,108,.15);
}

/* ── Search Bar Focus Ring Animation ── */
.cs-search-bar {
  transition: border-color .25s ease, box-shadow .25s ease, width .3s ease;
}
.cs-search-bar:focus {
  width: 380px;
}

/* ── Nav Icon Bounce ── */
.cs-navbar-icon:hover i {
  animation: pulse .3s ease;
}

/* ── Top Page Load Bar ── */
.page-loader-bar {
  position: fixed; top: 0; left: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  z-index: 9999;
  animation: topBarProgress .6s ease forwards;
}

/* ── Smooth Scroll ── */
html { scroll-behavior: smooth; }

/* ── Section reveal with IntersectionObserver ready class ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

