@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@600;700;800&display=swap');

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

:root {
  --primary: #8a8f98;
  --primary-dark: #6b7078;
  --primary-light: #f1f2f4;
  --primary-glow: rgba(138,143,152,0.18);
  --bg: #f4f4f4;
  --card-bg: #ffffff;
  --text-dark: #111111;
  --text-mid: #555555;
  --text-light: #999;
  --border: #e6e6e6;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-card: 0 2px 12px rgba(0,0,0,0.08);
  --header-h: 60px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text-dark);
  padding-top: 5px;
  padding-bottom: 80px;
  min-height: 100vh;
}

/* ============================================
   HEADER
   ============================================ */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(135deg, #e9ebee 0%, #dfe2e6 50%, #d5d8dd 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  z-index: 9999;
  box-shadow: 0 3px 20px rgba(60,64,72,0.18);
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  overflow: hidden;
}

/* Animated shimmer strip on header */
header::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.12) 50%, transparent 100%);
  animation: headerShimmer 3.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes headerShimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}

header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 800;
  color: #2b2d33;
  text-shadow: none;
  padding: 0; margin: 0;
  position: static;
  background: none;
  box-shadow: none;
  border-radius: 0;
  width: 145px;
  max-width: 145px;
  white-space: nowrap;
  overflow: hidden;
  flex-shrink: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  transition: max-width 0.35s cubic-bezier(0.4,0,0.2,1), opacity 0.35s ease;
}

/* Marquee inner span */
.store-marquee {
  display: inline-block;
  white-space: nowrap;
  letter-spacing: 0.3px;
  animation: storeMarqueeScroll 5s linear infinite;
}
@keyframes storeMarqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* When search is active — header collapses left content */
header.search-active h1 {
  max-width: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
}

