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

/* ==========================================
   1. PREMIUM STYLING SYSTEM ( obsidian slate )
   ========================================== */
:root {
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  /* Brand Colors (Luxurious Indigo Violet Theme) */
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --secondary-color: #ec4899;
  --accent-color: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  
  /* Page backgrounds & Borders */
  --bg-page: #f8fafc; /* Clean light slate background */
  --bg-card: #ffffff; /* Clean white card background */
  --color-border: rgba(15, 23, 42, 0.08);
  --color-text: #1e293b;
  --color-text-muted: #64748b;
  --color-shadow: rgba(15, 23, 42, 0.05);
  
  /* Progress Bar Config */
  --progress-bar-color: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  --progress-bar-height: 4px;

  /* Slider Spacings */
  --product-gap: 24px;
  
  /* Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  
  /* Transitions */
  --transition-speed: 0.6s;
  --transition-bezier: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-instant: 0.2s ease;
}

/* ==========================================
   2. DEMO WORKSPACE PRESETS
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--color-text);
  overflow-x: hidden;
  line-height: 1.5;
  padding: 60px 20px;
  -webkit-font-smoothing: antialiased;
}

.demo-container {
  max-width: 1240px;
  margin: 0 auto;
}

header.demo-header {
  text-align: center;
  margin-bottom: 60px;
}

header.demo-header h1 {
  font-size: clamp(2.2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  background: linear-gradient(135deg, #0f172a 40%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}

header.demo-header p {
  color: var(--color-text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto;
  font-weight: 400;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 70px 0 30px;
  padding-left: 16px;
  border-left: 4px solid var(--primary-color);
  color: var(--color-text);
  display: flex;
  align-items: center;
}

/* ==========================================
   3. CORE SLIDER FRAMEWORK (TRANSPARENT WRAPPER)
   ========================================== */
.super-slider-wrapper {
  position: relative;
  width: 100%;
  overflow: visible; /* Allow hover translations to pop out without clipping */
}

/* Rounded container inside the viewport (keeps sliding tracks clean) */
.super-slider-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 10px 0; /* Add safety padding top/bottom so card shadows aren't clipped */
  margin: -10px 0;
}

.super-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform var(--transition-speed) var(--transition-bezier);
  will-change: transform;
}

.super-slide {
  flex-shrink: 0;
  width: 100%;
  position: relative;
  user-select: none;
}

/* Autoplay timing progress line */
.slider-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: var(--progress-bar-height);
  width: 0%;
  background: var(--progress-bar-color);
  z-index: 10;
  transition: width 50ms linear;
}

/* ==========================================
   4. NAVIGATION CONTROLS (GLASSMORPHIC & ADJUSTED)
   ========================================== */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition-instant);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.slider-arrow:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Standard Side Arrows positioning */
.slider-arrow-prev { left: 24px; }
.slider-arrow-next { right: 24px; }

.slider-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Navigation dots (Pagination) */
.slider-dots {
  display: flex;
  gap: 10px;
  z-index: 20;
}

.slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.25);
  border: none;
  cursor: pointer;
  transition: width 0.3s ease, border-radius 0.3s ease, background-color 0.3s ease;
}

.slider-dot.active {
  width: 26px;
  border-radius: 5px;
  background: var(--primary-color);
}

/* Absolute Positioning for Hero Banner Mode */
#hero-slider .slider-dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}

/* Relative positioning below product/testimonial content */
#product-slider .slider-dots,
#testimonial-slider .slider-dots {
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
  justify-content: center;
  margin-top: 36px;
}

/* Offset arrows slightly outward in product mode to clear card shadows */
#product-slider .slider-arrow-prev { left: -16px; }
#product-slider .slider-arrow-next { right: -16px; }

/* Hide pagination if 1 slide */
.slider-controls-hidden {
  display: none !important;
}

