/* ==========================================================================
   Global Design System: Elegant Blue & Whitesmoke Theme Overhaul
   ========================================================================== */

:root {
  /* Main Theme Palette */
  --primary-color: #2563eb; /* Vibrant Royal Blue */
  --primary-gradient: linear-gradient(
    135deg,
    #1d4ed8,
    #3b82f6
  ); /* Premium Royal Blue Gradient */
  --secondary-color: #f1f5f9; /* Soft Slate Gray for Highlights */

  /* Layout Backgrounds */
  --dark-bg: #f5f5f7; /* Elegant Whitesmoke Background */
  --card-bg: rgba(
    255,
    255,
    255,
    0.85
  ); /* Translucent Pure White (Glassmorphism) */
  --card-border: rgba(0, 0, 0, 0.06); /* Delicate Semi-Gray Border */

  /* Typography & Text Contrast */
  --text-primary: #1e293b; /* Charcoal Dark Slate (Ultra Clear & Elegant) */
  --text-muted: #64748b; /* Muted Slate Gray for Secondary Text */

  /* Status Colors */
  --success-color: #10b981;
  --error-color: #ef4444;

  /* Effects & Transitions */
  --glass-blur: blur(16px);
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: "Outfit", "Inter", sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--secondary-color);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Typography & Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-smooth);
}
a:hover {
  color: #1d4ed8;
  text-shadow: 0 0 8px rgba(37, 99, 235, 0.15);
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.02);
}

.glass-card {
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
.glass-card:hover {
  transform: translateY(-5px);
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.05),
    0 0 15px rgba(37, 99, 235, 0.05);
}

/* Premium Buttons */
.btn-premium {
  background: var(--primary-gradient);
  border: none;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 12px;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}
.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff !important;
}
.btn-premium:active {
  transform: translateY(0);
}

.btn-outline-premium {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  font-weight: 600;
  padding: 8px 22px;
  border-radius: 12px;
  transition: var(--transition-smooth);
}
.btn-outline-premium:hover {
  background: var(--primary-gradient);
  color: #ffffff !important;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

/* Input Fields Styling */
.form-premium-control {
  background: rgba(0, 0, 0, 0.02) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--text-primary) !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  transition: var(--transition-smooth) !important;
}
.form-premium-control:focus {
  background: rgba(255, 255, 255, 0.8) !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15) !important;
  outline: none !important;
}
.form-premium-control::placeholder {
  color: var(--text-muted) !important;
  opacity: 0.7;
}

/* Navbar Tuning */
.navbar-premium {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition-smooth);
}

.nav-link-premium {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: var(--transition-smooth);
}
.nav-link-premium:hover,
.nav-link-premium.active {
  color: var(--text-primary) !important;
  background: rgba(0, 0, 0, 0.04);
}

/* Dropdown Menu Overhaul */
.dropdown-menu.glass-panel {
  background: rgba(255, 255, 255, 0.95) !important;
  border-color: var(--card-border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}
.dropdown-item.nav-link-premium {
  color: var(--text-primary) !important;
}
.dropdown-item.nav-link-premium:hover {
  background: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}

/* Badge Styling */
.badge-premium {
  background: var(--primary-gradient);
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 8px;
  color: #ffffff;
}

/* Footer Accentuation */
footer {
  background: #ffffff;
  border-top: 1px solid var(--card-border);
  padding: 40px 0;
  margin-top: auto;
  color: var(--text-muted);
}
footer h5,
footer .text-white,
footer span.text-white {
  color: var(--text-primary) !important;
}
footer a.text-muted:hover {
  color: var(--primary-color) !important;
}
footer hr {
  border-color: var(--card-border) !important;
  opacity: 0.5;
}

/* Card Badge */
.card-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 10;
}

/* Responsive Grid Tweaks */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 576px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(
      4,
      1fr
    ); /* Tepat 4 kolom per baris pada layar besar */
    gap: 25px;
  }
}

