/* =============================
   HERO SLIDE (IMAGE SLIDER)
   ============================= */
.hero-slide {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 1.5rem auto 0 auto;
  /* min-height: 220px; */
}
.hero-slide .slide-wrapper {
  display: flex;
  overflow: hidden;
  position: relative;
  width: 100%;
  /* height: 220px; */
}
.hero-slide .slide-item {
  min-width: 100%;
  transition: opacity 0.5s, transform 0.5s;
  opacity: 0;
  position: absolute;
  left: 0; top: 0;
  right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-slide .slide-item.active {
  opacity: 1;
  z-index: 2;
  pointer-events: auto;
  position: relative;
}
.hero-slide .slide-item img {
  width: 100%;
  /* height: 220px; */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}
.hero-slide .slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}
.hero-slide .slide-nav:hover {
  background: rgba(0,0,0,0.5);
}
.hero-slide .slide-nav.prev {
  left: 10px;
}
.hero-slide .slide-nav.next {
  right: 10px;
}
/**
 * LaptopStore Frontend - Main Stylesheet
 * Mobile-first responsive design
 */

/* ===================================
   1. CSS VARIABLES & DESIGN TOKENS
   =================================== */

:root {
  /* Colors */
  --color-primary: #d42b2b;
  --color-primary-dark: #b01818;
  --color-primary-light: #f05252;
  --color-secondary: #374151;
  --color-danger: #dc2626;
  --color-warning: #f59e0b;
  --color-info: #3b82f6;

  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-text-lighter: #9ca3af;
  --color-background: #ffffff;
  --color-background-light: #f9fafb;
  --color-border: #e5e7eb;
  --color-border-dark: #d1d5db;

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing */
  --space-0: 0;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --color-header-hover-bg: #fff5f5;
  --color-header-hover-border: #f5c2c2;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

  /* Transitions */
  --duration-fast: 150ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. RESET & GLOBAL STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-in-out);
}

a:hover {
  color: var(--color-primary-dark);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all var(--duration-fast) var(--ease-in-out);
}

/* ===================================
   3. LAYOUT & CONTAINER
   =================================== */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-2);
  }
}

/* ===================================
   4. HEADER & NAVIGATION
   =================================== */

/* Header — base styles */
header {
  background-color: var(--color-background);
  border-top: 3px solid var(--color-primary);
  position: relative; /* containing block for mobile nav dropdown */
}

/* Desktop only: sticky header at negative offset so header-top scrolls away,
   leaving only the nav bar visible at the top. No JS class-toggling needed. */
@media (min-width: 1025px) {
  #site-header {
    position: sticky;
    top: var(--sticky-header-offset, -84px);
    z-index: 100;
  }
}

/* ── Row 1: Logo / Search / Auth ── */
.header-top {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: 84px;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}


.logo {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  min-width: 180px;
}

.logo:hover {
  color: var(--color-primary-dark);
}

/* Search bar lives in header-top — stretches to fill space */
.header-top .search-bar {
  flex: 1;
  max-width: 620px;
}

/* Right-side action group */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-left: auto;
}

/* ── Row 2: Navigation Bar ── */
header nav {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border);
}

header nav .container {
  display: flex;
  align-items: center;
  min-height: 58px;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: var(--space-2);
  align-items: center;
  padding: 0;
  margin: 0;
}

header nav a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  color: var(--color-secondary);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  border-bottom: 3px solid transparent;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: all var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
}

header nav a svg {
  flex-shrink: 0;
  color: var(--color-text-light);
  transition: color var(--duration-fast) var(--ease-in-out);
}

header nav a:hover,
header nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background-color: var(--color-header-hover-bg);
}

header nav a:hover svg,
header nav a.active svg {
  color: var(--color-primary);
}

