/* =========================================================
   SHOP UI — Premium Modern Design System
   Luxury • Clean • Professional • RTL
   ========================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --primary: #1a56db;
  --primary-hover: #1e40af;
  --primary-soft: #eff6ff;
  --primary-muted: #dbeafe;
  --accent: #0d9488;          /* teal accent for luxury touch */
  --accent-soft: #f0fdfa;

  /* Neutrals */
  --text: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --card: #ffffff;
  --overlay: rgba(15, 23, 42, 0.45);

  /* Semantic */
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --info: #0284c7;

  /* Elevation */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 24px 56px rgba(15, 23, 42, 0.12);

  /* Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Motion */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --duration: 0.2s;
  --duration-slow: 0.35s;

  /* Layout */
  --header-h: 72px;
  --container: 1280px;
  --font: 'Vazirmatn', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
}

[data-theme="dark"] {
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-soft: #1e3a5f;
  --primary-muted: #1e40af;
  --accent: #2dd4bf;
  --accent-soft: #134e4a;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --border: #334155;
  --border-strong: #475569;
  --bg: #0b1120;
  --bg-elevated: #111827;
  --card: #1e293b;
  --overlay: rgba(0, 0, 0, 0.6);
  --success-soft: #064e3b;
  --warning-soft: #78350f;
  --danger-soft: #7f1d1d;
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--primary-hover); }
ul, ol { list-style: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}
.main-content {
  flex: 1;
  padding-block: 28px 56px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
}
.section-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-title a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section-title a:hover { gap: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.7rem 1.35rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  border: 1.5px solid transparent;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(26, 86, 219, 0.25);
}
.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.8125rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 0.9rem 1.75rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Alerts & States ---------- */
.alert {
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid transparent;
  animation: slideDown 0.3s var(--ease-out);
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 20%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 20%, transparent); }
.alert-info { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-muted); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }

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

.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  opacity: 0.7;
  line-height: 1;
}
.empty-state p {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  color: var(--text-secondary);
}
.empty-state .btn { margin-top: 0.5rem; }

/* ---------- Header (Premium) ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--card) 92%, transparent);
  box-shadow: var(--shadow-xs);
}
.header-top {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  height: var(--header-h);
  flex-wrap: nowrap;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
  transition: opacity var(--duration);
}
.logo:hover { opacity: 0.85; color: var(--text); }
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

/* Search */
.search-form {
  flex: 1;
  max-width: 540px;
  margin-inline: auto;
  position: relative;
  display: flex;
}
.search-form input {
  width: 100%;
  height: 46px;
  padding: 0 3.2rem 0 1.15rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--duration) var(--ease);
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.search-form button {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  transition: background var(--duration), transform var(--duration);
}
.search-form button:hover {
  background: var(--primary-hover);
  transform: translateY(-50%) scale(1.05);
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.header-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  position: relative;
  transition: all var(--duration) var(--ease);
}
.header-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.header-btn span:first-child { font-size: 1.2rem; line-height: 1; }
.cart-badge {
  position: absolute;
  top: 2px;
  left: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--card);
  animation: popIn 0.3s var(--ease-out);
}
@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.theme-toggle,
.mobile-menu-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all var(--duration);
}
.theme-toggle:hover,
.mobile-menu-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.mobile-menu-btn { display: none; }

/* Navigation */
.main-nav {
  border-top: 1px solid var(--border);
}
.nav-list {
  display: flex;
  gap: 0.15rem;
  padding: 0.5rem 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list > li > a {
  display: block;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--duration) var(--ease);
}
.nav-list > li > a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 200px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all var(--duration) var(--ease);
  z-index: 100;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.85rem;
  transition: all var(--duration);
}
.dropdown a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Hero Banner ---------- */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #1a56db 45%, #0ea5e9 100%);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 3.5rem 2.5rem;
  margin-bottom: 2.75rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.12) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 40%);
  pointer-events: none;
}
.hero-banner h1 {
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #fff;
  position: relative;
}
.hero-banner p {
  opacity: 0.9;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  position: relative;
}
.hero-banner .btn {
  background: #fff;
  color: #1a56db;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  position: relative;
}
.hero-banner .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  color: #1e40af;
}