/* Responsive Product Card Layout elements */
.product-image-wrapper {
  position: relative;
  overflow: hidden;
  height: 140px;
  background: #e2e8f0;
}
.product-card-body {
  padding: 10px;
}
.product-card-title {
  font-size: 0.9rem;
}
.product-price {
  font-size: 0.95rem;
}
.product-card-btn {
  width: 30px;
  height: 30px;
}
.product-card-btn i {
  font-size: 0.8rem !important;
}

/* Badges and Buttons Positioning */
.product-badge-bestseller {
  top: 8px !important;
  left: 8px !important;
  padding: 4px 8px !important;
  font-size: 0.65rem !important;
}
.product-wishlist-btn {
  top: 8px !important;
  right: 8px !important;
  width: 30px !important;
  height: 30px !important;
}
.product-wishlist-btn i {
  font-size: 0.95rem !important;
}
.product-category-badge {
  bottom: 8px !important;
  left: 8px !important;
  padding: 4px 8px !important;
  font-size: 0.65rem !important;
}

/* Larger screens overrides for card elements */
@media (min-width: 576px) {
  .product-image-wrapper {
    height: 230px;
  }
  .product-card-body {
    padding: 16px;
  }
  .product-card-title {
    font-size: 1.15rem;
  }
  .product-price {
    font-size: 1.25rem;
  }
  .product-card-btn {
    width: 38px;
    height: 38px;
  }
  .product-card-btn i {
    font-size: 1rem !important;
  }
  .product-badge-bestseller {
    top: 15px !important;
    left: 15px !important;
    padding: 6px 12px !important;
    font-size: 0.72rem !important;
  }
  .product-wishlist-btn {
    top: 15px !important;
    right: 15px !important;
    width: 38px !important;
    height: 38px !important;
  }
  .product-wishlist-btn i {
    font-size: 1.25rem !important;
  }
  .product-category-badge {
    bottom: 12px !important;
    left: 12px !important;
    padding: 6px 10px !important;
    font-size: 0.75rem !important;
  }
}

/* Auth Cards */
.auth-container {
  max-width: 500px;
  margin: 60px auto;
  padding: 40px;
}
.auth-container-wide {
  max-width: 800px;
  margin: 60px auto;
  padding: 40px;
}

/* Hero Section Seamless Overhaul */
.hero-section {
  padding: 100px 0 90px 0;
  position: relative;
  background: radial-gradient(
    circle at center,
    rgba(37, 99, 235, 0.05) 0%,
    transparent 70%
  );
  overflow: hidden;
}

/* Image Container dengan Blend Masking modern */
.hero-image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  border: none !important;
  box-shadow: none !important;
  filter: drop-shadow(0 15px 30px rgba(37, 99, 235, 0.08));
}

/* Gradient Mask overlay untuk blending dengan background web (whitesmoke #f5f5f7) */
.hero-image-wrapper::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 80px; /* Lebar gradasi memudar yang lebih presisi untuk transparan PNG */
  background: linear-gradient(to bottom, transparent, var(--dark-bg, #f5f5f7));
  pointer-events: none;
}

/* Hero Gradient Container */
.hero-gradient-container {
  background: linear-gradient(
    135deg,
    #3730a3 0%,
    #1e40af 35%,
    #0ea5e9 75%,
    #06b6d4 100%
  );
  padding: 50px 0;
  width: 100%;
  position: relative;
  margin-bottom: 2rem;
}

/* Hero Carousel Premium Styling */
.hero-carousel-wrapper {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  border: 8px solid rgba(255, 255, 255, 0.15) !important;
}

.carousel-caption-premium {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.45) 0%,
    rgba(0, 0, 0, 0.15) 50%,
    rgba(0, 0, 0, 0.3) 100%
  );
  color: #ffffff;
  text-align: center;
  padding: 20px;
}

.carousel-caption-premium p {
  font-family: "Outfit", sans-serif;
  font-size: 1.4rem;
  font-weight: 350;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  max-width: 85%;
  margin-bottom: 8px;
}