/* ── Search Bar ── */
.search-bar {
  display: flex;
  align-items: center;
  background-color: var(--color-background-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  min-height: 48px;
  padding: 0 var(--space-2) 0 var(--space-4);
  transition: border-color var(--duration-fast) var(--ease-in-out);
}

.search-bar:focus-within {
  border-color: var(--color-primary);
  background-color: var(--color-background);
}

.search-bar input {
  border: none;
  background: transparent;
  padding: var(--space-3) var(--space-2) var(--space-3) 0;
  width: 100%;
  font-size: var(--font-size-sm);
  min-width: 0;
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.search-bar button:hover {
  color: var(--color-primary);
  background-color: var(--color-header-hover-bg);
}

.search-bar button:focus-visible,
.cart-icon:focus-visible,
.menu-toggle:focus-visible,
header nav a:focus-visible,
.btn-login:focus-visible,
.btn-register:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── Cart Icon ── */
.cart-icon {
  position: relative;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  background-color: var(--color-background-light);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
}

.cart-icon:hover {
  color: var(--color-primary);
  border-color: var(--color-header-hover-border);
  background-color: var(--color-header-hover-bg);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--color-danger);
  color: white;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
}

.cart-count:empty {
  display: none;
}

/* ── User Menu ── */
.user-menu {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.btn-login,
.btn-register {
  min-height: 42px;
  padding: 0 var(--space-5);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.btn-login {
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
  background: transparent;
}

.btn-login:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-register {
  background-color: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
}

.btn-register:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}

/* ── Mobile Menu Toggle ── */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background-color: var(--color-background-light);
  flex-shrink: 0;
}

.menu-toggle:hover {
  color: var(--color-primary);
  border-color: var(--color-header-hover-border);
  background-color: var(--color-header-hover-bg);
}

/* ====================================================
   RESPONSIVE — tablet and below (≤ 1024px)
   ==================================================== */
@media (max-width: 1024px) {
  .header-top {
    flex-wrap: wrap;
    gap: var(--space-3);
    min-height: 72px;
    padding: var(--space-3) 0;
  }

  .logo {
    min-width: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
    margin-right: var(--space-1);
  }

  .header-top .search-bar {
    display: flex;
    order: 3;
    flex: 1 1 100%;
    max-width: none;
  }

  /* Nav becomes fixed overlay — stays visible even after header scrolls away */
  header nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding-top: 70px; /* space for FAB button (top 16px + height 50px + gap) */
    background-color: var(--color-background);
    border-bottom: 2px solid var(--color-primary);
    box-shadow: var(--shadow-md);
    z-index: 199;
  }

  header nav.active {
    display: block;
  }

  header nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-2) 0;
    gap: 0;
  }

  header nav a {
    padding: var(--space-3) var(--space-6);
    border-bottom: none;
    border-left: 3px solid transparent;
    border-radius: 0;
    font-size: var(--font-size-base);
  }

  header nav a:hover,
  header nav a.active {
    border-bottom: none;
    border-left-color: var(--color-primary);
    background-color: var(--color-header-hover-bg);
  }
}

@media (max-width: 768px) {
  .header-top {
    gap: var(--space-2);
  }

  .menu-toggle {
    margin-right: 0;
  }
}

/* ===================================
   5. MAIN CONTENT
   =================================== */

main {
  min-height: calc(100vh - 200px);
  padding: var(--space-12) 0;
}

/* ===================================
   6. BUTTONS
   =================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-base);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  white-space: nowrap;
  gap: var(--space-2);
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}


.btn-primary:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 4px 16px 0 rgba(212,43,43,0.12), 0 0 0 3px #fff5f5;
  border: 1.5px solid var(--color-header-hover-border);
  transform: translateY(-2px) scale(1.03);
  outline: none;
  z-index: 2;
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: white;
}

.btn-secondary:hover {
  background-color: #1f2937;
}

.btn-danger {
  background-color: var(--color-danger);
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-primary);
  color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: white;
}

.btn-small {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-size-sm);
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
}

.btn-block {
  width: 100%;
}

.btn-loading {
  opacity: 0.7;
  pointer-events: none;
}

/* ===================================
   7. FORMS
   =================================== */

.form-group {
  margin-bottom: var(--space-6);
}

label {
  display: block;
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.required::after {
  content: ' *';
  color: var(--color-danger);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: var(--font-size-base);
  color: var(--color-text);
  background-color: var(--color-background);
  transition: all var(--duration-fast) var(--ease-in-out);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input[type="text"].error,
input[type="email"].error,
input[type="password"].error,
textarea.error {
  border-color: var(--color-danger);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  color: var(--color-danger);
  font-size: var(--font-size-sm);
  margin-top: var(--space-1);
}

/* ===================================
   8. NOTIFICATIONS
   =================================== */

.notification {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  opacity: 0;
  transform: translateX(400px);
  transition: all var(--duration-normal) var(--ease-in-out);
  max-width: 400px;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-success {
  background-color: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.notification-error {
  background-color: #fee2e2;
  color: #7f1d1d;
  border-left: 4px solid var(--color-danger);
}

.notification-warning {
  background-color: #fef3c7;
  color: #78350f;
  border-left: 4px solid var(--color-warning);
}

.notification-info {
  background-color: #dbeafe;
  color: #0c2340;
  border-left: 4px solid var(--color-info);
}

/* ===================================
   9. FOOTER
   =================================== */

footer {
  background-color: var(--color-text);
  color: white;
  margin-top: var(--space-20);
  padding: var(--space-12) 0 var(--space-8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.footer-section h3 {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-lg);
}

.footer-section h3,
.footer-section a {
  color: white;
}

.footer-section a {
  display: block;
  margin-bottom: var(--space-2);
  color: #d1d5db;
}

.footer-section a:hover {
  color: white;
}

/* ===================================
   10. FLOATING CONTACT BUTTONS
   =================================== */

.floating-buttons {
  position: fixed;
  bottom: 24px;
  left: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}

.floating-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
}

.floating-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.floating-btn--messenger {
  background: linear-gradient(135deg, #0695FF, #A334FA, #FF6968);
}

.floating-btn--zalo {
  background: transparent;
  box-shadow: none;
  padding: 0;
  overflow: hidden;
}

.floating-btn--call {
  background: #e53e3e;
  animation: pulse-ring 1.8s ease infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(229, 62, 62, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0); }
}

.floating-btn__label {
  position: absolute;
  left: 60px;
  background: #333;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.floating-btn:hover .floating-btn__label {
  opacity: 1;
}

/* ===================================
   10b. SCROLL TO TOP BUTTON
   =================================== */

.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary, #2563eb);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.2s ease;
  z-index: 9999;
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--color-primary-dark, #1d4ed8);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* ===================================
   10c. MOBILE FLOATING MENU FAB
   =================================== */

#mobile-menu-fab {
  /* Hidden by default on all screens */
  display: none;
  position: fixed;
  top: 16px;
  left: 16px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: var(--color-primary, #2563eb);
  color: #fff;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.45);
  z-index: 998;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
}

#mobile-menu-fab.visible {
  opacity: 1;
  transform: scale(1);
}

#mobile-menu-fab:hover {
  background: var(--color-primary-dark, #1d4ed8);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.55);
}

#mobile-menu-fab:active {
  transform: scale(0.92);
}

#mobile-menu-fab .fab-icon-menu {
  display: block;
}

#mobile-menu-fab .fab-icon-close {
  display: none;
}