header.search-active .logo1 {
  width: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

header.search-active .header-left {
  gap: 0;
  flex-shrink: 1;
}

.logo1 {
  width: 45px; height: 45px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  overflow: hidden;
  flex-shrink: 0;
  position: static;
  margin: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  animation: logoPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes logoPop {
  from { opacity: 0; transform: scale(0.5) rotate(-30deg); }
  to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

.logo1 img {
  width: 43px; height: 43px;
  object-fit: contain;
  border-radius: 50%;
  animation: logoSpin 6s ease-in-out infinite;
}
@keyframes logoSpin {
  0%   { transform: rotate(0deg); }
  16%  { transform: rotate(360deg); }
  100% { transform: rotate(360deg); }
}

.header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
  min-width: 0;
}

/* ============================================
   SEARCH — Daraz style animated placeholder
   ============================================ */
.search-wrap {
  position: static;
  flex: 1;
  max-width: 220px;
  margin-left: 8px;
  display: flex;
  align-items: center;
  transition: max-width 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* When search active — expand to full width */
header.search-active .search-wrap {
  max-width: 100%;
  margin-left: 6px;
}

.search-input-box {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.92);
  border-radius: 50px;
  padding: 7px 12px;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
  width: 100%;
  overflow: hidden;
}

.search-input-box:focus-within {
  background: white;
  box-shadow: 0 3px 18px rgba(17,17,17,0.35);
}

.search-icon { color: var(--primary); font-size: 13px; flex-shrink: 0; }

/* Back arrow — hidden by default, shown when search active */
.search-back-btn {
  display: none;
  background: none; border: none;
  color: var(--primary); font-size: 15px;
  cursor: pointer; padding: 0 2px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.search-back-btn:active { transform: scale(0.85); }
header.search-active .search-back-btn { display: flex; align-items: center; }
header.search-active .search-icon { display: none; }

/* Remove default WebKit search styling */
.search::-webkit-search-decoration,
.search::-webkit-search-cancel-button,
.search::-webkit-search-results-button,
.search::-webkit-search-results-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.search {
  border: none; outline: none;
  background: transparent;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  width: 100%;
  height: auto;
  position: static;
  margin: 0;
  border-radius: 50px;
  padding: 0;
  transition: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.search::placeholder { color: #bbb; font-weight: 500; }

.search-placeholder-anim {
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: #aaa;
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'Nunito', sans-serif;
  overflow: hidden;
  white-space: nowrap;
  max-width: 100%;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Blinking cursor after animated text */
.search-placeholder-anim::after {
  content: '|';
  color: var(--primary);
  font-weight: 300;
  margin-left: 1px;
  animation: cursorBlink 0.8s step-end infinite;
}
@keyframes cursorBlink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

.search-clear-btn {
  background: none; border: none; cursor: pointer;
  color: #bbb; font-size: 12px; flex-shrink: 0;
  padding: 0 2px;
  display: none;
}

.btn { display: none; }

/* ============================================
   SEARCH SUGGESTIONS DROPDOWN
   ============================================ */
.suggestions-dropdown {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: white;
  z-index: 9998;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px 0;
  display: none;
}

.suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.suggestion-item:hover { background: var(--primary-light); }

.suggestion-item .sug-icon {
  color: var(--primary);
  font-size: 13px;
  width: 16px;
  text-align: center;
}

.suggestion-item em {
  font-style: normal;
  color: var(--primary);
  font-weight: 800;
}

.suggestion-item .sug-category {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-light);
  font-weight: 600;
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 20px;
}

/* ============================================
   SEARCH PANEL (Recent + Popular)
   ============================================ */
.search-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: white;
  z-index: 9997;
  display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 14px 16px 16px;
  max-height: 320px;
  overflow-y: auto;
}

.search-panel.active { display: block; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.recent-title {
  font-size: 13px; font-weight: 800;
  color: var(--text-mid);
  display: flex; align-items: center; gap: 6px;
  margin: 0;
}

.clear-btn {
  background: none; border: 1px solid #d9d9d9;
  color: var(--primary);
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  margin: 0;
  width: auto;
  position: static;
}
.clear-btn:hover { background: var(--primary); color: white; }

#recentSearches {
  list-style: none;
  margin-bottom: 12px;
}

#recentSearches li {
  padding: 9px 10px;
  border-bottom: 1px solid #f5f5f5;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  display: flex; align-items: center; gap: 10px;
  transition: background 0.15s;
  border-radius: 8px;
  margin-right: 0;
}

#recentSearches li::before {
  content: '\f1da';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #ccc;
  font-size: 12px;
}

#recentSearches li:hover { background: var(--primary-light); }

.popular-label {
  font-size: 12px; font-weight: 800;
  color: var(--text-mid); margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}

.popular-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.popular-chips span {
  display: inline-block;
  background: var(--bg); color: var(--text-dark);
  padding: 6px 14px; border-radius: 30px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: all 0.2s;
}

.popular-chips span:hover {
  background: var(--primary); color: white; border-color: var(--primary);
}

/* Old suggestions class (replaced by popular-chips) */
.suggestions { display: none; }

/* ============================================
   BOTTOM NAV
   ============================================ */
.bar {
  position: fixed;
  bottom: 8px; left: 50%;
  transform: translateX(-50%) translateY(120%);
  width: 92%; max-width: 400px;
  display: flex; justify-content: space-around;
  background: linear-gradient(135deg, #eceef1, #d9dce1);
  padding: 8px 6px 10px;
  border-radius: 26px;
  z-index: 9999;
  box-shadow: 0 8px 28px rgba(60,64,72,0.25), 0 2px 8px rgba(0,0,0,0.08);
  animation: slideUpBar 0.7s cubic-bezier(0.34,1.56,0.64,1) 0.2s forwards;
}

@keyframes slideUpBar {
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
  from { transform: translateX(-50%) translateY(120%); opacity: 0; }
}

.bar a {
  text-decoration: none;
  color: #4a4e57;
  font-family: 'Nunito', sans-serif;
  font-size: 10px; font-weight: 800;
  display: flex; flex-direction: column;
  align-items: center; gap: 2px;
  padding: 4px 12px; border-radius: 16px;
  flex: 1; text-transform: uppercase; letter-spacing: 0.6px;
  transition: all 0.25s ease;
}

.bar a img {
  width: 22px; height: 22px;
  filter: brightness(0);
  opacity: 0.65;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  margin-bottom: 0;
}

.bar a span { line-height: 1; margin-top: 2px; }

.bar a.active, .bar a:hover {
  color: #1f2126; background: rgba(0,0,0,0.07);
}

.bar a.active img, .bar a:hover img {
  opacity: 1; transform: translateY(-3px) scale(1.15);
}

.bar a.active::after {
  content: ''; width: 4px; height: 4px;
  background: #1f2126; border-radius: 50%; margin-top: 1px;
  box-shadow: none;
}

/* ============================================
   ADS SKELETON
   ============================================ */
.ads-skeleton { padding: 12px 12px 0; }

/* ============================================
   SWIPER ADS — peek cards (next banner thora nazar aata hai)
   ============================================ */
.swiper.mySwiper {
  width: 100%;
  margin: 12px 0 0;
  padding-bottom: 6px;
  overflow: hidden;
}

.swiper.mySwiper .swiper-slide.ad-slide {
  width: 86%;
  height: 168px;
  border-radius: 20px;
  overflow: hidden;
}
.swiper.mySwiper.ad-single .swiper-slide.ad-slide { width: calc(100% - 24px); }

.ad-card {
  position: relative;
  display: block;
  width: 100%; height: 100%;
  border-radius: 20px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ad-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  -webkit-user-drag: none;
}

/* Sirf link wale banners par: neeche halka scrim + "Shop now" pill */
.ad-card.has-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0,0,0,0.45), rgba(0,0,0,0));
  pointer-events: none;
}
.ad-cta {
  position: absolute;
  right: 12px; bottom: 12px;
  z-index: 2;
  padding: 7px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  font: 800 12px/1 'Nunito', sans-serif;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.ad-card.has-link:active .ad-cta { transform: scale(0.96); }

/* Ads skeleton same height */
.skeleton-ad {
  width: 100%; height: 168px;
  border-radius: 20px;
  background: linear-gradient(90deg, #ebebeb 25%, #e0e0e0 50%, #ebebeb 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

/* Desktop */
@media (min-width: 768px) {
  .swiper.mySwiper { margin-top: 16px; }
  .swiper.mySwiper .swiper-slide.ad-slide { width: 62%; height: 280px; border-radius: 24px; }
  .swiper.mySwiper.ad-single .swiper-slide.ad-slide { width: calc(100% - 24px); }
  .ad-card { border-radius: 24px; }
  .ads-skeleton { padding: 16px 24px 0; }
  .skeleton-ad { height: 280px; border-radius: 24px; }
}
@media (min-width: 1024px) {
  .swiper.mySwiper { max-width: 1200px; margin: 20px auto 0; }
  .swiper.mySwiper .swiper-slide.ad-slide { height: 340px; }
  .ads-skeleton { max-width: 1200px; margin: 0 auto; padding: 20px 0 0; }
  .skeleton-ad { height: 340px; }
}

/* Pagination: banner ke neeche, patli lines */
.swiper.mySwiper .swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  margin-top: 10px;
  line-height: 0;
}
.swiper.mySwiper .swiper-pagination-bullet {
  width: 14px; height: 3px;
  border-radius: 3px;
  background: var(--text-dark);
  opacity: 0.18;
  margin: 0 3px !important;
  transition: all 0.3s;
}
.swiper.mySwiper .swiper-pagination-bullet-active {
  width: 26px;
  background: var(--primary);
  opacity: 1;
}

/* ============================================
   SECTION BLOCKS (Flash Sale / Recently Viewed)
   ============================================ */
.section-block {
  margin: 14px 12px 0;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 8px;
}

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 15px; font-weight: 800;
  color: var(--text-dark);
  display: flex; align-items: center; gap: 6px;
}

/* ============================================
   FLASH SALE HEADING — animated
   ============================================ */
.flash-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 16px; font-weight: 900;
}



