/* ==========================================================================
   CARTZONE — Premium Interior Products Ecommerce
   Main Storefront Stylesheet
   ========================================================================== */

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */

:root {
  /* ── Colors ── */
  --color-primary:       #18181b; /* Rich Dark Charcoal */
  --color-primary-light: #27272a;
  --color-primary-dark:  #09090b;
  --color-accent:        #c59b6d; /* Premium Gold */
  --color-accent-hover:  #a87d50;
  --color-accent-light:  #fcfbf9;
  --color-accent-dark:   #8e633a;
  --color-bg:            #ffffff;
  --color-bg-alt:        #fdfbf7;
  --color-sage:          #a87d50;
  --color-sage-light:    #e3c09b;
  --color-text:          #27272a; /* High contrast rich charcoal text */
  --color-text-light:    #52525b; /* High contrast medium grey text */
  --color-text-muted:    #71717a;
  --color-border:        #e8e4df;
  --color-border-dark:   #d4d0cb;
  --color-white:         #ffffff;
  --color-black:         #000000;
  --color-error:         #dc3545;
  --color-error-light:   #f8d7da;
  --color-success:       #28a745;
  --color-success-light: #d4edda;
  --color-warning:       #ffc107;
  --color-warning-light: #fff3cd;
  --color-info:          #17a2b8;
  --color-info-light:    #d1ecf1;

  /* ── Typography ── */
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:    'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  /* Font Sizes */
  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-md:   1.125rem;   /* 18px */
  --text-lg:   1.25rem;    /* 20px */
  --text-xl:   1.5rem;     /* 24px */
  --text-2xl:  1.875rem;   /* 30px */
  --text-3xl:  2.25rem;    /* 36px */
  --text-4xl:  3rem;       /* 48px */
  --text-5xl:  3.75rem;    /* 60px */

  /* Line Heights */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.6;
  --leading-relaxed: 1.75;

  /* ── Spacing ── */
  --space-2xs: 0.25rem;   /* 4px */
  --space-xs:  0.5rem;    /* 8px */
  --space-sm:  0.75rem;   /* 12px */
  --space-md:  1rem;      /* 16px */
  --space-lg:  1.5rem;    /* 24px */
  --space-xl:  2rem;      /* 32px */
  --space-2xl: 3rem;      /* 48px */
  --space-3xl: 4rem;      /* 64px */
  --space-4xl: 6rem;      /* 96px */
  --space-5xl: 8rem;      /* 128px */

  /* ── Shadows ── */
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg:  0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl:  0 20px 50px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-gold: 0 4px 20px rgba(226, 176, 74, 0.3);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);

  /* ── Borders ── */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* ── Transitions ── */
  --transition:      all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Z-Index Scale ── */
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   500;
  --z-modal:     10000;
  --z-toast:     11000;
  --z-tooltip:   12000;

  /* ── Layout ── */
  --container-width: 1280px;
  --header-height: 72px;
  --sidebar-width: 260px;
}


/* ==========================================================================
   2. RESET & BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
  line-height: var(--leading-normal);
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Selection */
::selection {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

::-moz-selection {
  background-color: var(--color-accent);
  color: var(--color-primary);
}

/* Custom Scrollbar (Webkit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-dark);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-bg-alt);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-text-muted);
}

/* Firefox Scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-dark) var(--color-bg-alt);
}

/* Media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

img {
  -webkit-user-drag: none;
}

/* Links */
a {
  color: var(--color-accent-dark);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-accent);
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Tables */
table {
  border-collapse: collapse;
  border-spacing: 0;
  width: 100%;
}

/* Forms baseline */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

fieldset {
  border: none;
}

/* Remove number input arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Visually hidden utility (for screen readers) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}


/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--color-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-4xl);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-3xl);
}

h3 {
  font-size: var(--text-2xl);
}

h4 {
  font-size: var(--text-xl);
}

h5 {
  font-size: var(--text-lg);
}

h6 {
  font-size: var(--text-md);
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
  color: var(--color-text-light);
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 600;
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-sm);
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding-left: var(--space-lg);
  margin: var(--space-lg) 0;
  font-style: italic;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-text-light);
}

/* Decorative section title with gold underline */
.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  position: relative;
  padding-bottom: var(--space-lg);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  border-radius: var(--radius-full);
}

.section-subtitle {
  text-align: center;
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 600px;
  margin: var(--space-md) auto var(--space-2xl);
  line-height: var(--leading-relaxed);
}

.text-gold {
  color: var(--color-accent);
}

