/*
 * Meat Your Maker - Design System
 * Premium South African Biltong E-Commerce
 * =========================================
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  /* Colors - Warm Artisan Palette */
  --color-primary: #8B5E3C;
  --color-primary-dark: #6D4A2F;
  --color-primary-light: #A67B5B;
  --color-secondary: #E6C9A8;
  --color-secondary-light: #F5E6D3;
  --color-accent: #C17F59;
  --color-accent-hover: #D4916B;

  /* Backgrounds */
  --color-bg: #FFFBF2;
  --color-bg-alt: #FFF6E5;
  --color-card: #FFFFFF;
  --color-card-hover: #FFFAF5;

  /* Text */
  --color-text: #6D4C41;
  --color-text-dark: #4A3225;
  --color-text-light: #8D7B6E;
  --color-text-muted: #A69485;

  /* Status Colors */
  --color-success: #4CAF50;
  --color-error: #E53935;
  --color-warning: #FF9800;

  /* Glass Effect */
  --glass-bg: rgba(255, 251, 242, 0.85);
  --glass-border: rgba(139, 94, 60, 0.1);
  --glass-shadow: 0 8px 32px rgba(74, 50, 37, 0.1);

  /* Typography */
  --font-display: 'Bitter', serif;
  --font-body: 'Montserrat', sans-serif;

  /* Spacing (8pt grid) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-2xl: 3rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(74, 50, 37, 0.06);
  --shadow-md: 0 4px 16px rgba(74, 50, 37, 0.08);
  --shadow-lg: 0 10px 40px rgba(74, 50, 37, 0.12);
  --shadow-cute: 0 8px 0 0 rgba(74, 50, 37, 0.08);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--color-primary);
  color: white;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--color-text-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: 1.25rem;
}

.text-display {
  font-family: var(--font-display);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary);
}

.text-accent {
  color: var(--color-accent);
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-sm {
  max-width: 800px;
}

.container-lg {
  max-width: 1440px;
}

.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Flexbox 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-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

/* ===== COMPONENTS: NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
}

.footer-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  margin-bottom: 1.5rem;
  filter: brightness(0) invert(1);
  /* Make it white to contrast with dark footer */
  transition: transform var(--transition-base);
}

.footer-brand:hover .footer-logo-img {
  transform: scale(1.05);
}

.navbar-logo {
  width: 48px;
  height: 48px;
  background: var(--color-primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.25rem;
  transform: rotate(3deg);
  transition: transform var(--transition-base);
  border: 2px solid var(--color-secondary);
  box-shadow: var(--shadow-cute);
}

.navbar-brand:hover .navbar-logo {
  transform: rotate(6deg);
}

.navbar-logo-img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: var(--radius-md);
  transition: transform var(--transition-base);
}

.navbar-brand:hover .navbar-logo-img {
  transform: scale(1.05);
}

.navbar-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--color-text-dark);
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-link {
  padding: var(--space-2) var(--space-4);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-dark);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.navbar-link:hover {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.navbar-link.active {
  background: var(--color-primary);
  color: white;
}

/* Cart Button */
.cart-btn {
  position: relative;
  padding: var(--space-3);
  background: white;
  border-radius: var(--radius-lg);
  border: 2px solid var(--glass-border);
  transition: all var(--transition-base);
  cursor: pointer;
}

.cart-btn:hover {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  background: var(--color-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--color-bg);
  box-shadow: var(--shadow-sm);
}

/* Mobile Menu */
.navbar-toggle {
  display: none;
  padding: var(--space-2);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-menu.open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: var(--space-4);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
  }
}

/* ===== COMPONENTS: BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: white;
  color: var(--color-text-dark);
  border: 2px solid var(--glass-border);
}

.btn-secondary:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
}

.btn-accent {
  background: var(--color-accent);
  color: white;
}

.btn-accent:hover {
  background: var(--color-accent-hover);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: white;
}

.btn-lg {
  padding: var(--space-5) var(--space-12);
  font-size: 1.125rem;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: 0.875rem;
}

.btn-icon {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
}

/* ===== COMPONENTS: CARDS ===== */
.card {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Product Card */
.product-card {
  background: var(--color-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-base);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-secondary-light);
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card-badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  padding: var(--space-1) var(--space-3);
  background: var(--color-accent);
  color: white;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: var(--radius-full);
}

.product-card-body {
  padding: var(--space-6);
}

.product-card-category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.product-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.product-card-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
}