#mobile-menu-fab.open .fab-icon-menu {
  display: none;
}

#mobile-menu-fab.open .fab-icon-close {
  display: block;
}

/* Only show on tablet / mobile screens */
@media (max-width: 1024px) {
  #mobile-menu-fab {
    display: flex;
  }
}

/* ===================================
   11. HERO SECTION
   =================================== */

.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: white;
  padding: var(--space-12) 0;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.03"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.03"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.02"/><circle cx="10" cy="50" r="0.5" fill="white" opacity="0.02"/><circle cx="90" cy="30" r="0.5" fill="white" opacity="0.02"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 500px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
  line-height: var(--line-height-tight);
}

.hero-subtitle {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
  opacity: 0.9;
  line-height: var(--line-height-relaxed);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero-image {
  position: relative;
  text-align: center;
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.hero-stats {
  display: flex;
  justify-content: space-around;
  margin-top: var(--space-8);
  gap: var(--space-4);
}

.stat-item {
  text-align: center;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  display: block;
}

.stat-label {
  font-size: var(--font-size-sm);
  opacity: 0.8;
  margin-top: var(--space-1);
}

/* ===================================
   12. CATEGORIES SECTION
   =================================== */

.categories-section {
  padding: var(--space-16) 0;
  background-color: var(--color-background-light);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-8);
}

.category-card {
  background: white;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-in-out);
  border: 1px solid var(--color-border);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-primary);
}

.category-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-4);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.category-card h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-text);
}

.category-card p {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
}

/* ===================================
   13. SECTIONS & PRODUCTS
   =================================== */

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.section-subtitle {
  color: var(--color-text-light);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-6);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.featured-section,
.news-section {
  margin-bottom: var(--space-20);
}


.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-8);
}

/* Make all product cards the same height and align actions */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 440px; /* adjust as needed for your card content */
}

.product-info {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  justify-content: space-between;
  padding: 0.3rem var(--space-6) var(--space-6);
  min-height: 220px; /* adjust as needed for your card content */
}

.product-actions {
  margin-top: auto;
}

.product-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-in-out);
  border: 1px solid var(--color-border);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-info {
  padding: var(--space-6);
}

.product-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.product-description {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-actions {
  display: flex;
  gap: var(--space-2);
}

/* ===================================
   14. NEWS CAROUSEL
   =================================== */

.news-carousel-container {
  position: relative;
  margin-top: var(--space-8);
}

.news-carousel {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: var(--space-4) 0;
}

.news-carousel::-webkit-scrollbar {
  display: none;
}

.news-card {
  flex: 0 0 calc((100% - 2 * var(--space-6)) / 3);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-in-out);
  border: 1px solid var(--color-border);
  scroll-snap-align: start;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-image {
  height: 180px;
  overflow: hidden;
  position: relative;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

.news-content {
  padding: var(--space-6);
}

.news-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-3);
  color: var(--color-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--line-height-tight);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-3);
}

.news-date {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.news-category {
  background: var(--color-primary);
  color: white;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.news-excerpt {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  line-height: var(--line-height-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all var(--duration-fast) var(--ease-in-out);
  z-index: 10;
}

.carousel-nav:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.carousel-prev {
  left: -24px;
}

.carousel-next {
  right: -24px;
}

/* ===================================
   15. CTA SECTION
   =================================== */

.cta-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, #7f1d1d 100%);
  color: white;
  padding: var(--space-16) 0;
  text-align: center;
  margin-top: var(--space-20);
}

.cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-4);
}

.cta-content p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-8);
  opacity: 0.9;
}

.cta-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===================================
   16. LOADING STATES
   =================================== */

.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-12);
  color: var(--color-text-light);
}

.loading-spinner p {
  margin-top: var(--space-4);
  font-size: var(--font-size-sm);
}