.text-sage {
  color: var(--color-sage);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-light {
  color: var(--color-text-light);
}

.text-error {
  color: var(--color-error);
}

.text-success {
  color: var(--color-success);
}


/* ==========================================================================
   4. LAYOUT UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-narrow {
  max-width: 960px;
}

.container-wide {
  max-width: 1440px;
}

/* Section spacing */
.section {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.section-sm {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* Grid */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.grid-6 {
  grid-template-columns: repeat(6, 1fr);
}

/* Flex utilities */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-xs  { gap: var(--space-xs); }
.gap-sm  { gap: var(--space-sm); }
.gap-md  { gap: var(--space-md); }
.gap-lg  { gap: var(--space-lg); }
.gap-xl  { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* Text alignment */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

/* Margin utilities */
.mt-xs  { margin-top: var(--space-xs); }
.mt-sm  { margin-top: var(--space-sm); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.mx-auto { margin-left: auto; margin-right: auto; }

/* Padding utilities */
.p-md  { padding: var(--space-md); }
.p-lg  { padding: var(--space-lg); }
.p-xl  { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

.py-md  { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg  { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl  { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

/* Display */
.hidden  { display: none !important; }
.block   { display: block; }
.inline  { display: inline; }

/* Width */
.w-full { width: 100%; }


/* ==========================================================================
   5. BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

/* Primary — Gold solid with high-contrast white text */
.btn-primary {
  background: var(--color-accent);
  color: var(--color-white) !important;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: var(--color-white) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  box-shadow: none;
}

/* Secondary — Outlined */
.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* Outline Gold */
.btn-outline-gold {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline-gold:hover {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Danger */
.btn-danger {
  background: var(--color-error);
  color: var(--color-white);
  border-color: var(--color-error);
}

.btn-danger:hover {
  background: #c82333;
  border-color: #c82333;
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
  color: var(--color-white);
}

.btn-danger:active {
  transform: translateY(0) scale(0.98);
}

/* Ghost — No border, subtle hover */
.btn-ghost {
  background: transparent;
  color: var(--color-text-light);
  border: none;
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  color: var(--color-primary);
  background: var(--color-bg-alt);
}

/* Sizes */
.btn-sm {
  padding: 0.5rem 1.15rem;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: var(--text-base);
}

.btn-block {
  display: flex;
  width: 100%;
}

/* Disabled */
.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Button icon */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  border: 1px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text-light);
}

.btn-icon:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}


/* ==========================================================================
   6. FORMS
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-lg);
  position: relative;
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--color-error);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: var(--text-base);
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: var(--color-border-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(226, 176, 74, 0.15);
  outline: none;
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.form-error {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-error);
  margin-top: var(--space-2xs);
  animation: slideDown 0.2s ease;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2xs);
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-check-label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  cursor: pointer;
}

/* Input group (input + button) */
.input-group {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.input-group .form-input {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
}

.input-group .btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  white-space: nowrap;
}

/* Password strength bar */
.password-strength {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  margin-top: var(--space-xs);
  overflow: hidden;
}

.password-strength-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: var(--transition);
  width: 0;
}

.password-strength-fill.weak {
  width: 25%;
  background: var(--color-error);
}

.password-strength-fill.fair {
  width: 50%;
  background: var(--color-warning);
}

.password-strength-fill.good {
  width: 75%;
  background: var(--color-info);
}

.password-strength-fill.strong {
  width: 100%;
  background: var(--color-success);
}

.password-strength-text {
  font-size: var(--text-xs);
  margin-top: var(--space-2xs);
  color: var(--color-text-muted);
}


/* ==========================================================================
   7. HEADER / NAVBAR
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(250, 248, 245, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.header.scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

/* On dark hero pages, header starts transparent */
.header.transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.header.transparent.scrolled {
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--container-width);
}

/* Brand / Logo */
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.02em;
}

.nav-brand-name span {
  color: var(--color-accent);
}

.header.transparent .nav-brand-name {
  color: var(--color-white);
}

.header.transparent.scrolled .nav-brand-name {
  color: var(--color-primary);
}

/* Search bar */
.nav-search {
  position: relative;
  flex: 0 1 400px;
  margin: 0 var(--space-xl);
}

.nav-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  background: var(--color-bg-alt);
  border: 1.5px solid transparent;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--color-text);
  transition: var(--transition);
}

.nav-search-input:focus {
  background: var(--color-white);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(226, 176, 74, 0.1);
}

.nav-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  pointer-events: none;
}

/* Live search results dropdown */
.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: var(--z-dropdown);
}

.search-results.active {
  display: block;
  animation: fadeInDown 0.2s ease;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
  color: var(--color-text);
}

.search-result-item:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.search-result-img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-info {
  flex: 1;
  min-width: 0;
}

.search-result-name {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-price {
  font-size: var(--text-xs);
  color: var(--color-accent-dark);
  font-weight: 600;
}

.search-no-results {
  padding: var(--space-xl);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-light);
  text-decoration: none;
  padding: var(--space-xs) 0;
  position: relative;
  transition: var(--transition-fast);
  letter-spacing: 0.01em;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: var(--transition);
  border-radius: var(--radius-full);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.header.transparent .nav-link {
  color: var(--color-text);
}

.header.transparent .nav-link:hover {
  color: var(--color-primary);
}

.header.transparent.scrolled .nav-link {
  color: var(--color-text);
}

.header.transparent.scrolled .nav-link:hover {
  color: var(--color-primary);
}

/* Nav Actions (cart, user) */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-shrink: 0;
}

.nav-action-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--color-text);
  font-size: var(--text-lg);
  transition: var(--transition-fast);
  cursor: pointer;
  background: transparent;
  text-decoration: none;
}

.nav-action-btn:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.header.transparent .nav-action-btn {
  color: var(--color-white);
}

.header.transparent .nav-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header.transparent.scrolled .nav-action-btn {
  color: var(--color-text);
}

.header.transparent.scrolled .nav-action-btn:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

/* Specific Action Links */
.nav-cart, .nav-login, .nav-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.nav-cart:hover, .nav-login:hover, .nav-user-toggle:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.header.transparent .nav-cart, 
.header.transparent .nav-login, 
.header.transparent .nav-user-toggle {
  color: var(--color-white);
}

.header.transparent.scrolled .nav-cart, 
.header.transparent.scrolled .nav-login, 
.header.transparent.scrolled .nav-user-toggle {
  color: var(--color-text);
}

.nav-cart {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(25%, -25%);
}

.nav-user {
  position: relative;
}

.nav-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 150px;
  display: none;
  flex-direction: column;
  padding: var(--space-xs) 0;
  z-index: var(--z-dropdown);
}

.nav-user:hover .nav-user-dropdown {
  display: flex;
}

.nav-user-link {
  padding: var(--space-xs) var(--space-md);
  color: var(--color-text);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: var(--transition-fast);
}

.nav-user-link:hover {
  background: var(--color-bg-alt);
  color: var(--color-accent);
}

.nav-user-link-logout {
  color: var(--color-error);
  border-top: 1px solid var(--color-border);
  margin-top: var(--space-xs);
  padding-top: var(--space-sm);
}

.nav-user-link-logout:hover {
  background: var(--color-error-light);
  color: var(--color-error);
}


/* Cart badge */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-accent);
  color: var(--color-primary);
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.cart-badge:empty {
  display: none;
}

/* User dropdown */
.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-xs) 0;
  display: none;
  z-index: var(--z-dropdown);
}

.user-dropdown.active {
  display: block;
  animation: fadeInDown 0.2s ease;
}