.carousel-caption-premium span {
  font-size: 0.85rem;
  opacity: 0.85;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Custom indicators */
.carousel-indicators-premium [data-bs-target] {
  width: 24px !important;
  height: 4px !important;
  border-radius: 10px !important;
  background-color: rgba(255, 255, 255, 0.4) !important;
  border: none !important;
  transition: all 0.3s ease !important;
}

.carousel-indicators-premium .active {
  width: 40px !important;
  background-color: #ffffff !important;
}

/* Micro-animations */
.hover-zoom {
  transition: var(--transition-smooth);
}
.hover-zoom:hover {
  transform: scale(1.03);
}

.alert-premium {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}
.alert-premium-success {
  border-left: 4px solid var(--success-color);
}
.alert-premium-danger {
  border-left: 4px solid var(--error-color);
}

/* ==========================================================================
   Bootstrap Global Overrides for Full Color Cohesion
   ========================================================================== */

/* Warning Utilities Overrides (remapping orange warning elements to Royal Blue) */
.text-warning {
  color: var(--primary-color) !important;
}
.bg-warning {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}
.border-warning {
  border-color: var(--primary-color) !important;
}
.btn-warning {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #ffffff !important;
}
.btn-warning:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Dark Table Remapping to Elegant Light Tables */
.table-dark {
  --bs-table-color: var(--text-primary) !important;
  --bs-table-bg: transparent !important;
  --bs-table-border-color: rgba(0, 0, 0, 0.08) !important;
  --bs-table-hover-color: var(--text-primary) !important;
  --bs-table-hover-bg: rgba(0, 0, 0, 0.02) !important;
}
.table-dark th {
  border-bottom: 2px solid rgba(0, 0, 0, 0.08) !important;
  color: var(--text-primary) !important;
  font-weight: 600;
}

/* Ensure hardcoded text-white in light layouts is dark charcoal (highly legible) */
.glass-panel .text-white,
.glass-card .text-white,
.glass-panel span.text-white,
.glass-card span.text-white,
.glass-card h6.text-white,
.navbar-premium .text-white,
.navbar-premium a.text-white,
.navbar-premium i.text-white,
.navbar-premium span.text-white,
header .text-white,
footer .text-white,
footer h5.text-white,
.text-white:not(.btn-premium):not(.badge-premium):not(.bg-danger):not(
    .bg-success
  ):not(.btn-warning):not(.bg-warning) {
  color: var(--text-primary) !important;
}

/* Fix for btn-outline-secondary text-white (unselected category filter chips) */
.btn-outline-secondary.text-white {
  color: var(--text-muted) !important;
  border-color: rgba(0, 0, 0, 0.12) !important;
  background-color: transparent !important;
}
.btn-outline-secondary.text-white:hover {
  color: var(--text-primary) !important;
  border-color: rgba(0, 0, 0, 0.25) !important;
  background-color: rgba(0, 0, 0, 0.04) !important;
}

/* Card Category Badge Text Overrides (ensure white text on dark card badges for premium legibility) */
.glass-card .badge,
.glass-card .badge.text-warning,
.glass-card .badge.bg-dark {
  color: #ffffff !important;
}

/* ==========================================================================
   Inline Background Style Overrides (Targeting PHP Views Dark Styles)
   ========================================================================== */

/* Image Containers Dark Background Overrides */
div[style*="background: #131722"],
div[style*="background:#131722"],
div[style*="background: #131722;"],
div[style*="background:#131722;"] {
  background: #e2e8f0 !important; /* Elegant light-gray placeholder for image load states */
}

/* Translucent Highlights */
div[style*="background: rgba(255, 255, 255, 0.05)"],
div[style*="background:rgba(255, 255, 255, 0.05)"] {
  background: rgba(0, 0, 0, 0.03) !important;
}

/* Glassmorphic Inner Panels */
div[style*="background: rgba(255,255,255,0.02)"],
div[style*="background:rgba(255,255,255,0.02)"],
div[style*="background: rgba(255,255,255,0.02);"],
div[style*="background:rgba(255,255,255,0.02);"] {
  background: rgba(0, 0, 0, 0.015) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Semi-dark Panels Overrides */
div[style*="background: rgba(0,0,0,0.4)"],
div[style*="background:rgba(0,0,0,0.4)"],
div[style*="background: rgba(0,0,0,0.4);"],
div[style*="background:rgba(0,0,0,0.4);"],
div[style*="background: rgba(0,0,0,0.3)"],
div[style*="background:rgba(0,0,0,0.3)"],
div[style*="background: rgba(0,0,0,0.3);"],
div[style*="background:rgba(0,0,0,0.3);"] {
  background: rgba(0, 0, 0, 0.025) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
  color: var(--text-primary) !important;
}

/* Scroll Offset for Sticky Navbar integration */
#katalog-produk {
  scroll-margin-top: 95px !important;
}

/* Premium Ribbon Best Seller */
.ribbon-best-seller {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  overflow: hidden;
  width: 95px;
  height: 95px;
  pointer-events: none;
}
.ribbon-best-seller::before {
  content: "BEST SELLER";
  position: absolute;
  top: 18px;
  left: -28px;
  display: block;
  width: 140px;
  padding: 4px 0;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  /*PremiumGolden-OrangeGradient*/
  color: black !important;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-45deg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  -ms-transform: rotate(-45deg);
  -o-transform: rotate(-45deg);
}

/* Elegant Load More Button Styling (Consistent with btn-premium) */
.btn-load-more {
  background: var(--primary-gradient) !important;
  color: #ffffff !important;
  font-family: "Outfit", "Inter", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 12px 32px;
  border-radius: 12px;
  border: none;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.btn-load-more:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  background: linear-gradient(135deg, #1e40af, #2563eb) !important;
  color: #ffffff !important;
}

.btn-load-more:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

/* Elegant Fade-In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   Popup Banner Styling
   ========================================================================== */
/* Container Utama: Menutupi seluruh layar */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.65); /* Efek transparan gelap di kanan-kiri-atas-bawah */
    z-index: 99999; /* Memastikan berada di layer paling atas */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Kotak Konten Tengah */
.popup-content {
    position: relative;
    max-width: 85%;
    max-height: 85%;
    box-sizing: border-box;
}

/* Optimasi Gambar agar Responsive di HP */
.responsive-banner-img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

/* Tombol Tutup (X) posisi absolut di pojok kanan atas gambar */
.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 32px;
    height: 32px;
    background-color: #ffffff;
    color: #333333;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 10;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: scale(1.1);
}