/* ===================================
   17. RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-8);
  }

  .hero-stats {
    justify-content: center;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-carousel {
    gap: var(--space-4);
  }

  .news-card {
    flex: 0 0 calc((100% - 2 * var(--space-4)) / 3);
  }

  .carousel-nav {
    display: none; /* Hide navigation on smaller screens */
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: var(--space-12) 0;
  }

  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .categories-grid {
    grid-template-columns: 1fr;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-carousel {
    gap: var(--space-3);
  }

  .news-card {
    flex: 0 0 calc((100% - 2 * var(--space-3)) / 2);
  }

  .cta-actions {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero-stats {
    flex-direction: column;
    gap: var(--space-2);
  }

  .stat-item {
    padding: var(--space-3);
  }

  .news-card {
    flex: 0 0 calc(100% - var(--space-4));
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================================
   11. UTILITY CLASSES
   =================================== */

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

.text-primary { color: var(--color-primary); }
.text-danger { color: var(--color-danger); }
.text-success { color: var(--color-secondary); }

.hidden {
  display: none;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===================================
   18. PRODUCTS PAGE STYLES
   =================================== */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-6);
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
}

.breadcrumb a {
  color: var(--color-text-light);
  white-space: nowrap;
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb span {
  color: var(--color-text-lighter);
  white-space: nowrap;
}

.breadcrumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* Page Header */
.page-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.page-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.page-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Filters Section */
.filters-section {
  background: var(--color-background-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  border: 1px solid var(--color-border);
}

.filters-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.search-sort-row {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box input {
  width: 100%;
  padding: 0 var(--space-10) 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  height: 42px;
  line-height: 42px;
  box-sizing: border-box;
}

#product-search {
  padding-left: 10px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-box button {
  position: absolute;
  right: var(--space-2);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-light);
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
}

.search-box button:hover {
  color: var(--color-primary);
  background: var(--color-background-light);
}

.sort-dropdown select {
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: white;
  cursor: pointer;
  height: 42px;
  line-height: 42px;
  box-sizing: border-box;
  appearance: auto;
}

.sort-dropdown select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filters-row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  min-width: 150px;
}

.filter-group--clear {
  justify-content: flex-end;
  min-width: auto;
}

.filter-group label {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.filter-group select {
  padding: 0 var(--space-4);
  height: 42px;
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  background: white;
  cursor: pointer;
}

/* Brand Logo Bar */
.brand-logo-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-top: 1px solid var(--color-border);
}

.brand-logo-bar::-webkit-scrollbar {
  display: none;
}

.brand-logo-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  min-width: 80px;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.brand-logo-item img {
  max-height: 30px;
  max-width: 80px;
  object-fit: contain;
  display: block;
}

.brand-logo-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.brand-logo-item--active {
  border-color: var(--color-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(212, 43, 43, 0.15);
}

.brand-logo-all {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  white-space: nowrap;
}

.brand-logo-item--active .brand-logo-all {
  color: var(--color-primary);
}

.brand-logo-name {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
}

/* Parent brand "has children" dot indicator */
.brand-logo-item {
  position: relative;
}

.brand-logo-child-dot {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0.6;
}

/* Brand Sub Bar — child brands row */
.brand-sub-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  border-top: 2px solid var(--color-primary);
  background: rgba(37, 99, 235, 0.03);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  animation: subBarSlide 0.2s ease;
}

@keyframes subBarSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand-sub-bar::-webkit-scrollbar {
  display: none;
}

.brand-sub-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 64px;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-size: var(--font-size-sm);
}

.brand-sub-item img {
  max-height: 24px;
  max-width: 64px;
  object-fit: contain;
  display: block;
}

.brand-sub-name {
  font-size: 13px;
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  white-space: nowrap;
}

.brand-sub-item:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
  transform: translateY(-1px);
}

.brand-sub-item--active {
  border-color: var(--color-primary);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.brand-sub-item--active .brand-sub-name {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* "Tất cả" button in sub-bar */
.brand-sub-item--all {
  border-style: dashed;
  color: var(--color-text-muted);
}

.brand-sub-item--all .brand-sub-name {
  font-style: italic;
  font-size: 12px;
}

.brand-sub-item--all.brand-sub-item--active {
  border-style: solid;
  border-color: var(--color-primary);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Products Section */
.products-section {
  margin-top: var(--space-8);
}

.results-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.results-info span {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

/* Enhanced Product Card */
.product-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-in-out);
  border: 1px solid var(--color-border);
  position: relative;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.product-image {
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.badge {
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
}

.badge.new {
  background: var(--color-secondary);
  color: white;
}

.badge.out-of-stock {
  background: var(--color-danger);
  color: white;
}

.product-info {
  padding: 0.3rem var(--space-6) var(--space-6);
}

.product-name {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin-bottom: 0.1rem;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--line-height-tight);
}

.product-name a {
  color: #111827;
  text-decoration: none;
}

.product-name:hover,
.product-name a:hover {
  color: var(--color-primary);
}

.product-model {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  margin-bottom: 0.15rem;
}

.product-price {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: 0.2rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.2rem;
  font-size: var(--font-size-sm);
}

.stock-status {
  font-weight: var(--font-weight-medium);
}

.stock-status.in-stock {
  color: var(--color-secondary);
}

.stock-status.out-of-stock {
  color: var(--color-danger);
}

.brand {
  color: var(--color-text-light);
  font-weight: var(--font-weight-medium);
}

.product-actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Load More */
.load-more-section {
  display: flex;
  justify-content: center;
  margin-top: var(--space-12);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.load-more-btn {
  min-width: 200px;
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-full);
  transition: all var(--duration-normal) var(--ease-in-out);
}

.load-more-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.page-number:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.page-dots {
  border: none;
  background: none;
  cursor: default;
  color: var(--color-text-lighter);
}

.page-numbers {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

/* No Products State */
.no-products {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-light);
}

.no-products-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

.no-products h3 {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.no-products p {
  margin-bottom: var(--space-6);
}

/* Error Message */
.error-message {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-light);
}

.error-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

.error-message h3 {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.error-message p {
  margin-bottom: var(--space-6);
}

/* Notifications */
.notification {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  color: white;
  font-weight: var(--font-weight-medium);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transform: translateX(100%);
  opacity: 0;
  transition: all var(--duration-normal) var(--ease-in-out);
}

.notification.show {
  transform: translateX(0);
  opacity: 1;
}

.notification-success {
  background: var(--color-secondary);
}

.notification-error {
  background: var(--color-danger);
}

.notification-warning {
  background: var(--color-warning);
}

.notification-info {
  background: var(--color-info);
}

/* ===================================
   19. RESPONSIVE PRODUCTS PAGE
   =================================== */

@media (max-width: 1024px) {
  .search-sort-row {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: auto;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: auto;
  }
}

@media (max-width: 768px) {
  .page-title {
    font-size: var(--font-size-3xl);
  }

  .filters-section {
    padding: var(--space-4);
  }

  .search-sort-row {
    gap: var(--space-3);
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    min-width: unset;
    width: 100%;
  }

  .sort-dropdown {
    width: 100%;
  }

  .sort-dropdown select {
    width: 100%;
  }

  .filters-row {
    gap: var(--space-3);
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: unset;
    width: 100%;
  }

  .filter-group select {
    width: 100%;
  }

  .filter-group--clear {
    width: 100%;
  }

  .filter-group--clear .btn {
    width: 100%;
  }

  /* Brand bar wraps on mobile */
  .brand-logo-bar {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .brand-logo-item {
    flex: 0 0 auto;
  }

  .product-actions {
    flex-direction: column;
  }

  .product-actions .btn {
    width: 100%;
  }

}

@media (max-width: 480px) {
  .results-info {
    flex-direction: column;
    gap: var(--space-2);
    align-items: flex-start;
  }

  .product-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

}

/* ===================================
   20. PRODUCT DETAIL PAGE STYLES
   =================================== */

/* Loading and Error States */
.loading-state, .error-state {
  text-align: center;
  padding: var(--space-16);
  color: var(--color-text-light);
}

.loading-state .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-4);
}

.error-icon {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--space-4);
}

.error-state h3 {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

/* Product Detail Layout */
.product-detail-content {
  margin-top: var(--space-8);
}

.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-16);
  align-items: start;
}

/* Product Images */
.product-images {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  min-width: 0; /* prevent column from exceeding 50% grid */
  overflow: hidden;
}

.main-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: white;
}

.main-image-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.image-zoom-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.image-zoom-overlay img {
  max-width: 150%;
  max-height: 150%;
  object-fit: contain;
  transform: scale(2);
  cursor: zoom-out;
}

.thumbnail-gallery {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  padding: var(--space-2) 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.thumbnail-gallery::-webkit-scrollbar {
  display: none;
}

.thumbnail {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  flex-shrink: 0;
}

.thumbnail:hover {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.thumbnail.active {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

/* Product Info */
.product-info {
  display: flex;
  flex-direction: column;
}

.product-header {
  padding-bottom: var(--space-4);
}

.product-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-3);
  line-height: var(--line-height-tight);
}

.product-meta {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.product-header .product-meta {
  justify-content: flex-start;
}

.brand-tag, .category-tag {
  display: none;
  padding: var(--space-1) var(--space-3);
  background: var(--color-background-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-light);
}

.brand-tag {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.category-tag {
  background: var(--color-secondary);
  color: white;
  border-color: var(--color-secondary);
}

/* Price Section */
.product-price-section {
  background: var(--color-background-light);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.price-display {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.price {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.original-price {
  font-size: var(--font-size-lg);
  color: var(--color-text-light);
  text-decoration: line-through;
}

.stock-status {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stock-badge {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.stock-badge.in-stock {
  color: var(--color-secondary);
}

.stock-badge.out-of-stock {
  color: var(--color-danger);
}

#stock-quantity {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

/* Product Description */
.product-description {
  margin-bottom: var(--space-6);
}

.product-description h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.product-description p {
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
}

/* Product Actions */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.quantity-selector label {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  background: white;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  transition: all var(--duration-fast) var(--ease-in-out);
}

.qty-btn:hover {
  background: var(--color-background-light);
  border-color: var(--color-primary);
}

.qty-btn:active {
  transform: scale(0.95);
}

#quantity {
  width: 80px;
  height: 40px;
  text-align: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
}

#quantity:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.action-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn-large {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.product-features {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Promotional Gift Box */
.promo-gift-box {
  border: 1.5px solid #ef4444;
  border-radius: var(--border-radius-lg);
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
  padding: var(--space-3) var(--space-4);
  margin-top: var(--space-3);
}

.promo-gift-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: #dc2626;
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.promo-gift-header svg {
  flex-shrink: 0;
  color: #ef4444;
}

.promo-gift-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.promo-gift-list li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: #991b1b;
  padding-left: var(--space-1);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
}

.feature-item svg {
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* Specifications */
.product-specifications {
  margin-bottom: var(--space-16);
}

.product-specifications h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-primary);
}

.specs-content {
  background: var(--color-background-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--color-border);
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-4);
}

.spec-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.spec-label {
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
  flex: 1;
}

.spec-value {
  color: var(--color-text-light);
  text-align: right;
  flex: 1;
}

.specs-text {
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  white-space: pre-line;
}

.no-specs {
  text-align: center;
  color: var(--color-text-light);
  font-style: italic;
  padding: var(--space-8);
}

/* Related Products */
.related-products {
  margin-bottom: var(--space-16);
}

.related-products h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-primary);
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-6);
}

.related-product-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-in-out);
  border: 1px solid var(--color-border);
  cursor: pointer;
}

