/* ============================================
   ShopZen - Main Stylesheet
   Font: Syne (headings) + DM Sans (body)
   Palette: Deep Navy + Electric Orange + Cloud White
   ============================================ */

:root {
  --primary:       #FF6B2B;
  --primary-dark:  #E55A1C;
  --primary-light: #FF8F5E;
  --secondary:     #0A1628;
  --accent:        #FFD600;
  --surface:       #FFFFFF;
  --surface-2:     #F8F9FC;
  --surface-3:     #EEF1F8;
  --border:        #E2E6F0;
  --text-primary:  #0A1628;
  --text-secondary:#5A6A8A;
  --text-muted:    #9AA5BC;
  --success:       #22C55E;
  --danger:        #EF4444;
  --warning:       #F59E0B;
  --info:          #3B82F6;
  --gradient-hero: linear-gradient(135deg, #0A1628 0%, #1E3A5F 50%, #0F2544 100%);
  --gradient-card: linear-gradient(145deg, #FFFFFF 0%, #F8F9FC 100%);
  --shadow-sm:     0 2px 8px rgba(10,22,40,.06);
  --shadow-md:     0 8px 24px rgba(10,22,40,.10);
  --shadow-lg:     0 20px 60px rgba(10,22,40,.15);
  --shadow-xl:     0 32px 80px rgba(10,22,40,.20);
  --radius-sm:     8px;
  --radius-md:     14px;
  --radius-lg:     20px;
  --radius-xl:     28px;
  --header-h:      72px;
  --topbar-h:      36px;
  --catnav-h:      50px;
  --sidebar-w:     270px;
  --transition:    .3s cubic-bezier(.4,0,.2,1);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--surface-2);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5,h6 { font-family: 'Syne', sans-serif; font-weight: 700; line-height: 1.2; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; }

/* === PAGE LOADER === */
.page-loader {
  position: fixed; inset: 0; background: var(--secondary);
  z-index: 9999; display: flex; align-items: center; justify-content: center;
  transition: opacity .5s ease, visibility .5s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-logo { font-size: 4rem; animation: pulse 1s ease-in-out infinite; }
.loader-bar {
  width: 200px; height: 3px; background: rgba(255,255,255,.15);
  border-radius: 10px; margin: 20px auto 0; overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 40%;
  background: var(--primary); border-radius: 10px;
  animation: loaderSlide 1.2s ease-in-out infinite;
}
@keyframes loaderSlide { 0%{transform:translateX(-100%)} 100%{transform:translateX(600%)} }
@keyframes pulse { 0%,100%{transform:scale(1)} 50%{transform:scale(1.1)} }

/* === TOP BAR === */
.top-bar {
  background: var(--secondary); color: rgba(255,255,255,.75);
  font-size: .78rem; height: var(--topbar-h);
  display: flex; align-items: center;
}
.top-bar a { color: rgba(255,255,255,.75); transition: color var(--transition); margin-left: 16px; }
.top-bar a:hover { color: var(--primary); }
.top-bar-right { display: flex; align-items: center; }

/* === MAIN HEADER === */
.main-header {
  background: var(--surface); height: var(--header-h);
  position: sticky; top: 0; z-index: 500;
  box-shadow: var(--shadow-md);
  transition: box-shadow var(--transition);
}
.main-header.scrolled { box-shadow: var(--shadow-lg); }
/* Header 3-column grid: logo | search (centered) | icons */
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  height: 100%;
}
.header-left { display: flex; align-items: center; gap: 14px; justify-content: flex-start; }

/* Logo */
.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 1.7rem; }
.logo-text {
  font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 800;
  color: var(--secondary);
}
.logo-text em { color: var(--primary); font-style: normal; }

/* Sidebar Toggle */
.sidebar-toggle-btn {
  width: 40px; height: 40px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  border-radius: var(--radius-sm); transition: background var(--transition);
}
.sidebar-toggle-btn span {
  display: block; width: 22px; height: 2px;
  background: var(--secondary); border-radius: 2px;
  transition: all var(--transition);
}
.sidebar-toggle-btn:hover { background: var(--surface-3); }
.sidebar-toggle-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.sidebar-toggle-btn.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.sidebar-toggle-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Search */
.header-search { flex: 1; position: relative; max-width: 600px; display: flex; flex-direction: column; align-items: stretch; }
.search-form {
  display: flex; align-items: center; width: 100%;
  background: var(--surface-2); border: 2px solid var(--border);
  border-radius: 50px; overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form:focus-within {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,107,43,.1);
}
.search-category {
  border-right: 1px solid var(--border); flex-shrink: 0;
}
.search-category select {
  border: none; background: transparent; padding: 0 14px; font-size: .85rem;
  color: var(--text-secondary); outline: none; height: 44px; cursor: pointer;
}
.search-input {
  flex: 1; border: none; background: transparent; padding: 0 16px;
  font-size: .9rem; color: var(--text-primary); outline: none; height: 44px;
  min-width: 0;
}
.search-btn {
  background: var(--primary); color: white; border: none;
  width: 52px; height: 44px; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: background var(--transition); flex-shrink: 0;
  cursor: pointer;
}
.search-btn:hover { background: var(--primary-dark); }

/* Search Dropdown */
.search-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  z-index: 600; display: none; overflow: hidden;
}
.search-dropdown.show { display: block; animation: dropIn .2s ease; }
.search-dropdown-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; transition: background var(--transition); cursor: pointer;
}
.search-dropdown-item:hover { background: var(--surface-2); }
.search-dropdown-item img { width: 40px; height: 40px; object-fit: cover; border-radius: var(--radius-sm); }
.search-dropdown-item .name { font-size: .88rem; font-weight: 500; }
.search-dropdown-item .price { font-size: .82rem; color: var(--primary); font-weight: 600; }