.user-dropdown-header {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-2xs);
}

.user-dropdown-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.user-dropdown-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.user-dropdown a,
.user-dropdown button {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  width: 100%;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  transition: var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.user-dropdown .dropdown-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-2xs) 0;
}

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  z-index: calc(var(--z-overlay) + 10);
}

.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.header.transparent .mobile-menu-toggle span {
  background: var(--color-white);
}

.header.transparent.scrolled .mobile-menu-toggle span {
  background: var(--color-text);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 360px;
  height: 100vh;
  background: var(--color-white);
  box-shadow: var(--shadow-xl);
  z-index: var(--z-overlay);
  padding: calc(var(--header-height) + var(--space-lg)) var(--space-lg) var(--space-lg);
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-overlay) - 1);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
  opacity: 1;
}

.mobile-menu .mobile-nav-link {
  display: block;
  padding: var(--space-sm) 0;
  font-size: var(--text-lg);
  font-family: var(--font-heading);
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: var(--transition-fast);
}

.mobile-menu .mobile-nav-link:hover {
  color: var(--color-accent);
  padding-left: var(--space-xs);
}

.mobile-menu .mobile-nav-actions {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* Body lock when menu open */
body.menu-open {
  overflow: hidden;
}


/* ==========================================================================
   8. HERO SECTION
   ========================================================================== */

.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-primary);
  background-image: url('https://images.unsplash.com/photo-1618221195710-dd6b1456ca45?auto=format&fit=crop&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.85) 0%,
    rgba(26, 26, 46, 0.55) 50%,
    rgba(26, 26, 46, 0.3) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: var(--space-xl) var(--space-lg);
  animation: heroFadeIn 1s ease forwards;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero-title span {
  color: var(--color-accent);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  font-weight: 300;
  max-width: 560px;
  margin: 0 auto var(--space-xl);
  line-height: var(--leading-relaxed);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: var(--transition);
}

.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(226, 176, 74, 0.4);
  color: var(--color-primary);
}

.hero-cta:active {
  transform: translateY(-1px);
}

/* Hero decoration */
.hero-scroll-indicator {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bounceDown 2s infinite;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}


/* ==========================================================================
   9. CATEGORY GRID
   ========================================================================== */

.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.category-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.category-card-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.75) 0%,
    rgba(26, 26, 46, 0.2) 60%,
    transparent 100%
  );
  z-index: 1;
  transition: var(--transition);
}

.category-card:hover .category-card-image {
  transform: scale(1.08);
}

.category-card:hover::before {
  background: linear-gradient(
    to top,
    rgba(26, 26, 46, 0.6) 0%,
    rgba(26, 26, 46, 0.1) 60%,
    transparent 100%
  );
}

.category-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-xl);
  z-index: 2;
  color: var(--color-white);
}

.category-card-name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2xs);
  color: var(--color-white);
}

.category-card-count {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.category-card-arrow {
  position: absolute;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  z-index: 2;
  transition: var(--transition);
  font-size: var(--text-md);
}

.category-card:hover .category-card-arrow {
  background: var(--color-accent);
  color: var(--color-primary);
  transform: translateX(4px);
}


/* ==========================================================================
   10. PRODUCT CARDS
   ========================================================================== */

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.product-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* Product image */
.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg-alt);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-image img {
  transform: scale(1.08);
}

/* Sale badge */
.sale-badge {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-primary);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  z-index: 2;
}

/* New badge */
.new-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 4px 12px;
  background: var(--color-sage);
  color: var(--color-white);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  z-index: 2;
}

/* Quick add overlay */
.quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-sm);
  display: flex;
  justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.35), transparent);
  transform: translateY(100%);
  opacity: 0;
  transition: var(--transition);
  z-index: 2;
}

.product-card:hover .quick-add {
  transform: translateY(0);
  opacity: 1;
}

.quick-add-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--color-white);
  color: var(--color-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.quick-add-btn:hover {
  background: var(--color-accent);
  color: var(--color-primary);
}

/* Wishlist button */
.wishlist-btn {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: var(--text-base);
  color: var(--color-text-muted);
  transition: var(--transition-fast);
  z-index: 2;
  opacity: 0;
}

.product-card:hover .wishlist-btn {
  opacity: 1;
}

.wishlist-btn:hover,
.wishlist-btn.active {
  color: var(--color-error);
  transform: scale(1.1);
}

/* Product info */
.product-info {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-category {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2xs);
}

.product-name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
  line-height: var(--leading-snug);
}

.product-name a {
  color: inherit;
  text-decoration: none;
}

.product-name a:hover {
  color: var(--color-accent-dark);
}

.product-price {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.product-price .current-price {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-primary);
}

.product-price .original-price {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-price .sale-price {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-accent-dark);
}

/* Star rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-bottom: var(--space-xs);
}

.product-rating .stars {
  color: var(--color-accent);
  font-size: var(--text-sm);
  letter-spacing: 1px;
}

.product-rating .rating-count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}


/* ==========================================================================
   11. PRODUCT DETAIL PAGE
   ========================================================================== */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
  padding-top: var(--space-xl);
}

/* Product gallery */
.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.product-main-image {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-bg-alt);
  cursor: crosshair;
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* Zoom effect container */
.product-zoom-lens {
  position: absolute;
  width: 150px;
  height: 150px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-sm);
  background-repeat: no-repeat;
  pointer-events: none;
  opacity: 0;
  z-index: 5;
}

.product-main-image:hover .product-zoom-lens {
  opacity: 1;
}

.product-thumbnails {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.product-thumbnail {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition-fast);
  opacity: 0.6;
}

.product-thumbnail:hover,
.product-thumbnail.active {
  border-color: var(--color-accent);
  opacity: 1;
}

.product-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product meta / info */
.product-meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.product-detail-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
  line-height: var(--leading-tight);
}

.product-detail-category {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.product-detail-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.product-detail-price .current-price {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-primary);
}

.product-detail-price .original-price {
  font-size: var(--text-xl);
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.product-detail-price .sale-price {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--color-accent-dark);
}

