﻿/* ==================== ROOT VARIABLES ==================== */
:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --accent: #d97706;
  --accent-dark: #b45309;
  --secondary: #1e293b;
  --accent-weak: color-mix(in oklab, var(--accent) 10%, var(--surface));
  --line: color-mix(in oklab, var(--ink) 6%, transparent);
  --success: #059669;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
  --radius: 20px;
  --radius-sm: 12px;
  --step--1: clamp(0.72rem, 0.68rem + 0.18vw, 0.85rem);
  --step-0: clamp(0.88rem, 0.82rem + 0.25vw, 1rem);
  --step-1: clamp(1.05rem, 0.95rem + 0.45vw, 1.4rem);
  --step-2: clamp(1.4rem, 1.15rem + 1vw, 2.1rem);
  --step-3: clamp(1.9rem, 1.4rem + 2vw, 3rem);
  --space: clamp(1rem, 0.75rem + 1vw, 1.5rem);
}

/* ==================== RESET ==================== */
/* Star Rating CSS */
.star-rating {
  display: flex;
  flex-direction: row-reverse; /* برای اینکه اولین ستاره از راست انتخاب شود */
  justify-content: flex-end;
  gap: 0.2rem;
}

.star-rating input {
  display: none;
}

.star-rating label {
  font-size: 2rem;
  color: #d1d5db;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}

.star-rating label:hover {
  transform: scale(1.1);
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: #f59e0b;
}



* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", "Tahoma", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.85;
  font-size: var(--step-0);
}

/* ==================== ANNOUNCEMENT ==================== */
.announcement {
  background: linear-gradient(90deg, var(--secondary), #0f172a);
  color: #fff;
  text-align: center;
  padding: 0.5rem var(--space);
  font-size: var(--step--1);
  font-weight: 600;
}

  .announcement span {
    color: #fbbf24;
  }

/* ==================== HEADER ==================== */
header {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.65rem var(--space);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.logo {
  font-size: var(--step-2);
  font-weight: 900;
  color: var(--secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

  .logo span {
    color: var(--accent);
  }

.search-box {
  flex: 1;
  min-width: 220px;
  position: relative;
}

  .search-box input {
    width: 100%;
    padding: 0.7rem 3.2rem 0.7rem 1.1rem;
    border: 2px solid var(--line);
    border-radius: 50px;
    font-family: inherit;
    font-size: var(--step--1);
    background: rgba(243,244,246,0.8);
    transition: all 0.3s ease;
    outline: none;
  }

    .search-box input:focus {
      border-color: var(--accent);
      background: #fff;
      box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 12%, transparent);
    }

  .search-box button {
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: white;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
  }

    .search-box button:hover {
      background: var(--accent-dark);
      transform: translateY(-50%) scale(1.05);
    }

.header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 1.05rem;
}

  .btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
  }

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--danger);
  color: white;
  font-size: 0.62rem;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--surface);
}

.user-info-header {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: var(--step--1);
  color: var(--secondary);
  margin-left: 0.5rem;
}

  .user-info-header.show {
    display: flex;
  }

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ==================== HERO ==================== */
.hero {
  background: linear-gradient(115deg, #0f172a 0%, #1e293b 50%, #334155 100%);
  color: white;
  padding: 4rem var(--space);
  position: relative;
  overflow: hidden;
}

  .hero::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217,119,6,0.18) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
  }

.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: var(--step-3);
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
  letter-spacing: -1px;
}

  .hero h1 span {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

.hero p {
  font-size: var(--step-1);
  opacity: 0.82;
  margin-bottom: 2rem;
  max-width: 88%;
  font-weight: 400;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #d97706, #b45309);
  color: white;
  padding: 0.85rem 2.2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--step-0);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 8px 24px rgba(217,119,6,0.35);
  position: relative;
  overflow: hidden;
}

  .btn-primary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
  }

  .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(217,119,6,0.45);
  }

    .btn-primary:hover::before {
      opacity: 1;
    }

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.hero-stat strong {
  display: block;
  font-size: var(--step-2);
  background: linear-gradient(135deg, #fbbf24, #d97706);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}

.hero-stat span {
  font-size: var(--step--1);
  opacity: 0.65;
  font-weight: 500;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

  .hero-image svg {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.35));
  }
/* ================================================================ */
/* ADMIN PANEL STYLES (Responsive & Modern)                        */
/* ================================================================ */

.admin-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 0 var(--space);
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

  .admin-header h1 {
    font-size: 1.5rem;
    font-weight: 900;
  }

.admin-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

  .admin-card h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

  .admin-form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
  }

  .admin-form-group input[type="text"],
  .admin-form-group input[type="number"],
  .admin-form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s;
  }

    .admin-form-group input:focus,
    .admin-form-group select:focus {
      border-color: var(--accent);
      outline: none;
    }

  .admin-form-group .helper-text {
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1.4;
  }

