/* ==============================================================
   Front-End Custom Styling
   PT Solusi Tekno Nusantara
   ============================================================== */

:root,
[data-bs-theme="light"] {
  --primary-color: #0d6efd;
  --primary-hover: #0b5ed7;
  --secondary-color: #198754;
  --dark-color: #1a202c;
  --light-bg: #f1f5f9;
  --card-border: #e2e8f0;
  --text-muted: #64748b;
  --wa-green: #25d366;
  --wa-hover: #1ebd5a;
  --font-base: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --bs-body-bg: #f1f5f9;
  --bs-body-bg-rgb: 241, 245, 249;
  --bs-body-color: #1e293b;
  --bs-card-bg: #ffffff;
}

body {
  font-family: var(--font-base);
  color: #1e293b;
  background-color: #f1f5f9;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

[data-bs-theme="light"] body {
  background-color: #f1f5f9;
  color: #1e293b;
}

.card {
  background-color: #ffffff;
  border-color: #e2e8f0;
}

main {
  flex: 1 0 auto;
}

/* Navbar */
.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.3px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 500;
  color: #495057;
  transition: color 0.2s ease;
  padding: 0.5rem 0.85rem !important;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color) !important;
}

/* Hero Carousel */
.hero-slider .carousel-item {
  height: 480px;
  background-color: #101827;
  position: relative;
}

.hero-slider .carousel-item img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  opacity: 0.35;
}

.hero-slider .carousel-caption {
  bottom: 25%;
  text-align: left;
  max-width: 650px;
}

.hero-title {
  color: #ffffff !important;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 400;
  color: #f8fafc !important;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
}

@media (max-width: 768px) {
  .hero-slider .carousel-item {
    height: 380px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Feature Cards */
.feature-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1.75rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
}

.feature-icon-wrapper {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: #e7f1ff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* Product Card */
.product-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.08);
}

.product-img-wrap {
  position: relative;
  width: 100%;
  height: 210px;
  background-color: #f8f9fa;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

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

.product-badge-discount {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: #dc3545;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.product-badge-featured {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: #ffc107;
  color: #000;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.product-category {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.35rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

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

.product-price-box {
  margin-top: auto;
  padding-top: 0.75rem;
}

.product-price-current {
  font-size: 1.15rem;
  font-weight: 700;
  color: #dc3545;
}

.product-price-old {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 6px;
}

/* Category Card */
.category-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: #ffffff;
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--dark-color);
  transition: all 0.2s ease;
  display: block;
}

.category-card:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(13, 110, 253, 0.08);
}

.category-icon-box {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: var(--primary-color);
}

/* Floating WhatsApp Button */
.floating-wa-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background-color: var(--wa-green);
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  text-decoration: none;
}

.floating-wa-btn:hover {
  background-color: var(--wa-hover);
  color: #ffffff;
  transform: scale(1.08);
}

/* Live Search Suggestions Dropdown */
.search-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  z-index: 1050;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}

.search-item {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #f1f1f1;
  text-decoration: none;
  color: #333;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background-color: #f8f9fa;
}

.search-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-right: 12px;
  border-radius: 6px;
  background: #fff;
  padding: 2px;
  border: 1px solid #eee;
}

/* Footer */
footer {
  background-color: #0f172a;
  color: #94a3b8;
}

footer a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: #ffffff;
}