.product-detail-price .discount-pct {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-success);
  background: var(--color-success-light);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.product-detail-description {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-lg);
}

/* Quantity control */
.quantity-control {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.quantity-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border: none;
  cursor: pointer;
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  transition: var(--transition-fast);
}

.quantity-btn:hover {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
}

.quantity-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.quantity-input {
  width: 56px;
  height: 44px;
  text-align: center;
  font-size: var(--text-base);
  font-weight: 600;
  border: none;
  border-left: 1.5px solid var(--color-border);
  border-right: 1.5px solid var(--color-border);
  background: var(--color-white);
  color: var(--color-text);
}

/* Add to cart area */
.product-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  margin-top: var(--space-sm);
}

.add-to-cart-btn {
  flex: 1;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: var(--color-primary);
  font-size: var(--text-base);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.add-to-cart-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

.add-to-cart-btn:active {
  transform: translateY(0) scale(0.98);
}

.add-to-cart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Product Tabs */
.product-tabs {
  margin-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.product-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}

.product-tab-btn {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-tab-btn::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: transparent;
  transition: var(--transition);
}

.product-tab-btn:hover {
  color: var(--color-primary);
}

.product-tab-btn.active {
  color: var(--color-primary);
  font-weight: 600;
}

.product-tab-btn.active::after {
  background: var(--color-accent);
}

.product-tab-content {
  display: none;
  padding: var(--space-xl) 0;
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
}

.product-tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.product-tab-content ul {
  list-style: disc;
  padding-left: var(--space-lg);
}

.product-tab-content ul li {
  margin-bottom: var(--space-xs);
}


/* ==========================================================================
   12. SHOPPING CART
   ========================================================================== */

.cart-page {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: start;
}

.cart-page-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

.cart-count {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-lg);
}

/* Cart table */
.cart-table {
  width: 100%;
}

.cart-table thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.cart-table tbody td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.cart-item-product {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-alt);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: var(--text-sm);
}

.cart-item-name a {
  color: inherit;
  text-decoration: none;
}

.cart-item-name a:hover {
  color: var(--color-accent-dark);
}

.cart-item-variant {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.cart-item-price {
  font-weight: 600;
  color: var(--color-text);
}

.cart-item-subtotal {
  font-weight: 700;
  color: var(--color-primary);
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--text-lg);
  padding: var(--space-xs);
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

.cart-item-remove:hover {
  color: var(--color-error);
  background: var(--color-error-light);
}

/* Cart summary sidebar */
.cart-summary {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.cart-summary-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) 0;
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.cart-summary-row.total {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  border-top: 2px solid var(--color-border);
  margin-top: var(--space-md);
  padding-top: var(--space-md);
}

.cart-summary .btn {
  margin-top: var(--space-lg);
}

.cart-coupon {
  margin-top: var(--space-lg);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
}

.cart-coupon-label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}


/* ==========================================================================
   13. CHECKOUT
   ========================================================================== */

.checkout-page {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-2xl);
  align-items: start;
}

.checkout-section {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.checkout-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.checkout-section-title .step-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-primary);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Order summary in checkout */
.checkout-summary {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.checkout-summary-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-item:last-of-type {
  border-bottom: none;
}

.checkout-item-image {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-alt);
  position: relative;
}

.checkout-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.checkout-item-qty {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkout-item-info {
  flex: 1;
  min-width: 0;
}

.checkout-item-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.checkout-item-price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.checkout-totals {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.checkout-totals .summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2xs) 0;
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.checkout-totals .summary-row.total {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-primary);
  border-top: 2px solid var(--color-border);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
}

/* Payment method selection */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.payment-method {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.payment-method:hover {
  border-color: var(--color-accent);
}

.payment-method.selected {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.payment-method input[type="radio"] {
  accent-color: var(--color-accent);
}

.payment-method-label {
  font-size: var(--text-sm);
  font-weight: 500;
}


/* ==========================================================================
   14. AUTH PAGES (Login / Register)
   ========================================================================== */

.auth-page {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--color-bg);
}

.auth-card {
  width: 100%;
  max-width: 450px;
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-2xl);
  animation: fadeInUp 0.4s ease;
}

.auth-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--space-2xs);
}

.auth-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-card .form-input {
  padding: 0.9rem 1rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border);
}

.auth-link {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.auth-link a {
  color: var(--color-accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.auth-link a:hover {
  text-decoration: underline;
  color: var(--color-accent);
}

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
}

.forgot-password {
  font-size: var(--text-sm);
  color: var(--color-accent-dark);
  text-decoration: none;
}

.forgot-password:hover {
  text-decoration: underline;
}


/* ==========================================================================
   15. ACCOUNT / DASHBOARD
   ========================================================================== */

.account-page {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Sidebar */
.account-sidebar {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.account-user {
  text-align: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-md);
}

.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-sm);
}

.account-user-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-primary);
}

.account-user-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.account-nav a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-light);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: 2px;
  transition: var(--transition-fast);
}

.account-nav a:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.account-nav a.active {
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-weight: 600;
}

/* Account content */
.account-content {
  min-width: 0;
}

.account-section-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-lg);
}

/* Order history table */
.order-history {
  width: 100%;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.order-history thead th {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  padding: var(--space-md);
  background: var(--color-bg-alt);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.order-history tbody td {
  padding: var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.order-history tbody tr:last-child td {
  border-bottom: none;
}

.order-history tbody tr:hover {
  background: var(--color-bg);
}
.order-id {
  font-weight: 600;
  color: var(--color-primary);
}

/* --- Customer Account Custom Layout --- */
.account-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-xl);
  align-items: stretch;
}

@media (max-width: 992px) {
  .account-layout {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

.account-profile,
.account-orders {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
}

.account-profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

.account-profile-title,
.account-orders-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-primary-dark);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.order-amount {
  font-weight: 600;
}

/* Order timeline */
.order-timeline {
  position: relative;
  padding-left: var(--space-xl);
}

.order-timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding-bottom: var(--space-lg);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: calc(-1 * var(--space-xl) + 2px);
  top: 2px;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  border: 3px solid var(--color-accent);
  background: var(--color-white);
  z-index: 1;
}

.timeline-item.completed .timeline-dot {
  background: var(--color-accent);
}

.timeline-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xs);
}