.product-card-price span {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* ===== COMPONENTS: FORMS ===== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-dark);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: var(--space-4);
  background: white;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  color: var(--color-text-dark);
  transition: all var(--transition-base);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(139, 94, 60, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input.error {
  border-color: var(--color-error);
}

.form-error {
  font-size: 0.75rem;
  color: var(--color-error);
  margin-top: var(--space-1);
}

.form-select {
  width: 100%;
  padding: var(--space-4);
  background: white;
  border: 2px solid var(--glass-border);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  color: var(--color-text-dark);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236D4C41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 18px;
  padding-right: var(--space-12);
}

.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ===== COMPONENTS: TABS ===== */
.tabs {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-1);
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  width: fit-content;
}

.tab {
  padding: var(--space-3) var(--space-6);
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
}

.tab:hover {
  color: var(--color-primary);
}

.tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* ===== COMPONENTS: PROGRESS STEPS ===== */
.steps {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-bottom: var(--space-12);
}

.step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  border: 2px solid var(--glass-border);
  transition: all var(--transition-base);
}

.step.active .step-number {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.step.completed .step-number {
  background: var(--color-success);
  color: white;
  border-color: var(--color-success);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

.step.active .step-label,
.step.completed .step-label {
  color: var(--color-text-dark);
}

.step-connector {
  width: 60px;
  height: 2px;
  background: var(--glass-border);
}

.step.completed+.step-connector,
.step.completed~.step-connector {
  background: var(--color-success);
}

@media (max-width: 640px) {
  .step-label {
    display: none;
  }

  .step-connector {
    width: 30px;
  }
}

/* ===== COMPONENTS: CART ===== */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4);
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-secondary-light);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--space-1);
}

.cart-item-variant {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.cart-item-price {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-primary);
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-2);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  padding: var(--space-1);
}

.quantity-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-text);
  transition: all var(--transition-base);
  cursor: pointer;
}

.quantity-btn:hover {
  background: white;
  color: var(--color-primary);
}

.quantity-value {
  width: 32px;
  text-align: center;
  font-weight: 700;
}

/* ===== COMPONENTS: BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border-radius: var(--radius-full);
}

.badge-primary {
  background: rgba(139, 94, 60, 0.1);
  color: var(--color-primary);
}

.badge-accent {
  background: var(--color-accent);
  color: white;
}

.badge-success {
  background: rgba(76, 175, 80, 0.1);
  color: var(--color-success);
}

.badge-warning {
  background: rgba(255, 152, 0, 0.1);
  color: var(--color-warning);
}

/* ===== COMPONENTS: HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(74, 50, 37, 0.2) 0%,
      rgba(74, 50, 37, 0.5) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: var(--space-4);
  max-width: 900px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--glass-bg);
  padding: var(--space-2) var(--space-6);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-dark);
  margin-bottom: var(--space-6);
  border: 2px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.hero-title {
  font-size: clamp(3rem, 10vw, 7rem);
  color: var(--color-bg);
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
  margin-bottom: var(--space-4);
  line-height: 0.95;
}

.hero-title span {
  color: var(--color-secondary);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--color-bg);
  margin-bottom: var(--space-8);
  text-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
}

/* Wave Divider */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  line-height: 0;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ===== COMPONENTS: FOOTER ===== */
.footer {
  background: var(--color-text-dark);
  color: var(--color-bg);
  padding: var(--space-16) 0 var(--space-8);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  margin-top: calc(var(--space-8) * -1);
  position: relative;
  z-index: 10;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (max-width: 640px) {
  .footer-brand {
    justify-content: center;
  }
}

.footer-logo {
  width: 40px;
  height: 40px;
  background: var(--color-secondary);
  color: var(--color-text-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
}

.footer-desc {
  color: rgba(255, 251, 242, 0.7);
  margin-bottom: var(--space-6);
  line-height: 1.8;
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .footer-social {
    justify-content: center;
  }
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.footer-social a:hover {
  background: var(--color-secondary);
  color: var(--color-text-dark);
}

.footer-heading {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary);
  margin-bottom: var(--space-4);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: var(--space-3);
}

.footer-links a {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 251, 242, 0.7);
  transition: all var(--transition-base);
}

.footer-links a:hover {
  color: var(--color-secondary);
  padding-left: var(--space-2);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a:hover {
  color: var(--color-secondary);
}

/* ===== UTILITIES ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden {
  display: none !important;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.pt-24 {
  padding-top: var(--space-24);
}

.pb-12 {
  padding-bottom: var(--space-12);
}

.w-full {
  width: 100%;
}

.max-w-md {
  max-width: 28rem;
}

.max-w-lg {
  max-width: 32rem;
}

.max-w-xl {
  max-width: 36rem;
}

.rounded-full {
  border-radius: var(--radius-full);
}

.rounded-xl {
  border-radius: var(--radius-xl);
}

.opacity-50 {
  opacity: 0.5;
}

.opacity-70 {
  opacity: 0.7;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-scale-in {
  animation: scaleIn 0.4s ease forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s ease forwards;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ===== PAGE-SPECIFIC: CHECKOUT ===== */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--space-8);
  align-items: start;
}