/* ==========================================
   5. MODE 1: HERO LAYOUTS (SOLID, SPLIT, OVERLAY)
   ========================================== */
.mode-hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.hero-slide-grid {
  display: grid;
  width: 100%;
  min-height: 520px;
  align-items: center;
  padding: 60px 80px;
  position: relative;
  z-index: 2;
  gap: 50px;
}

/* Layout Styles */
.hero-split-text-left {
  grid-template-columns: 1.1fr 0.9fr;
}
.hero-split-text-left .hero-content { order: 1; text-align: left; }
.hero-split-text-left .hero-graphic { order: 2; }

.hero-split-image-left {
  grid-template-columns: 0.9fr 1.1fr;
}
.hero-split-image-left .hero-content { order: 2; text-align: right; }
.hero-split-image-left .hero-graphic { order: 1; }

/* Elegant centered text box (Overlay card layout) */
.hero-overlay-centered {
  grid-template-columns: 1fr;
  justify-items: center;
}

.hero-overlay-centered .hero-content {
  background: var(--hero-content-bg, rgba(255, 255, 255, 0.85));
  backdrop-filter: blur(var(--hero-content-blur, 18px)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--hero-content-blur, 18px)) saturate(1.2);
  border: var(--hero-content-border, 1px solid rgba(15, 23, 42, 0.08));
  padding: 50px 60px;
  border-radius: var(--radius-md);
  box-shadow: none;
  max-width: 720px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-overlay-centered .hero-actions {
  justify-content: center;
}

.hero-overlay-centered .hero-graphic {
  display: none;
}

/* Background image overlay styling */
.hero-bg-media {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-size: cover;
  background-position: center;
  transition: transform 8s ease;
}

.super-slide.active-slide .hero-bg-media {
  transform: scale(1.04);
}

/* Graduated contrast overlays */
.mode-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  background: var(--hero-overlay, transparent);
  transition: background 0.3s ease;
}

.underlay-split-left {
  --hero-overlay: linear-gradient(90deg, rgba(255, 255, 255, 0.98) 45%, rgba(255, 255, 255, 0.2) 100%);
}
.underlay-split-right {
  --hero-overlay: linear-gradient(-90deg, rgba(255, 255, 255, 0.98) 45%, rgba(255, 255, 255, 0.2) 100%);
}
.underlay-full-overlay {
  --hero-overlay: rgba(255, 255, 255, 0.85);
}
}

/* Hero Content animation entry */
.hero-content {
  opacity: 0;
  transform: translateY(20px);
  transition: transform 0.8s var(--transition-bezier), opacity 0.8s var(--transition-bezier);
  transition-delay: 0.1s;
  z-index: 5;
}

.super-slide.active-slide .hero-content {
  opacity: 1;
  transform: translateY(0);
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--secondary-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 1.5px;
  border-radius: 30px;
  margin-bottom: 22px;
}

.hero-content h2 {
  font-size: clamp(2rem, 3.5vw, 3.1rem);
  line-height: 1.15;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -1px;
  color: var(--color-text);
}

.hero-content h2 span {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.08rem;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
  font-weight: 400;
}

.hero-description span {
  color: var(--primary-color);
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-instant);
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  border: none;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.5);
  filter: brightness(1.15);
}

.btn-secondary {
  background: rgba(15, 23, 42, 0.04);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-2px);
}

/* Image Graphic */
.hero-graphic {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: scale(0.95) translateX(20px);
  transition: transform 1s var(--transition-bezier), opacity 1s var(--transition-bezier);
  transition-delay: 0.3s;
  z-index: 5;
}

.super-slide.active-slide .hero-graphic {
  opacity: 1;
  transform: scale(1) translateX(0);
}

.hero-img-wrapper {
  position: relative;
  width: 90%;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  border: 1px solid var(--color-border);
}

.hero-img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  aspect-ratio: 4/3;
}