.timeline-title {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.timeline-description {
  font-size: var(--text-sm);
  color: var(--color-text-light);
}


/* ==========================================================================
   16. ABOUT PAGE
   ========================================================================== */

.about-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  text-align: center;
}

.about-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.7);
}

.about-hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  max-width: 700px;
  padding: var(--space-xl);
}

.about-hero-title {
  font-family: var(--font-heading);
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
  color: var(--color-white);
}

.about-hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  line-height: var(--leading-relaxed);
}

/* Story section */
.about-story {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
}

.about-story-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.about-story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-story-content {
  max-width: 520px;
}

.about-story-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.about-story-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

/* Values grid */
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.value-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.value-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.value-card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: var(--text-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.value-card-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.value-card-text {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
}


/* ==========================================================================
   17. CONTACT PAGE
   ========================================================================== */

.contact-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}

.contact-form-wrapper {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  padding: var(--space-xl);
}

.contact-form-title {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-md);
}

.contact-form-subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.contact-info-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.contact-info-card:hover {
  border-color: var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.contact-info-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  font-size: var(--text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info-title {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-primary);
  margin-bottom: var(--space-2xs);
}

.contact-info-text {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
}

.contact-map {
  width: 100%;
  height: 280px;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ==========================================================================
   18. FOOTER
   ========================================================================== */

.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.8);
  padding-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: var(--space-2xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Footer about column */
.footer-about .nav-brand-name {
  color: var(--color-white);
  font-size: var(--text-xl);
  margin-bottom: var(--space-md);
  display: inline-block;
}

.footer-about p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  line-height: var(--leading-relaxed);
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: var(--text-sm);
  transition: var(--transition-fast);
  text-decoration: none;
}

.footer-social a:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Footer link columns */
.footer-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  position: relative;
  padding-bottom: var(--space-sm);
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer-links a {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
}

.footer-links a:hover {
  color: var(--color-accent);
  transform: translateX(4px);
}

/* Newsletter */
.footer-newsletter p {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: var(--space-md);
}

.newsletter-form {
  display: flex;
  gap: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--color-white);
  font-size: var(--text-sm);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-form input:focus {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
}

.newsletter-form button {
  padding: 0.75rem 1.25rem;
  background: var(--color-accent);
  color: var(--color-primary);
  border: none;
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.newsletter-form button:hover {
  background: var(--color-accent-hover);
}

/* Footer bottom */
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-lg);
}

.footer-bottom-links a {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--color-accent);
}


/* ==========================================================================
   19. MODALS
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.modal-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--color-bg-alt);
  color: var(--color-text-light);
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-error-light);
  color: var(--color-error);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  padding: var(--space-lg) var(--space-xl);
  border-top: 1px solid var(--color-border);
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


/* ==========================================================================
   20. TOAST NOTIFICATIONS
   ========================================================================== */

.toast-container {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 320px;
  max-width: 450px;
  pointer-events: all;
  animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 4px solid transparent;
  position: relative;
  overflow: hidden;
}

.toast.removing {
  animation: toastSlideOut 0.3s ease forwards;
}

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

.toast-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: var(--text-base);
  padding: var(--space-2xs);
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.toast-close:hover {
  color: var(--color-text);
}

/* Toast progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  animation: toastProgress 3s linear forwards;
}

/* Toast types */
.toast.success {
  border-left-color: var(--color-success);
}

.toast.success .toast-icon {
  background: var(--color-success-light);
  color: var(--color-success);
}

.toast.success .toast-progress {
  background: var(--color-success);
}

.toast.error {
  border-left-color: var(--color-error);
}

.toast.error .toast-icon {
  background: var(--color-error-light);
  color: var(--color-error);
}

.toast.error .toast-progress {
  background: var(--color-error);
}

.toast.warning {
  border-left-color: var(--color-warning);
}

.toast.warning .toast-icon {
  background: var(--color-warning-light);
  color: #856404;
}

.toast.warning .toast-progress {
  background: var(--color-warning);
}

.toast.info {
  border-left-color: var(--color-info);
}

.toast.info .toast-icon {
  background: var(--color-info-light);
  color: var(--color-info);
}

.toast.info .toast-progress {
  background: var(--color-info);
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastSlideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(120%);
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}


/* ==========================================================================
   21. BADGES & TAGS
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  white-space: nowrap;
  line-height: 1.5;
}

.badge-pending {
  background: var(--color-warning-light);
  color: #856404;
}

.badge-processing {
  background: var(--color-info-light);
  color: #0c5460;
}

.badge-shipped {
  background: #e8daef;
  color: #6c3483;
}

.badge-delivered {
  background: var(--color-success-light);
  color: #155724;
}

.badge-cancelled {
  background: var(--color-error-light);
  color: #721c24;
}

.badge-sale {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-primary);
}

.badge-new {
  background: var(--color-sage);
  color: var(--color-white);
}

.badge-category {
  background: var(--color-bg-alt);
  color: var(--color-text-light);
}

/* Tag style — outlined */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: var(--text-xs);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-light);
  transition: var(--transition-fast);
  text-decoration: none;
}

.tag:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  background: var(--color-accent-light);
}


/* ==========================================================================
   22. PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-2xs);
  margin-top: var(--space-2xl);
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-light);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: var(--transition-fast);
  cursor: pointer;
}

.page-link:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  background: var(--color-accent-light);
}

.page-link.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-primary);
  font-weight: 600;
}

.page-link.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.page-ellipsis {
  padding: 0 var(--space-xs);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}


/* ==========================================================================
   23. LOADING STATES
   ========================================================================== */

/* Skeleton shimmer */
.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.5) 50%,
    transparent 100%
  );
  animation: shimmer 1.8s infinite ease-in-out;
}

.skeleton-text {
  height: 14px;
  margin-bottom: var(--space-xs);
  border-radius: var(--radius-sm);
}