/* Header Right */
.header-right { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }
.header-icon-btn {
  display: flex; flex-direction: column; align-items: center;
  padding: 8px 12px; border-radius: var(--radius-sm);
  transition: background var(--transition); position: relative;
  font-size: .9rem; color: var(--text-primary);
}
.header-icon-btn:hover { background: var(--surface-2); color: var(--primary); }
.icon-label { font-size: .72rem; margin-top: 2px; color: var(--text-secondary); }
.cart-btn { position: relative; }
.cart-badge {
  position: absolute; top: 4px; right: 8px;
  background: var(--primary); color: white;
  font-size: .65rem; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.cart-badge.bump { transform: scale(1.4); }

/* === LEFT SIDEBAR === */
.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(10,22,40,.5);
  backdrop-filter: blur(4px); z-index: 600;
  opacity: 0; visibility: hidden; transition: all var(--transition);
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }
.left-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w); background: var(--surface);
  z-index: 700; transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column;
}
.left-sidebar.open { transform: translateX(0); }

/* Custom scrollbar for sidebar */
.left-sidebar::-webkit-scrollbar { width: 4px; }
.left-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 16px; background: var(--secondary); color: white;
  flex-shrink: 0;
}
.sidebar-header h6 { font-size: .9rem; margin: 0; font-weight: 600; }
.sidebar-close {
  color: rgba(255,255,255,.7); font-size: 1.1rem;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: all var(--transition);
}
.sidebar-close:hover { background: rgba(255,255,255,.15); color: white; }

.sidebar-nav { padding: 8px 0; flex: 1; }
.sidebar-cat-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; color: var(--text-primary); font-size: .9rem;
  transition: all var(--transition); position: relative;
}
.sidebar-cat-link:hover { background: var(--surface-2); color: var(--primary); }
.sidebar-cat-link.has-children { cursor: pointer; }
.cat-icon {
  width: 32px; height: 32px; background: var(--surface-2);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: .85rem; flex-shrink: 0; color: var(--primary);
  transition: all var(--transition);
}
.sidebar-cat-link:hover .cat-icon { background: rgba(255,107,43,.12); }
.cat-arrow { margin-left: auto; font-size: .75rem; color: var(--text-muted); transition: transform var(--transition); }
.sidebar-cat-link[aria-expanded="true"] .cat-arrow { transform: rotate(90deg); }
.sidebar-submenu { padding: 4px 0; background: var(--surface-2); }
.sidebar-submenu a {
  display: block; padding: 9px 16px 9px 58px;
  font-size: .85rem; color: var(--text-secondary);
  transition: all var(--transition);
}
.sidebar-submenu a:hover { color: var(--primary); padding-left: 62px; }

