/* ===== Variables ===== */
:root {
  --primary: #1a0a2e;
  --primary-dark: #0d0618;
  --accent: #6c3ce1;
  --danger: #e63946;
  --text: #222;
  --muted: #6c757d;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.1);
}

/* ===== Base ===== */
* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #fff;
}
a { transition: color 0.2s; }
img { max-width: 100%; }

/* ===== Topbar ===== */
.topbar {
  background: var(--primary-dark);
  padding: 8px 0;
  font-size: 0.85rem;
}
.topbar .btn-light {
  background: #fff;
  border: none;
  padding: 2px 12px;
  font-size: 0.8rem;
}

/* ===== Header ===== */
.main-header {
  background: var(--primary);
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}
@media (max-width: 991px) {
  .logo-text { font-size: 1.05rem; }
}
.search-box .input-group {
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  max-width: 560px;
  margin: 0 auto;
}
.search-box .category-select {
  max-width: 150px;
  border: none;
  border-right: 1px solid #eee;
  background: transparent;
  font-size: 0.875rem;
  padding-left: 1rem;
}
.search-box .form-control {
  border: none;
  box-shadow: none;
  font-size: 0.9rem;
}
.search-box .btn-search {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 0 1.25rem;
}
.header-actions .small {
  font-size: 0.65rem;
  line-height: 1.2;
  opacity: 0.85;
}
.badge-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}












/* ===== Perfect Menu Design ===== */
.main-nav {
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.04);
  z-index: 1020;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 58px;
}
.btn-categories {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a0a2e;
  color: #fff;
  border: none;
  padding: 11px 20px;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  white-space: nowrap;
  cursor: pointer;
}
.btn-categories:hover {
  background: #6c3ce1;
  color: #fff;
  box-shadow: 0 6px 20px rgba(108, 60, 225, 0.35);
}

/* Hamburger - hidden on desktop */
.nav-toggler {
  width: 42px;
  height: 42px;
  border: none;
  background: #f6f6f8;
  border-radius: 8px;
  margin-left: auto;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #1a0a2e;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu .nav-link {
  display: block;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.25s ease;
  position: relative;
}
.nav-menu .nav-link:hover {
  color: #6c3ce1;
  background: rgba(108, 60, 225, 0.06);
}
.nav-menu .nav-link.active {
  color: #6c3ce1;
  font-weight: 600;
}
.nav-menu .nav-link.active::after {
  content: '';
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 4px;
  height: 2.5px;
  background: #6c3ce1;
  border-radius: 4px;
}

.nav-phone {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  padding-left: 1.25rem;
  border-left: 1px solid #eee;
  text-decoration: none;
}
.phone-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #1a0a2e, #6c3ce1);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.phone-label {
  display: block;
  font-size: 0.7rem;
  color: #999;
}
.phone-number {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1a0a2e;
}

/* ===== MOBILE ===== */
@media (max-width: 991.98px) {
  .nav-inner {
    flex-wrap: wrap;
    padding: 10px 0;
  }
  .nav-toggler {
    display: flex;          /* show hamburger */
  }
  .nav-phone {
    display: none !important;
  }
  #mainNav {
    width: 100%;
    order: 3;
    flex-basis: 100%;
  }
  /* HIDE menu until open */
  #mainNav.collapse:not(.show) {
    display: none !important;
  }
  /* SHOW when hamburger clicked */
  #mainNav.collapse.show {
    display: block !important;
  }
  #mainNav .nav-menu {
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
  }
  #mainNav .nav-menu .nav-link {
    padding: 13px 10px;
    border-bottom: 1px solid #f3f3f3;
    border-radius: 0;
  }
  #mainNav .nav-menu .nav-link.active::after {
    display: none;
  }
}

/* ===== DESKTOP ===== */
@media (min-width: 992px) {
  .nav-toggler {
    display: none !important;
  }
  #mainNav {
    display: flex !important;
    flex-grow: 1;
  }
  #mainNav .nav-menu {
    display: flex !important;
    flex-direction: row;
  }
}
















