/* ============================================================
   ShopZone – Main Stylesheet
   ============================================================ */

/* ── Variables ───────────────────────────────────────────────── */
:root {
  --primary:       #2874f0;
  --primary-dark:  #1a5dc4;
  --secondary:     #fb641b;
  --sale:          #ff6161;
  --success:       #26a541;
  --surface:       #f1f3f6;
  --card-shadow:   0 2px 12px rgba(0,0,0,.09);
  --transition:    all .22s cubic-bezier(.4,0,.2,1);
}

/* ── Global ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html  { scroll-behavior: smooth; }
body  { font-family: 'Inter', system-ui, sans-serif; background: var(--surface); color: #212121; }
a     { text-decoration: none; color: inherit; }
img   { max-width: 100%; height: auto; }

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: #f0f0f0; }
::-webkit-scrollbar-thumb  { background: #c5c5c5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #888; }
.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { scrollbar-width: none; }

/* ── Product Card ────────────────────────────────────────────── */
.product-card {
  background: #fff;
  border-radius: .875rem;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.07);
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 12px 36px rgba(0,0,0,.14);
  transform: translateY(-5px);
}

/* ── Image area ── */
.product-card .img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  display: block;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform .45s ease;
  padding: 0;
  display: block;
}
.product-card:hover .img-wrap img { transform: scale(1.08); }

/* dim overlay on hover */
.product-card .img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background .3s ease;
  pointer-events: none;
}
.product-card:hover .img-wrap::after { background: rgba(0,0,0,.06); }

/* ── Action buttons (wishlist / quick view) ── */
.product-card .card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 2;
}
.product-card:hover .card-actions { opacity: 1; transform: translateX(0); }