.admin-checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem 0;
}

  .admin-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
  }

/* ریسپانسیو برای موبایل و تبلت */
@media (max-width: 768px) {
  .admin-grid-2, .admin-grid-3 {
    grid-template-columns: 1fr;
  }

  .admin-card {
    padding: 1rem;
  }
}
/* ================================================================ */
/* PAGINATION STYLES                                               */
/* ================================================================ */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.8rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-btn:hover:not(.disabled):not(.current) {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.page-btn.current {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg);
}

.page-dots {
  color: var(--muted);
  font-weight: 900;
  padding: 0 0.2rem;
}

@media (max-width: 480px) {
  .page-btn {
    min-width: 38px;
    height: 38px;
    font-size: 0.85rem;
    padding: 0 0.6rem;
  }

  .pagination-container .page-btn:not(.current):not([rel="prev"]):not([rel="next"]) {
    display: none;
  }
}
/* استایل اختصاصی برای زنجیره سورت */
.sort-rule-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: var(--bg);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--line);
}

@media (max-width: 600px) {
  .sort-rule-row {
    flex-wrap: wrap;
  }

    .sort-rule-row select {
      width: 100%;
    }
}
/* ==================== FEATURES STRIP ==================== */
.features-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem var(--space);
  position: relative;
  z-index: 2;
}

.features-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-around;
  gap: 1rem;
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--muted);
}

  .feature-item svg {
    width: 26px;
    height: 26px;
    color: var(--accent);
    flex-shrink: 0;
  }

/* ==================== PROMO BANNER ==================== */
.promo-banner {
  max-width: 1280px;
  margin: 2rem auto;
  padding: 0 var(--space);
}

.promo-inner {
  background: linear-gradient(100deg, #1e293b, #0f172a);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: white;
  position: relative;
  overflow: hidden;
}

  .promo-inner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -5%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(217,119,6,0.2), transparent 70%);
    border-radius: 50%;
  }

.promo-text {
  position: relative;
  z-index: 1;
}

  .promo-text h3 {
    font-size: var(--step-1);
    font-weight: 800;
    margin-bottom: 0.25rem;
  }

    .promo-text h3 span {
      color: #fbbf24;
    }

  .promo-text p {
    font-size: var(--step--1);
    opacity: 0.75;
  }

.promo-btn {
  position: relative;
  z-index: 1;
  background: #fbbf24;
  color: #0f172a;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 50px;
  font-family: inherit;
  font-weight: 800;
  font-size: var(--step--1);
  cursor: pointer;
  transition: all 0.3s;
  flex-shrink: 0;
  text-decoration: none;
}

  .promo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(251,191,36,0.3);
  }

/* ==================== CATEGORIES ==================== */
.categories {
  padding: 2.5rem var(--space) 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.section-title {
  font-size: var(--step-2);
  font-weight: 800;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

  .section-title::after {
    content: "";
    flex: 1;
    height: 1.5px;
    background: linear-gradient(90deg, var(--line), transparent);
    margin-left: 0.5rem;
  }

.category-list {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

  .category-list::-webkit-scrollbar {
    display: none;
  }

.category-chip {
  flex-shrink: 0;
  padding: 0.55rem 1.2rem;
  border-radius: 50px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  font-family: inherit;
  font-size: var(--step--1);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  color: var(--ink);
}

  .category-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
  }

  .category-chip.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(217,119,6,0.3);
  }

/* ==================== PRODUCTS ==================== */
.products-section {
  padding: 1rem var(--space) 3rem;
  max-width: 1280px;
  margin: 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
  gap: 1.5rem;
}

/* ==================== PRODUCT CARD ==================== */
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(24px);
  display: flex;
  flex-direction: column;
  height: 100%;
}

  .product-card.visible {
    opacity: 1;
    transform: translateY(0);
  }

  .product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
  }