/* ===== Hero Slider ===== */
.hero-slider {
  position: relative;
  overflow: hidden;
}
.hero-slide {
  height: 560px;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10,5,30,0.85) 0%, rgba(10,5,30,0.55) 50%, rgba(10,5,30,0.25) 100%);
  z-index: 1;
}
.hero-content-wrap {
  position: relative;
  z-index: 2;
}
.hero-content {
  max-width: 560px;
  padding: 2rem 0;
  animation: heroFadeIn 0.9s ease-out;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 7px 18px;
  border-radius: 50px;
  margin-bottom: 1.4rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
}
.hero-title {
  font-size: 3.6rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -1.5px;
  text-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
.hero-text {
  color: rgba(255,255,255,0.88);
  font-size: 1.15rem;
  max-width: 460px;
  margin-bottom: 2rem;
  line-height: 1.65;
}
.hero-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn-hero {
  background: #fff;
  color: #1a0a2e;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 50px;
  border: none;
  font-size: 0.95rem;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.btn-hero:hover {
  background: #a78bfa;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(167,139,250,0.45);
}
.btn-hero-outline {
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: 13px 30px;
  border-radius: 50px;
  border: 2px solid rgba(255,255,255,0.55);
  font-size: 0.95rem;
  transition: all 0.3s;
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
  transform: translateY(-3px);
}
.hero-nav-btn {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s;
}
.hero-nav-btn:hover {
  background: #fff;
  color: #1a0a2e;
}
.hero-slider .carousel-control-prev,
.hero-slider .carousel-control-next {
  width: 80px;
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-slider:hover .carousel-control-prev,
.hero-slider:hover .carousel-control-next {
  opacity: 1;
}
.hero-slider .carousel-control-prev { left: 10px; }
.hero-slider .carousel-control-next { right: 10px; }
.hero-slider .carousel-indicators {
  bottom: 28px;
  gap: 8px;
  z-index: 5;
}
.hero-slider .carousel-indicators button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  opacity: 1;
  transition: all 0.35s;
}
.hero-slider .carousel-indicators button.active {
  background: #fff;
  width: 32px;
  border-radius: 10px;
}
.carousel-fade .carousel-item {
  transition: opacity 1s ease-in-out;
}

@media (max-width: 991px) {
  .hero-slide { height: 480px; }
  .hero-title { font-size: 2.6rem; }
  .hero-content { text-align: center; margin: 0 auto; }
  .hero-text { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(10,5,30,0.75) 0%, rgba(10,5,30,0.6) 100%);
  }
}
@media (max-width: 575px) {
  .hero-slide { height: 420px; }
  .hero-title { font-size: 2rem; }
  .hero-text { font-size: 1rem; }
  .hero-badge { font-size: 0.65rem; letter-spacing: 1.5px; }
  .btn-hero, .btn-hero-outline { padding: 11px 22px; font-size: 0.88rem; }
}

/* ===== Categories ===== */
.categories-section {
  background: #f0f4f8;
}
.category-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all 0.3s;
  cursor: pointer;
  border: 1px solid transparent;
  height: 100%;
}
.category-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: #e0e0e0;
}
.category-card img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.category-card h6 {
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}
.category-card .count {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== Product Cards ===== */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #f0f0f0;
  overflow: hidden;
  transition: all 0.3s;
  height: 100%;
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: #e0e0e0;
}
.product-card .img-wrap {
  position: relative;
  padding: 1.5rem;
  background: #fafafa;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .img-wrap img {
  max-height: 180px;
  object-fit: contain;
  transition: transform 0.3s;
}
.product-card:hover .img-wrap img {
  transform: scale(1.05);
}
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}
.badge-new { background: #2d6a4f; color: #fff; }
.badge-sale { background: var(--danger); color: #fff; }
.badge-best { background: #d4ed6a; color: #333; }
.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}
.product-card:hover .product-actions { opacity: 1; }
.product-actions .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.product-actions .btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.product-card .card-body {
  padding: 1rem 1.25rem 1.25rem;
}
.product-card .product-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin-bottom: 0.5rem;
}
.product-card .product-title:hover { color: var(--accent); }
.product-card .stars {
  color: #f4b400;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}
.product-card .price {
  font-weight: 700;
  color: var(--danger);
  font-size: 1.05rem;
}
.product-card .old-price {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.85rem;
  font-weight: 400;
  margin-left: 6px;
}
.btn-add-cart {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  transition: all 0.3s;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 6px 20px;
  border-radius: 50px;
  z-index: 2;
}
.product-card:hover .btn-add-cart {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== Countdown ===== */
.countdown-boxes .cd-box {
  background: var(--danger);
  color: #fff;
  border-radius: 6px;
  padding: 6px 10px;
  text-align: center;
  min-width: 48px;
}
.countdown-boxes .cd-box span {
  display: block;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}
.countdown-boxes .cd-box small {
  font-size: 0.65rem;
  opacity: 0.9;
}

/* ===== Section Title ===== */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
}
.view-all {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.view-all:hover { color: var(--accent); }

/* ===== Feature Banner ===== */
.feature-banner-left {
  background: linear-gradient(135deg, #1a237e 0%, #0d1b4a 100%);
  min-height: 320px;
}
.feature-banner-right {
  min-height: 320px;
  background: #c9a66b;
}
.feature-banner-right img {
  object-fit: cover;
  height: 100%;
  min-height: 320px;
}

/* ===== Brands ===== */
.brands-slider {
  overflow: hidden;
  position: relative;
}
.brands-track {
  display: flex;
  gap: 2rem;
  animation: scrollBrands 25s linear infinite;
  width: max-content;
}
.brand-logo {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  height: 80px;
  border: 1px solid #eee;
}
.brand-logo img {
  max-height: 36px;
  max-width: 120px;
  object-fit: contain;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: all 0.3s;
}
.brand-logo:hover img {
  filter: grayscale(0);
  opacity: 1;
}
@keyframes scrollBrands {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== FAQ ===== */
.accordion-button {
  font-weight: 600;
  font-size: 0.95rem;
}
.accordion-button:not(.collapsed) {
  background: #fff;
  color: var(--accent);
  box-shadow: none;
}
.accordion-button:focus { box-shadow: none; }

/* ===== Footer ===== */
.footer {
  background: var(--primary-dark);
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 3px 0;
}
.footer-links a:hover { color: #fff; }
.footer-links li { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
}
.social-btn:hover { background: var(--accent); color: #fff; }
.payment-icon { opacity: 0.8; filter: brightness(0) invert(1); }

/* ===== Product Detail ===== */
.product-gallery {
  position: sticky;
  top: 100px;
}
.main-image {
  background: #fafafa;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin-bottom: 1rem;
  border: 1px solid #f0f0f0;
}
.main-image img {
  max-height: 400px;
  object-fit: contain;
}
.thumb-images {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.thumb-images .thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  object-fit: contain;
  background: #fafafa;
  padding: 6px;
  transition: border-color 0.2s;
}
.thumb-images .thumb.active,
.thumb-images .thumb:hover {
  border-color: var(--accent);
}
.product-info .product-title-lg {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.product-info .price-lg {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--danger);
}
.product-info .old-price-lg {
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: line-through;
  margin-left: 10px;
}
.product-info .short-desc {
  color: var(--muted);
  line-height: 1.6;
  margin: 1rem 0;
}
.btn-buy-now {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 32px;
  font-weight: 600;
  border-radius: 8px;
  font-size: 1rem;
}
.btn-buy-now:hover { background: var(--primary-dark); color: #fff; }
.btn-add-to-cart-detail {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 28px;
  font-weight: 600;
  border-radius: 8px;
}
.btn-add-to-cart-detail:hover {
  background: var(--primary);
  color: #fff;
}
.product-tabs .nav-link {
  color: var(--muted);
  font-weight: 600;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 0.75rem 1.25rem;
}
.product-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}
.product-description {
  line-height: 1.7;
  color: #444;
}

/* ===== Order Modal ===== */
.qty-btn {
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
}
.order-summary {
  font-size: 0.95rem;
}

/* ===== Toast ===== */
.toast {
  min-width: 300px;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .search-box { display: none !important; }
  .header-actions .small { display: none; }
  .feature-banner-left, .feature-banner-right { min-height: 260px; }
}
@media (max-width: 575px) {
  .logo-text { font-size: 1.4rem; }
  .section-title { font-size: 1.3rem; }
  .countdown { flex-direction: column; align-items: flex-start !important; }
}
