:root {
  --blue: #2563eb;
  --blue-light: #3b82f6;
  --blue-soft: #eff6ff;
  --orange: #f59e0b;
  --dark: #0f172a;
  --mid: #475569;
  --light: #94a3b8;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --white: #ffffff;
}

.cat-nav-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 2px solid #044899;
  border-top: 1px solid #e8e8e8;
  width: 100%;
  overflow: visible;
  justify-content: center;
}

.cat-nav-label {
  display: none;
}

.cat-nav-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.cat-nav-scroll::-webkit-scrollbar {
  display: none;
}

.cat-nav-list {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  width: 100%;
}

.cat-nav-item {
  flex: 0 0 auto;
  border-right: 1px solid #0087de;
  position: relative;
}

.cat-nav-item > a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  gap: 4px;
  padding: 14px 14px;
  font-size: 20px;
  font-weight: 500;
  color: #1a1a2e;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  line-height: 1.3;
  transition: color 0.2s, background 0.2s, border-bottom 0.2s;
}

.cat-nav-item:last-child {
  border-right: none;
}

.cat-nav-item > a:hover,
.cat-nav-item.active > a {
  color: #1a9ed4;
  background: #f4fbff;
}

.cat-arrow {
  font-size: 9px;
  color: #bbb;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.cat-nav-item.active .cat-arrow {
  transform: rotate(180deg);
  color: #1a9ed4;
}

.cat-dropdown {
  position: absolute;
  display: none;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-top: 2px solid #1a9ed4;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  z-index: 500;
  border-radius: 0 0 4px 4px;
  min-width: 180px;
  animation: dropFade 0.15s ease;
}

.cat-dropdown.open {
  display: block;
}

#cat-dropdown-list {
  list-style: none;
  padding: 6px 0;
  margin: 0;
  max-height: 320px;
  overflow-y: auto;
}

#cat-dropdown-list li a {
  display: block;
  padding: 9px 18px;
  font-size: clamp(18px, 2vw, 14px);
  color: #444;
  text-decoration: none;
  transition: all 0.15s;
  border-bottom: 1px solid #f8f8f8;
}

#cat-dropdown-list li a:hover {
  background: #f4fbff;
  color: #1a9ed4;
  padding-left: 24px;
}

.cat-dropdown-empty {
  padding: 10px 18px;
  font-size: 13px;
  color: #aaa;
  font-style: italic;
}

.main-content {
  padding: 24px;
  width: 100%;
}

.main-content {
  flex: 1;
  padding: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #222;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8e8e8;
  position: relative;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: #1a73e8;
}

.product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.25s;
}

.product-card:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.product-img {
  position: relative;
  height: 250px;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.product-card:hover .product-img img {
  transform: scale(1.05);
}

.label-group {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 2;
}

.product-label {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  text-align: center;
  line-height: 1;
}

.label-hot {
  background: #1a9ed4;
  color: #fff;
}

.label-sale {
  background: #e53935;
  color: #fff;
}

.product-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.25s;
}

.product-card:hover .product-overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.overlay-btn:hover {
  background: #1a73e8;
  color: #fff;
}

.overlay-btn i {
  font-size: 14px;
  color: inherit;
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.wishlist-btn i {
  font-size: 16px;
  color: #aaa;
}

.wishlist-btn:hover i {
  color: #e53935;
}

.product-card:hover .wishlist-btn {
  opacity: 1;
}

.product-info {
  padding: 12px 14px;
}

.product-category {
  font-size: 12px;
  color: #999;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: #222;
  margin-bottom: 4px;
}

.product-condition {
  font-size: 14px;
  color: #666;
}

.product-stars {
  color: #ffc107;
  font-size: 20px;
}

.product-price {
  font-size: 18px;
  font-weight: 700;
  color: #222;
}

.brands-slider-wrap {
  overflow: hidden;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 3px;
  padding: 20px 0;
  margin-bottom: 30px;
  position: relative;
}

.brands-slider-wrap::before,
.brands-slider-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
  z-index: 2;
}