/* ==========================================
   6. MODE 2: PRODUCT CARD LAYOUT (FLOATING CARDS)
   ========================================== */
.mode-product {
  padding: 10px; /* Keep slide bounds padding clean */
  box-sizing: border-box;
}

.product-slider-track-adjust {
  display: flex;
  gap: var(--product-gap);
  padding: 12px 0;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--transition-bezier), border-color 0.3s ease, box-shadow 0.4s ease;
  height: 100%;
  box-shadow: none;
}

.product-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: none;
}

.product-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 5;
  background: var(--secondary-color);
  color: white;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.product-img-holder {
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 22px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.product-img-holder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--transition-bezier);
}

.product-card:hover .product-img-holder img {
  transform: scale(1.05);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  margin-bottom: 12px;
}

.product-rating svg {
  width: 14px;
  height: 14px;
  fill: #eab308;
  stroke: #eab308;
}

.product-rating .star-empty {
  fill: rgba(255, 255, 255, 0.08);
  stroke: rgba(255, 255, 255, 0.08);
}

.product-rating-val {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-left: 6px;
  font-weight: 600;
}

.product-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.product-card h3 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.product-card h3 a:hover {
  color: var(--primary-color);
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
  margin-top: auto;
}

.product-price-current {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--color-text);
}

.product-price-original {
  font-size: 0.95rem;
  text-decoration: line-through;
  color: var(--color-text-muted);
}

.btn-buy {
  width: 100%;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: 12px;
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-instant);
}

.product-card:hover .btn-buy {
  background: var(--primary-color);
  border-color: transparent;
  color: white;
  box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.btn-buy svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================
   7. MODE 3: TESTIMONIAL LAYOUT
   ========================================== */
.mode-testimonial {
  padding: 60px 80px;
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: none;
}

.testimonial-wrapper {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.8s var(--transition-bezier), opacity 0.8s var(--transition-bezier);
}

.super-slide.active-slide .testimonial-wrapper {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.testimonial-quote-icon {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  opacity: 0.05;
  color: var(--primary-color);
  pointer-events: none;
  z-index: 0;
}

.testimonial-rating {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 20px;
}

.testimonial-rating svg {
  width: 18px;
  height: 18px;
  fill: #eab308;
  stroke: #eab308;
}

.testimonial-quote {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  font-weight: 500;
  line-height: 1.65;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  color: var(--color-text);
  font-style: italic;
}

.testimonial-user {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  box-shadow: 0 8px 16px -4px rgba(99, 102, 241, 0.3);
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-details h4 {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.testimonial-details p {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ==========================================
   8. MEDIA QUERIES (RESPONSIVENESS)
   ========================================== */

@media (max-width: 1024px) {
  .hero-slide-grid {
    padding: 50px 60px;
    gap: 30px;
  }
  .mode-testimonial {
    padding: 50px 60px;
  }
}

@media (max-width: 768px) {
  .hero-slide-grid {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    padding: 40px 30px;
    min-height: 480px;
  }
  .hero-slide-grid::before {
    background: rgba(3, 7, 18, 0.9) !important;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
    order: 1 !important;
  }
  .hero-overlay-centered .hero-content {
    padding: 40px 30px;
  }
  .hero-graphic {
    display: none !important;
  }
  .mode-testimonial {
    padding: 40px 30px;
  }
  
  /* Reset offset arrows for mobile views */
  #product-slider .slider-arrow-prev { left: 8px; }
  #product-slider .slider-arrow-next { right: 8px; }
}

@media (max-width: 480px) {
  .hero-slide-grid {
    padding: 30px 15px;
  }
  .mode-testimonial {
    padding: 35px 15px;
  }
  .testimonial-quote-icon {
    width: 50px;
    height: 50px;
    top: -20px;
  }
  .slider-arrow {
    width: 40px;
    height: 40px;
  }
  .slider-arrow-prev { left: 8px; }
  .slider-arrow-next { right: 8px; }
}