footer .footer-title {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

/* Toast Container */
.toast-container {
  z-index: 11000;
}

/* ==============================================================
   Theme Toggle Button & Dark Mode Overrides
   ============================================================== */
.theme-toggle-btn {
  border: 1px solid #d1d5db;
  background-color: transparent;
  color: #4b5563;
  transition: all 0.2s ease;
  cursor: pointer;
}

.theme-toggle-btn:hover {
  background-color: #f3f4f6;
  color: #111827;
  border-color: #9ca3af;
}

/* Dark Mode Styles */
[data-bs-theme="dark"] body {
  color: #e5e7eb;
  background-color: #0b0f19 !important;
}

.bg-light.border-bottom {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .bg-light.border-bottom {
  background-color: #0f172a !important;
  border-color: #1f2937 !important;
}

[data-bs-theme="dark"] .bg-white {
  background-color: #111827 !important;
}

[data-bs-theme="dark"] .bg-light {
  background-color: #0f172a !important;
}

[data-bs-theme="dark"] .text-dark {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .hero-title {
  color: #ffffff !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}

[data-bs-theme="dark"] .hero-subtitle {
  color: #f1f5f9 !important;
}

[data-bs-theme="dark"] .text-secondary {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .text-muted {
  color: #9ca3af !important;
}

[data-bs-theme="dark"] .navbar {
  border-bottom: 1px solid #1f2937;
}

[data-bs-theme="dark"] .nav-link {
  color: #d1d5db !important;
}

[data-bs-theme="dark"] .nav-link:hover,
[data-bs-theme="dark"] .nav-link.active {
  color: #60a5fa !important;
}

[data-bs-theme="dark"] .navbar-brand .text-dark {
  color: #f9fafb !important;
}

[data-bs-theme="dark"] .feature-card,
[data-bs-theme="dark"] .product-card,
[data-bs-theme="dark"] .category-card,
[data-bs-theme="dark"] .card {
  background-color: #111827;
  border-color: #1f2937;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .feature-card:hover,
[data-bs-theme="dark"] .product-card:hover,
[data-bs-theme="dark"] .category-card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

[data-bs-theme="dark"] .product-img-wrap {
  background-color: #162032;
}

[data-bs-theme="dark"] .product-title {
  color: #f3f4f6;
}

[data-bs-theme="dark"] .category-icon-box {
  background: #1f2937;
  color: #60a5fa;
}

[data-bs-theme="dark"] .feature-icon-wrapper {
  background: #1e293b;
  color: #60a5fa;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #162032;
  border-color: #374151;
  color: #f9fafb;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
  background-color: #162032;
  border-color: #3b82f6;
  color: #f9fafb;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #6b7280;
}

[data-bs-theme="dark"] .search-autocomplete-dropdown {
  background: #111827;
  border-color: #374151;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .search-item {
  border-bottom: 1px solid #1f2937;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .search-item:hover {
  background-color: #1f2937;
}

[data-bs-theme="dark"] .search-item img {
  background: #162032;
  border-color: #374151;
}

[data-bs-theme="dark"] .table {
  --bs-table-bg: #111827;
  --bs-table-striped-bg: #162032;
  --bs-table-hover-bg: #1e293b;
  --bs-table-color: #e5e7eb;
  --bs-table-border-color: #1f2937;
}

[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom {
  border-color: #1f2937 !important;
}

[data-bs-theme="dark"] .breadcrumb {
  color: #9ca3af;
}

[data-bs-theme="dark"] .breadcrumb-item a {
  color: #60a5fa;
}

[data-bs-theme="dark"] .accordion-button {
  background-color: #111827;
  color: #f9fafb;
  border-color: #1f2937;
}

[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background-color: #1e293b;
  color: #60a5fa;
}

[data-bs-theme="dark"] .accordion-item {
  background-color: #111827;
  border-color: #1f2937;
}

[data-bs-theme="dark"] .modal-content {
  background-color: #111827;
  border-color: #1f2937;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .list-group-item {
  background-color: #111827;
  border-color: #1f2937;
  color: #e5e7eb;
}

[data-bs-theme="dark"] .theme-toggle-btn {
  border-color: #374151;
  color: #f59e0b;
}

[data-bs-theme="dark"] .theme-toggle-btn:hover {
  background-color: #1f2937;
  border-color: #f59e0b;
  color: #fbbf24;
}

/* ==============================================================
   Main Navbar (Deep Blue Header matching footer #0f172a)
   ============================================================== */
.main-navbar {
  background-color: #0f172a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.main-navbar .navbar-brand {
  color: #ffffff !important;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.main-navbar .nav-link {
  color: #cbd5e1 !important;
  font-weight: 500;
  padding: 0.5rem 0.85rem !important;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.main-navbar .nav-link:hover {
  color: #38bdf8 !important;
  background-color: rgba(255, 255, 255, 0.05);
}

.main-navbar .nav-link.active {
  color: #38bdf8 !important;
  font-weight: 600;
}

.main-navbar .btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #f8fafc;
}

.main-navbar .btn-outline-light:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: #ffffff;
  color: #ffffff;
}

.main-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.25);
}

[data-bs-theme="dark"] .main-navbar {
  background-color: #0b1120 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Product Video Thumbnail & Popup Player */
.thumb-video {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.thumb-video:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 4px 14px rgba(220, 53, 69, 0.28);
  border-color: #dc3545 !important;
}