.related-product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.related-product-image {
  height: 200px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.related-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-2);
  transition: transform var(--duration-normal) var(--ease-in-out);
}

.related-product-card:hover .related-product-image img {
  transform: scale(1.05);
}

.related-product-info {
  padding: var(--space-4);
}

.related-product-name {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  line-height: var(--line-height-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-product-price {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.related-product-meta {
  font-size: var(--font-size-sm);
}

.related-product-meta .stock-status {
  font-weight: var(--font-weight-medium);
}

.related-product-meta .in-stock {
  color: var(--color-secondary);
}

.related-product-meta .out-of-stock {
  color: var(--color-danger);
}

.no-related {
  text-align: center;
  color: var(--color-text-light);
  font-style: italic;
  padding: var(--space-8);
  grid-column: 1 / -1;
}

/* ===================================
   21. RESPONSIVE PRODUCT DETAIL
   =================================== */

@media (max-width: 1024px) {
  .product-detail-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .product-images {
    order: 1;
  }

  .product-info {
    order: 2;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .product-detail-content {
    margin-top: var(--space-4);
  }

  .product-header h1 {
    font-size: var(--font-size-2xl);
  }

  .price {
    font-size: var(--font-size-2xl);
  }

  .product-price-section {
    padding: var(--space-4);
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-buttons .btn {
    width: 100%;
  }

  .quantity-controls {
    margin-left: auto;
  }

  .thumbnail-gallery {
    gap: var(--space-2);
  }

  .thumbnail {
    width: 60px;
    height: 60px;
  }

  .related-products-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
  }

  .related-product-card {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .product-detail-grid {
    gap: var(--space-6);
  }

  .product-header {
    padding-bottom: var(--space-4);
  }

  .product-header h1 {
    font-size: var(--font-size-xl);
  }

  .price-display {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .stock-status {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .quantity-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .quantity-controls {
    margin-left: 0;
  }

  .product-features {
    gap: var(--space-1);
  }

  .feature-item {
    font-size: var(--font-size-xs);
  }

  .specs-content {
    padding: var(--space-4);
  }

  .spec-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-1);
  }

  .spec-value {
    text-align: left;
  }

  .related-products-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================
   MODAL & QUICK VIEW STYLES
   =================================== */

/* Modal Base Styles */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn var(--duration-normal) var(--ease-in-out);
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: fadeIn var(--duration-normal) var(--ease-in-out);
}

.modal-content {
  position: relative;
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  max-height: 90vh;
  overflow: hidden;
  animation: slideUp var(--duration-normal) var(--ease-in-out);
}

.quick-view-scroll {
  overflow-y: auto;
  max-height: 90vh;
  padding: var(--space-8);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(2rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: var(--space-6);
  right: var(--space-6);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: var(--color-background-light);
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease-in-out);
  z-index: 10;
}

.modal-close:hover {
  background: var(--color-border);
  transform: rotate(90deg);
}

/* Quick View Modal */
.quick-view-modal {
  width: 90vw;
  max-width: 1000px;
  padding: 0;
}

.quick-view-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-8);
  align-items: start;
}

.qv-image-section {
  min-width: 0; /* prevent column overflow when many thumbnails */
  overflow: hidden;
}

/* Image Section */
.qv-image-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.qv-main-image-container {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-background-light);
  overflow: hidden;
}

.qv-main-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: opacity 0.2s ease;
}

/* Prev/Next navigation buttons on main image */
.qv-img-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--duration-fast) ease, background var(--duration-fast) ease;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.qv-main-image-container:hover .qv-img-nav {
  opacity: 1;
}

