/* /assets/store-front.css - Main storefront styles */

/* ========================================
   CSS VARIABLES & THEME SYSTEM
   ======================================== */
:root {
  /* Colors - Theme 1 (Modern Minimalist) */
  --color-primary: #111827;
  --color-primary-hover: #1f2937;
  --color-secondary: #6b7280;
  --color-accent: #3b82f6;
  
  --color-background: #ffffff;
  --color-surface: #f9fafb;
  --color-surface-alt: #f3f4f6;
  
  --color-text: #111827;
  --color-text-light: #6b7280;
  --color-text-muted: #9ca3af;
  
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  
  --color-success: #10b981;
  --color-error: #ef4444;
  --color-warning: #f59e0b;
  
  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
  
  /* Spacing */
  --container-max: 1280px;
  --container-padding: 24px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Header */
  --header-height: 70px;
  --header-bg: var(--color-background);
  --header-border: var(--color-border);
}

/* Theme 2 variables can be added here in future */
[data-theme="theme-2"] {
  --color-primary: #0f172a;
  /* Additional theme overrides */
}


/* ========================================
   RESET & BASE STYLES
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-background);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ========================================
   HEADER SYSTEM
   ======================================== */
.site-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
  position: relative;
  z-index: 100;
  height: var(--header-height);
}

.site-header.sticky {
  position: sticky;
  top: 0;
  box-shadow: var(--shadow-sm);
}

.header-row {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: var(--header-height);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

/* Brand */
.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-text);
  display: flex;
  align-items: center;
  transition: opacity var(--transition-fast);
}

.brand:hover {
  opacity: 0.8;
}

/* Navigation Toggle (Mobile) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--color-text);
  align-items: center;
  justify-content: center;
}

/* Main Navigation */
.site-nav {
  display: flex;
  justify-content: center;
}

.nav-root {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

.nav-item.is-active > .nav-link {
  color: var(--color-primary);
  font-weight: 600;
}

/* Dropdown/Mega Menu */
.nav-item.has-children > .nav-link::after {
  content: '▾';
  margin-left: 6px;
  font-size: 12px;
  transition: transform var(--transition-fast);
}

.nav-item.has-children:hover > .nav-link::after {
  transform: rotate(180deg);
}

.nav-sub {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: 1000;
}

.nav-item.has-children:hover > .nav-sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-sub .nav-item {
  border-bottom: 1px solid var(--color-border-light);
}

.nav-sub .nav-item:last-child {
  border-bottom: none;
}

.nav-sub .nav-link {
  padding: 12px 16px;
  border-radius: 0;
}

.nav-sub .nav-item:first-child .nav-link {
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nav-sub .nav-item:last-child .nav-link {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Header Icons */
.header-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-text);
  transition: all var(--transition-fast);
  position: relative;
}

.icon-btn:hover {
  background: var(--color-surface);
}

/* Cart Badge */
.cart-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--color-error);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

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

/* ========================================
   MOBILE NAVIGATION
   ======================================== */
@media (max-width: 900px) {
  .header-row {
    grid-template-columns: 44px 1fr auto;
    gap: 16px;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .site-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    background: var(--color-background);
    padding: 20px;
    overflow-y: auto;
    transition: left var(--transition-slow);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
  }
  
  .site-nav.open {
    left: 0;
  }
  
  .site-nav::before {
    content: '×';
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-text-light);
    cursor: pointer;
  }
  
  .nav-root {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-top: 60px;
  }
  
  .nav-link {
    padding: 14px 16px;
    border-radius: 0;
    border-bottom: 1px solid var(--color-border-light);
  }
  
  .nav-sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    box-shadow: none;
    background: var(--color-surface);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
  }
  
  .nav-item.mobile-open > .nav-sub {
    max-height: 500px;
  }
  
  .nav-item.has-children > .nav-link::after {
    margin-left: auto;
  }
}

/* ========================================
   DRAWER SYSTEM (Search & Cart)
   ======================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity var(--transition-base);
  z-index: 9998;
}

.drawer-backdrop:not([hidden]) {
  opacity: 1;
}

.drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 90%;
  max-width: 480px;
  height: 100vh;
  background: var(--color-background);
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-slow);
  z-index: 9999;
}

.drawer.ready {
  transition: right var(--transition-slow);
}

.drawer.open {
  right: 0;
}

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

.drawer__head strong {
  font-size: 18px;
  font-weight: 600;
}

.drawer__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 20px;
  color: var(--color-text-light);
  transition: all var(--transition-fast);
}

.drawer__close:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
  color: var(--color-text);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer__foot {
  padding: 20px;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.drawer__subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.drawer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Search Form in Drawer */
