:root {
  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-muted: #f1f5f9;
  --primary: #0f3d7a;
  --primary-hover: #0a2b57;
  --primary-soft: #eff6ff;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-soft: #fef2f2;
  --teal: #0d9488;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 40px -12px rgba(15, 61, 122, 0.14);
  --transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  direction: rtl;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
}

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

.container {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, #09254c 0%, #0f3d7a 50%, #0d5c75 100%);
  color: #ffffff;
  font-size: 0.85rem;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-bar-badges {
  display: flex;
  align-items: center;
  gap: 20px;
}

.top-bar-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e2e8f0;
}

.top-bar-badge strong {
  color: #38bdf8;
}

/* Header & Navigation */
.main-header {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: fit-content;
}

.brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), #1d4ed8);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(15, 61, 122, 0.25);
}

.brand-text h1, .brand-text .logo-title {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1.2;
}

.brand-text span {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: block;
}

/* Search Box */
.header-search {
  flex: 1;
  max-width: 560px;
  position: relative;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-muted);
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 4px 14px;
  transition: var(--transition);
}

.search-input-wrap:focus-within {
  background: #fff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(15, 61, 122, 0.08);
}

.search-input-wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 8px;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
}

.search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 38px;
}

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

.live-search-results {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 1200;
  max-height: 380px;
  overflow-y: auto;
  display: none;
}

.live-search-results.active {
  display: block;
}

.live-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.live-search-item:hover {
  background: var(--bg-muted);
}

.live-search-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  min-width: 44px;
}

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

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

.action-btn.cart-btn:hover {
  background: var(--primary-hover);
  color: #fff;
}

.badge-count {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* Main Nav */
.main-nav {
  border-top: 1px solid var(--border);
  background: #fff;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-hotline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.nav-hotline strong {
  color: var(--primary);
  font-size: 1rem;
  direction: ltr;
}

.mobile-menu-toggle {
  display: none;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 1.1rem;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: var(--transition);
  min-height: 46px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 18px rgba(15, 61, 122, 0.22);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.24);
}

.btn-accent:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background: var(--primary-soft);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Hero Section */
.hero-section {
  position: relative;
  background: linear-gradient(115deg, rgba(9, 28, 58, 0.94) 0%, rgba(15, 61, 122, 0.86) 55%, rgba(13, 148, 136, 0.78) 100%),
              url('https://images.unsplash.com/photo-1556911220-bff31c812dba?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  color: #fff;
  padding: 64px 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(56, 189, 248, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #bae6fd;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}

.hero-content h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 16px;
}

.hero-content p {
  font-size: 1.05rem;
  color: #e2e8f0;
  max-width: 580px;
  margin-bottom: 28px;
}

.hero-cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 34px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-stat strong {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  color: #38bdf8;
}

.hero-stat span {
  font-size: 0.84rem;
  color: #cbd5e1;
}

.hero-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.hero-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: var(--transition);
}

.hero-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.18);
}

.hero-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 12px;
}

.hero-card h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-card span {
  font-size: 0.82rem;
  color: #bae6fd;
}

/* Section Headers */
.section {
  padding: 56px 0;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 30px;
}

.section-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 6px;
  height: 28px;
  border-radius: 6px;
  background: var(--primary);
  display: inline-block;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin-top: 4px;
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
}

.category-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.category-thumb {
  width: 100%;
  height: 120px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg-muted);
}

.category-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.category-card:hover .category-thumb img {
  transform: scale(1.07);
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.category-card span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Flash Deal Banner */
.flash-deal-box {
  background: linear-gradient(135deg, #be123c 0%, #ef4444 100%);
  border-radius: var(--radius-lg);
  padding: 28px;
  color: #fff;
  box-shadow: 0 18px 36px rgba(239, 68, 68, 0.22);
}

.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.flash-title-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}

.countdown-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  direction: ltr;
}

.time-box {
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  min-width: 54px;
  text-align: center;
}

.time-box strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.1;
}

.time-box span {
  font-size: 0.7rem;
  opacity: 0.85;
}

