/**
 * Salloq Dawn Theme - Minimal, Clean, Product-Focused
 * Based on Shopify's Dawn theme aesthetic
 */

/* ===== CSS Variables ===== */
:root {
  --color-primary: #121212;
  --color-secondary: #363636;
  --color-accent: #4169e1;
  --color-text: #121212;
  --color-text-muted: #6b7177;
  --color-background: #ffffff;
  --color-background-alt: #f6f6f7;
  --color-border: #e8e8e8;
  --color-success: #4ade80;
  --color-error: #ef4444;
  --color-sale: #ef4444;
  
  --font-heading: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;
  --line-height: 1.6;
  
  --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;
  
  --container-width: 1200px;
  --header-height: 70px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --transition: 200ms ease;
}

/* ===== Base Reset ===== */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-background);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--space-4);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

/* ===== Accessibility ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  padding: var(--space-3) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-8); }
}

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

.section {
  padding: var(--space-12) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-16) 0; }
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-2);
}

@media (min-width: 768px) {
  .section-title { font-size: var(--font-size-3xl); }
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: var(--font-size-base);
}

.section-footer {
  text-align: center;
  margin-top: var(--space-10);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: 500;
  line-height: 1.5;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

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

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

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

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

.btn-white {
  background: #fff;
  color: var(--color-text);
  border-color: #fff;
}

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

.btn-full { width: 100%; }
.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--font-size-xs); }

/* ===== Forms ===== */
.form-group {
  margin-bottom: var(--space-4);
}

.form-group label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-background);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-row {
  display: grid;
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .form-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Announcement Bar ===== */
.announcement-bar {
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-size: var(--font-size-sm);
}

.announcement-bar a { text-decoration: underline; }
.announcement-bar p { margin: 0; }

/* ===== Header ===== */
.header {
  position: relative;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border);
  z-index: 100;
}

.header--sticky {
  position: sticky;
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: var(--space-4);
}

.header-logo img { height: 36px; width: auto; }

.header-logo-text {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.header-nav {
  display: none;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .header-nav { display: flex; }
}

.header-nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--color-text);
  transition: color var(--transition);
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.header-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  color: var(--color-text);
  transition: color var(--transition);
}

.header-action:hover { color: var(--color-accent); }

.header-cart { position: relative; }

.header-cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--color-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  border-radius: 9px;
}

.header-menu-toggle {
  display: flex;
  background: none;
  border: none;
  padding: var(--space-2);
  color: var(--color-text);
}

@media (min-width: 1024px) {
  .header-menu-toggle { display: none; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-background-alt);
}

.hero--small { min-height: 400px; }
.hero--medium { min-height: 500px; }
.hero--large { min-height: 600px; }
.hero--xlarge { min-height: 700px; }
.hero--fullscreen { min-height: 100vh; }

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: #000;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: var(--space-8);
}

.hero-content--left { text-align: left; margin-right: auto; }
.hero-content--center { text-align: center; }
.hero-content--right { text-align: right; margin-left: auto; }

.hero-heading {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.hero-subheading {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  margin-bottom: var(--space-6);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: inherit;
}

/* ===== Product Grid ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
  }
}

/* ===== Product Card ===== */
.product-card { position: relative; }

.product-card-media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--color-background-alt);
  aspect-ratio: 1;
}

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

.product-card-image.hover-image {
  position: absolute;
  inset: 0;
  opacity: 0;
}

.product-card:hover .product-card-image.primary-image { opacity: 0; }
.product-card:hover .product-card-image.hover-image { opacity: 1; }

.product-badges {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-size-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.badge-sale { background: var(--color-sale); color: #fff; }
.badge-new { background: var(--color-accent); color: #fff; }
.badge-sold-out { background: var(--color-text-muted); color: #fff; }

.product-card-quick-add {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  padding: var(--space-3);
  background: var(--color-background);
  border: none;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--transition);
}

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

.product-card-info {
  padding: var(--space-4) 0;
}

.product-card-vendor {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

.product-card-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin: 0 0 var(--space-2);
}

.product-card-title a:hover { color: var(--color-accent); }

.product-card-price { font-size: var(--font-size-sm); }

.price-compare {
  color: var(--color-text-muted);
  text-decoration: line-through;
  margin-right: var(--space-2);
}

.price-sale { color: var(--color-sale); }

/* ===== Collection Grid ===== */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .collection-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }
}

.collection-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 4/5;
}