.qv-img-prev { left: var(--space-3); }
.qv-img-next { right: var(--space-3); }

.qv-img-nav:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.qv-img-nav:disabled {
  opacity: 0.3 !important;
  cursor: not-allowed;
}

/* Image counter badge */
.qv-img-counter {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  background: rgba(0,0,0,0.55);
  color: white;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  pointer-events: none;
  display: none;
}

.qv-img-counter.visible {
  display: block;
}

.qv-thumbnails {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding: var(--space-1) 0;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.qv-thumbnails::-webkit-scrollbar {
  display: none;
}

.qv-thumbnail {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-in-out);
  background: var(--color-background-light);
}

.qv-thumbnail:hover,
.qv-thumbnail.active {
  border-color: var(--color-primary);
  transform: scale(1.05);
}

.qv-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Info Section */
.qv-info-section {
  display: flex;
  flex-direction: column;
}

/* Header */
.qv-header {
  border-bottom: 1px solid var(--color-border);
}

.qv-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  padding-right: 3rem;
}

.qv-model {
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}

.qv-meta-tags {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.qv-brand-info {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--color-bg-secondary, #f9fafb);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 2px 8px;
}

.qv-brand-logo {
  height: 22px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
}

.qv-brand-name-tag {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.qv-category-tag {
  display: inline-block;
  background: #fff0f0;
  color: var(--color-primary);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  padding: 2px 10px;
  border-radius: 20px;
  border: 1px solid #fca5a5;
}

.qv-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
}

.qv-rating .stars {
  color: #fbbf24;
  letter-spacing: 2px;
}

.qv-rating .rating-count {
  color: var(--color-text-light);
}

/* Price & Stock */
.qv-price-stock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  padding: var(--space-4);
  background: var(--color-background-light);
  border-radius: var(--radius-lg);
}