/* UTILITY UNTUK VARIANT: MODEL NEWSLETTER (SPLIT) */
.popup-split {
    display: flex;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    max-width: 600px;
}
.popup-img-side { flex: 1; }
.popup-img-side img { width: 100%; height: 100%; object-fit: cover; }
.popup-form-side { flex: 1; padding: 25px; display: flex; flex-direction: column; justify-content: center; }
.popup-form-side input { width: 100%; padding: 10px; margin-bottom: 10px; border: 1px solid #ccc; border-radius: 4px; }
.popup-form-side button { width: 100%; padding: 10px; background: #2563eb; color: white; border: none; border-radius: 4px; cursor: pointer; transition: background 0.3s ease; }
.popup-form-side button:hover { background: #1d4ed8; }

/* Responsive Breakpoint untuk Mobile */
@media (max-width: 768px) {
    .popup-split { flex-direction: column; max-width: 320px; }
    .close-btn { top: 10px; right: 10px; background-color: rgba(0,0,0,0.5); color: #fff; }
}

/* Penyesuaian Input Group dengan Premium Controls agar Gabung Sempurna */
.input-group > .form-premium-control {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.input-group > .btn-premium,
.input-group > .btn-danger,
.input-group > .btn {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  margin-left: -1px !important;
}

/* Hero Action Buttons Equal Width on Mobile */
.hero-action-btn {
  width: 290px;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 576px) {
  .hero-action-btn {
    width: auto;
  }
}