.product-image {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

  .product-image svg {
    width: 55%;
    height: 55%;
    opacity: 0.45;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  }

.product-card:hover .product-image svg {
  transform: scale(1.1) rotate(-2deg);
}

.product-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.04) 100%);
  pointer-events: none;
}

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

  .product-badge.discount {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
  }

  .product-badge.new {
    background: linear-gradient(135deg, #059669, #047857);
  }

  .product-badge.bestseller {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
  }

.wishlist-btn {
  /* موقعیت‌دهی قبلی حذف شد تا از کانتینر والد پیروی کند */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

  .wishlist-btn:hover, .wishlist-btn.active {
    background: var(--danger);
    color: white;
    transform: scale(1.1);
  }

.product-info {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-category {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.2rem;
  letter-spacing: 0.3px;
}

.product-name {
  font-size: var(--step-0);
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  margin-bottom: 1rem;
  min-height: 2.6rem;
}

.product-price {
  font-size: var(--step-1);
  font-weight: 900;
  color: var(--success);
}

.product-old-price {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: line-through;
  order: 1;
}

.product-price-row .product-price {
  order: 2;
}

.btn-add-cart {
  width: 100%;
  padding: 0.7rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: var(--step--1);
  position: relative;
  overflow: hidden;
  margin-top: auto;
}

  .btn-add-cart:hover {
    background: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(217,119,6,0.25);
  }

/* ==================== DRAWERS ==================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.45);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s;
  backdrop-filter: blur(5px);
}

  .drawer-overlay.active {
    opacity: 1;
    visibility: visible;
  }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--surface);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

  .drawer.active {
    transform: translateX(0);
  }

.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

  .drawer-header h2 {
    font-size: var(--step-1);
    font-weight: 800;
  }

.btn-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

  .btn-close:hover {
    background: var(--accent-weak);
    border-color: var(--accent);
    color: var(--accent);
    transform: rotate(90deg);
  }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg), var(--surface));
}

/* ==================== CART ==================== */
.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

  .cart-empty svg {
    width: 90px;
    height: 90px;
    margin-bottom: 1rem;
    opacity: 0.2;
  }

.cart-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item-image {
  width: 72px;
  height: 72px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

  .cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.cart-item-price {
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 0.85rem;
  color: var(--ink);
}

  .qty-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-weak);
  }

.cart-item-qty {
  font-weight: 700;
  min-width: 22px;
  text-align: center;
  font-size: 0.85rem;
}

.btn-remove {
  margin-right: auto;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 0;
  transition: color 0.2s;
}

  .btn-remove:hover {
    color: var(--danger);
  }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.875rem;
  font-size: var(--step-1);
  font-weight: 800;
}

.cart-total-label {
  color: var(--muted);
  font-size: var(--step-0);
  font-weight: 600;
}

.btn-checkout {
  width: 100%;
  padding: 0.95rem;
  background: linear-gradient(135deg, var(--success), #047857);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: var(--step-0);
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(5,150,105,0.25);
}

  .btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(5,150,105,0.35);
  }

/* ==================== WISHLIST & ALERTS ==================== */
.wishlist-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.wishlist-item {
  display: flex;
  gap: 0.875rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  animation: fadeIn 0.35s ease;
}

.wishlist-item-image {
  width: 72px;
  height: 72px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

  .wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

.wishlist-item-details {
  flex: 1;
}

.wishlist-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.15rem;
}

.wishlist-item-price {
  color: var(--success);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}

.wishlist-item-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm-primary {
  background: var(--secondary);
  color: white;
}

  .btn-sm-primary:hover {
    background: var(--accent);
  }

.btn-sm-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
}

  .btn-sm-ghost:hover {
    color: var(--danger);
    border-color: var(--danger);
    background: #fef2f2;
  }

/* ==================== AUTH DRAWER & FORMS ==================== */
.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: var(--bg);
  padding: 0.35rem;
  border-radius: 12px;
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-family: inherit;
  font-weight: 700;
  font-size: var(--step--1);
  cursor: pointer;
  color: var(--muted);
  transition: all 0.3s;
}

  .auth-tab.active {
    background: white;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
  }