.skeleton-text:last-child {
  width: 60%;
}

.skeleton-title {
  height: 22px;
  width: 70%;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-sm);
}

.skeleton-image {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
}

.skeleton-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
}

.skeleton-btn {
  height: 44px;
  width: 140px;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* CSS Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.spinner-lg {
  width: 56px;
  height: 56px;
  border-width: 4px;
}

.spinner-overlay {
  position: fixed;
  inset: 0;
  background: rgba(250, 248, 245, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(2px);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Page loader bar */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: calc(var(--z-toast) + 1);
  overflow: hidden;
}

.page-loader::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark), var(--color-accent));
  animation: pageLoading 1.5s ease-in-out infinite;
}

@keyframes pageLoading {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}


/* ==========================================================================
   24. FLASH / ALERT MESSAGES
   ========================================================================== */

.alert {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 500;
  border: 1px solid transparent;
  animation: slideDown 0.3s ease;
}

.alert-icon {
  flex-shrink: 0;
  font-size: var(--text-lg);
}

.alert-message {
  flex: 1;
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: var(--text-lg);
  opacity: 0.6;
  transition: var(--transition-fast);
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.alert-close:hover {
  opacity: 1;
}

.alert-success {
  background: var(--color-success-light);
  border-color: #c3e6cb;
  color: #155724;
}

.alert-error {
  background: var(--color-error-light);
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background: var(--color-warning-light);
  border-color: #ffeeba;
  color: #856404;
}

.alert-info {
  background: var(--color-info-light);
  border-color: #bee5eb;
  color: #0c5460;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ==========================================================================
   25. SCROLL ANIMATIONS
   ========================================================================== */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Delay variants for stagger effect */
.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }
.animate-delay-5 { transition-delay: 0.5s; }

/* Slide-in variants */
.animate-on-scroll.slide-left {
  transform: translateX(-30px);
}

.animate-on-scroll.slide-left.visible {
  transform: translateX(0);
}

.animate-on-scroll.slide-right {
  transform: translateX(30px);
}

.animate-on-scroll.slide-right.visible {
  transform: translateX(0);
}

.animate-on-scroll.scale-up {
  transform: scale(0.95);
}

.animate-on-scroll.scale-up.visible {
  transform: scale(1);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}


/* ==========================================================================
   26. BREADCRUMBS
   ========================================================================== */

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
}

.breadcrumb-item {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb-item:hover {
  color: var(--color-accent-dark);
}

.breadcrumb-item.active {
  color: var(--color-text);
  font-weight: 500;
  pointer-events: none;
}

.breadcrumb-separator {
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  user-select: none;
}


/* ==========================================================================
   27. EMPTY STATES
   ========================================================================== */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4xl) var(--space-xl);
  text-align: center;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  opacity: 0.3;
}

.empty-state-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 360px;
  margin-bottom: var(--space-xl);
  line-height: var(--leading-relaxed);
}


/* ==========================================================================
   28. MISCELLANEOUS COMPONENTS
   ========================================================================== */

/* Divider */
.divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-xl) 0;
}

/* Tooltip */
.tooltip-wrapper {
  position: relative;
  display: inline-block;
}

.tooltip-wrapper .tooltip-text {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: var(--text-xs);
  border-radius: var(--radius-md);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  z-index: var(--z-tooltip);
}

.tooltip-wrapper .tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--color-primary);
}

.tooltip-wrapper:hover .tooltip-text {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Card generic */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Features row / benefits bar */
.features-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-align: left;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-accent-light);
  color: var(--color-accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.feature-text strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
}

.feature-text span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Testimonial card */
.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--color-accent);
  font-size: var(--text-sm);
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}

.testimonial-text {
  font-size: var(--text-base);
  color: var(--color-text-light);
  line-height: var(--leading-relaxed);
  font-style: italic;
  margin-bottom: var(--space-lg);
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  overflow: hidden;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.testimonial-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-primary);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Price filter range */
.price-range {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-md) 0;
}

.price-range input[type="range"] {
  flex: 1;
  accent-color: var(--color-accent);
  height: 4px;
}

/* Sidebar filters (shop page) */
.shop-sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-xl));
}

.filter-group {
  margin-bottom: var(--space-xl);
}

.filter-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--color-border);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition-fast);
}

.filter-item:hover {
  color: var(--color-primary);
}

.filter-item .count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Shop page layout */
.shop-page {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-2xl);
  align-items: start;
}