.price-section,
.stock-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.price-label,
.stock-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

.stock-value {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
}

/* Specifications */
.qv-specs h4,
.qv-description h4 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--color-background-light);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--color-primary);
}

.spec-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: var(--font-size-base);
  color: var(--color-text);
  font-weight: var(--font-weight-semibold);
}

/* Description */
.qv-description p {
  color: var(--color-text-light);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-sm);
}

/* Actions */
.qv-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-3);
}

.qv-actions .btn {
  padding: var(--space-3) var(--space-4);
  font-weight: var(--font-weight-semibold);
}

/* Responsive Design */
@media (max-width: 768px) {
  .quick-view-modal {
    width: 95vw;
  }

  .quick-view-scroll {
    padding: var(--space-6);
  }

  .quick-view-container {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .qv-main-image {
    height: auto;
  }

  .qv-price-stock {
    grid-template-columns: 1fr;
  }

  .specs-grid {
    grid-template-columns: 1fr;
  }

  .modal-close {
    top: var(--space-4);
    right: var(--space-4);
    width: 2rem;
    height: 2rem;
  }

  .qv-actions {
    flex-direction: column;
  }
}

/* ===================================
   PRODUCT DETAILS TABS
   =================================== */

/* Tabs Container */
.product-details-tabs {
  margin-top: var(--space-12);
  background: var(--color-background);
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Tabs Header */
.tabs-header {
  display: flex;
  gap: var(--space-2);
  background: var(--color-background-light);
  padding: var(--space-4);
  border-bottom: 2px solid var(--color-border);
}

.tab-button {
  padding: var(--space-3) var(--space-6);
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-in-out);
  position: relative;
}

.tab-button:hover {
  background: var(--color-background);
  color: var(--color-text);
}

.tab-button.active {
  background: var(--color-background);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-primary);
}

/* Tabs Content */
.tabs-content {
  padding: var(--space-8);
  min-height: 300px;
}

.tab-panel {
  display: none;
  animation: fadeIn var(--duration-normal) var(--ease-in-out);
}

.tab-panel.active {
  display: block;
}

/* Product Detail Text */
.product-detail-text {
  color: var(--color-text);
  line-height: var(--line-height-relaxed);
  font-size: var(--font-size-base);
}

.product-detail-text h1,
.product-detail-text h2,
.product-detail-text h3 {
  margin-top: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--color-text);
  font-weight: var(--font-weight-bold);
}

.product-detail-text h1 {
  font-size: var(--font-size-3xl);
}

.product-detail-text h2 {
  font-size: var(--font-size-2xl);
}

.product-detail-text h3 {
  font-size: var(--font-size-xl);
}

.product-detail-text p {
  margin-bottom: var(--space-4);
}

.product-detail-text ul,
.product-detail-text ol {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.product-detail-text li {
  margin-bottom: var(--space-2);
}

.product-detail-text img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}

.product-detail-text blockquote {
  border-left: 4px solid var(--color-primary);
  padding-left: var(--space-4);
  margin: var(--space-6) 0;
  font-style: italic;
  color: var(--color-text-light);
}

.product-detail-text table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-6) 0;
}

.product-detail-text table th,
.product-detail-text table td {
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  text-align: left;
}

.product-detail-text table th {
  background: var(--color-background-light);
  font-weight: var(--font-weight-semibold);
}

/* Responsive Design */
@media (max-width: 768px) {
  .tabs-header {
    padding: var(--space-3);
    gap: var(--space-1);
  }

  .tab-button {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
  }

  .tabs-content {
    padding: var(--space-6);
  }
}

/* ===================================
   IMAGE LIGHTBOX
   =================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn var(--duration-fast) var(--ease-in-out);
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}

.lightbox-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-16) var(--space-20);
  box-sizing: border-box;
}

.lightbox-img {
  position: relative;
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
  animation: slideUp var(--duration-fast) var(--ease-in-out);
  user-select: none;
}

/* Close button */
.lightbox-close {
  position: fixed;
  top: var(--space-6);
  right: var(--space-6);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  z-index: 2001;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Prev / Next buttons */
.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-in-out);
  z-index: 2001;
}

.lightbox-prev { left: var(--space-6); }
.lightbox-next { right: var(--space-6); }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.28);
}