/* ---------- Category Strip ---------- */
.cat-strip {
  display: flex;
  gap: 0.85rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 2.5rem;
  scrollbar-width: thin;
}
.cat-item {
  flex-shrink: 0;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.9rem;
  min-width: 130px;
  transition: all var(--duration) var(--ease);
  box-shadow: var(--shadow-xs);
}
.cat-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

/* ---------- Product Grid & Cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.35rem;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--duration-slow) var(--ease);
  position: relative;
}
.product-card:hover {
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-card .img-wrap {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg);
  overflow: hidden;
}
.product-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.product-card:hover .img-wrap img {
  transform: scale(1.06);
}
.product-card .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
  z-index: 2;
}
.product-card .out-of-stock {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  z-index: 2;
}
.product-card .info {
  padding: 1.1rem 1.15rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.product-card .name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  min-height: 2.6em;
  transition: color var(--duration);
}
.product-card:hover .name { color: var(--primary); }
.product-card .price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.4rem;
}
.product-card .price {
  font-weight: 800;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.product-card .old-price {
  font-size: 0.8rem;
  color: var(--text-faint);
  text-decoration: line-through;
}
.product-card .actions {
  margin-top: 0.85rem;
  display: flex;
  gap: 0.5rem;
}
.product-card .actions .btn {
  flex: 1;
  opacity: 0.95;
}
.product-card:hover .actions .btn {
  opacity: 1;
}

/* ---------- Shop Layout & Filters ---------- */
.shop-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1.75rem;
  align-items: start;
}
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  position: sticky;
  top: calc(var(--header-h) + 24px);
  box-shadow: var(--shadow-xs);
}
.filters h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.filter-group {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}
.filter-group:last-of-type { border-bottom: none; margin-bottom: 1rem; }
.filter-group label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color var(--duration);
}
.filter-group label:hover { color: var(--primary); }
.filter-group input[type="radio"],
.filter-group input[type="checkbox"] {
  accent-color: var(--primary);
  width: 16px;
  height: 16px;
}
.filter-group input[type="number"] {
  width: 100%;
  height: 40px;
  padding: 0 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-top: 0.4rem;
  transition: border-color var(--duration);
}
.filter-group input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.shop-toolbar select {
  height: 40px;
  padding: 0 2rem 0 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 0.75rem center;
}

/* ---------- Product Detail Page ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  background: var(--card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}
.product-gallery .main-img {
  aspect-ratio: 1;
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 0.85rem;
  border: 1px solid var(--border);
}
.product-gallery .main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.product-gallery .main-img:hover img { transform: scale(1.03); }
.thumb-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 4px;
}
.thumb-list img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.75;
  transition: all var(--duration);
  flex-shrink: 0;
}
.thumb-list img:hover,
.thumb-list img.active {
  border-color: var(--primary);
  opacity: 1;
}

.product-info h1 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}
.product-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
}
.product-meta a { font-weight: 500; }
.product-price {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.product-price .current {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.product-price .old {
  font-size: 1.05rem;
  color: var(--text-faint);
  text-decoration: line-through;
}
.product-price .discount-badge {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.15rem;
  background: var(--bg);
}
.qty-selector button {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.15rem;
  font-weight: 600;
  transition: all var(--duration);
}
.qty-selector button:hover {
  background: var(--primary-soft);
  color: var(--primary);
}
.qty-selector input {
  width: 52px;
  height: 42px;
  text-align: center;
  border: none;
  border-inline: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-selector input::-webkit-outer-spin-button,
.qty-selector input::-webkit-inner-spin-button { -webkit-appearance: none; }

.product-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.product-actions .btn-primary {
  min-width: 180px;
  height: 48px;
  font-size: 0.95rem;
}
.product-actions .wishlist-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  font-size: 1.25rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration);
}
.product-actions .wishlist-btn:hover,
.product-actions .wishlist-btn.active {
  border-color: #f43f5e;
  background: #fff1f2;
  color: #e11d48;
}

/* Tabs */
.product-tabs {
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
}
.tab-nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1.5px solid var(--border);
  margin-bottom: 1.35rem;
  overflow-x: auto;
}
.tab-nav button {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: all var(--duration);
  white-space: nowrap;
}
.tab-nav button:hover { color: var(--text); }
.tab-nav button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}
.tab-content {
  display: none;
  animation: fadeIn 0.3s var(--ease);
  line-height: 1.8;
  color: var(--text-secondary);
}
.tab-content.active { display: block; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Reviews */
.review-item {
  border-bottom: 1px solid var(--border);
  padding: 1.15rem 0;
}
.review-item:last-child { border-bottom: none; }
.review-item .stars { color: #f59e0b; letter-spacing: 1px; }
.review-item .meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ---------- Cart & Checkout ---------- */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}
.cart-table th {
  padding: 0.85rem 1rem;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1.5px solid var(--border);
}
.cart-table td {
  padding: 1.15rem 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.cart-item-img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.cart-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.cart-summary h3 {
  font-size: 1.05rem;
  margin-bottom: 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}
.cart-summary .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.cart-summary .total {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  border-top: 1.5px solid var(--border);
  padding-top: 0.9rem;
  margin-top: 0.9rem;
}

/* Forms */
.form-group { margin-bottom: 1.15rem; }
.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.form-control {
  width: 100%;
  height: 46px;
  padding: 0 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  transition: all var(--duration) var(--ease);
}
textarea.form-control {
  height: auto;
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 100px;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-control::placeholder { color: var(--text-faint); }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-box {
  max-width: 420px;
  margin: 2.5rem auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.25rem;
  box-shadow: var(--shadow-md);
}
.auth-box h1 {
  font-size: 1.4rem;
  text-align: center;
  margin-bottom: 1.75rem;
}

/* Account */
.account-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.account-sidebar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-xs);
  position: sticky;
  top: calc(var(--header-h) + 24px);
}
.account-sidebar a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--duration);
  margin-bottom: 0.2rem;
}
.account-sidebar a:hover,
.account-sidebar a.active {
  background: var(--primary-soft);
  color: var(--primary);
}
.account-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-xs);
  min-height: 320px;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}