/* === CATEGORY NAV BAR === */
.cat-nav-wrapper {
  background: var(--surface); border-bottom: 1px solid var(--border);
  position: sticky; top: var(--header-h); z-index: 400;
}
.cat-nav-wrapper .position-relative { display: flex; align-items: center; }
.cat-nav-scroll {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; scrollbar-width: none; padding: 6px 0;
  scroll-behavior: smooth; user-select: none;
  flex: 1;
}
.cat-nav-scroll::-webkit-scrollbar { display: none; }
.cat-nav-item {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 50px; white-space: nowrap;
  font-size: .82rem; font-weight: 500; color: var(--text-secondary);
  transition: all var(--transition); flex-shrink: 0;
  border: 1.5px solid transparent;
}
.cat-nav-item:hover { background: var(--surface-2); color: var(--primary); border-color: var(--border); }
.cat-nav-item.active { background: var(--primary); color: white; border-color: var(--primary); }
.cat-nav-icon { font-size: .95rem; }
.cat-scroll-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; z-index: 10; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
  color: var(--text-primary);
}
.cat-scroll-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.cat-scroll-left { left: 0; }
.cat-scroll-right { right: 0; }

/* === PAGE NAV BAR (dynamic pages menu) === */
.page-nav-bar {
  background: var(--secondary);
  position: sticky;
  top: calc(var(--header-h) + var(--catnav-h));
  z-index: 390;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.page-nav-inner {
  display: flex; align-items: center; gap: 4px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 0;
  flex-wrap: nowrap;
}
.page-nav-inner::-webkit-scrollbar { display: none; }
.page-nav-link {
  display: inline-flex; align-items: center;
  padding: 6px 16px; border-radius: 50px; white-space: nowrap;
  font-size: .80rem; font-weight: 500;
  color: rgba(255,255,255,.65);
  transition: all var(--transition); flex-shrink: 0;
  border: 1.5px solid transparent;
}
.page-nav-link:hover { color: white; background: rgba(255,255,255,.1); }
.page-nav-link.active {
  color: white; background: var(--primary);
  border-color: var(--primary);
}


/* === HERO SLIDER === */
.hero-section { position: relative; overflow: hidden; background: #0A1628; }
.hero-swiper {
  height: 520px;
  background: linear-gradient(135deg, #0A1628 0%, #1E3A5F 50%, #0F2544 100%) !important;
}
@media (max-width: 768px) { .hero-swiper { height: 300px; } }
.hero-swiper .swiper-wrapper { align-items: stretch; }
.hero-swiper .swiper-slide {
  height: 100% !important;
  opacity: 1 !important;
  visibility: visible !important;
}
.hero-slide {
  position: relative; overflow: hidden; height: 100%;
  background: linear-gradient(135deg, #0A1628 0%, #1E3A5F 50%, #0F2544 100%);
  min-height: 300px; display: flex; flex-direction: column;
}
.hero-slide img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  opacity: .4; transition: transform 6s ease;
}
.swiper-slide-active .hero-slide img { transform: scale(1.05); }
.hero-content {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  justify-content: center; padding: 0 8%;
  color: white;
}
.hero-content .hero-tag {
  display: inline-block; background: var(--primary);
  padding: 4px 14px; border-radius: 50px; font-size: .8rem;
  font-weight: 600; letter-spacing: .05em; margin-bottom: 16px;
  width: fit-content;
}
.hero-content h1 {
  font-size: clamp(1.8rem, 5vw, 3.5rem); font-weight: 800;
  margin-bottom: 16px; line-height: 1.15;
  text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hero-content p {
  font-size: clamp(.85rem, 2vw, 1.1rem); opacity: .85;
  margin-bottom: 28px; max-width: 480px;
}
.hero-cta {
  display: flex; gap: 12px; flex-wrap: wrap;
}
.btn-hero-primary {
  background: var(--primary); color: white;
  padding: 13px 32px; border-radius: 50px;
  font-weight: 600; font-size: .95rem;
  transition: all var(--transition);
  box-shadow: 0 4px 20px rgba(255,107,43,.4);
}
.btn-hero-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(255,107,43,.5); color: white; }
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,.5); color: white;
  padding: 11px 30px; border-radius: 50px;
  font-weight: 600; font-size: .95rem;
  transition: all var(--transition); background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.btn-hero-outline:hover { background: rgba(255,255,255,.2); border-color: white; color: white; }

/* Hero Swiper Controls */
.hero-swiper .swiper-pagination-bullet { background: white; opacity: .6; }
.hero-swiper .swiper-pagination-bullet-active { opacity: 1; width: 24px; border-radius: 4px; }
.hero-swiper-button-prev,
.hero-swiper-button-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px; background: rgba(255,255,255,.15);
  backdrop-filter: blur(8px); border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: .85rem;
  z-index: 10;
  cursor: pointer;
}
.hero-swiper-button-prev { left: 24px; }
.hero-swiper-button-next { right: 24px; }
.hero-swiper-button-prev:hover,
.hero-swiper-button-next:hover { background: var(--primary); }

/* === SECTIONS === */
.section { padding: 60px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 32px;
}
.section-title { font-size: clamp(1.3rem, 3vw, 1.8rem); position: relative; }
.section-title::after {
  content: ''; display: block; width: 48px; height: 3px;
  background: var(--primary); border-radius: 2px; margin-top: 8px;
}
.section-link {
  font-size: .85rem; color: var(--primary); font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: gap var(--transition);
}
.section-link:hover { gap: 10px; color: var(--primary-dark); }

/* Featured Categories */
.featured-cats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.feat-cat-card {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px 16px;
  text-align: center; transition: all var(--transition); cursor: pointer;
}
.feat-cat-card:hover {
  border-color: var(--primary); transform: translateY(-4px);
  box-shadow: var(--shadow-md); background: linear-gradient(135deg, #fff7f3, #fff);
}
.feat-cat-icon {
  font-size: 2.4rem; margin-bottom: 10px; display: block;
  transition: transform var(--transition);
}
.feat-cat-card:hover .feat-cat-icon { transform: scale(1.2) rotate(-5deg); }
.feat-cat-name { font-size: .85rem; font-weight: 600; color: var(--text-primary); }

/* === PRODUCT GRID === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
@media (max-width: 576px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* Product Card */
.product-card {
  border-radius: var(--radius-lg); overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-card-inner {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden; position: relative;
  transition: border-color var(--transition);
  height: 100%; display: flex; flex-direction: column;
}
.product-card:hover .product-card-inner { border-color: rgba(255,107,43,.25); }

/* Badges */
.product-badges { position: absolute; top: 10px; left: 10px; z-index: 5; display: flex; flex-direction: column; gap: 4px; }
.badge-discount, .badge-flash, .badge-trending {
  display: inline-block; padding: 3px 9px; border-radius: 50px;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
}
.badge-discount { background: var(--danger); color: white; }
.badge-flash { background: var(--accent); color: var(--secondary); }
.badge-trending { background: var(--primary); color: white; }

/* Wishlist Button */
.wishlist-btn {
  position: absolute; top: 10px; right: 10px; z-index: 5;
  width: 34px; height: 34px; background: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm); color: var(--text-muted);
  transition: all var(--transition); font-size: .9rem;
  opacity: 0;
}
.product-card:hover .wishlist-btn { opacity: 1; }
.wishlist-btn.active, .wishlist-btn:hover { color: #EF4444; transform: scale(1.15); }
.wishlist-btn.active { opacity: 1; }

/* Product Image */
.product-img-wrap {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 1; background: var(--surface-2);
}
.product-img {
  width: 100%; height: 100%; object-fit: contain; padding: 12px;
  transition: transform .5s ease;
}
.product-card:hover .product-img { transform: scale(1.06); }
.product-overlay {
  position: absolute; inset: 0; background: rgba(10,22,40,.35);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.product-card:hover .product-overlay { opacity: 1; }
.btn-quick-view {
  background: white; color: var(--text-primary);
  padding: 9px 20px; border-radius: 50px; font-size: .82rem; font-weight: 600;
  transform: translateY(10px); transition: all var(--transition);
  border: none; cursor: pointer;
}
.product-card:hover .btn-quick-view { transform: translateY(0); }
.btn-quick-view:hover { background: var(--primary); color: white; }

/* Product Info */
.product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: .72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; }
.product-name {
  font-size: .92rem; font-weight: 600; margin: 4px 0 8px;
  line-height: 1.35; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-name a { color: var(--text-primary); transition: color var(--transition); }
.product-name a:hover { color: var(--primary); }
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.stars { color: var(--warning); font-size: .78rem; }
.count { font-size: .75rem; color: var(--text-muted); }
.product-price { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.current-price { font-family: 'Syne', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.original-price { font-size: .82rem; color: var(--text-muted); text-decoration: line-through; }

.btn-add-cart {
  width: 100%; padding: 10px; background: var(--secondary);
  color: white; border-radius: var(--radius-sm); font-size: .85rem;
  font-weight: 600; transition: all var(--transition); border: none;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
}
.btn-add-cart:hover { background: var(--primary); transform: translateY(-1px); }
.btn-add-cart.loading { opacity: .7; pointer-events: none; }

/* === FLASH SALE === */
.flash-sale-section {
  background: linear-gradient(135deg, #0A1628 0%, #1E2D4F 100%);
  padding: 60px 0; position: relative; overflow: hidden;
}
.flash-sale-section::before {
  content: ''; position: absolute; top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255,107,43,.12) 0%, transparent 70%);
  pointer-events: none;
}
.flash-sale-section .section-title { color: white; }
.flash-sale-section .section-title::after { background: var(--primary); }
.flash-tag {
  background: var(--primary); color: white;
  padding: 4px 12px; border-radius: 50px; font-size: .8rem; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
/* Countdown */
.countdown-timer { display: flex; align-items: center; gap: 8px; }
.countdown-unit {
  text-align: center; background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  padding: 8px 14px; border-radius: var(--radius-sm);
  min-width: 56px;
}
.countdown-num {
  font-family: 'Syne', sans-serif; font-size: 1.4rem; font-weight: 800;
  color: white; display: block; line-height: 1;
}
.countdown-label { font-size: .65rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .05em; }
.countdown-sep { color: var(--primary); font-size: 1.5rem; font-weight: 700; margin-bottom: 6px; }

.flash-sale-section .product-card-inner { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
.flash-sale-section .product-name a,
.flash-sale-section .product-category { color: rgba(255,255,255,.8); }
.flash-sale-section .product-name a:hover { color: var(--primary); }
.flash-sale-section .count { color: rgba(255,255,255,.4); }
.flash-sale-section .btn-add-cart { background: rgba(255,255,255,.1); }
.flash-sale-section .btn-add-cart:hover { background: var(--primary); }

/* === PRODUCT SWIPER === */
.product-swiper { padding: 4px 2px 16px !important; }
.product-swiper .swiper-slide { height: auto; }
.product-swiper .product-card { height: 100%; }
.product-swiper .product-card-inner { height: 100%; }
.swiper-products-nav .swiper-button-next,
.swiper-products-nav .swiper-button-prev {
  position: static;
  margin: 0;
  width: 40px; height: 40px; background: var(--surface);
  border: 1.5px solid var(--border); border-radius: 50%;
  box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.swiper-products-nav .swiper-button-next:hover,
.swiper-products-nav .swiper-button-prev:hover { background: var(--primary); border-color: var(--primary); }
.swiper-products-nav .swiper-button-next::after,
.swiper-products-nav .swiper-button-prev::after { font-size: .7rem; font-weight: 800; color: var(--text-primary); }
.swiper-products-nav .swiper-button-next:hover::after,
.swiper-products-nav .swiper-button-prev:hover::after { color: white; }

/* === TOAST === */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9000; display: flex; flex-direction: column; gap: 10px; }
.toast-msg {
  background: var(--secondary); color: white;
  padding: 14px 20px; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px;
  max-width: 320px; font-size: .88rem; font-weight: 500;
  animation: toastIn .3s ease; border-left: 4px solid var(--primary);
}
.toast-msg.success { border-left-color: var(--success); }
.toast-msg.error { border-left-color: var(--danger); }
.toast-msg.warning { border-left-color: var(--warning); }
.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
@keyframes toastIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(120px); opacity: 0; } }
@keyframes dropIn { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* === PAGINATION === */
.pagination-wrap { display: flex; justify-content: center; margin-top: 40px; gap: 6px; }
.page-btn {
  width: 38px; height: 38px; display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-secondary); font-size: .88rem;
  font-weight: 600; transition: all var(--transition); cursor: pointer;
}
.page-btn:hover, .page-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* === PRODUCT DETAIL PAGE === */
.product-detail-section { padding: 40px 0; }
.product-gallery { position: sticky; top: calc(var(--header-h) + var(--catnav-h) + 16px); }
.gallery-main {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1.5px solid var(--border); background: var(--surface-2);
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  cursor: zoom-in; position: relative;
}
.gallery-main img { max-width: 90%; max-height: 90%; object-fit: contain; transition: transform .5s ease; }
.gallery-main:hover img { transform: scale(1.08); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumb {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); overflow: hidden; cursor: pointer;
  background: var(--surface-2); transition: border-color var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.gallery-thumb.active { border-color: var(--primary); }
.gallery-thumb img { width: 80%; height: 80%; object-fit: contain; }

.product-detail-info { padding-left: 20px; }
.product-detail-category { color: var(--primary); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.product-detail-title { font-size: clamp(1.3rem, 3vw, 2rem); margin: 10px 0 14px; }
.product-detail-rating { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.product-detail-rating .stars { font-size: 1rem; }
.product-detail-price { margin-bottom: 20px; }
.product-detail-price .current { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; color: var(--primary); }
.product-detail-price .original { font-size: 1.1rem; color: var(--text-muted); text-decoration: line-through; margin-left: 10px; }
.product-detail-price .discount-badge {
  background: var(--danger); color: white; font-size: .78rem; font-weight: 700;
  padding: 3px 10px; border-radius: 50px; margin-left: 10px;
}

.short-desc { color: var(--text-secondary); line-height: 1.7; margin-bottom: 24px; }
.detail-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.qty-selector { display: flex; align-items: center; gap: 0; }
.qty-btn {
  width: 38px; height: 42px; background: var(--surface-2); border: 1.5px solid var(--border);
  font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); color: var(--text-primary);
}
.qty-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.qty-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-input {
  width: 52px; height: 42px; border: 1.5px solid var(--border);
  border-left: none; border-right: none; text-align: center;
  font-weight: 600; font-size: .95rem; background: var(--surface);
}

.btn-primary-action, .btn-secondary-action {
  padding: 13px 28px; border-radius: var(--radius-md); font-weight: 600; font-size: .95rem;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  transition: all var(--transition); cursor: pointer; border: none;
}
.btn-primary-action { background: var(--primary); color: white; flex: 1; }
.btn-primary-action:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(255,107,43,.35); color: white; }
.btn-secondary-action { background: var(--secondary); color: white; flex: 1; }
.btn-secondary-action:hover { opacity: .9; color: white; }
.btn-order-now-action {
  padding: 14px 28px; border-radius: var(--radius-md); font-weight: 700; font-size: 1.1rem;
  display: flex; align-items: center; gap: 8px; justify-content: center;
  transition: all var(--transition); cursor: pointer; border: none;
  background: linear-gradient(135deg, #22C55E 0%, #15803D 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
  text-decoration: none;
  width: 100%;
}
.btn-order-now-action:hover {
  background: linear-gradient(135deg, #16A34A 0%, #11662C 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.45);
  color: white;
}
.btn-order-now-action.loading {
  opacity: .8;
  pointer-events: none;
}
.btn-wishlist-detail {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--text-muted); transition: all var(--transition);
}
.btn-wishlist-detail:hover, .btn-wishlist-detail.active { color: #EF4444; border-color: #EF4444; background: #fef2f2; }

.product-meta { display: flex; flex-direction: column; gap: 8px; }
.product-meta-item { display: flex; gap: 10px; font-size: .87rem; }
.product-meta-label { color: var(--text-muted); min-width: 80px; }
.product-meta-value { font-weight: 500; }

/* Tabs */
.detail-tabs .nav-link {
  color: var(--text-secondary); font-weight: 600; font-size: .9rem;
  padding: 12px 20px; border: none; border-bottom: 2px solid transparent;
}
.detail-tabs .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: none; }
.tab-content { padding-top: 24px; }
.description-content { color: var(--text-secondary); line-height: 1.8; }

/* Reviews */
.review-card { background: var(--surface-2); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; }
.reviewer-name { font-weight: 600; font-size: .9rem; }
.review-date { font-size: .78rem; color: var(--text-muted); }
.review-text { color: var(--text-secondary); font-size: .88rem; margin-top: 8px; }

/* === CART PAGE === */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td {
  padding: 16px; text-align: left; border-bottom: 1px solid var(--border);
  font-size: .88rem;
}
.cart-table th { font-weight: 700; color: var(--text-secondary); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.cart-product-img { width: 70px; height: 70px; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.cart-product-name { font-weight: 600; font-size: .9rem; }

.cart-summary { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; border: 1.5px solid var(--border); position: sticky; top: calc(var(--header-h) + 20px); }
.cart-summary h5 { margin-bottom: 20px; font-size: 1.1rem; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: .9rem; border-bottom: 1px solid var(--border); }
.summary-row:last-of-type { border: none; font-weight: 700; font-size: 1rem; }
.btn-checkout {
  width: 100%; background: var(--primary); color: white;
  padding: 14px; border-radius: var(--radius-md); font-weight: 700;
  font-size: 1rem; border: none; cursor: pointer; transition: all var(--transition);
  margin-top: 16px;
}
.btn-checkout:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,43,.35); }

/* === FILTER SIDEBAR (Products Page) === */
.filter-sidebar { background: var(--surface); border-radius: var(--radius-lg); padding: 20px; border: 1.5px solid var(--border); }
.filter-group { margin-bottom: 24px; }
.filter-group h6 { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: 12px; }
.filter-list li { margin-bottom: 8px; }
.filter-list a { font-size: .88rem; color: var(--text-secondary); transition: color var(--transition); }
.filter-list a:hover, .filter-list a.active { color: var(--primary); font-weight: 600; }
.price-range { display: flex; gap: 8px; align-items: center; }
.price-input {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font-size: .85rem; outline: none;
  transition: border-color var(--transition);
}
.price-input:focus { border-color: var(--primary); }
.btn-filter {
  width: 100%; background: var(--primary); color: white;
  border: none; padding: 10px; border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer; transition: all var(--transition); margin-top: 8px;
}
.btn-filter:hover { background: var(--primary-dark); }

/* === FORMS (Login/Register/Checkout) === */
.auth-page { min-height: 80vh; display: flex; align-items: center; }
.auth-card {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 40px; box-shadow: var(--shadow-lg);
  border: 1.5px solid var(--border); max-width: 460px; width: 100%; margin: 0 auto;
}
.auth-card h2 { margin-bottom: 6px; }
.auth-card .subtitle { color: var(--text-secondary); margin-bottom: 28px; font-size: .9rem; }
.form-group { margin-bottom: 18px; }
.form-label { font-size: .85rem; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; display: block; }
.form-control {
  width: 100%; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: .9rem; font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface); color: var(--text-primary); outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(255,107,43,.1); }
.form-control.error { border-color: var(--danger); }
.error-msg { font-size: .78rem; color: var(--danger); margin-top: 4px; }
.btn-submit {
  width: 100%; background: var(--primary); color: white;
  border: none; padding: 14px; border-radius: var(--radius-md);
  font-weight: 700; font-size: 1rem; cursor: pointer;
  transition: all var(--transition); margin-top: 8px;
}
.btn-submit:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255,107,43,.35); }
.form-divider { text-align: center; color: var(--text-muted); font-size: .85rem; margin: 18px 0; position: relative; }
.form-divider::before, .form-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 30px); height: 1px; background: var(--border);
}
.form-divider::before { left: 0; } .form-divider::after { right: 0; }

/* === QUICK VIEW MODAL === */
.quick-view-modal { border-radius: var(--radius-xl) !important; overflow: hidden; border: none !important; }
.modal-close-btn {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; background: var(--secondary); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: .9rem; transition: background var(--transition);
}
.modal-close-btn:hover { background: var(--primary); }

/* === ACCOUNT PAGE === */
.account-sidebar { background: var(--surface); border-radius: var(--radius-lg); padding: 24px; border: 1.5px solid var(--border); }
.account-avatar {
  width: 80px; height: 80px; border-radius: 50%; background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: white; font-family: 'Syne', sans-serif; font-weight: 700; margin-bottom: 12px;
}
.account-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: .9rem; color: var(--text-secondary); transition: all var(--transition);
}
.account-nav a:hover, .account-nav a.active { background: rgba(255,107,43,.08); color: var(--primary); font-weight: 600; }
.account-nav a i { width: 18px; text-align: center; }

.order-card { background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 20px; margin-bottom: 16px; }
.order-status { padding: 4px 12px; border-radius: 50px; font-size: .75rem; font-weight: 700; display: inline-block; }
.status-pending  { background: #FEF3C7; color: #92400E; }
.status-processing { background: #DBEAFE; color: #1E40AF; }
.status-shipped  { background: #D1FAE5; color: #065F46; }
.status-delivered { background: #DCFCE7; color: #14532D; }
.status-cancelled { background: #FEE2E2; color: #7F1D1D; }

/* === FOOTER === */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.75); margin-top: 60px; }
.footer-top { padding: 60px 0 40px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; text-align: center; font-size: .82rem; }
.footer-logo { font-family: 'Syne', sans-serif; font-size: 1.6rem; font-weight: 800; color: white; margin-bottom: 12px; }
.footer-logo em { color: var(--primary); font-style: normal; }
.footer-brand p { font-size: .85rem; line-height: 1.7; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px; height: 36px; background: rgba(255,255,255,.08);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; color: rgba(255,255,255,.7);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-3px); }
.site-footer h6 { color: white; font-size: .88rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 16px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer ul a { font-size: .85rem; color: rgba(255,255,255,.6); transition: color var(--transition); }
.site-footer ul a:hover { color: var(--primary); }
.newsletter-form { display: flex; gap: 0; border-radius: var(--radius-sm); overflow: hidden; }
.newsletter-form input {
  flex: 1; border: none; padding: 11px 14px; font-size: .85rem;
  background: rgba(255,255,255,.1); color: white; outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form button {
  background: var(--primary); color: white; padding: 0 16px;
  border: none; cursor: pointer; transition: background var(--transition);
}
.newsletter-form button:hover { background: var(--primary-dark); }
.payment-icons { display: flex; gap: 10px; }
.payment-icons span { font-size: 1.8rem; color: rgba(255,255,255,.4); }

/* === UTILS === */
.text-primary-c { color: var(--primary) !important; }
.bg-primary-c { background: var(--primary) !important; }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state i { font-size: 4rem; color: var(--border); margin-bottom: 16px; }
.empty-state h4 { color: var(--text-muted); margin-bottom: 8px; }
.stock-badge { font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 50px; }
.in-stock { background: #D1FAE5; color: #065F46; }
.out-of-stock { background: #FEE2E2; color: #7F1D1D; }
.alert-box { padding: 14px 18px; border-radius: var(--radius-md); font-size: .88rem; margin-bottom: 16px; border-left: 4px solid; }
.alert-success { background: #F0FDF4; color: #166534; border-color: var(--success); }
.alert-error { background: #FEF2F2; color: #7F1D1D; border-color: var(--danger); }
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
  }
  .header-search { max-width: none; }
  .product-detail-info { padding-left: 0; margin-top: 24px; }
  .product-gallery { position: static; }
  .cart-table th:nth-child(3),
  .cart-table td:nth-child(3) { display: none; }
}
@media (max-width: 768px) {
  :root {
    --header-h: 120px;
  }
  .header-inner {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 10px;
    align-content: center;
  }
  .header-left { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; justify-content: flex-start; }
  .header-right { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 4px; justify-content: flex-end; }
  .header-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 8px; max-width: none; }
  .search-category { display: none; }
  .main-header .px-4, .cat-nav-wrapper .px-4 { padding-left: 14px !important; padding-right: 14px !important; }
  .search-input { height: 40px; font-size: 0.82rem; padding: 0 14px; text-overflow: ellipsis; }
  .search-btn { height: 40px; width: 44px; }
  .header-icon-btn { padding: 4px 8px; }
  .logo-text { font-size: 1.15rem; }
  
  .section { padding: 40px 0; }
  .hero-swiper { height: 260px; }
  .hero-content h1 { font-size: 1.5rem; }
  .hero-content p { display: none; }
  .featured-cats-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .feat-cat-card { padding: 14px 8px; }
  .auth-card { padding: 24px; }
}
@media (max-width: 400px) {
  .logo-text { display: none; }
}
@media (max-width: 480px) {
  .cart-table thead { display: none; }
  .cart-table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  .cart-table td { display: flex; padding: 4px 8px; align-items: center; gap: 8px; border: none; }
  .cart-table td::before { content: attr(data-label); font-weight: 600; min-width: 80px; font-size: .78rem; color: var(--text-muted); }
}