.lightbox-prev:disabled,
.lightbox-next:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Counter */
.lightbox-counter {
  position: fixed;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--font-size-sm);
  z-index: 2001;
  letter-spacing: 1px;
}

/* Thumbnail strip */
.lightbox-thumbs {
  position: fixed;
  bottom: var(--space-16);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 2001;
  max-width: 90vw;
  overflow-x: auto;
  padding: var(--space-2);
}

.lightbox-thumb {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-in-out);
  background: rgba(255,255,255,0.08);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-thumb.active {
  border-color: var(--color-primary);
}

/* Clickable image cursor */
#main-image,
#qv-image {
  cursor: zoom-in;
}

@media (max-width: 768px) {
  .lightbox-prev { left: var(--space-3); }
  .lightbox-next { right: var(--space-3); }
  .lightbox-img { max-width: 95vw; max-height: 70vh; }
  .lightbox-thumbs { bottom: var(--space-12); }
}

/* Floating buttons responsive */
@media (max-width: 768px) {
  .floating-buttons {
    bottom: 16px;
    left: 14px;
    gap: 10px;
  }

  .floating-btn {
    width: 44px;
    height: 44px;
  }

  .floating-btn svg {
    width: 22px;
    height: 22px;
  }

  .floating-btn__label {
    display: none;
  }

  .scroll-top-btn {
    bottom: 16px;
    right: 14px;
    width: 40px;
    height: 40px;
  }
}

.page-news {
  min-height: calc(100vh - 280px);
  padding: var(--space-8) 0;
}

.news-page-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

.news-page-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.news-page-header p {
  color: var(--color-text-light);
  font-size: var(--font-size-base);
}

.news-filters {
  margin-bottom: var(--space-12);
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
}

.search-box {
  background-color: var(--color-background-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  gap: var(--space-2);
}

.search-box input {
  flex: 1;
  border: none;
  background: none;
  padding: 0;
  border: 1px solid var(--color-border);
}

.search-box input:focus {
  outline: none;
}

.category-filter {
  background-color: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}

.category-filter select {
  width: 100%;
  border: none;
  background: none;
  padding: 0;
}

.category-filter select:focus {
  outline: none;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-bottom: var(--space-12);
}

.news-card {
  background-color: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.news-image {
  width: 100%;
  height: 200px;
  background-color: var(--color-background);
  overflow: hidden;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-card-content {
  padding: var(--space-4);
}

.news-card-meta {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.news-category {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}

.news-date {
  font-size: var(--font-size-xs);
  color: var(--color-text-light);
}

.news-card h3 {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.news-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.news-card h3 a:hover {
  color: var(--color-primary);
}

.news-excerpt {
  font-size: var(--font-size-sm);
  color: var(--color-text-light);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

#news-empty {
  text-align: center;
  padding: var(--space-12);
  color: var(--color-text-light);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.pagination button,
.pagination a {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-background);
  color: var(--color-text);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--duration-fast) var(--ease-in-out);
}

.pagination button:hover,
.pagination a:hover {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination .active {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

@media (max-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-filters {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
  }

  .news-page-header h1 {
    font-size: var(--font-size-2xl);
  }
}
.page-news-detail {
  min-height: calc(100vh - 280px);
  padding: var(--space-8) 0;
}

.news-detail-header {
  margin-bottom: var(--space-8);
}

.news-detail-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.news-detail-meta {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  color: var(--color-text-light);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
}

.news-detail-meta span {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.news-category-badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  background-color: var(--color-primary);
  color: white;
  border-radius: var(--radius-md);
  font-size: var(--font-size-xs);
}

.news-detail-image {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius-xl);
  object-fit: cover;
  margin-bottom: var(--space-8);
}

.news-detail-content {
  line-height: 1.8;
  color: var(--color-text);
  margin-bottom: var(--space-8);
  font-size: var(--font-size-base);
}

.news-detail-content p {
  margin-bottom: var(--space-4);
}

.news-detail-content h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin: var(--space-8) 0 var(--space-4) 0;
}

.news-detail-content h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  margin: var(--space-6) 0 var(--space-3) 0;
}

.news-detail-content ul {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.news-detail-content li {
  margin-bottom: var(--space-2);
}

.news-detail-content iframe {
  max-width: 100%;
  height: auto;
  min-height: 315px;
  border-radius: var(--radius-md);
  display: block;
  margin: var(--space-4) auto;
}

.news-detail-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  margin: var(--space-4) auto;
}

.media-embed {
  margin: var(--space-6) 0;
}

.media-embed iframe {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-md);
}

.news-divider {
  height: 1px;
  background-color: var(--color-border);
  margin: var(--space-12) 0;
}

.related-news {
  margin-top: var(--space-12);
}

.related-news h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-6);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

.related-card {
  background-color: var(--color-background-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.related-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.related-card-content {
  padding: var(--space-4);
}

.related-card h3 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-2);
}

.related-card a {
  color: var(--color-text);
  text-decoration: none;
}

.related-card a:hover {
  color: var(--color-primary);
}

.back-link {
  display: inline-block;
  margin-bottom: var(--space-8);
}

.back-link a {
  color: var(--color-primary);
  text-decoration: none;
}

.back-link a:hover {
  text-decoration: underline;
}