.page-link {
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--duration);
}
.page-link:hover,
.page-link.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(26, 86, 219, 0.25);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.75rem;
  margin-top: auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 0.85rem;
}
.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.footer-col p,
.footer-col li {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  line-height: 1.6;
}
.footer-col a {
  color: var(--text-muted);
  transition: color var(--duration);
}
.footer-col a:hover { color: var(--primary); }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-faint);
}
.social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.social-links a {
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  transition: all var(--duration);
}
.social-links a:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Toast ---------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  min-width: 280px;
  max-width: 360px;
  padding: 0.9rem 1.15rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s var(--ease-out);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
  }
  .filter-group { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; gap: 1.75rem; padding: 1.5rem; }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; display: flex; flex-wrap: wrap; gap: 0.25rem; }
  .account-sidebar a { flex: 1; min-width: 120px; justify-content: center; }
  .form-row { grid-template-columns: 1fr; }
  .cart-layout,
  .checkout-layout { grid-template-columns: 1fr !important; }
  .cart-summary { position: static; }
}

@media (max-width: 640px) {
  :root { --header-h: auto; }
  .container { padding-inline: 16px; }
  .header-top {
    flex-wrap: wrap;
    height: auto;
    padding: 0.75rem 0;
    gap: 0.75rem;
  }
  .btn-text { display: none; }
  .mobile-menu-btn { display: flex; }
  .search-form {
    order: 3;
    width: 100%;
    max-width: none;
  }
  .main-nav { display: none; }
  .main-nav.open {
    display: block;
    animation: slideDown 0.25s var(--ease);
  }
  .nav-list { flex-direction: column; padding: 0.5rem 0 1rem; }
  .has-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    display: none;
    padding: 0 0 0 1rem;
  }
  .has-dropdown.open .dropdown { display: block; }
  .hero-banner { padding: 2.25rem 1.35rem; border-radius: var(--radius-lg); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.85rem; }
  .product-card .info { padding: 0.85rem; }
  .product-card .name { font-size: 0.8rem; min-height: 2.4em; }
  .product-card .price { font-size: 0.95rem; }
  .product-card .actions .btn { font-size: 0.75rem; padding: 0.4rem 0.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .cart-table thead { display: none; }
  .cart-table tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    background: var(--card);
  }
  .cart-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    padding: 0.4rem 0;
  }
  .cart-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
  }
}

@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}