.collection-card-media {
  position: absolute;
  inset: 0;
}

.collection-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.collection-card:hover .collection-card-media img { transform: scale(1.05); }

.collection-card-info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--space-6);
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
}

.collection-card-title {
  font-size: var(--font-size-xl);
  margin: 0 0 var(--space-1);
}

.collection-card-count {
  font-size: var(--font-size-sm);
  opacity: 0.8;
}

/* ===== Collection Page ===== */
.collection-header {
  padding: var(--space-10) 0;
  text-align: center;
  background: var(--color-background-alt);
}

.collection-header h1 { margin-bottom: var(--space-2); }
.collection-header p { color: var(--color-text-muted); margin: 0; }

.collection-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.collection-count { color: var(--color-text-muted); font-size: var(--font-size-sm); margin: 0; }

.collection-actions { display: flex; gap: var(--space-3); }

.collection-sort {
  padding: var(--space-2) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-background);
  font-size: var(--font-size-sm);
}

.collection-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .collection-layout { grid-template-columns: 250px 1fr; }
}

/* ===== Filters ===== */
.collection-filters {
  display: none;
}

@media (min-width: 1024px) {
  .collection-filters { display: block; }
}

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

.filter-header h3 {
  font-size: var(--font-size-base);
  margin: 0;
}

.filter-clear {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  text-decoration: underline;
  cursor: pointer;
}

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

.filter-group h4 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  cursor: pointer;
}

.filter-option input { margin: 0; accent-color: var(--color-accent); }

.filter-price-inputs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.filter-price-inputs input {
  width: 80px;
  padding: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
}

/* ===== Product Page ===== */
.product-page {
  padding: var(--space-8) 0;
}

.product-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }
}

.product-gallery { display: grid; gap: var(--space-3); }

.product-gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-background-alt);
}

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

.product-gallery-thumbs {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
}

.product-gallery-thumb {
  flex: 0 0 80px;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: none;
}

.product-gallery-thumb.active,
.product-gallery-thumb:hover {
  border-color: var(--color-primary);
}

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

.product-info {
  position: sticky;
  top: calc(var(--header-height) + var(--space-4));
}

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

.product-title {
  font-size: var(--font-size-2xl);
  margin-bottom: var(--space-4);
}

.product-price {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-6);
}

.product-options { margin-bottom: var(--space-6); }

.product-option {
  margin-bottom: var(--space-4);
}

.product-option label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.product-option select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-background);
}

.product-quantity { margin-bottom: var(--space-6); }

.product-quantity label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

.product-add-btn {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--font-size-base);
}

.product-description {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
}

.product-description h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-4);
}

.product-description-content {
  color: var(--color-text-muted);
  line-height: 1.8;
}

/* ===== Quantity Selector ===== */
.quantity-selector {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.quantity-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: none;
  font-size: var(--font-size-lg);
  cursor: pointer;
}

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

.quantity-input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-size: var(--font-size-base);
  -moz-appearance: textfield;
}

.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== Cart Drawer ===== */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--color-background);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.cart-drawer.open { transform: translateX(0); }

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

.cart-drawer-header h2 {
  font-size: var(--font-size-lg);
  margin: 0;
}

.cart-drawer-close {
  background: none;
  border: none;
  padding: var(--space-2);
  color: var(--color-text);
}

.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-4) var(--space-6);
}

.cart-drawer-empty {
  text-align: center;
  padding: var(--space-8) 0;
}

.cart-drawer-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

.cart-shipping-progress {
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
  text-align: center;
}

.progress-bar {
  height: 4px;
  background: var(--color-background-alt);
  border-radius: 2px;
  margin-top: var(--space-2);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--color-success);
  transition: width 0.3s ease;
}

