/* ═══════════════════════════════════════════════
   SimiTOLK — Festival Design System
   Indian & Maharashtrian Festivals
   ═══════════════════════════════════════════════ */

/* ── Festival Banner ── */
.festival-banner {
  display: none;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 12px 16px;
  padding: 28px 32px;
  min-height: 140px;
  isolation: isolate;
  transition: background 0.8s ease;
}
.festival-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.12) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.festival-banner .fb-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.festival-banner .fb-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  width: fit-content;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.festival-banner .fb-title {
  font-size: 26px;
  font-weight: 900;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.festival-banner .fb-desc {
  font-size: 14px;
  opacity: 0.9;
  max-width: 500px;
  margin: 0;
  line-height: 1.5;
}
.festival-banner .fb-countdown {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.festival-banner .fb-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.festival-banner .fb-actions a {
  padding: 10px 24px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.festival-banner .fb-actions .fb-btn-primary {
  background: rgba(255,255,255,0.95);
  color: #1e293b;
}
.festival-banner .fb-actions .fb-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.festival-banner .fb-actions .fb-btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
}
.festival-banner .fb-actions .fb-btn-secondary:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
.festival-banner .fb-gift {
  position: absolute;
  right: 24px;
  bottom: 16px;
  font-size: 64px;
  opacity: 0.6;
  animation: gift-bounce 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}
@keyframes gift-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

/* ── Festival Theme Colors ── */
.festival-ganesh {
  --fp: #8b1a1a;
  --fs: #c0392b;
  --fa: #f1c40f;
  --ft: #ffffff;
}
.festival-gudi {
  --fp: #1a6b3c;
  --fs: #27ae60;
  --fa: #ff6b35;
  --ft: #ffffff;
}
.festival-diwal {
  --fp: #b8860b;
  --fs: #f39c12;
  --fa: #ff6b6b;
  --ft: #ffffff;
}
.festival-sankranti {
  --fp: #d4601a;
  --fs: #e67e22;
  --fa: #f1c40f;
  --ft: #ffffff;
}
.festival-holi {
  --fp: #8e44ad;
  --fs: #e91e63;
  --fa: #ffeb3b;
  --ft: #ffffff;
}
.festival-gauri {
  --fp: #c2185b;
  --fs: #e91e63;
  --fa: #ffd700;
  --ft: #ffffff;
}

/* ── Confetti Animation ── */
.confetti-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.confetti-piece {
  position: absolute;
  width: 10px;
  height: 10px;
  top: -10px;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(calc(100vh + 20px)) rotate(720deg); opacity: 0; }
}

/* ── Diya / Lamp Animation ── */
.diya-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.diya {
  position: absolute;
  bottom: -20px;
  font-size: 24px;
  animation: diya-rise 4s ease-in-out infinite;
  opacity: 0.5;
}
@keyframes diya-rise {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  30% { opacity: 0.6; }
  70% { opacity: 0.4; }
  100% { transform: translateY(-200px) scale(1.2); opacity: 0; }
}

/* ── Rangoli Animation ── */
.rangoli-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.rangoli-petal {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.3;
  animation: rangoli-spin 6s linear infinite;
}
@keyframes rangoli-spin {
  0% { transform: rotate(0deg) scale(0); opacity: 0; }
  20% { opacity: 0.4; }
  80% { opacity: 0.3; }
  100% { transform: rotate(360deg) scale(1.5); opacity: 0; }
}

/* ── Flower Animation ── */
.flower-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.flower {
  position: absolute;
  font-size: 20px;
  animation: flower-drift 8s ease-in-out infinite;
  opacity: 0.3;
}
@keyframes flower-drift {
  0% { transform: translateX(-20px) translateY(0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.4; }
  80% { opacity: 0.2; }
  100% { transform: translateX(calc(100vw + 40px)) translateY(-100px) rotate(360deg); opacity: 0; }
}

/* ── Stars / Sparkle Animation ── */
.stars-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.sparkle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  animation: sparkle-pulse 2s ease-in-out infinite;
}
@keyframes sparkle-pulse {
  0%, 100% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1); opacity: 0.7; }
}

/* ── Festival Offer Cards ── */
.festival-offers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  padding: 16px;
}
.festival-offer-card {
  background: var(--bg2);
  border-radius: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.festival-offer-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.festival-offer-card .fo-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}
.festival-offer-card .fo-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}
.festival-offer-card .fo-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 10px;
  line-height: 1.4;
}
.festival-offer-card .fo-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}
.festival-offer-card .fo-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}
.festival-deal-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 800;
}