.brands-slider-wrap::before {
  left: 0;
  background: linear-gradient(to right, #fff, transparent);
}

.brands-slider-wrap::after {
  right: 0;
  background: linear-gradient(to left, #fff, transparent);
}

.brands-track {
  display: flex;
  align-items: center;
  gap: 0;
  width: max-content;
  animation: brandScroll 60s linear infinite;
}

.brands-track:hover {
  animation-play-state: paused;
}

.brand-item {
  flex: 0 0 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-right: 1px solid #eee;
}

.brand-img {
  max-width: 100%;
  max-height: 120px;
  object-fit: cover;
  transition: filter 0.3s, opacity 0.3s;
}

.brand-item:hover .brand-img {
  filter: grayscale(0%);
  opacity: 1;
}

.bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.bottom-section {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 3px;
  padding: 16px;
}

.mini-product {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}

.mini-product:last-child {
  border-bottom: none;
}

.mini-img {
  width: 100px;
  height: 100px;
  background: #f5f5f5;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 9px;
  color: #bbb;
  text-transform: uppercase;
}

.mini-img img {
  max-width: 80px;
  max-height: 80px;
  object-fit: contain;
}

.mini-info {
  flex: 1;
}

.mini-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 3px;
}

.mini-cond {
  font-size: 14px;
  color: #888;
  margin-bottom: 4px;
}

.mini-stars {
  color: #ffc107;
  font-size: 16px;
  margin-bottom: 3px;
}

.mini-price {
  font-size: 16px;
  font-weight: 700;
  color: #222;
}

.trust-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
  white-space: nowrap;
  opacity: 0;
  animation: fadeSlideUp 0.5s ease forwards;
}

.trust-item:nth-child(1) {
  animation-delay: 0.1s;
}

.trust-item:nth-child(2) {
  animation-delay: 0.2s;
}

.trust-item:nth-child(3) {
  animation-delay: 0.3s;
}

.trust-item i {
  font-size: 16px;
  color: var(--blue);
}

.trust-stars {
  display: flex;
  gap: 2px;
  margin-right: 2px;
}

.trust-stars i {
  color: var(--orange);
  font-size: 15px;
}

.trust-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.features-section {
  padding: 40px 0 50px;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 30px 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  opacity: 0;
  animation: fadeSlideUp 0.55s ease forwards;
}

.feature-card:nth-child(1) {
  animation-delay: 0.15s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.28s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.41s;
}

.feature-card:nth-child(4) {
  animation-delay: 0.54s;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
  border-radius: 16px 16px 0 0;
}

.feature-card:hover {
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.1);
  transform: translateY(-4px);
  border-color: #bfdbfe;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 52px;
  height: 52px;
  background: var(--blue-soft);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: background 0.3s ease;
}

.card-icon i {
  font-size: 22px;
  color: var(--blue);
  transition: color 0.3s ease;
}

.feature-card:hover .card-icon {
  background: var(--blue);
}

.feature-card:hover .card-icon i {
  color: var(--white);
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.card-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 14px;
}

.card-desc {
  font-size: 14px;
  color: var(--mid);
  line-height: 1.75;
  margin-bottom: 22px;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: gap 0.2s ease, color 0.2s ease;
}

.card-link:hover {
  color: #1d4ed8;
  gap: 10px;
}

.card-link i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.card-link:hover i {
  transform: translateX(3px);
}

.gif-btn img {
  width: 180px;
  height: 160px;
  object-fit: contain;
}

.contact-nav a {
  text-decoration: none;
  color: #044899;
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.banner-slide-img {
  width: 100%;
  object-fit: cover;
  height: 380px;
  border-radius: 8px;
}

#bannerCarousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background-color: #fff;
  opacity: 0.5;
  margin: 0 4px;
}

#bannerCarousel .carousel-indicators .active {
  background-color: #1a9ed4;
  opacity: 1;
}

.shop-video-banner video {
  position: relative;
  height: 75vh;
  width: 100%;
  overflow: hidden;
  z-index: 1;
  object-fit: cover;
}

/* ============================================================ */
/* CART SIDEBAR                                                  */
/* ============================================================ */

/* Overlay */
#cartSidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  animation: overlayFadeIn 0.25s ease;
}
#cartSidebarOverlay.open {
  display: block;
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Sidebar panel */
#cartSidebar {
  position: fixed;
  top: 0;
  right: -420px; /* hidden off screen */
  width: 400px;
  max-width: 100vw;
  height: 100dvh;
  background: #fff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
  transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}
#cartSidebar.open {
  right: 0;
} /* slide in */

/* Header */
.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #e8e8e8;
  background: #1a1a2e;
  color: #fff;
  flex-shrink: 0;
}
.cart-sidebar-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cart-sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1;
}
.cart-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Scrollable item list */
.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.cart-sidebar-body::-webkit-scrollbar {
  display: none;
}

/* Single cart item */
.cs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cs-item:last-child {
  border-bottom: none;
}