.cart-drawer-totals { margin-bottom: var(--space-4); }

.cart-drawer-subtotal {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.cart-drawer-note {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}

.cart-drawer-footer .btn + .btn { margin-top: var(--space-2); }

/* ===== Cart Item ===== */
.cart-item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item-image {
  width: 80px;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item-details { flex: 1; }

.cart-item-title {
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin: 0 0 var(--space-1);
}

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

.cart-item-price {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-3);
}

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

.cart-item-remove {
  background: none;
  border: none;
  padding: var(--space-2);
  color: var(--color-text-muted);
  cursor: pointer;
}

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

/* ===== Mobile Menu ===== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 320px;
  height: 100%;
  background: var(--color-background);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu-title { font-weight: 600; }

.mobile-menu-close {
  background: none;
  border: none;
  padding: var(--space-2);
}

.mobile-menu-nav {
  flex: 1;
  padding: var(--space-4) var(--space-6);
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  font-size: var(--font-size-base);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu-link:hover,
.mobile-menu-link.active { color: var(--color-accent); }

.mobile-menu-footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--color-border);
}

/* ===== Search Drawer ===== */
.search-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--color-background);
  z-index: 200;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.search-drawer.open { transform: translateY(0); }

.search-drawer-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  max-width: var(--container-width);
  margin: 0 auto;
}

.search-form {
  display: flex;
  flex: 1;
  gap: var(--space-2);
}

.search-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
}

.search-form button {
  background: none;
  border: none;
  padding: var(--space-3);
  color: var(--color-text);
}

.search-drawer-close {
  background: none;
  border: none;
  padding: var(--space-2);
}

/* ===== Overlay ===== */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 150;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== Image with Text ===== */
.image-with-text {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 768px) {
  .image-with-text {
    grid-template-columns: 1fr 1fr;
    gap: 0;
  }

  .image-with-text--reverse .image-with-text-media {
    order: 2;
  }
}

.image-with-text-media {
  overflow: hidden;
}

.image-with-text-media img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.image-with-text-content {
  padding: var(--space-8);
}

@media (min-width: 768px) {
  .image-with-text-content { padding: var(--space-12); }
}