.search-form {
  display: flex;
  gap: 12px;
}

.search-input {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 15px;
  transition: border-color var(--transition-fast);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.btn--muted {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn--muted:hover {
  background: var(--color-surface-alt);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.toast {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  padding: 16px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  opacity: 0;
  transform: translateX(100%);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateX(100%);
}

.toast__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
}

.toast.success .toast__icon {
  background: #d1fae5;
  color: var(--color-success);
}

.toast.error .toast__icon {
  background: #fee2e2;
  color: var(--color-error);
}

.toast.warning .toast__icon {
  background: #fef3c7;
  color: var(--color-warning);
}

.toast.info .toast__icon {
  background: #dbeafe;
  color: var(--color-accent);
}

.toast__content {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
  color: var(--color-text);
}

.toast__message {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.4;
}

.toast__close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--color-text-light);
  font-size: 18px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.toast__close:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-border-light);
}

.toast__progress-bar {
  height: 100%;
  background: var(--color-primary);
  transition-property: width;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

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

.hidden {
  display: none !important;
}

/* Quantity Selector */
.qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 4px;
  background: var(--color-surface);
}

.qty button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.qty button:hover {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.qty button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty input {
  width: 50px;
  text-align: center;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

/* ========================================
   PRODUCT TEMPLATES
   ======================================== */
.product-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px;
}

.breadcrumbs {
  font-size: 14px;
  color: var(--color-text-light);
  margin-bottom: 32px;
}

.breadcrumbs a {
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

.breadcrumbs a:hover {
  color: var(--color-text);
}

.product-container .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

@media (max-width: 900px) {
  .product-container .grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Product Images */
.hero {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 16px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity var(--transition-base);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
}

.thumbs button {
  aspect-ratio: 1 / 1;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.thumbs button:hover {
  border-color: var(--color-text);
}

.thumbs button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.2;
}

.subtitle {
  font-size: 18px;
  color: var(--color-text-light);
  margin-bottom: 20px;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.price {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
}

.compare {
  font-size: 20px;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.badge-note {
  font-size: 13px;
  padding: 4px 12px;
  background: var(--color-surface);
  color: var(--color-text-light);
  border-radius: var(--radius-pill);
}

/* Stock Badge */
.stock {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}

.stock.ok {
  background: #d1fae5;
  color: var(--color-success);
}

.stock.low {
  background: #fef3c7;
  color: var(--color-warning);
}

.stock.oos {
  background: #fee2e2;
  color: var(--color-error);
}

/* Product Options */
.field {
  margin-bottom: 24px;
}

.field .label {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.choices button {
  padding: 10px 20px;
  background: white;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.choices button:hover {
  border-color: var(--color-text);
}

.choices button[aria-pressed="true"] {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Buy Section */
.buy {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.buy .btn {
  flex: 1;
  min-width: 160px;
}

.btn-primary {
  background: var(--color-primary);
  color: white;
  border: 2px solid var(--color-primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: var(--color-text);
  border: 2px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface);
  border-color: var(--color-text);
}

.btn-secondary.hidden {
  display: none;
}

/* Accordion */
.accordion {
  margin-top: 32px;
}

.accordion details {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
}

.accordion summary {
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color var(--transition-fast);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

.accordion summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  transition: transform var(--transition-fast);
}

.accordion details[open] summary::after {
  transform: rotate(45deg);
}

.accordion summary:hover {
  color: var(--color-primary);
}

.accordion details > div {
  margin-top: 16px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */
@media (max-width: 768px) {
  :root {
    --header-height: 60px;
    --container-padding: 16px;
  }
  
  .title {
    font-size: 24px;
  }
  
  .price {
    font-size: 24px;
  }
  
  .buy {
    flex-direction: column;
  }
  
  .buy .btn {
    width: 100%;
  }
  
  .drawer {
    max-width: 100%;
    width: 100%;
  }
  
  .toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }
}

/* ========================================
   TOAST NOTIFICATION SYSTEM
   Add this to the end of store-front.css
   ======================================== */

/* Toast Container */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 20px); /* Below header */
  right: 20px;
  z-index: 9900; /* Below drawers (9999) but above content */
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  pointer-events: none;
}

/* Individual Toast */
.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: 12px;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 360px;
  max-width: calc(100vw - 40px);
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

/* Toast Icon */
.toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  font-weight: 600;
}

.toast.success .toast__icon {
  background: linear-gradient(135deg, #34c759 0%, #30d158 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(52, 199, 89, 0.3);
}

.toast.error .toast__icon {
  background: linear-gradient(135deg, #ff3b30 0%, #ff453a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
}

.toast.warning .toast__icon {
  background: linear-gradient(135deg, #ff9500 0%, #ff9f0a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
}

.toast.info .toast__icon {
  background: linear-gradient(135deg, #007aff 0%, #0a84ff 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(0, 122, 255, 0.3);
}

/* Toast Content */
.toast__content {
  flex: 1;
  min-width: 0;
}

.toast__title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
  color: var(--color-text);
  line-height: 1.3;
}

.toast__message {
  font-size: 13px;
  color: var(--color-text-light);
  line-height: 1.4;
  word-wrap: break-word;
}

/* Close Button */
.toast__close {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  color: var(--color-text-light);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 9px;
}

.toast__close:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-text);
}

/* Progress Bar */
.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.toast__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.3));
  width: 100%;
  transition: width linear;
}

.toast.success .toast__progress-bar {
  background: linear-gradient(90deg, #34c759, #30d158);
}

.toast.error .toast__progress-bar {
  background: linear-gradient(90deg, #ff3b30, #ff453a);
}

.toast.warning .toast__progress-bar {
  background: linear-gradient(90deg, #ff9500, #ff9f0a);
}

.toast.info .toast__progress-bar {
  background: linear-gradient(90deg, #007aff, #0a84ff);
}

/* ========================================
   MOBILE (iOS STYLE)
   ======================================== */
@media (max-width: 768px) {
  .toast-container {
    top: calc(var(--header-height) + 10px); /* Below header on mobile too */
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    width: auto;
    max-width: none;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 
      0 8px 24px rgba(0, 0, 0, 0.12),
      0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-150%);
  }
  
  .toast.show {
    transform: translateY(0);
  }
  
  .toast.hide {
    transform: translateY(-150%);
  }
  
  .toast__title {
    font-size: 14px;
  }
  
  .toast__message {
    font-size: 12px;
  }
  
  .toast__icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 
      0 4px 12px rgba(0, 0, 0, 0.3),
      0 1px 3px rgba(0, 0, 0, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  
  .toast__title {
    color: #fff;
  }
  
  .toast__message {
    color: #aaa;
  }
  
  .toast__close {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
  }
  
  .toast__close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast__close {
    transition: none !important;
  }
}

/* ========================================
   CART DRAWER ENHANCEMENTS
   Add this to store-front.css
   ======================================== */

/* Cart Item in Drawer */
.cart-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.cart-item__image {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-surface);
}

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

.cart-item__details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cart-item__title {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.3;
  margin: 0;
}

.cart-item__variant {
  font-size: 13px;
  color: var(--color-text-light);
}

.cart-item__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.cart-item__price {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text);
}

/* Quantity Controls in Cart */
.cart-qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px;
  background: var(--color-surface);
}

.cart-qty button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.cart-qty button:hover:not(:disabled) {
  background: var(--color-surface-alt);
}

.cart-qty button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.cart-qty span {
  min-width: 32px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

/* Remove Button */
.cart-item__remove {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  padding: 4px 8px;
  transition: color var(--transition-fast);
}

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

/* Cart Summary */
.cart-summary {
  margin-bottom: 16px;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.cart-note {
  text-align: center;
  color: var(--color-text-light);
  font-size: 13px;
  margin: 0;
}

/* Cart Actions */
.cart-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cart-actions .btn {
  text-align: center;
  padding: 12px 16px;
}

/* Empty Cart State */
.cart-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.cart-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  opacity: 0.3;
}

.cart-empty p {
  margin: 0 0 20px;
  font-size: 15px;
}

.cart-empty .btn {
  display: inline-block;
}

/* Loading State */
.cart-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-text-muted);
}

.cart-loading::after {
  content: '';
  display: block;
  width: 24px;
  height: 24px;
  margin: 20px auto 0;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
  .cart-item {
    grid-template-columns: 60px 1fr;
    gap: 10px;
    padding: 12px 0;
  }
  
  .cart-item__image {
    width: 60px;
    height: 60px;
  }
  
  .cart-item__title {
    font-size: 13px;
  }
  
  .cart-item__variant {
    font-size: 12px;
  }
  
  .cart-qty {
    gap: 2px;
  }
  
  .cart-qty button {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  
  .cart-qty span {
    min-width: 28px;
    font-size: 13px;
  }
}