/* ==========================================================================
   TechSafari Ke - Hero Promotional Banner & Flash Sales System CSS
   Aesthetics: Sleek glassmorphism, vibrant dark/light theme support, gold accents
   ========================================================================== */

.hero-promotions-section {
  width: 100%;
  max-width: 1280px;
  margin: 16px auto 32px auto;
  padding: 0 16px;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.hero-promotions-container {
  position: relative;
  width: 100%;
  border-radius: 24px;
  background: var(--card-bg, rgba(20, 20, 26, 0.95));
  color: var(--text-primary, #ffffff);
  border: 1px solid var(--border-primary, rgba(255, 157, 0, 0.25));
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 157, 0, 0.08);
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-promotions-container:hover {
  border-color: rgba(255, 157, 0, 0.45);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 157, 0, 0.15);
}

/* Slider Track */
.promo-slider-track {
  display: flex;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  touch-action: pan-y;
  user-select: none;
}

.promo-slide {
  min-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  position: relative;
  opacity: 0.4;
  transform: scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.promo-slide.active-slide {
  opacity: 1;
  transform: scale(1);
}

/* Banner Hero Box */
.promo-banner-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  min-height: 380px;
  padding: 36px 44px;
  gap: 32px;
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.promo-banner-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 20%, rgba(255, 157, 0, 0.12), transparent 45%),
              linear-gradient(to right, var(--bg-secondary, rgba(10, 10, 14, 0.92)) 0%, var(--bg-secondary, rgba(10, 10, 14, 0.75)) 60%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.promo-text-column {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.promo-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.promo-type-badge.type-flash_sale {
  background: rgba(239, 68, 68, 0.2);
  color: #ff4d4d;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.promo-type-badge.type-product_promo {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.promo-type-badge.type-new_arrival {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.promo-type-badge.type-brand_campaign {
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.4);
}
.promo-type-badge.type-holiday_promo {
  background: rgba(236, 72, 153, 0.2);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}
.promo-type-badge.type-event_promo {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}
.promo-type-badge.type-entertainment_promo {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.promo-type-badge.type-custom_campaign {
  background: rgba(255, 157, 0, 0.2);
  color: #ff9d00;
  border: 1px solid rgba(255, 157, 0, 0.4);
}

.promo-subtitle {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ff9d00;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.promo-headline {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--text-primary, #ffffff);
  margin: 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.promo-description {
  font-size: 0.98rem;
  line-height: 1.5;
  color: var(--text-secondary, rgba(255, 255, 255, 0.85));
  margin: 0;
  max-width: 520px;
}

/* Countdown Timer */
.promo-countdown-wrapper {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.promo-countdown-title {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ff4d4d;
  display: flex;
  align-items: center;
  gap: 6px;
}

.promo-countdown-boxes {
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-count-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 157, 0, 0.35);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.promo-count-number {
  font-size: 1.25rem;
  font-weight: 900;
  font-family: 'Inter', monospace, sans-serif;
  color: #ffffff;
  line-height: 1;
}

.promo-count-label {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-secondary, rgba(255, 255, 255, 0.65));
  margin-top: 3px;
}

.promo-count-sep {
  font-size: 1.2rem;
  font-weight: 900;
  color: #ff9d00;
}

/* CTA Button */
.promo-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 800;
  color: #0d0d11;
  background: linear-gradient(135deg, #ff9d00 0%, #ffc107 100%);
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 157, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.promo-cta-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 30px rgba(255, 157, 0, 0.55);
  background: linear-gradient(135deg, #ffb36a 0%, #ffd54f 100%);
  color: #000;
}

.promo-cta-btn i {
  transition: transform 0.3s ease;
}

.promo-cta-btn:hover i {
  transform: translateX(4px);
}

/* Media Column */
.promo-media-column {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 280px;
  background: transparent;
}

.promo-media-image {
  max-width: 100%;
  max-height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.35));
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.promo-slide:hover .promo-media-image {
  transform: scale(1.04) translateY(-4px);
}

/* Featured Products Strip below Banner */
.promo-featured-strip {
  position: relative;
  z-index: 3;
  padding: 18px 28px 22px 28px;
  background: var(--bg-secondary, rgba(16, 16, 22, 0.95));
  border-top: 1px solid var(--border-primary, rgba(255, 157, 0, 0.15));
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.promo-featured-title {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #ff9d00;
  display: flex;
  align-items: center;
  gap: 8px;
}

.promo-featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.promo-product-card {
  background: var(--card-bg, rgba(25, 25, 34, 0.9));
  border: 1px solid var(--border-primary, rgba(255, 255, 255, 0.1));
  border-radius: 16px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  color: var(--text-primary, #ffffff);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.promo-product-card:hover {
  border-color: #ff9d00;
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(255, 157, 0, 0.25);
}

.promo-product-img-wrap {
  width: 100%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow: hidden;
}

.promo-product-img-wrap img {
  max-width: 90%;
  max-height: 100px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.promo-product-card:hover .promo-product-img-wrap img {
  transform: scale(1.08);
}

.promo-product-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary, #ffffff);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.promo-product-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: auto;
}

.promo-product-price {
  font-size: 0.98rem;
  font-weight: 900;
  color: #ff9d00;
}

.promo-product-buy-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(255, 157, 0, 0.15);
  color: #ff9d00;
  border: 1px solid rgba(255, 157, 0, 0.4);
  transition: all 0.2s ease;
}

.promo-product-card:hover .promo-product-buy-btn {
  background: #ff9d00;
  color: #000;
}

/* Slider Controls */
.promo-slider-prev,
.promo-slider-next {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.promo-slider-prev { left: 16px; }
.promo-slider-next { right: 16px; }

.promo-slider-prev:hover,
.promo-slider-next:hover {
  background: #ff9d00;
  color: #000;
  border-color: #ff9d00;
  transform: translateY(-50%) scale(1.1);
}

/* Pagination Dots */
.promo-pagination-dots {
  position: absolute;
  top: 340px;
  right: 44px;
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.promo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.3s ease;
}

.promo-dot.active-dot {
  width: 24px;
  border-radius: 10px;
  background: #ff9d00;
  box-shadow: 0 0 10px rgba(255, 157, 0, 0.6);
}

/* Light Theme Overrides */
body.light-theme .hero-promotions-container,
[data-theme="light"] .hero-promotions-container {
  background: #ffffff;
  color: #111827;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

body.light-theme .promo-banner-content::before,
[data-theme="light"] .promo-banner-content::before {
  background: radial-gradient(circle at 10% 20%, rgba(255, 157, 0, 0.08), transparent 45%),
              linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 60%, transparent 100%);
}

body.light-theme .promo-headline,
[data-theme="light"] .promo-headline {
  color: #111827;
  text-shadow: none;
}

body.light-theme .promo-description,
[data-theme="light"] .promo-description {
  color: #4b5563;
}

body.light-theme .promo-count-unit,
[data-theme="light"] .promo-count-unit {
  background: #f3f4f6;
  border-color: rgba(255, 157, 0, 0.4);
}

body.light-theme .promo-count-number,
[data-theme="light"] .promo-count-number {
  color: #111827;
}

body.light-theme .promo-featured-strip,
[data-theme="light"] .promo-featured-strip {
  background: #f9fafb;
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .promo-product-card,
[data-theme="light"] .promo-product-card {
  background: #ffffff;
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: #111827;
}

body.light-theme .promo-product-name,
[data-theme="light"] .promo-product-name {
  color: #111827;
}

/* Responsive queries */
@media (max-width: 992px) {
  .promo-banner-content {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 28px 24px;
  }
  .promo-media-column {
    min-height: 200px;
    order: -1;
  }
  .promo-media-image {
    max-height: 220px;
  }
  .promo-pagination-dots {
    top: auto;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
  }
}

/* Trailer Play Overlay & Modal Styling */
.promo-media-column.has-trailer {
  cursor: pointer;
  position: relative;
}

.promo-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0.9;
  transition: all 0.3s ease;
}

.promo-media-column.has-trailer:hover .promo-play-overlay {
  opacity: 1;
  background: rgba(0, 0, 0, 0.25);
}

.promo-play-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff0000, #cc0000);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 25px rgba(255, 0, 0, 0.6);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.promo-play-btn i {
  margin-left: 4px;
}

.promo-media-column.has-trailer:hover .promo-play-btn {
  transform: scale(1.15);
}

.promo-trailer-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.promo-trailer-modal-dialog {
  width: 100%;
  max-width: 900px;
  background: #12121c;
  border: 1px solid rgba(255, 157, 0, 0.4);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.promo-trailer-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.promo-trailer-modal-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.promo-modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.promo-modal-close:hover {
  opacity: 1;
  color: #ff4d4d;
}

.promo-trailer-modal-body {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
}

.promo-trailer-modal-body iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