.image-with-text-inner h2 { margin-bottom: var(--space-4); }
.image-with-text-inner p { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ===== Newsletter ===== */
.newsletter {
  background: var(--color-background-alt);
}

.newsletter-content {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-content h2 { margin-bottom: var(--space-2); }
.newsletter-content p { color: var(--color-text-muted); margin-bottom: var(--space-6); }

.newsletter-form {
  display: flex;
  gap: var(--space-2);
}

.newsletter-form input {
  flex: 1;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.newsletter-form--large {
  max-width: 400px;
  margin: 0 auto;
}

/* ===== Testimonials ===== */
.testimonials-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .testimonials-grid { grid-template-columns: repeat(3, 1fr); }
}

.testimonial {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.testimonial-stars {
  color: #fbbf24;
  margin-bottom: var(--space-4);
}

.testimonial-text {
  font-style: italic;
  margin-bottom: var(--space-4);
}

.testimonial-author {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* ===== Footer ===== */
.footer {
  background: var(--color-background-alt);
  padding: var(--space-12) 0 var(--space-6);
  margin-top: var(--space-16);
}

.footer-grid {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand { max-width: 280px; }

.footer-logo { height: 36px; width: auto; margin-bottom: var(--space-4); }

.footer-logo-text {
  font-size: var(--font-size-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.footer-description {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.footer-social {
  display: flex;
  gap: var(--space-3);
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

.footer-menu h4 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.footer-menu nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-menu a {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

.footer-newsletter h4 {
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-2);
}

.footer-newsletter p {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-copyright {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.footer-payments,
.payment-icons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.payment-icons svg { height: 24px; width: auto; }

/* ===== Page Styles ===== */
.page-header {
  padding: var(--space-8) 0;
  text-align: center;
}

.page-header h1 { margin-bottom: 0; }

.page-content { padding-bottom: var(--space-12); }

.page-body {
  line-height: 1.8;
  color: var(--color-text-muted);
}

.page-body h2,
.page-body h3 {
  color: var(--color-text);
  margin-top: var(--space-8);
}

.page-body a { color: var(--color-accent); text-decoration: underline; }

/* ===== Checkout ===== */
.checkout-page { padding: var(--space-8) 0; }

.checkout-header {
  text-align: center;
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-border);
}

.checkout-logo { height: 40px; width: auto; }
.checkout-logo-text { font-size: var(--font-size-xl); font-weight: 700; }

.checkout-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .checkout-layout { grid-template-columns: 1fr 380px; }
}

.checkout-section {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.checkout-section h2 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
}

.shipping-methods { display: grid; gap: var(--space-3); }

.shipping-method {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.shipping-method:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(65, 105, 225, 0.05);
}

.shipping-method-info {
  display: flex;
  justify-content: space-between;
  flex: 1;
}

.payment-card {
  padding: var(--space-4);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.checkout-submit { margin-top: var(--space-6); }

.checkout-sidebar { position: sticky; top: var(--space-4); }

.order-summary {
  padding: var(--space-6);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.order-summary h3 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.order-items { margin-bottom: var(--space-4); }

.order-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) 0;
}

.order-item-image {
  position: relative;
  width: 60px;
}

.order-item-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.order-item-quantity {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: var(--color-text-muted);
  color: #fff;
  font-size: 11px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-item-details { flex: 1; }
.order-item-title { font-size: var(--font-size-sm); margin: 0; }
.order-item-variant { font-size: var(--font-size-xs); color: var(--color-text-muted); }
.order-item-price { font-size: var(--font-size-sm); text-align: right; }

.order-totals {
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.order-line {
  display: flex;
  justify-content: space-between;
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
}

.order-total { font-weight: 600; font-size: var(--font-size-base); }

/* ===== Cart Page ===== */
.cart-layout {
  display: grid;
  gap: var(--space-8);
}

@media (min-width: 1024px) {
  .cart-layout { grid-template-columns: 1fr 380px; }
}

.cart-summary {
  position: sticky;
  top: var(--space-4);
  padding: var(--space-6);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.cart-notes { margin-bottom: var(--space-4); }
.cart-notes label { display: block; font-size: var(--font-size-sm); font-weight: 500; margin-bottom: var(--space-2); }
.cart-notes textarea { width: 100%; padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-sm); min-height: 80px; }

.cart-totals { margin-bottom: var(--space-4); }
.cart-subtotal { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: var(--space-2); }
.cart-shipping-note { font-size: var(--font-size-sm); color: var(--color-text-muted); }

/* ===== Auth Pages ===== */
.auth-page {
  max-width: 400px;
  margin: 0 auto;
  padding: var(--space-8) 0;
}

.auth-page h1 { text-align: center; margin-bottom: var(--space-6); }

.auth-link {
  text-align: center;
  margin-top: var(--space-4);
}

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

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--color-text-muted);
}

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

.auth-switch {
  text-align: center;
  font-size: var(--font-size-sm);
}

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

/* ===== Account Pages ===== */
.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-8);
}

.account-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .account-grid { grid-template-columns: repeat(3, 1fr); }
}

.account-section {
  padding: var(--space-6);
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
}

.account-section h2 {
  font-size: var(--font-size-base);
  margin-bottom: var(--space-4);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-4);
}

.empty-state h2 { margin-bottom: var(--space-2); }
.empty-state p { color: var(--color-text-muted); margin-bottom: var(--space-6); }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

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

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  transition: all var(--transition);
}

.pagination a:hover { border-color: var(--color-primary); }
.pagination-current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ===== Notification ===== */
.notification {
  position: fixed;
  bottom: var(--space-4);
  right: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 300;
}

.notification[hidden] { display: none; }

.notification-close {
  background: none;
  border: none;
  color: #fff;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
}

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

/* ===== Loading ===== */
.loading-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ===== Utilities ===== */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }

/* ===== Print Styles ===== */
@media print {
  .header, .footer, .cart-drawer, .mobile-menu, .overlay { display: none !important; }
  body { color: #000; background: #fff; }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