/* ── Festival Product Section ── */
.festival-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  padding: 16px;
}
.festival-product-card {
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  text-align: center;
  transition: transform 0.3s ease;
  cursor: pointer;
}
.festival-product-card:hover {
  transform: translateY(-3px);
}
.festival-product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}
.festival-product-card h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 4px;
}
.festival-product-card .fp-price {
  font-size: 15px;
  font-weight: 800;
  color: var(--p);
}

/* ── Festival Countdown Timer ── */
.festival-countdown {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
.countdown-unit {
  text-align: center;
  min-width: 48px;
}
.countdown-unit .cd-num {
  font-size: 24px;
  font-weight: 900;
  display: block;
  line-height: 1;
}
.countdown-unit .cd-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.7;
}

/* ── Festival Section Header ── */
.festival-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  margin: 0 16px;
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.festival-section-header h2 {
  font-size: 20px;
  font-weight: 800;
  margin: 0;
}
.festival-section-header a {
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.festival-section-header a:hover { opacity: 1; }

/* ─── Festival Gifts Section ─── */
.festival-gifts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  padding: 16px;
}
.festival-gift-card {
  background: var(--bg2);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}
.festival-gift-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.festival-gift-card .fg-icon {
  font-size: 36px;
  margin-bottom: 8px;
  display: block;
}
.festival-gift-card .fg-name {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}
.festival-gift-card .fg-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--p);
  margin-top: 4px;
}

/* ── Festival Tab Navigation ── */
.festival-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.festival-tabs::-webkit-scrollbar { display: none; }
.festival-tab {
  padding: 8px 18px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  color: var(--text);
}
.festival-tab.active {
  background: var(--p);
  color: #fff;
  border-color: var(--p);
}
.festival-tab:hover:not(.active) {
  background: var(--soft);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .festival-banner { padding: 20px 18px; min-height: 110px; margin: 8px 10px; }
  .festival-banner .fb-title { font-size: 20px; }
  .festival-banner .fb-desc { font-size: 13px; }
  .festival-banner .fb-gift { font-size: 40px; right: 12px; bottom: 8px; }
  .festival-banner .fb-actions a { padding: 8px 16px; font-size: 13px; }
  .festival-offers { grid-template-columns: 1fr; }
  .festival-products { grid-template-columns: repeat(2, 1fr); }
  .festival-section-header { margin: 0 8px; padding: 12px 14px; }
}
@media (max-width: 480px) {
  .festival-banner { padding: 16px 14px; min-height: 100px; margin: 6px 8px; }
  .festival-banner .fb-title { font-size: 17px; }
  .festival-products { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .festival-product-card { padding: 8px; }
  .festival-product-card img { height: 120px; }
}
/* ─── Dark Theme ─── */
[data-theme="dark"] .festival-banner .fb-actions .fb-btn-primary {
  background: var(--card, #1e293b);
  color: var(--ink, #f1f5f9);
  border: 1px solid var(--line, #334155);
}
[data-theme="dark"] .festival-product-card {
  background: var(--card, #1e293b);
  border-color: var(--line, #334155);
}
[data-theme="dark"] .festival-product-card .fp-name { color: var(--ink, #f1f5f9); }
[data-theme="dark"] .festival-product-card .fp-price { color: var(--ink, #f1f5f9); }

/* ── Festival Products Slider (inside banner) ── */
.fb-products-slider {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  overflow: hidden;
  width: 100%;
}
.fb-slider-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 6px 4px;
  flex: 1;
}
.fb-slider-track::-webkit-scrollbar { display: none; }
.fb-slider-prev,
.fb-slider-next {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  z-index: 3;
}
.fb-slider-prev:hover,
.fb-slider-next:hover {
  background: rgba(255,255,255,0.35);
  transform: scale(1.1);
}
.fb-product-card {
  flex-shrink: 0;
  width: 130px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  text-align: center;
}
.fb-product-card:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}
.fb-product-card img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
}
.fb-product-card .fb-pname {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fb-product-card .fb-pprice {
  font-size: 13px;
  font-weight: 900;
  color: #ffd700;
  margin-top: 2px;
}
.fb-product-card .fb-pmrp {
  font-size: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: line-through;
}
.fb-product-card .fb-pcat {
  font-size: 9px;
  background: rgba(255,215,0,0.2);
  color: #ffd700;
  padding: 2px 6px;
  border-radius: 8px;
  display: inline-block;
  margin-top: 4px;
}
@media (max-width: 600px) {
  .fb-product-card { width: 110px; padding: 6px; }
  .fb-product-card img { height: 60px; }
  .fb-slider-prev, .fb-slider-next { width: 26px; height: 26px; font-size: 11px; }
}