/* Sort bar */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.shop-result-count {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.shop-sort label {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  white-space: nowrap;
}

.shop-sort select {
  padding: var(--space-xs) var(--space-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  background: var(--color-white);
  color: var(--color-text);
  cursor: pointer;
  appearance: auto;
}


/* ==========================================================================
   29. KEYFRAME ANIMATIONS (SHARED)
   ========================================================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}


/* ==========================================================================
   30. RESPONSIVE DESIGN
   ========================================================================== */

/* ── Large Desktop ( ≥ 1280px) ── */
/* Default styles are already suited for large screens. */

/* ── Desktop ( < 1280px ) ── */
@media (max-width: 1279px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: var(--space-xl);
  }

  .product-detail {
    gap: var(--space-2xl);
  }

  .checkout-page {
    grid-template-columns: 1fr 380px;
  }
}

/* ── Tablet ( < 1024px ) ── */
@media (max-width: 1023px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .section {
    padding-top: var(--space-3xl);
    padding-bottom: var(--space-3xl);
  }

  /* Grid adjustments */
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Header: hide nav links, show hamburger */
  .nav-links {
    display: none;
  }

  .nav-search {
    flex: 0 1 300px;
    margin: 0 var(--space-md);
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .mobile-menu {
    display: block; /* but positioned off-screen via right: -100% */
  }

  .mobile-menu-overlay {
    display: block; /* but opacity: 0 until .active */
  }

  /* Hero adjustments */
  .hero-title {
    font-size: var(--text-3xl);
  }

  .hero-subtitle {
    font-size: var(--text-base);
  }

  /* Product detail */
  .product-detail {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .product-gallery {
    position: relative;
    top: 0;
  }

  /* Cart + Checkout */
  .cart-page {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: relative;
    top: 0;
  }

  .checkout-page {
    grid-template-columns: 1fr;
  }

  .checkout-summary {
    position: relative;
    top: 0;
    order: -1;
  }

  /* Account page */
  .account-page {
    grid-template-columns: 1fr;
  }

  .account-sidebar {
    position: relative;
    top: 0;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }

  /* About page */
  .about-story {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .about-values {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact page */
  .contact-page {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  /* Features bar */
  .features-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Shop page */
  .shop-page {
    grid-template-columns: 1fr;
  }

  .shop-sidebar {
    position: relative;
    top: 0;
    display: none; /* toggle via JS on mobile */
  }

  .shop-sidebar.active {
    display: block;
  }
}

/* ── Mobile / Small Tablet ( < 768px ) ── */
@media (max-width: 767px) {
  :root {
    --header-height: 60px;
  }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }
  h3 { font-size: var(--text-lg); }

  .section-title {
    font-size: var(--text-xl);
  }

  .section {
    padding-top: var(--space-2xl);
    padding-bottom: var(--space-2xl);
  }

  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-6 {
    grid-template-columns: 1fr;
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }

  .categories-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Nav search — hide on mobile, move into mobile menu */
  .nav-search {
    display: none;
  }

  /* Hero */
  .hero {
    min-height: 70vh;
  }

  .hero-title {
    font-size: var(--text-2xl);
  }

  .hero-subtitle {
    font-size: var(--text-sm);
  }

  .hero-cta {
    padding: 0.8rem 2rem;
    font-size: var(--text-xs);
  }

  .hero-scroll-indicator {
    display: none;
  }

  /* Product card adjustments */
  .product-info {
    padding: var(--space-sm);
  }

  .product-name {
    font-size: var(--text-sm);
  }

  .product-price .current-price,
  .product-price .sale-price {
    font-size: var(--text-base);
  }

  .quick-add {
    transform: translateY(0);
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
  }

  .wishlist-btn {
    opacity: 1;
  }

  /* Cart table — stack on mobile */
  .cart-table thead {
    display: none;
  }

  .cart-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    gap: var(--space-sm);
    align-items: center;
  }

  .cart-table tbody td {
    padding: 0;
    border: none;
  }

  .cart-item-product {
    width: 100%;
  }

  /* Checkout form */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Auth card */
  .auth-card {
    padding: var(--space-xl) var(--space-lg);
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* About values */
  .about-values {
    grid-template-columns: 1fr;
  }

  .about-hero-title {
    font-size: var(--text-2xl);
  }

  /* Features bar */
  .features-bar {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Toast */
  .toast-container {
    left: var(--space-md);
    right: var(--space-md);
    bottom: var(--space-md);
  }

  .toast {
    min-width: auto;
    width: 100%;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
  }

  /* Order history table — card-style */
  .order-history thead {
    display: none;
  }

  .order-history tbody tr {
    display: block;
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
  }

  .order-history tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2xs) 0;
    border: none;
  }

  .order-history tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
  }

  /* Detail page */
  .product-detail-title {
    font-size: var(--text-2xl);
  }

  .product-detail-price .current-price,
  .product-detail-price .sale-price {
    font-size: var(--text-2xl);
  }

  .product-actions {
    flex-direction: column;
  }

  .product-tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .product-tab-btn {
    white-space: nowrap;
    padding: var(--space-sm) var(--space-md);
  }

  .product-thumbnails {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: var(--space-xs);
  }
}

/* ── Small Phone ( < 480px ) ── */
@media (max-width: 479px) {
  .container {
    padding-left: var(--space-sm);
    padding-right: var(--space-sm);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .product-card {
    border-radius: var(--radius-md);
  }

  .product-info {
    padding: var(--space-xs);
  }

  .product-name {
    font-size: var(--text-xs);
  }

  .product-category {
    display: none;
  }

  .btn {
    padding: 0.6rem 1.25rem;
    font-size: var(--text-xs);
  }

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: var(--text-sm);
  }

  .auth-card {
    padding: var(--space-lg) var(--space-md);
    border-radius: var(--radius-lg);
  }

  .modal {
    border-radius: var(--radius-lg);
    margin: var(--space-sm);
  }

  .category-card {
    aspect-ratio: 16 / 9;
  }

  .hero {
    min-height: 60vh;
  }

  .hero-title {
    font-size: var(--text-xl);
  }
}

/* ── High-resolution displays ── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp borders on retina */
  .product-card,
  .card,
  .auth-card,
  .modal,
  .toast {
    -webkit-font-smoothing: antialiased;
  }
}

/* ── Print styles ── */
@media print {
  .header,
  .footer,
  .mobile-menu,
  .mobile-menu-overlay,
  .toast-container,
  .modal-overlay {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  a {
    color: inherit;
    text-decoration: underline;
  }
}

/* ==========================================================================
   28. SIDE CART DRAWER & PREMIUM QUANTITY CONTROLS
   ========================================================================== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px; /* Hide offscreen */
  width: 450px;
  max-width: 100vw;
  height: 100vh;
  background: var(--color-white);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.open {
  right: 0;
}

.cart-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.3); /* Soothing dark overlay */
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg-alt);
}

.cart-drawer-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.cart-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s, transform 0.2s;
}

.cart-drawer-close:hover {
  color: var(--color-primary);
  transform: rotate(90deg);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-drawer-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.cart-drawer-empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cart-drawer-empty-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.cart-drawer-empty-text {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.cart-drawer-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-drawer-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  align-items: center;
}

.cart-drawer-item:last-child {
  border-bottom: none;
}

.cart-drawer-item-image {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-alt);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.cart-drawer-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-drawer-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.cart-drawer-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s;
  line-height: 1.3;
}

.cart-drawer-item-name:hover {
  color: var(--color-accent);
}

.cart-drawer-item-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-accent);
}

.cart-drawer-item-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
}