/* Product Cards Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  color: var(--text-main);
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.product-img-wrap {
  position: relative;
  height: 220px;
  background: #f8fafc;
  overflow: hidden;
}

.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-img-wrap img {
  transform: scale(1.06);
}

.product-badges {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge-discount {
  background: var(--accent);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-energy {
  background: #16a34a;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
}

.compare-quick-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.compare-quick-btn:hover,
.compare-quick-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.product-brand {
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 2px 9px;
  border-radius: 6px;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 3.1em;
}

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

.product-specs-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.spec-chip {
  font-size: 0.75rem;
  background: var(--bg-muted);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
}

.product-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price-block .old-price {
  display: block;
  font-size: 0.8rem;
  color: var(--text-light);
  text-decoration: line-through;
}

.price-block .final-price {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
}

.price-block .final-price small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.add-cart-icon-btn {
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 42px;
}

.add-cart-icon-btn:hover {
  background: var(--primary);
  color: #fff;
}

/* Trust Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.feature-box h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.feature-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Brands Strip */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

.brand-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.brand-item:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

/* Breadcrumb & Page Banner */
.page-header {
  background: linear-gradient(135deg, #0f3d7a 0%, #1e40af 100%);
  color: #fff;
  padding: 36px 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #bae6fd;
  margin-bottom: 8px;
}

.page-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
}

/* Shop Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 28px;
  align-items: start;
}

.filter-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  position: sticky;
  top: 130px;
}

.filter-group {
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.filter-group:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.filter-group h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.shop-toolbar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.sort-select {
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-muted);
  font-size: 0.9rem;
  color: var(--text-main);
}

/* Product Detail Page */
.pdp-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.pdp-main-img {
  width: 100%;
  height: 410px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

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

.pdp-thumbs {
  display: flex;
  gap: 12px;
}

.pdp-thumb {
  width: 82px;
  height: 82px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--border);
  cursor: pointer;
}

.pdp-thumb.active {
  border-color: var(--primary);
}

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

.color-swatches {
  display: flex;
  gap: 10px;
  margin: 12px 0 20px;
}

.swatch-btn {
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.swatch-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.2);
}

.tabs-container {
  margin-top: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg-muted);
  overflow-x: auto;
}

.tab-btn {
  padding: 16px 26px;
  border: none;
  background: transparent;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

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

.tab-panel {
  padding: 28px;
  display: none;
}

.tab-panel.active {
  display: block;
}

.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table th, .specs-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: right;
  font-size: 0.93rem;
}

.specs-table th {
  width: 32%;
  background: var(--bg-muted);
  color: var(--text-muted);
  font-weight: 600;
}

/* Cart & Checkout */
.cart-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: start;
}

.card-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.cart-item-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.cart-item-row img {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.qty-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-muted);
  font-weight: 800;
  cursor: pointer;
}

.qty-control span {
  padding: 0 14px;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.94rem;
  outline: none;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 61, 122, 0.1);
}