/* ── Pure CSS Animated Flame ── */
.fire-icon {
  position: relative;
  width: 22px; height: 28px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  flex-shrink: 0;
}

/* Main outer flame */
.fire-icon::before {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 18px; height: 24px;
  background: radial-gradient(ellipse at 50% 100%, #ff2200 0%, #ff6600 40%, #ffaa00 70%, #ffdd00 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  animation: flameBurn 0.6s ease-in-out infinite alternate;
  filter: blur(0.4px);
  transform-origin: bottom center;
}

/* Inner bright core */
.fire-icon::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 50%;
  transform: translateX(-50%);
  width: 9px; height: 14px;
  background: radial-gradient(ellipse at 50% 100%, #fff5a0 0%, #ffdd00 40%, #333333 100%);
  border-radius: 50% 50% 30% 30% / 60% 60% 40% 40%;
  animation: flameCoreburn 0.5s ease-in-out infinite alternate-reverse;
  filter: blur(0.3px);
  transform-origin: bottom center;
}

@keyframes flameBurn {
  0%   { transform: translateX(-50%) scaleX(1)   scaleY(1)    rotate(-3deg); }
  25%  { transform: translateX(-50%) scaleX(0.88) scaleY(1.08) rotate(2deg); }
  50%  { transform: translateX(-50%) scaleX(1.06) scaleY(0.95) rotate(-2deg); }
  75%  { transform: translateX(-50%) scaleX(0.92) scaleY(1.06) rotate(3deg); }
  100% { transform: translateX(-50%) scaleX(1)   scaleY(1.02) rotate(-1deg); }
}

@keyframes flameCoreburn {
  0%   { transform: translateX(-50%) scaleX(1)    scaleY(1)    rotate(2deg); }
  33%  { transform: translateX(-50%) scaleX(0.82) scaleY(1.12) rotate(-3deg); }
  66%  { transform: translateX(-50%) scaleX(1.1)  scaleY(0.9)  rotate(2deg); }
  100% { transform: translateX(-50%) scaleX(0.9)  scaleY(1.05) rotate(-1deg); }
}

/* Glow underneath the flame */
.fire-glow {
  position: absolute;
  bottom: -2px; left: 50%;
  transform: translateX(-50%);
  width: 22px; height: 6px;
  background: radial-gradient(ellipse, rgba(17,17,17,0.7) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 0.6s ease-in-out infinite alternate;
}
@keyframes glowPulse {
  from { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
  to   { opacity: 1;   transform: translateX(-50%) scaleX(1.3); }
}

/* Floating sparks */
.fire-spark {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #ffdd00;
  opacity: 0;
  pointer-events: none;
}
.fire-spark-1 {
  bottom: 18px; left: 2px;
  animation: spark1 1.1s ease-out infinite;
  animation-delay: 0.1s;
}
.fire-spark-2 {
  bottom: 16px; right: 2px;
  width: 2px; height: 2px;
  background: #333333;
  animation: spark2 0.9s ease-out infinite;
  animation-delay: 0.45s;
}
.fire-spark-3 {
  bottom: 20px; left: 50%;
  width: 2px; height: 2px;
  background: #fff;
  animation: spark1 1.3s ease-out infinite;
  animation-delay: 0.7s;
}
@keyframes spark1 {
  0%   { opacity: 0;   transform: translate(0, 0) scale(1); }
  20%  { opacity: 1; }
  100% { opacity: 0;   transform: translate(-4px, -14px) scale(0.3); }
}
@keyframes spark2 {
  0%   { opacity: 0;   transform: translate(0, 0) scale(1); }
  20%  { opacity: 0.9; }
  100% { opacity: 0;   transform: translate(5px, -12px) scale(0.2); }
}

.flash-text {
  background: linear-gradient(90deg, #8a8f98, #a9adb4, #c4c7cc, #8a8f98);
  background-size: 250% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: flashMove 2.2s linear infinite;
}
@keyframes flashMove {
  0%   { background-position: 0% center; }
  100% { background-position: 250% center; }
}

.live-badge {
  background: linear-gradient(135deg, #8a8f98, #b5b9bf);
  color: white;
  font-size: 9px; font-weight: 900;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 1px;
  -webkit-text-fill-color: white;
  animation: livePulse 1.2s ease-in-out infinite;
  box-shadow: 0 2px 8px rgba(17,17,17,0.4);
}
@keyframes livePulse {
  0%,100% { transform: scale(1);    box-shadow: 0 2px 8px rgba(17,17,17,0.4); }
  50%      { transform: scale(1.08); box-shadow: 0 2px 16px rgba(17,17,17,0.7); }
}

.see-all-btn {
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 20px;
  transition: all 0.2s;
  margin-right: 14px;
}

/* Flash Sale Section (old style override) */
.flash-sale-section {
  margin: 14px 12px 0;
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: none;
  padding: 0;
}

.flash-sale-heading {
  font-family: 'Poppins', sans-serif;
  font-size: 15px; font-weight: 800;
  color: var(--primary);
  display: flex; align-items: center; gap: 6px;
  padding: 12px 14px 8px;
  margin: 0;
  text-align: left;
}



.recently-title { color: #5c5caa; }

/* Flash Sale horizontal grid */
.flash-sale-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 14px 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.flash-sale-grid::-webkit-scrollbar { display: none; }

.flash-sale-card {
  position: relative;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  width: 150px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

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

.flash-sale-card img {
  width: 100%; height: 130px;
  object-fit: cover;
}

.flash-sale-card .card-info {
  padding: 6px 8px 8px;
}

.flash-sale-card .card-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.discount-badge {
  position: absolute;
  top: 0; left: 0;
  background: linear-gradient(90deg, #8a8f98, #b5b9bf);
  color: white;
  font-size: 10px; font-weight: 900;
  padding: 3px 10px 3px 6px;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0% 100%);
  letter-spacing: 0.5px;
  z-index: 5;
}

.price-block {
  display: flex; align-items: baseline;
  gap: 5px; flex-wrap: wrap;
}

.final-price {
  color: var(--primary);
  font-size: 13px; font-weight: 900;
}

.old-price {
  font-size: 11px; color: var(--text-light);
  text-decoration: line-through;
  font-weight: 600;
}

.stock-badge {
  font-size: 10px; font-weight: 800;
  color: white;
  background: linear-gradient(90deg, var(--primary), #444444);
  border-radius: 20px;
  padding: 3px 8px;
  display: inline-block;
  margin-top: 4px;
}

/* ============================================
   BAG ANIM + ANIMATED STICKER ICONS
   ============================================ */



/* ============================================
   RECENTLY VIEWED — PROFESSIONAL REDESIGN
   ============================================ */
.rv-section-block {
  margin: 8px 12px 0;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(92,92,170,0.35), 0 2px 8px rgba(0,0,0,0.2);
  border: 1px solid rgba(123,108,246,0.25);
  position: relative;
  animation: rvSectionReveal 0.6s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes rvSectionReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Sparkle stars background */
.rv-section-block::before {
  content: '✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧ ✦ ✧';
  position: absolute;
  top: 0; left: 0; right: 0;
  font-size: 11px;
  color: rgba(255,255,255,0.04);
  letter-spacing: 12px;
  padding: 6px 10px;
  pointer-events: none;
  overflow: hidden;
}

.rv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  position: relative;
  z-index: 1;
}

.rv-title {
  font-family: 'Poppins', sans-serif;
  font-size: 14px; font-weight: 800;
  color: #fff;
  display: flex; align-items: center; gap: 8px;
}

/* Animated eye sticker */
.rv-eye-icon {
  font-size: 20px;
  display: inline-block;
  animation: eyeWiggle 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(123,108,246,0.8));
}
@keyframes eyeWiggle {
  0%,100% { transform: scale(1) rotate(0deg); }
  20%     { transform: scale(1.2) rotate(-8deg); }
  40%     { transform: scale(0.9) rotate(5deg); }
  60%     { transform: scale(1.1) rotate(-3deg); }
  80%     { transform: scale(1) rotate(2deg); }
}

.rv-title-text {
  background: linear-gradient(90deg, #a78bfa, #818cf8, #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerText 2.5s ease-in-out infinite;
  background-size: 200% auto;
}
@keyframes shimmerText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.rv-count-badge {
  background: linear-gradient(135deg, #7b6cf6, #a78bfa);
  color: white;
  font-size: 10px; font-weight: 900;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  display: none;
  box-shadow: 0 2px 8px rgba(123,108,246,0.5);
  animation: badgePulse 2s ease-in-out infinite;
}
.rv-count-badge.show { display: inline-block; }
@keyframes badgePulse {
  0%,100% { box-shadow: 0 2px 8px rgba(123,108,246,0.5); }
  50%     { box-shadow: 0 2px 18px rgba(123,108,246,0.9); }
}

.rv-clear-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  backdrop-filter: blur(4px);
}
.rv-clear-btn:hover {
  background: rgba(239,68,68,0.2);
  border-color: rgba(239,68,68,0.5);
  color: #fca5a5;
  transform: scale(1.1) rotate(10deg);
}

/* Horizontal scroll grid */
.rv-scroll-grid {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 14px 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  position: relative; z-index: 1;
}
.rv-scroll-grid::-webkit-scrollbar { display: none; }

/* Individual RV Card */
.rv-card-new {
  position: relative;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  width: 130px;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  animation: rvCardPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes rvCardPop {
  from { opacity: 0; transform: scale(0.7) translateY(15px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.rv-card-new:hover {
  transform: translateY(-6px) scale(1.04);
  box-shadow: 0 12px 32px rgba(123,108,246,0.35);
  border-color: rgba(167,139,250,0.5);
}
.rv-card-new:active { transform: scale(0.96); }

.rv-card-new img {
  width: 100%; height: 105px;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.rv-card-new:hover img { transform: scale(1.08); }

.rv-card-body {
  padding: 7px 8px 9px;
}

.rv-card-title {
  font-size: 10px; font-weight: 700;
  color: rgba(255,255,255,0.88);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 5px;
}

.rv-price {
  background: linear-gradient(90deg, #a78bfa, #818cf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 12px; font-weight: 900;
}

.rv-old-price {
  font-size: 9.5px; color: rgba(255,255,255,0.35);
  text-decoration: line-through; font-weight: 600;
  margin-left: 3px;
  -webkit-text-fill-color: rgba(255,255,255,0.35);
}

/* Glowing dot top-right */
.rv-viewed-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px;
  background: #a78bfa; border-radius: 50%;
  box-shadow: 0 0 6px 2px rgba(167,139,250,0.7);
  animation: dotGlow 1.8s ease-in-out infinite;
}
@keyframes dotGlow {
  0%,100% { box-shadow: 0 0 6px 2px rgba(167,139,250,0.7); }
  50%     { box-shadow: 0 0 12px 4px rgba(167,139,250,1); }
}

/* Floating sparkle stickers inside section */
.rv-sticker {
  position: absolute;
  pointer-events: none;
  font-size: 16px;
  opacity: 0.18;
  animation: floatSticker 4s ease-in-out infinite;
}
.rv-sticker-1 { top: 8px;  right: 90px; animation-delay: 0s; }
.rv-sticker-2 { top: 14px; right: 55px; animation-delay: 0.8s; font-size: 11px; }
.rv-sticker-3 { top: 8px;  right: 130px; animation-delay: 1.4s; font-size: 12px; }
@keyframes floatSticker {
  0%,100% { transform: translateY(0) rotate(0deg);  opacity: 0.18; }
  50%     { transform: translateY(-5px) rotate(15deg); opacity: 0.32; }
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */
.wa-float-btn {
  position: fixed;
  bottom: 90px;
  right: 16px;
  z-index: 9990;
  width: 45px; height: 45px;
  background: linear-gradient(135deg, #25d366 0%, #128c5e 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(37,211,102,0.45), 0 2px 8px rgba(0,0,0,0.15);
  text-decoration: none;
  /* transition handled by JS inline style */
}

.wa-float-btn:hover {
  box-shadow: 0 10px 36px rgba(37,211,102,0.55), 0 4px 12px rgba(0,0,0,0.18);
  filter: brightness(1.08);
}

.wa-float-btn:active { filter: brightness(0.9); }

.wa-icon-wrap {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 2;
}

.wa-svg { width: 30px; height: 30px; filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2)); }

/* Pulse rings */
.wa-pulse-ring {
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2.5px solid rgba(37,211,102,0.6);
  animation: waPulse 2s ease-out infinite;
  pointer-events: none;
}
.wa-pulse-ring-2 { animation-delay: 0.7s; }

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

/* Tooltip */
.wa-tooltip {
  position: absolute;
  right: 68px; top: 50%;
  transform: translateY(-50%);
  background: rgba(18,140,94,0.95);
  color: white;
  font-family: 'Nunito', sans-serif;
  font-size: 12px; font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.wa-tooltip::after {
  content: '';
  position: absolute;
  right: -6px; top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: rgba(18,140,94,0.95);
  border-right: none;
}
.wa-float-btn:hover .wa-tooltip { opacity: 1; right: 64px; }

/* wa button hidden state handled via JS inline styles */

/* ============================================
   ALL PRODUCTS HEADER — Professional Animated
   ============================================ */
.products-section-header {
  padding: 16px 14px 8px;
  display: flex; align-items: center;
  position: relative;
}

.products-section-header .section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 16px; font-weight: 900;
  display: flex; align-items: center; gap: 8px;
  position: relative;
  /* Two-tone text: dark + orange accent */
  color: var(--text-dark);
}

/* Animated orange underline bar */
.products-section-header .section-title::after {
  content: '';
  position: absolute;
  bottom: -5px; left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), #555555, var(--primary));
  background-size: 200% auto;
  border-radius: 4px;
  animation: titleUnderlineSlide 2.5s linear infinite;
}
@keyframes titleUnderlineSlide {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Animated bag icon bounce */
.bag-anim {
  display: inline-block;
  animation: bagBounce 1.6s cubic-bezier(0.36,0.07,0.19,0.97) infinite;
  transform-origin: top center;
  filter: drop-shadow(0 2px 4px rgba(17,17,17,0.4));
}
@keyframes bagBounce {
  0%,100% { transform: translateY(0) rotate(0deg); }
  20%     { transform: translateY(-4px) rotate(-8deg); }
  40%     { transform: translateY(0px) rotate(5deg); }
  60%     { transform: translateY(-2px) rotate(-3deg); }
  80%     { transform: translateY(0px) rotate(2deg); }
}

/* "All Products" word with orange accent on "All" */
.products-section-header .all-word {
  color: var(--primary);
  position: relative;
}

/* ============================================
   PRODUCT GRID — 2 Columns
   ============================================ */
.container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 12px 12px;
}

/* ============================================
   PRODUCT CARD + SCROLL ANIMATION
   ============================================ */
.item-card {
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  cursor: pointer;
  border: 1.5px solid var(--border);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  opacity: 0;
  transform: translateY(30px);
}

.item-card.visible {
  animation: cardReveal 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes cardReveal {
  from { opacity: 0; transform: translateY(30px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.item-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 28px rgba(17,17,17,0.18);
  border-color: rgba(17,17,17,0.35);
}

.item-card .card-img-wrap {
  width: 100%; height: 145px;
  overflow: hidden;
  background: var(--bg);
}

.item-card img {
  width: 100%; height: 145px;
  object-fit: contain;
  padding: 6px;
  transition: transform 0.4s ease;
}

.item-card:hover img { transform: scale(1.06); }

.item-card .card-body {
  padding: 8px 8px 10px;
  flex: 1; display: flex;
  flex-direction: column; gap: 4px;
}

.item-card h3 {
  font-size: 12px; font-weight: 700;
  color: var(--text-dark);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0; padding: 0;
}

.price-wrapper {
  display: flex; align-items: baseline;
  gap: 5px; flex-wrap: wrap; margin-top: 2px;
}

.new-price {
  font-size: 15px; font-weight: 900;
  color: var(--primary);
  display: flex; align-items: baseline; gap: 2px;
}

.new-price .rs { font-size: 11px; font-weight: 700; }
.new-price strong { font-size: 15px; }

.old-price-inline {
  font-size: 11px; color: var(--text-light);
  text-decoration: line-through;
  font-weight: 600;
}

/* ============================================
   SKELETON LOADING
   ============================================ */
.skeleton-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 12px 0;
}

.skeleton-card {
  background: white;
  border-radius: var(--radius-sm);
  overflow: hidden;
  height: 230px;
  display: flex; flex-direction: column;
  border: 1.5px solid var(--border);
}

.skeleton-img { width: 100%; height: 145px; }

.skeleton-title {
  width: 80%; height: 13px;
  border-radius: 6px;
  margin: 10px 10px 0;
}

.skeleton-price {
  width: 45%; height: 16px;
  border-radius: 6px;
  margin: 8px 10px 0;
}

.shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 300% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

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

.skeleton-container.hidden { display: none !important; }

/* ============================================
   NOT FOUND
   ============================================ */
.not-found {
  grid-column: 1 / -1;
  text-align: center;
  padding: 50px 20px;
}

.not-found img { width: 150px; opacity: 0.85; margin-bottom: 14px; }
.not-found h3 { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.not-found p { color: var(--text-mid); font-size: 14px; }
.not-found .try-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.not-found .try-tag {
  font-size: 12px; font-weight: 700;
  background: var(--primary-light); color: var(--primary);
  padding: 5px 14px; border-radius: 20px; cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   THEME-AWARE DARK MODE FIXES
   These work with themeEngine.js to ensure perfect dark themes
   ═══════════════════════════════════════════════════════════ */

/* Flash Sale Section - ensure theme-aware */
.section-block,
.flash-sale-section {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
}

/* Skeleton cards - theme-aware shimmer */
.skeleton-card {
  background: var(--card-bg);
  border: 1.5px solid var(--border);
}

.skeleton-card .skeleton-img,
.skeleton-card .skeleton-title,
.skeleton-card .skeleton-price,
.skeleton-ad {
  background: linear-gradient(90deg, var(--border) 25%, rgba(128,128,128,0.15) 50%, var(--border) 75%);
  background-size: 300% 100%;
}

/* Search Panel - theme-aware */
.search-panel {
  background: var(--card-bg);
}

#recentSearches li {
  color: var(--text-dark);
  border-bottom-color: var(--border);
}

#recentSearches li:hover {
  background: var(--primary-light);
}

.popular-chips span {
  background: var(--bg);
  color: var(--text-dark);
  border-color: var(--border);
}

/* Suggestions dropdown - theme-aware */
.suggestions-dropdown {
  background: var(--card-bg);
}

.suggestion-item {
  color: var(--text-dark);
}

.suggestion-item:hover {
  background: var(--primary-light);
}

.suggestion-item .sug-category {
  background: var(--bg);
  color: var(--text-light);
}

/* Search input - ensure text is visible */
.search {
  color: var(--text-dark);
}

.search::placeholder {
  color: var(--text-light);
}

.search-placeholder-anim {
  color: var(--text-light);
}

/* Recently Viewed - theme-aware gradient fallback */
.rv-section-block {
  background: linear-gradient(135deg, var(--card-bg) 0%, rgba(0,0,0,0.3) 50%, var(--bg) 100%);
}

.rv-card-new {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
}

.rv-card-title {
  color: var(--text-dark);
}

.rv-price {
  color: var(--primary);
}

.rv-old-price {
  color: var(--text-light);
}

/* All Products Header */
.products-section-header .section-title {
  color: var(--text-dark);
}

.products-section-header .all-word {
  color: var(--primary);
}

/* Not Found */
.not-found h3 {
  color: var(--primary);
}

.not-found p {
  color: var(--text-mid);
}

.not-found .try-tag {
  background: var(--primary-light);
  color: var(--primary);
}

/* Flash Sale Cards */
.flash-sale-card {
  background: var(--card-bg);
  border-color: var(--border);
}

.flash-sale-card .card-title {
  color: var(--text-dark);
}

.flash-sale-card .final-price {
  color: var(--primary);
}

.flash-sale-card .old-price {
  color: var(--text-light);
}

/* Product Cards */
.item-card h3 {
  color: var(--text-dark);
}

.item-card .old-price-inline {
  color: var(--text-light);
}

/* Ensure body background always applies */
body {
  background: var(--bg) !important;
  color: var(--text-dark) !important;
}

/* ============================================
   PRODUCT CARD — image load hone tak sirf loading progress
   ============================================ */
.item-card .card-img-wrap { position: relative; }
.item-card .card-img-wrap img { transition: opacity 0.35s ease, transform 0.4s ease; }
.item-card .card-img-wrap.img-wrap-loading img { opacity: 0; }
.img-progress {
  position: absolute; left: 50%; top: 50%;
  width: 56%; height: 4px; margin: -2px 0 0 -28%;
  border-radius: 99px; overflow: hidden; z-index: 2;
  background: rgba(128,128,128,0.22);
  pointer-events: none;
}
.img-progress i {
  position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
  border-radius: inherit;
  background: var(--primary);
  animation: imgProgress 1.1s ease-in-out infinite;
}
@keyframes imgProgress {
  0%   { transform: translateX(-110%); }
  100% { transform: translateX(280%); }
}
@media (prefers-reduced-motion: reduce) {
  .img-progress i { animation-duration: 2.4s; }
}


/* ============================================
   MARKETPLACE TABS (All Items | Shops)
   ============================================ */
.tab-bar { position: relative; display: flex; background: var(--card-bg); border-bottom: 2px solid var(--border);
  z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.tab-bar .tab { flex: 1; text-align: center; font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 800;
  padding: 12px 0; color: var(--text-light); cursor: pointer; transition: color .25s; letter-spacing: .3px; }
.tab-bar .tab.active, .tab-bar .tab:hover { color: var(--primary); }
.tab-bar .underline { position: absolute; bottom: -2px; left: 0; height: 3px; width: 50%; background: var(--primary);
  border-radius: 3px 3px 0 0; transition: transform .3s cubic-bezier(.4,0,.2,1); }