@media (max-width: 1024px) {
  .checkout-layout {
    grid-template-columns: 1fr;
  }
}

.checkout-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.checkout-summary {
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  position: sticky;
  top: 100px;
  border: 1px solid var(--glass-border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--glass-border);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-total {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

/* Success Animation */
.success-checkmark {
  width: 120px;
  height: 120px;
  margin: 0 auto var(--space-6);
  background: var(--color-success);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-checkmark .material-symbols-outlined {
  font-size: 60px;
}

/* ===== PAGE-SPECIFIC: ACCOUNT ===== */
.auth-card {
  max-width: 450px;
  margin: 0 auto;
  background: white;
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-lg);
}

.auth-tabs {
  display: flex;
  margin-bottom: var(--space-8);
  background: var(--color-bg-alt);
  border-radius: var(--radius-full);
  padding: var(--space-1);
}

.auth-tab {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  text-align: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-text);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
}

.auth-tab.active {
  background: white;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.dashboard-stat {
  background: white;
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--glass-border);
}

.dashboard-stat-value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.dashboard-stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
}

/* ===== COMPONENTS: IMAGE CAROUSEL ===== */
.image-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.4s ease;
}

.image-carousel-slide {
  min-width: 100%;
  height: 100%;
}

.image-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all var(--transition-base);
  z-index: 10;
  color: var(--color-text-dark);
  font-size: 1.25rem;
  font-weight: bold;
}

.image-carousel-btn:hover {
  background: var(--color-primary);
  color: white;
}

.image-carousel:hover .image-carousel-btn {
  opacity: 1;
}

.image-carousel-btn.prev {
  left: var(--space-2);
}

.image-carousel-btn.next {
  right: var(--space-2);
}

.image-carousel-dots {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.image-carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: all var(--transition-base);
}

.image-carousel-dot.active {
  background: white;
  transform: scale(1.2);
  box-shadow: var(--shadow-sm);
}

/* ===== COMPONENTS: MODALS ===== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--color-bg);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform var(--transition-base);
  border: 1px solid var(--glass-border);
}

.modal-backdrop.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--color-bg-alt);
  color: var(--color-error);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  font-size: 0.9rem;
  line-height: 1.7;
}

.modal-body h3 {
  font-size: 1.1rem;
  color: var(--color-primary);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
}

.modal-body ul {
  padding-left: var(--space-4);
  margin-bottom: var(--space-4);
}

.modal-body p {
  margin-bottom: var(--space-4);
}

/* Scrollbar for modal */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border-radius: var(--radius-full);
}

/* ===== PRODUCT CARD QUANTITY ===== */
.product-card .form-group {
  margin-bottom: 0;
}

.product-card .form-input[type="number"] {
  padding: 0.5rem;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.product-card .form-input[type="number"]::-webkit-outer-spin-button,
.product-card .form-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== CHECKOUT ADDRESS SELECTOR ===== */
.address-select-grid {
  display: flex;
  gap: var(--space-4);
  overflow-x: auto;
  padding: var(--space-4) 4px;
  margin-bottom: var(--space-6);
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.address-select-grid::-webkit-scrollbar {
  height: 6px;
}

.address-select-grid::-webkit-scrollbar-track {
  background: var(--color-bg-alt);
}

.address-select-grid::-webkit-scrollbar-thumb {
  background: var(--color-primary-light);
  border-radius: 3px;
}

.address-select-card {
  flex: 0 0 260px;
  scroll-snap-align: start;
  background: white;
  border: 2px solid var(--glass-border);
  padding: var(--space-4);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  border-radius: 4px;
}

.address-select-card:hover {
  border-color: var(--color-primary-light);
  background: var(--color-bg-alt);
}

.address-select-card.selected {
  border-color: var(--color-primary);
  background: var(--color-secondary-light);
  box-shadow: 4px 4px 0 0 var(--color-primary);
}

.address-select-card .address-label {
  top: -8px;
  right: 12px;
  font-size: 0.6rem;
}

.address-select-card.selected::before {
  content: 'check_circle';
  font-family: 'Material Symbols Outlined';
  position: absolute;
  bottom: 12px;
  right: 12px;
  color: var(--color-primary);
  font-size: 20px;
}