.auth-form {
  display: none;
}

  .auth-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
  }

.form-group {
  margin-bottom: 1rem;
}

  .form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: var(--ink);
  }

    .form-group label .required {
      color: var(--danger);
    }

  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: var(--step--1);
    background: var(--bg);
    transition: all 0.3s;
    outline: none;
    color: var(--ink);
  }

    .form-group input:focus,
    .form-group textarea:focus {
      border-color: var(--accent);
      background: white;
      box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 8%, transparent);
    }

  .form-group textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.7;
  }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-auth-submit {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: var(--step-0);
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 0.5rem;
  box-shadow: 0 4px 14px rgba(217,119,6,0.3);
}

  .btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(217,119,6,0.4);
  }

.auth-hint {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

  .auth-hint button {
    background: none;
    border: none;
    color: var(--accent);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
  }

    .auth-hint button:hover {
      text-decoration: underline;
    }

/* ==================== MODAL (Alert/Email) ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.55);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(8px);
}

  .modal-overlay.active {
    opacity: 1;
    visibility: visible;
  }

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: var(--shadow-lg);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: none;
  cursor: pointer;
  z-index: 10;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: all 0.3s;
}

  .modal-close:hover {
    background: var(--accent-weak);
    color: var(--accent);
    transform: rotate(90deg);
  }

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  background: var(--ink);
  color: white;
  padding: 0.9rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transform: translateX(-130%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  font-weight: 600;
  font-size: 0.88rem;
}

  .toast.show {
    transform: translateX(0);
  }

  .toast.success {
    background: linear-gradient(135deg, var(--success), #047857);
  }

  .toast.error {
    background: linear-gradient(135deg, var(--danger), #b91c1c);
  }

  .toast.info {
    background: linear-gradient(135deg, var(--info), #1d4ed8);
  }

/* ==================== FOOTER ==================== */
footer {
  background: linear-gradient(180deg, var(--secondary), #0f172a);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem var(--space) 1.25rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.footer-col h4 {
  color: white;
  font-size: var(--step-0);
  margin-bottom: 0.875rem;
  font-weight: 800;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: rgba(255,255,255,0.58);
  text-decoration: none;
  transition: all 0.3s;
  font-size: 0.88rem;
  display: inline-block;
}

  .footer-col a:hover {
    color: #fbbf24;
    transform: translateX(-3px);
  }

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero p {
    max-width: 100%;
  }

  .hero-image {
    order: -1;
  }

  .hero-stats {
    justify-content: center;
    gap: 1.5rem;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .promo-inner {
    text-align: center;
    justify-content: center;
    flex-direction: column;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .drawer {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    gap: 0.6rem;
  }

  .search-box {
    order: 3;
    min-width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  .hero {
    padding: 2.5rem var(--space);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .product-card {
    opacity: 1;
    transform: none;
  }
}
/* ==================== CHECKOUT RESPONSIVE ==================== */
.checkout-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.checkout-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
}
/* ==================== PRODUCT TOP ACTIONS (Heart & Bell) ==================== */
.product-top-actions {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 0.5rem; /* فاصله بین قلب و زنگوله */
  z-index: 10;
}



/* ==================== PRODUCT TOP ACTIONS ==================== */
.product-top-actions {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px; /* فاصله بین دکمه‌ها */
  z-index: 10;
}

.product-top-actions .wishlist-btn,
.product-top-actions .alert-btn {
  /* این استایل‌ها مطمئن می‌شوند دکمه‌ها روی هم نیفتند */
  position: relative;
  top: 0;
  left: 0;
}

/* استایل اختصاصی برای زنگوله */
.product-top-actions .alert-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}

/* حالت‌های فعال */
.product-top-actions .wishlist-btn.active {
  background: var(--danger);
  color: white;
}

.product-top-actions .alert-btn.active {
  background: #fef3c7;
  color: #92400e;
}
















@media (max-width: 900px) {
  .checkout-container {
    grid-template-columns: 1fr;
  }

  .checkout-container > div:last-child {
    position: static !important;
  }
}