.card-action-btn {
  width: 36px; height: 36px;
  background: white;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.15);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
  border: none;
  color: #555;
  text-decoration: none;
}
.card-action-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }
.card-action-btn.active { background: #fff5f5; color: var(--sale); box-shadow: 0 2px 10px rgba(255,97,97,.25); }
.card-action-btn.active:hover { background: var(--sale); color: white; }

/* ── Card body ── */
.product-card .card-body {
  padding: .85rem .9rem .9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
/* Tighten card body on mobile (2-col grid) */
@media (max-width: 639px) {
  .product-card .card-body { padding: .6rem .6rem .7rem; }
  .product-card .sale-price { font-size: .9rem; }
  .product-card .product-name { font-size: .78rem; }
  .btn-cart { font-size: .72rem; padding: .45rem .3rem; }
}
.product-card .product-name {
  font-size: .85rem;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card .price-wrap {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}
.product-card .sale-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111;
}
.product-card .orig-price {
  font-size: .75rem;
  color: #aaa;
  text-decoration: line-through;
}
.product-card .discount-badge {
  font-size: .68rem;
  font-weight: 700;
  color: #fff;
  background: var(--sale);
  padding: 1px 6px;
  border-radius: 20px;
}

/* ── Add to cart ── */
.product-card .add-to-cart-btn { margin-top: auto; padding-top: .55rem; }
.btn-cart {
  display: block;
  width: 100%;
  padding: .52rem;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  text-align: center;
  border-radius: .5rem;
  border: none;
  cursor: pointer;
  transition: background .2s, transform .15s;
  letter-spacing: .01em;
}
.btn-cart:hover { background: var(--primary-dark); transform: scale(1.02); }
.btn-cart.added  { background: var(--success); }

/* Badge on cards */
.badge-new   { background: var(--primary); color: #fff; }
.badge-sale  { background: var(--sale);    color: #fff; }
.badge-flash { background: var(--secondary); color: #fff; }

/* ── Hero Slider ─────────────────────────────────────────────── */
.hero-slider {
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
}
.slide { display: none; }
.slide.active { display: block; }/* Responsive aspect ratio: taller on mobile so text & button fit */
.hero-slide-inner {
  aspect-ratio: 16 / 9;
}
@media (min-width: 480px)  { .hero-slide-inner { aspect-ratio: 16 / 8; } }
@media (min-width: 640px)  { .hero-slide-inner { aspect-ratio: 16 / 7; } }
@media (min-width: 768px)  { .hero-slide-inner { aspect-ratio: 16 / 6; } }.slide-img {
  width: 100%;
  aspect-ratio: 16 / 6;
  object-fit: cover;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.85);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.slider-btn:hover { background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.slider-dot {
  width: 8px; height: 8px;
  background: rgba(255,255,255,.6);
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.slider-dot.active { background: #fff; width: 20px; border-radius: 4px; }

/* ── Category Slider ─────────────────────────────────────────── */

/* wrapper clips overflow so shadow doesn't create scrollbar */
.cat-slider-wrap {
  overflow: hidden;
  padding: 4px 2px 8px;
}
/* scrollable flex row */
.cat-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cat-slider::-webkit-scrollbar { display: none; }

/* each card — 8 visible on desktop */
.cat-card {
  flex: 0 0 calc((100% - 7 * 14px) / 8);
  min-width: 90px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: transform .22s ease, box-shadow .22s ease;
}
.cat-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,.13);
}
.cat-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  min-height: 90px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cat-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.cat-card:hover .cat-card-img img { transform: scale(1.06); }
.cat-card-icon { font-size: 2rem; color: #555; }
.cat-card-label {
  padding: .55rem .4rem;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: #222;
  text-align: center;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* arrow nav buttons */
.cat-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #555;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: .7rem;
  transition: all .2s;
  flex-shrink: 0;
}
.cat-arrow:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* responsive breakpoints */
@media (max-width: 1024px) {
  .cat-card { flex: 0 0 calc((100% - 5 * 14px) / 6); }  /* 6 visible */
}
@media (max-width: 768px) {
  .cat-card { flex: 0 0 calc((100% - 3 * 14px) / 4); }  /* 4 visible */
}
@media (max-width: 480px) {
  .cat-card { flex: 0 0 calc((100% - 2 * 14px) / 3); }  /* 3 visible, scroll */
  .cat-arrow { display: none; }
}

/* legacy .category-card kept for any other pages */
.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  padding: 1rem .75rem;
  background: #fff;
  border-radius: .75rem;
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.category-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.category-card .cat-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  transition: var(--transition);
}
.category-card:hover .cat-icon { background: var(--primary); color: #fff; }
.category-card .cat-icon.cat-img { overflow: hidden; background: #f3f4f6; }
.category-card .cat-icon.cat-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.category-card:hover .cat-icon.cat-img { background: #f3f4f6; }
.category-card .cat-name { font-size: .8rem; font-weight: 600; color: #333; }

/* ── Section Headings ────────────────────────────────────────── */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-heading h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #212121;
  position: relative;
}
.section-heading h2::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.section-heading .view-all {
  font-size: .8rem;
  color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}
.section-heading .view-all:hover { gap: 4px; text-decoration: underline; }

/* ── Flash Sale Timer ────────────────────────────────────────── */
.flash-sale-header {
  background: linear-gradient(135deg, #ff0050, #ff6b35);
  border-radius: .5rem .5rem 0 0;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}
.countdown-unit {
  background: rgba(255,255,255,.2);
  border-radius: .375rem;
  padding: .25rem .5rem;
  text-align: center;
  min-width: 3rem;
}
.countdown-num { font-size: 1.1rem; font-weight: 700; color: #fff; }
.countdown-lbl { font-size: .6rem; color: rgba(255,255,255,.8); margin-top: 1px; }

/* ── Filter Sidebar ──────────────────────────────────────────── */
.filter-sidebar {
  background: #fff;
  border-radius: .5rem;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  position: sticky;
  top: 80px;
}
.filter-section { margin-bottom: 1.5rem; border-bottom: 1px solid #eee; padding-bottom: 1.5rem; }
.filter-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-title { font-size: .85rem; font-weight: 700; color: #212121; text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.filter-option {
  display: flex; align-items: center; gap: .5rem;
  font-size: .85rem; color: #555;
  padding: .25rem 0;
  cursor: pointer;
}
.filter-option:hover { color: var(--primary); }
.filter-option input[type=checkbox] { accent-color: var(--primary); }

/* Price range slider */
.range-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  outline: none;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* ── Product Images Gallery ──────────────────────────────────── */
.product-gallery-main {
  position: relative;
  overflow: hidden;
  border-radius: .5rem;
  background: #fff;
  border: 1px solid #eee;
}
.product-gallery-main img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 1.5rem;
  transition: transform .3s ease;
}
.product-gallery-main:hover img { transform: scale(1.04); }

.product-thumbnail {
  width: 64px; height: 64px;
  border: 2px solid transparent;
  border-radius: .375rem;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  background: #fff;
}
.product-thumbnail.active,
.product-thumbnail:hover { border-color: var(--primary); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

/* ── Skeleton Loading ────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: .375rem;
}
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  background: #fff;
  border-radius: .5rem;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

/* ── Rating Stars ────────────────────────────────────────────── */
.star-rating { display: inline-flex; gap: 2px; cursor: pointer; }
.star        { font-size: 1.2rem; color: #e0e0e0; transition: color .15s; }
.star.active, .star.hover { color: #f59e0b; }

/* ── Order Timeline ──────────────────────────────────────────── */
.order-timeline { position: relative; padding-left: 2rem; }
.order-timeline::before {
  content: '';
  position: absolute;
  left: .6rem;
  top: 0; bottom: 0;
  width: 2px;
  background: #e5e7eb;
}
.timeline-item { position: relative; margin-bottom: 1.5rem; }
.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 3px solid #e5e7eb;
  background: #fff;
  transition: var(--transition);
}
.timeline-dot.completed { background: var(--success); border-color: var(--success); }
.timeline-dot.active    { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px rgba(40,116,240,.2); }

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
  font-size: .8rem;
  color: #777;
  padding: .5rem 0;
}
.breadcrumb a { color: #777; transition: color .2s; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: #bbb; }
.breadcrumb .current { color: #212121; font-weight: 500; }

/* ── Qty Selector ────────────────────────────────────────────── */
.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: .5rem;
  overflow: hidden;
}
.qty-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  background: #f7f7f7;
  border: none;
  transition: var(--transition);
}
.qty-btn:hover { background: var(--primary); color: #fff; }
.qty-input {
  width: 44px;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  outline: none;
  border-left: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

/* ── Cart ────────────────────────────────────────────────────── */
.cart-item {
  background: #fff;
  border-radius: .5rem;
  box-shadow: var(--card-shadow);
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.cart-item-img {
  width: 90px; height: 90px;
  flex-shrink: 0;
  border: 1px solid #eee;
  border-radius: .375rem;
  object-fit: contain;
  padding: 4px;
  background: #fafafa;
}

/* ── Coupon ──────────────────────────────────────────────────── */
.coupon-input-wrap {
  display: flex;
  border: 1px dashed var(--primary);
  border-radius: .5rem;
  overflow: hidden;
}
.coupon-input-wrap input {
  flex: 1;
  padding: .6rem .75rem;
  font-size: .875rem;
  border: none;
  outline: none;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.coupon-apply-btn {
  padding: .6rem 1rem;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}
.coupon-apply-btn:hover { background: var(--primary-dark); }

/* ── Button Variants ─────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: .65rem 1.5rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  padding: .65rem 1.5rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .9rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-secondary:hover { background: #e0550d; }

.btn-outline {
  background: transparent;
  color: var(--primary);
  padding: .6rem 1.4rem;
  border-radius: .5rem;
  font-weight: 600;
  font-size: .9rem;
  border: 1.5px solid var(--primary);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: .4rem;
}
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ── Form Controls ───────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid #ddd;
  border-radius: .5rem;
  font-size: .9rem;
  outline: none;
  transition: var(--transition);
  background: #fff;
  color: #212121;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(40,116,240,.12); }
.form-input.error { border-color: var(--sale); }

.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: #444;
  margin-bottom: .35rem;
}

/* ── Responsive Product Grid ─────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
@media (min-width: 640px)  { .product-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; } }
@media (min-width: 1024px) { .product-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

/* ── Featured Products Slider ────────────────────────────────── */
.featured-slider-wrap {
  position: relative;
}
/* Mobile: horizontal scroll, exactly 2 cards visible at once */
.featured-slider {
  display: flex;
  gap: .75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: .5rem;
}
.featured-slider::-webkit-scrollbar { display: none; }
.featured-slider .product-card {
  flex: 0 0 calc(50% - .375rem);
  min-width: 0;
  scroll-snap-align: start;
}
/* Desktop: revert to grid */
@media (min-width: 640px) {
  .featured-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    overflow-x: visible;
    scroll-snap-type: none;
    gap: 1.1rem;
  }
  .featured-slider .product-card { flex: unset; min-width: unset; }
  .feat-nav-btn { display: none !important; }
}
@media (min-width: 1024px) {
  .featured-slider { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}
/* Arrow nav buttons (mobile only) */
.feat-nav-btn {
  position: absolute;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
  background: white;
  border: none;
  border-radius: 50%;
  width: 30px; height: 30px;
  font-size: .7rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  cursor: pointer;
  transition: box-shadow .2s;
  padding: 0;
}
.feat-nav-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.feat-prev { left: -4px; }
.feat-next { right: -4px; }

/* ── Horizontal Scroll Row ───────────────────────────────────── */
.product-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: .5rem;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.product-row::-webkit-scrollbar { display: none; }
.product-row .product-card {
  flex: 0 0 200px;
  min-width: 200px;
  scroll-snap-align: start;
}
@media (min-width: 640px)  { .product-row .product-card { flex: 0 0 215px; min-width: 215px; } }
@media (min-width: 1024px) { .product-row .product-card { flex: 0 0 230px; min-width: 230px; } }

/* ── Sticky Sidebar ──────────────────────────────────────────── */
.sticky-sidebar { position: sticky; top: 80px; }

/* ── Brand Slider ────────────────────────────────────────────── */
.brand-slider-wrap {
  overflow: hidden;
  padding: 4px 2px 8px;
}
.brand-slider {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.brand-slider::-webkit-scrollbar { display: none; }

.brand-card {
  flex: 0 0 calc((100% - 9 * 14px) / 10);  /* 10 per row desktop */
  min-width: 90px;
  scroll-snap-align: start;
  aspect-ratio: 3 / 2;
  background: #fff;
  border: 1.5px solid #eef0f3;
  border-radius: .875rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  padding: 0;
}
.brand-card:hover {
  border-color: var(--primary);
  box-shadow: 0 6px 20px rgba(40,116,240,.15);
  transform: translateY(-3px);
}
.brand-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .35s ease;
}
.brand-card:hover img { transform: scale(1.07); }
.brand-card span {
  font-size: .75rem;
  font-weight: 700;
  color: #444;
  text-align: center;
  padding: .5rem;
  line-height: 1.3;
}

@media (max-width: 1024px) {
  .brand-card { flex: 0 0 calc((100% - 6 * 14px) / 7); }
}
@media (max-width: 768px) {
  .brand-card { flex: 0 0 calc((100% - 4 * 14px) / 5); }
}
@media (max-width: 480px) {
  .brand-card { flex: 0 0 calc((100% - 3 * 14px) / 4); min-width: 80px; }
}

/* ── Promo Banners ───────────────────────────────────────────── */
.promo-banner {
  border-radius: .75rem;
  overflow: hidden;
  position: relative;
  min-height: 130px;
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--primary), #5a9aff);
  color: #fff;
  transition: var(--transition);
}
.promo-banner:hover { transform: scale(1.02); }

/* ── Testimonials ────────────────────────────────────────────── */
/* Legacy (keep for backward compat) */
.testimonial-card {
  background: #fff;
  border-radius: .75rem;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  border-left: 4px solid var(--primary);
}

/* New professional testimonial section */
.testimonials-section {
  background: transparent;
  position: relative;
  overflow: hidden;
}
.testimonials-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(40,116,240,.08) 0%, transparent 70%);
  pointer-events: none;
}
.testimonials-section::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(251,100,27,.07) 0%, transparent 70%);
  pointer-events: none;
}

.testimonial-card-new {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.05);
  transition: transform .22s ease, box-shadow .22s ease;
}
@media (max-width: 639px) {
  .testimonial-card-new { padding: 1.25rem; border-radius: .875rem; }
}
.testimonial-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(40,116,240,.12), 0 2px 8px rgba(0,0,0,.06);
}

.testimonial-quote-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: var(--primary);
  color: #fff;
  border-radius: .6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  opacity: .9;
}

/* ── Testimonial Slider ──────────────────────────────────────── */
.testi-slider-outer {
  position: relative;
  overflow: hidden;
  padding: 0 0 .5rem;
}
.testi-slider {
  display: flex;
  gap: 1.5rem;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.testi-slide {
  flex: 0 0 calc((100% - 3rem) / 3); /* 3 cards */
  min-width: 0;
}
@media (max-width: 1023px) {
  .testi-slide { flex: 0 0 calc((100% - 1.5rem) / 2); } /* 2 cards */
}
@media (max-width: 639px) {
  .testi-slide { flex: 0 0 100%; } /* 1 card */
}

/* Arrows */
.testi-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  cursor: pointer;
  z-index: 10;
  transition: background .2s, color .2s, box-shadow .2s;
}
.testi-arrow:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(40,116,240,.3);
}
.testi-prev { left: -1.25rem; }
.testi-next { right: -1.25rem; }
/* Hide arrows on mobile — users swipe instead */
@media (max-width: 639px) {
  .testi-prev, .testi-next { display: none; }
}

/* Dots */
.testi-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: 1.75rem;
}
.testi-dot {
  width: .5rem;
  height: .5rem;
  border-radius: 9999px;
  background: #d1d5db;
  border: none;
  cursor: pointer;
  transition: background .25s, width .25s;
  padding: 0;
}
.testi-dot.active {
  background: var(--primary);
  width: 1.5rem;
}
/* Larger tap targets on mobile */
@media (max-width: 639px) {
  .testi-dots { gap: .6rem; margin-top: 1.25rem; }
  .testi-dot  { width: .65rem; height: .65rem; }
  .testi-dot.active { width: 1.75rem; }
}

/* ── Tabs ────────────────────────────────────────────────────── */
.tab-btn {
  padding: .6rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 700; }
.tab-btn:hover  { color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Lazy Image ──────────────────────────────────────────────── */
img[data-src] { opacity: 0; transition: opacity .3s; }
img.loaded    { opacity: 1; }

/* ── Checkout Steps ──────────────────────────────────────────── */
.checkout-steps-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto 2rem;
  padding: 0 1rem;
}
.checkout-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  flex-shrink: 0;
  color: #b0b8c9;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}
.checkout-step.active { color: var(--primary); }
.checkout-step.done   { color: var(--success); }
.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
  color: #9ca3af;
  transition: background .2s, color .2s;
}
.checkout-step.active .step-num {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(40,116,240,.15);
}
.checkout-step.done .step-num {
  background: var(--success);
  color: #fff;
}
.step-label {
  display: block;
  margin-top: .15rem;
}
.step-line {
  flex: 1;
  height: 2px;
  background: #e5e7eb;
  margin: 0 6px;
  margin-bottom: 18px;
  border-radius: 2px;
  min-width: 24px;
  transition: background .2s;
}
.step-line.done { background: var(--success); }

/* ── Search Dropdown ─────────────────────────────────────────── */
#search-dropdown .search-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1rem;
  font-size: .875rem;
  cursor: pointer;
  transition: background .15s;
}
#search-dropdown .search-item:hover { background: var(--surface); }
#search-dropdown .search-item img { width: 36px; height: 36px; object-fit: contain; border-radius: .25rem; }

/* ── Toast ───────────────────────────────────────────────────── */
.toast-enter  { animation: slideUp .3s ease forwards; }
.toast-leave  { animation: slideDown .3s ease forwards; }
@keyframes slideUp   { from { transform: translateY(20px); opacity:0; } to { transform: translateY(0); opacity:1; } }
@keyframes slideDown { from { transform: translateY(0);    opacity:1; } to { transform: translateY(20px); opacity:0; } }

/* ── Overlay Loader ──────────────────────────────────────────── */
.page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
}
.spinner {
  width: 44px; height: 44px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Account Sidebar ─────────────────────────────────────────── */
.account-nav-link {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem 1rem;
  border-radius: .5rem;
  font-size: .875rem;
  color: #555;
  transition: var(--transition);
}
.account-nav-link:hover,
.account-nav-link.active { background: #eef3fd; color: var(--primary); font-weight: 600; }

/* ── Utility ─────────────────────────────────────────────────── */
.text-primary  { color: var(--primary); }
.bg-primary    { background: var(--primary); }
.line-clamp-2  { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.line-clamp-3  { display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }

/* ── Promotion ribbon ────────────────────────────────────────── */
.ribbon {
  position: absolute;
  top: 0; left: 0;
  background: var(--sale);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 0 0 6px 0;
  z-index: 2;
  letter-spacing: .04em;
}

/* ── Responsive Utilities ────────────────────────────────────── */
@media (max-width: 639px) {
  .section-heading h2 { font-size: 1.1rem; }
  .product-row .product-card { flex: 0 0 150px; min-width: 150px; }
}