/* Compare Table */
.compare-table-wrap {
  overflow-x: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.compare-table th, .compare-table td {
  padding: 16px;
  border: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.compare-table th {
  background: var(--bg-muted);
  text-align: right;
  width: 220px;
  font-weight: 700;
}

/* Accordion FAQ */
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: right;
  padding: 16px 20px;
  background: #fff;
  border: none;
  font-weight: 700;
  font-size: 0.98rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.faq-answer {
  padding: 0 20px 16px;
  color: var(--text-muted);
  font-size: 0.92rem;
  display: none;
}

.faq-item.open .faq-answer {
  display: block;
}

/* Toast Notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.main-footer {
  background: #0b192c;
  color: #cbd5e1;
  padding: 56px 0 24px;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-col h4 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: #38bdf8;
  padding-right: 4px;
}

.trust-seals {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.seal-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
  font-size: 0.8rem;
  color: #fff;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* ==========================================================================
   Responsive (بازنویسی کامل) — 1280 / 1024 / 900 / 720 / 560 / 400
   ========================================================================== */
/* فرزندان گرید نباید با محتوای طولانی از صفحه بیرون بزنند */
.header-top > *, .hero-grid > *, .shop-layout > *, .pdp-grid > *, .cart-layout > *,
.footer-grid > *, .features-grid > *, .brands-grid > *, .categories-grid > *, .products-grid > *, .form-grid > * { min-width: 0; }
.product-title, .cart-item-row a, .footer-links a { overflow-wrap: anywhere; }
.trust-seals { flex-wrap: wrap; }
.color-swatches { flex-wrap: wrap; }
.swatch-btn { max-width: 100%; }
.seal-box { flex: 1 1 90px; }

@media (max-width: 1200px) {
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .brands-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content h2, .hero-content h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
}

@media (max-width: 1024px) {
  /* سربرگ: جستجو در ردیف دوم تا دکمه‌ها جا شوند */
  .header-top { flex-wrap: wrap; row-gap: 12px; }
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-section { padding: 44px 0; }
  .pdp-grid { grid-template-columns: 1fr; gap: 24px; padding: 20px; }
  .cart-layout { grid-template-columns: 1fr; }
  .compare-table th { width: 150px; }
}

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filter-sidebar { position: static; }
  .section { padding: 40px 0; }
  .flash-deal-box { padding: 20px; }
  .tab-btn { padding: 14px 18px; white-space: nowrap; }
}

@media (max-width: 720px) {
  .container { padding: 0 14px; }
  .top-bar { font-size: .8rem; }
  .top-bar-inner { justify-content: center; text-align: center; }
  .header-top { padding: 10px 0; }
  .brand-icon { width: 40px; height: 40px; font-size: 1.25rem; }
  .brand-text h1, .brand-text .logo-title { font-size: 1.15rem; }
  .brand-text span { display: none; }
  .brand-logo { gap: 8px; }
  .header-top { column-gap: 8px; }
  .header-actions { gap: 5px; margin-inline-start: auto; }
  .action-btn { padding: 0; width: 40px; min-width: 0; min-height: 40px; height: 40px; position: relative; flex: none; }
  .action-btn > span:first-child { white-space: nowrap; }
  .action-btn .badge-count { position: absolute; top: -6px; left: -6px; }
  .mobile-menu-toggle { width: 40px; height: 40px; min-height: 40px; min-width: 0; padding: 0; }
  .mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-inner { flex-wrap: wrap; min-height: 0; }
  .nav-links { display: none; flex-direction: column; align-items: stretch; width: 100%; padding: 8px 0; }
  .nav-links.open { display: flex; }
  .nav-links a { border-bottom: 0; border-right: 3px solid transparent; padding: 10px 12px; }
  .nav-links a.active { border-right-color: var(--primary); background: var(--primary-soft); border-radius: 8px; }
  .nav-hotline { display: none; width: 100%; justify-content: center; padding: 8px 0; border-top: 1px solid var(--border); }
  .nav-links.open + .nav-hotline { display: flex; }
  .main-nav { border-top: 0; }
  .hero-section { padding: 32px 0; }
  .hero-content p { font-size: .95rem; margin-bottom: 20px; }
  .hero-cta-group { flex-wrap: wrap; }
  .hero-cta-group .btn { flex: 1 1 auto; }
  .hero-stats { gap: 10px; }
  .hero-stat strong { font-size: 1.1rem; }
  .hero-stat span { font-size: .75rem; }
  .section { padding: 32px 0; }
  .section-header { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .section-title { font-size: 1.3rem; }
  .page-header { padding: 24px 0; }
  .page-header h1 { font-size: 1.4rem; line-height: 1.5; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .category-card { padding: 10px; }
  .category-card h3 { font-size: .85rem; }
  .features-grid { gap: 12px; }
  .brands-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .brand-item { padding: 14px 8px; font-size: .82rem; }
  .flash-header { flex-direction: column; align-items: flex-start; }
  .flash-title-wrap h2, .flash-title { font-size: 1.15rem !important; }
  .time-box { min-width: 46px; padding: 6px 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .card-box { padding: 18px; }
  .shop-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .shop-toolbar .sort-select { width: 100%; }
  .pdp-grid { padding: 14px; border-radius: var(--radius-md); }
  .specs-table th, .specs-table td { padding: 10px 12px; font-size: .88rem; }
  .specs-table th { width: 40%; }
  .compare-table th, .compare-table td { padding: 10px; font-size: .85rem; }
  .compare-table th { width: 110px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
  .toast-container { left: 12px; right: 12px; bottom: 12px; }
}

@media (max-width: 560px) {
  .products-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .brands-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-showcase { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-card { padding: 10px; }
  .hero-card img { height: 120px; }
  .hero-card h4 { font-size: .8rem; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-card span { font-size: .72rem; }
  .product-img-wrap { height: 200px; }
}

@media (max-width: 400px) {
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .brand-text h1, .brand-text .logo-title { font-size: 1rem; }
  .brand-icon { width: 36px; height: 36px; font-size: 1.1rem; border-radius: 11px; }
  .action-btn, .mobile-menu-toggle { width: 36px; height: 36px; min-height: 36px; }
  .countdown-timer { gap: 5px; }
}

@media (max-width: 360px) {
  .brand-text h1, .brand-text .logo-title { font-size: .9rem; }
  .brand-icon { width: 34px; height: 34px; font-size: 1rem; }
  .brand-logo { gap: 6px; }
  .header-actions { gap: 4px; }
  .action-btn, .mobile-menu-toggle { width: 34px; height: 34px; min-height: 34px; font-size: .95rem; }
}