.cart-drawer-remove {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  text-decoration: underline;
  transition: color 0.2s;
}

.cart-drawer-remove:hover {
  color: var(--color-error);
}

.cart-drawer-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
}

.cart-drawer-summary {
  margin-bottom: 1.5rem;
}

.cart-drawer-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
}

.cart-drawer-row-total {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 0.5rem;
}

.cart-drawer-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.75rem 0;
}

.cart-drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Premium Quantity Controls Overhaul */
.quantity-control {
  display: inline-flex;
  align-items: center;
  background: var(--color-bg-alt) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 8px !important;
  overflow: hidden;
  height: 34px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.quantity-control:focus-within {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(197, 155, 109, 0.15);
}

.quantity-control-btn, .quantity-btn, .qty-minus, .qty-plus {
  background: transparent !important;
  border: none !important;
  color: var(--color-text-light) !important;
  width: 32px !important;
  height: 100% !important;
  cursor: pointer !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s, color 0.2s !important;
  padding: 0 !important;
  margin: 0 !important;
}

.quantity-control-btn:hover, .quantity-btn:hover, .qty-minus:hover, .qty-plus:hover {
  background: var(--color-border) !important;
  color: var(--color-primary) !important;
}

.quantity-control-input, .quantity-input, .cart-qty-input {
  border: none !important;
  background: transparent !important;
  text-align: center !important;
  width: 38px !important;
  height: 100% !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  color: var(--color-primary) !important;
  padding: 0 !important;
  margin: 0 !important;
  -moz-appearance: textfield !important;
}

.quantity-control-input::-webkit-outer-spin-button,
.quantity-control-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

/* Spinner Loader */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   CHECKOUT PAGE — Two-column layout, order summary, confirmation
   ========================================================================== */

/* ── Layout ── */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-2xl);
  align-items: start;
}

/* ── Checkout Form Panel ── */
.checkout-form {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-2xl);
  box-shadow: var(--shadow-md);
}

.checkout-form-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
}

.checkout-form-title + .checkout-form-title,
h2.checkout-form-title:not(:first-child) {
  margin-top: var(--space-2xl);
}

/* ── Form Rows ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-xs);
  letter-spacing: 0.02em;
}

.form-label .required {
  color: var(--color-accent);
  margin-left: 2px;
}

.form-label .optional {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(197, 155, 109, 0.15);
}

.form-control-textarea {
  resize: vertical;
  min-height: 90px;
}

/* ── Payment Method Radio Cards ── */
.radio-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border: 2px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  background: var(--color-bg-alt);
  user-select: none;
}

.radio-label:hover {
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.radio-label input[type="radio"] {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-label:has(input:checked) {
  border-color: var(--color-accent);
  background: var(--color-white);
  box-shadow: 0 0 0 3px rgba(197, 155, 109, 0.12);
}

.radio-label-text {
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text);
}

/* ── Order Summary Sidebar ── */
.order-summary {
  position: sticky;
  top: 100px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
}

.order-summary-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-primary);
  margin-top: 0;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
}

.order-summary-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--space-md);
}

.order-summary-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.order-summary-item:last-child {
  border-bottom: none;
}

.order-summary-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.order-summary-item-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.4;
  word-break: break-word;
}

.order-summary-item-qty {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.order-summary-item-price {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
}

.order-summary-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-md) 0;
}

.order-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--text-sm);
  color: var(--color-text-light);
  margin-bottom: var(--space-xs);
}

.order-summary-row-total {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--space-sm);
}

.order-summary-row-total strong {
  color: var(--color-accent);
  font-size: var(--text-lg);
}

.order-summary-free {
  color: var(--color-success);
  font-weight: 600;
  font-size: var(--text-sm);
}

.order-summary-submit {
  margin-top: var(--space-lg);
  width: 100%;
  padding: 1rem;
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.order-summary-terms {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ── btn helpers ── */
.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: var(--text-md);
}

/* ── Alerts ── */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: 8px;
  margin-bottom: var(--space-xl);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.alert-error {
  background: var(--color-error-light);
  border: 1px solid var(--color-error);
  color: var(--color-error);
}

.alert-list {
  margin: 0;
  padding-left: var(--space-lg);
}

.alert-list li {
  margin-bottom: var(--space-2xs);
}

/* ── Order Confirmation ── */
.order-confirmation {
  max-width: 680px;
  margin: 0 auto;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-xl);
  text-align: center;
}

.order-confirmation-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-success), #20c45a);
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-lg);
  box-shadow: 0 8px 24px rgba(40, 167, 69, 0.3);
  animation: confirmPop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes confirmPop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.order-confirmation-title {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.order-confirmation-text {
  font-size: var(--text-base);
  color: var(--color-text-light);
  margin-bottom: var(--space-xl);
  line-height: 1.75;
}

.order-confirmation-details {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-xl);
  text-align: left;
  margin-bottom: var(--space-xl);
}

.order-confirmation-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--color-text-light);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
}

.order-confirmation-row:last-child {
  border-bottom: none;
}

.order-confirmation-row strong {
  color: var(--color-primary);
  font-weight: 700;
}

.order-confirmation-row-total {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-primary);
  margin-top: var(--space-sm);
  border-bottom: none !important;
}

.order-confirmation-row-total strong {
  color: var(--color-accent);
  font-size: var(--text-lg);
}

.order-confirmation-divider {
  height: 1px;
  background: var(--color-border);
  margin: var(--space-md) 0;
}

.order-confirmation-subtitle {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin: var(--space-lg) 0 var(--space-sm);
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin-bottom: var(--space-md);
}

.order-items-table th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--space-xs) var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.order-items-table td {
  padding: var(--space-sm);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.order-items-table tr:last-child td {
  border-bottom: none;
}

.order-confirmation-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }

  .order-summary {
    position: static;
  }
}

@media (max-width: 600px) {
  .checkout-form {
    padding: var(--space-lg);
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .order-confirmation {
    padding: var(--space-xl) var(--space-md);
  }

  .order-confirmation-actions {
    flex-direction: column;
  }
}