.cs-img {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #eee;
  flex-shrink: 0;
  background: #f5f5f5;
}
.cs-info {
  flex: 1;
  min-width: 0;
}
.cs-name {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.cs-meta {
  font-size: 12px;
  color: #888;
}
.cs-price {
  font-size: 13px;
  font-weight: 700;
  color: #1a1a2e;
  white-space: nowrap;
}
.cs-remove {
  background: none;
  border: none;
  color: #ccc;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.cs-remove:hover {
  color: #e53935;
}

/* Empty state */
.cs-empty {
  text-align: center;
  padding: 50px 20px;
  color: #aaa;
}
.cs-empty i {
  font-size: 44px;
  margin-bottom: 14px;
  display: block;
  color: #ddd;
}
.cs-empty p {
  font-size: 14px;
  margin-bottom: 14px;
}
.cs-empty a {
  font-size: 13px;
  color: #1a9ed4;
  font-weight: 600;
  text-decoration: none;
}

/* Footer */
.cart-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid #e8e8e8;
  background: #fafafa;
  flex-shrink: 0;
}
.cart-sidebar-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 14px;
}
.cart-sidebar-actions {
  display: flex;
  gap: 10px;
}
.cart-sidebar-btn {
  flex: 1;
  padding: 11px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-sidebar-btn-outline {
  border: 2px solid #1a1a2e;
  color: #1a1a2e;
  background: #fff;
}
.cart-sidebar-btn-outline:hover {
  background: #1a1a2e;
  color: #fff;
}
.cart-sidebar-btn-solid {
  background: #1a9ed4;
  color: #fff;
  border: 2px solid #1a9ed4;
}
.cart-sidebar-btn-solid:hover {
  background: #1585b5;
  border-color: #1585b5;
}

/* ── Search Dropdown ─────────────────────────────────────────── */
#searchDropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  max-height: 400px; /* Critical for scrolling */
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.search-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.search-item:hover {
  background-color: #f8f9fa;
}

/* ====================================== Media Query ===================================== */
@media (max-width: 360px) {
  .product-img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .cat-nav-item > a {
    padding: 10px 12px;
    font-size: 11px;
  }

  .product-img {
    height: 120px;
  }

  .product-info {
    padding: 8px 10px;
  }

  .product-name {
    font-size: 12px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-stars {
    font-size: 11px;
  }

  .section-title {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .promo-percent {
    font-size: 20px;
  }

  .promo-label {
    font-size: 10px;
  }

  .banner-slide-img {
    height: 140px;
  }

  #cartSidebar {
    width: 100vw;
  }
}

@media (max-width: 576px) {
  .main-content {
    padding: 12px;
  }

  .product-img {
    height: 140px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 15px;
  }

  .section-title {
    font-size: 18px;
    letter-spacing: 1.5px;
  }

  .brands-slider-wrap {
    padding: 12px 0;
  }

  .brand-item {
    flex: 0 0 140px;
    padding: 0 16px;
  }

  .brand-img {
    max-height: 50px;
  }

  .bottom-grid {
    gap: 12px;
  }

  .bottom-section {
    padding: 12px;
  }

  .mini-img {
    width: 46px;
    height: 46px;
  }

  .mini-name {
    font-size: 12px;
  }

  .mini-price {
    font-size: 13px;
  }

  .feature-item {
    padding: 28px 16px !important;
  }

  .feature-icon {
    width: 64px;
    height: 64px;
  }

  .feature-icon i {
    font-size: 22px;
  }

  .feature-text h4 {
    font-size: 12px;
  }

  .trust-divider {
    display: none;
  }

  .trust-bar-inner {
    gap: 14px;
    justify-content: flex-start;
    padding: 0 4px;
  }

  .trust-item {
    font-size: 12.5px;
  }
}

@media (max-width: 768px) {
  .cat-nav-item {
    border-right: none;
    border-bottom: 1px solid #0087de;
  }

  .cat-nav-item:last-child {
    border-bottom: none;
  }

  .cat-nav-item > a {
    padding: 11px 14px;
    font-size: 12px;
  }

  .cat-dropdown {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: unset !important;
    border-radius: 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  }

  .main-content {
    padding: 16px;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }

  .product-img {
    height: 160px;
  }

  .banner-slide-img {
    height: 200px;
  }

  .feature-card {
    padding: 24px 22px 22px;
  }

  .card-title {
    font-size: 16px;
  }

  .card-desc {
    font-size: 13px;
  }

  .features-section {
    padding: 28px 0 36px;
  }

  .product-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 992px) {
  .bottom-grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-img {
    height: 160px;
  }

  .brand-item {
    flex: 0 0 200px;
  }

  .bottom-grid {
    grid-template-columns: 1fr;
  }
}

/* ====================================== Animation ===================================== */
@keyframes dropFade {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes brandScroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}
