/* ==========================================================================
   لوازم خانگی آسمان — Design System (تم مشکی/سفید)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;600;700;800&display=swap');

:root {
  --color-primary: #c8102e;
  --color-primary-dark: #8f0c21;
  --color-primary-light: #f1f1f1;
  --color-primary-lighter: #f8f8f8;
  --color-accent: #c8102e;
  --color-accent-dark: #8f0c21;
  --color-accent-light: #f0f0f0;

  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-text: #0d0d0d;
  --color-text-muted: #5c5c5c;
  --color-text-soft: #949494;
  --color-border: #e4e4e4;
  --color-border-soft: #eeeeee;
  --color-danger: #c73e30;
  --color-danger-light: #fbeae8;
  --color-success: #1f9d55;
  --color-success-light: #e6f7ec;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 999px;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .06);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, .10);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, .16);

  --font-sans: 'Vazirmatn', -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --container-width: 1240px;
  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
}

h1, h2, h3, h4 { line-height: 1.4; margin: 0 0 12px; font-weight: 800; }
p { margin: 0 0 12px; color: var(--color-text-muted); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .15s ease; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
::selection { background: #c8102e; color: #fff; }
:focus-visible { outline: 2px solid #000; outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-full); border: none;
  font-weight: 700; font-size: 15px;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .15s ease, color .15s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: #c8102e; color: #fff; box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: #000; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-accent { background: #c8102e; color: #fff; }
.btn-accent:hover { background: #000; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-border); color: var(--color-text); }
.btn-outline:hover { border-color: #c8102e; background: var(--color-primary-lighter); }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #a5311f; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* ---------------- Forms ---------------- */
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 700; color: var(--color-text-muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--color-border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; background: #fff; color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: #c8102e; box-shadow: 0 0 0 4px var(--color-primary-light);
}
.field input:disabled { background: var(--color-border-soft); color: var(--color-text-soft); }
.field-error { color: var(--color-danger); font-size: 13px; margin-top: 6px; font-weight: 600; }

/* ---------------- Header ---------------- */
.site-header {
  background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border); position: sticky; top: 0; z-index: 50;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 15px 20px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 21px; color: #c8102e; letter-spacing: -.02em; }
.logo img { height: 36px; width: auto; display: block; }
.logo span { color: var(--color-text-soft); }
.main-nav ul { display: flex; gap: 30px; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--color-text-muted); position: relative; padding-bottom: 4px; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; right: 0; left: 0; height: 2px; background: #c8102e; transform: scaleX(0); transition: transform .2s var(--ease); }
.main-nav a:hover { color: #c8102e; }
.main-nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.header-search {
  display: flex; align-items: center; flex: 1; max-width: 360px;
  background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-full);
  padding: 4px 6px 4px 16px; transition: border-color .15s ease;
}
.header-search:focus-within { border-color: #c8102e; background: #fff; }
.header-search input { flex: 1; border: none; background: transparent; padding: 8px 4px; font-family: inherit; font-size: 14px; color: var(--color-text); outline: none; }
.header-search button { background: #c8102e; color: #fff; border: none; width: 34px; height: 34px; border-radius: var(--radius-full); font-size: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.icon-btn {
  position: relative; width: 42px; height: 42px; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border); display: flex; align-items: center; justify-content: center;
  background: #fff; transition: border-color .15s ease, transform .15s ease;
}
.icon-btn:hover { border-color: #c8102e; transform: translateY(-1px); }
.icon-btn .badge {
  position: absolute; top: -4px; left: -4px; background: #c8102e; color: #fff;
  font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #fff;
}

/* ---------------- Footer ---------------- */
.site-footer { background: #0a0a0a; color: #cfcfcf; margin-top: 72px; padding: 52px 0 24px; }
.site-footer h4 { color: #fff; margin-bottom: 18px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.site-footer a { color: #a8a8a8; font-size: 14px; line-height: 2.1; }
.site-footer a:hover { color: #fff; }
.site-footer p { color: #a8a8a8; }
.site-footer .bottom { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 13px; color: #7a7a7a; }

/* ---------------- Hero / Slider ---------------- */
.hero-slider { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); margin: 28px 0; }
.hero-slide { position: relative; display: block; }
.hero-slide img { width: 100%; height: 380px; object-fit: cover; transition: transform .4s var(--ease); }
.hero-slide:hover img { transform: scale(1.02); }

/* ---------------- Section ---------------- */
.section { padding: 44px 0; }
.section-title { font-size: 23px; font-weight: 800; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; }
.section-title a { font-size: 13.5px; color: #c8102e; font-weight: 700; }
.section-title a:hover { text-decoration: underline; }

/* ---------------- Category chips ---------------- */
.category-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.category-chip {
  background: var(--color-surface); border-radius: var(--radius-md); padding: 22px 12px; text-align: center;
  box-shadow: var(--shadow-xs); border: 1px solid var(--color-border-soft);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s ease;
}
.category-chip:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.category-chip img { width: 46px; height: 46px; margin: 0 auto 12px; object-fit: contain; }
.category-chip span { font-size: 13px; font-weight: 700; }

/* ---------------- Product grid/card ---------------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs);
  border: 1px solid var(--color-border-soft); transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.product-card .thumb { aspect-ratio: 1 / 1; background: var(--color-primary-light); overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.06); }
.product-card .body { padding: 15px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.product-card .brand { font-size: 12px; color: var(--color-text-soft); font-weight: 600; }
.product-card .name { font-size: 14px; font-weight: 700; flex: 1; color: var(--color-text); }
.product-card .price { font-weight: 800; color: #c8102e; font-size: 16.5px; }
.product-card .price small { font-weight: 500; font-size: 12px; color: var(--color-text-muted); }

/* ---------------- Cart ---------------- */
.cart-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--color-border-soft); align-items: center; }
.cart-item img { width: 84px; height: 84px; border-radius: var(--radius-sm); object-fit: cover; background: var(--color-primary-light); }
.cart-item .info { flex: 1; }
.qty-control { display: flex; align-items: center; gap: 10px; }
.qty-control button { width: 32px; height: 32px; border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: #fff; transition: border-color .15s ease; }
.qty-control button:hover { border-color: #c8102e; }
.cart-summary { background: var(--color-surface); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-xs); border: 1px solid var(--color-border-soft); }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: var(--color-text-muted); }
.cart-summary .total { font-weight: 800; font-size: 18px; color: var(--color-text); border-top: 1px solid var(--color-border); padding-top: 14px; margin-top: 12px; }

.layout-2col { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; align-items: start; }

/* ---------------- Dashboard shells ---------------- */
.dash-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.dash-sidebar { background: #0a0a0a; color: #d5d5d5; padding: 26px 18px; }
.dash-sidebar .brand { color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 34px; display: block; }
.dash-sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; color: #a3a3a3; margin-bottom: 4px; border-right: 3px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.dash-sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.dash-sidebar nav a.active { background: rgba(255,255,255,.10); color: #fff; border-color: #fff; }
.dash-main { padding: 30px 34px; }
.dash-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.dash-topbar h1 { font-size: 22px; margin: 0; }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.stat-card { background: var(--color-surface); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-xs); border: 1px solid var(--color-border-soft); }
.stat-card .label { font-size: 13px; color: var(--color-text-muted); margin-bottom: 10px; font-weight: 600; }
.stat-card .value { font-size: 26px; font-weight: 800; color: #c8102e; }

.data-table { width: 100%; border-collapse: collapse; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-xs); border: 1px solid var(--color-border-soft); }
.data-table th, .data-table td { padding: 15px 16px; text-align: right; font-size: 14px; border-bottom: 1px solid var(--color-border-soft); }
.data-table th { background: #fafafa; color: var(--color-text-muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .03em; }
.data-table tbody tr { transition: background .12s ease; }
.data-table tbody tr:hover { background: var(--color-primary-lighter); }
.data-table tbody tr:last-child td { border-bottom: none; }

.status-pill { padding: 5px 13px; border-radius: var(--radius-full); font-size: 11.5px; font-weight: 700; display: inline-block; }
.status-pill.pending { background: #f0f0f0; color: #444; }
.status-pill.paid, .status-pill.delivered { background: var(--color-success-light); color: var(--color-success); }
.status-pill.canceled { background: var(--color-danger-light); color: var(--color-danger); }
.status-pill.processing, .status-pill.shipped { background: var(--color-primary-light); color: #c8102e; }

/* ---------------- Toast ---------------- */
#toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #c8102e; color: #fff; padding: 13px 22px; border-radius: var(--radius-full); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: toast-in .25s var(--ease); }
.toast.error { background: var(--color-danger); }
.toast.success { background: var(--color-success); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Product page ---------------- */
.breadcrumb { font-size: 13px; color: var(--color-text-soft); margin: 18px 0; }
.breadcrumb a:hover { color: #c8102e; }
.gallery-main { aspect-ratio: 1 / 1; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-primary-light); box-shadow: var(--shadow-xs); border: 1px solid var(--color-border-soft); margin-bottom: 14px; }
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.gallery-thumb { width: 68px; height: 68px; border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; border: 2px solid transparent; position: relative; background: var(--color-primary-light); transition: border-color .15s ease, transform .15s ease; }
.gallery-thumb:hover { transform: translateY(-2px); }
.gallery-thumb.active { border-color: #c8102e; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb .play-icon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.4); color: #fff; font-size: 18px; }
.rating-stars { color: #c8102e; font-size: 15px; letter-spacing: 1px; }
.rating-summary { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--color-text-muted); margin-bottom: 12px; }
.qty-stepper { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.qty-stepper button { width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1.5px solid var(--color-border); background: #fff; font-size: 18px; transition: border-color .15s ease; }
.qty-stepper button:hover { border-color: #c8102e; }
.qty-stepper input { width: 50px; text-align: center; border: none; font-size: 16px; font-weight: 700; background: transparent; }
.wishlist-toggle { width: 46px; height: 46px; border-radius: var(--radius-full); border: 1.5px solid var(--color-border); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; transition: border-color .15s ease, transform .15s ease; }
.wishlist-toggle:hover { transform: translateY(-1px); }
.wishlist-toggle.active { border-color: var(--color-danger); color: var(--color-danger); }
.trust-badges { display: flex; flex-direction: column; gap: 11px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--color-border-soft); }
.trust-badges .item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--color-text-muted); font-weight: 500; }
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--color-border); margin: 36px 0 22px; }
.tab-btn { padding: 13px 22px; background: none; border: none; font-weight: 700; font-size: 14px; color: var(--color-text-soft); border-bottom: 2px solid transparent; margin-bottom: -1.5px; transition: color .15s ease, border-color .15s ease; }
.tab-btn:hover { color: #c8102e; }
.tab-btn.active { color: #c8102e; border-color: #c8102e; }
.tab-panel { display: none; animation: fade-in .2s ease; }
.tab-panel.active { display: block; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--color-border-soft); }
.review-item .meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--color-text-soft); margin-bottom: 8px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 960px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .layout-2col { grid-template-columns: 1fr; }
  .dash-shell { grid-template-columns: 1fr; }
  .dash-sidebar { display: none; }
  .site-footer .cols { grid-template-columns: repeat(2, 1fr); }
  .main-nav { display: none; }
  .header-search { display: none; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ---------------- Mobile navigation (hamburger) ---------------- */
.mobile-menu-btn {
  display: none;
  width: 42px; height: 42px; border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border); background: #fff;
  font-size: 18px; align-items: center; justify-content: center;
}

.mobile-nav-panel {
  display: none;
  background: #fff; border-top: 1px solid var(--color-border);
  padding: 16px 20px 20px;
}
.mobile-nav-panel.open { display: block; }
.mobile-nav-panel ul { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.mobile-nav-panel a { display: block; padding: 12px 4px; font-weight: 600; font-size: 15px; border-bottom: 1px solid var(--color-border-soft); }
.mobile-nav-panel form { display: flex; align-items: center; background: var(--color-bg); border: 1.5px solid var(--color-border); border-radius: var(--radius-full); padding: 4px 6px 4px 16px; }
.mobile-nav-panel form input { flex: 1; border: none; background: transparent; padding: 10px 4px; font-family: inherit; font-size: 14px; outline: none; }
.mobile-nav-panel form button { background: #c8102e; color: #fff; border: none; width: 34px; height: 34px; border-radius: var(--radius-full); font-size: 14px; }

/* دکمه‌ی باز/بسته کردن سایدبار پنل‌ها در موبایل */
.dash-mobile-toggle {
  display: none;
  width: 42px; height: 42px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border); background: #fff; font-size: 18px;
}
.dash-sidebar.open { display: block !important; position: fixed; inset: 0 0 0 auto; width: 260px; z-index: 100; overflow-y: auto; }
.dash-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99; }
.dash-overlay.open { display: block; }

@media (max-width: 960px) {
  .mobile-menu-btn { display: flex; }
  .dash-mobile-toggle { display: block; }
  .dash-main { padding: 20px 16px; }
}

/* ---------------- About page ---------------- */
.about-hero {
  text-align: center; padding: 56px 20px 44px; background: var(--color-primary-light);
  border-radius: var(--radius-lg); margin: 28px 0 40px;
}
.about-hero img { height: 64px; margin: 0 auto 20px; }
.about-hero h1 { font-size: 26px; margin-bottom: 10px; }
.about-hero p { max-width: 560px; margin: 0 auto; font-size: 15px; }

.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.about-card {
  background: var(--color-surface); border: 1px solid var(--color-border-soft); border-radius: var(--radius-md);
  padding: 24px; text-align: center; box-shadow: var(--shadow-xs);
}
.about-card .icon { font-size: 28px; margin-bottom: 12px; }
.about-card h4 { margin-bottom: 6px; font-size: 15px; }
.about-card p { font-size: 13.5px; margin: 0; }

.about-map-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: #c8102e; color: #fff; border-radius: var(--radius-lg);
  padding: 28px 32px; margin-bottom: 40px; flex-wrap: wrap;
}
.about-map-cta .text h3 { color: #fff; margin-bottom: 6px; }
.about-map-cta .text p { color: rgba(255,255,255,.85); margin: 0; }
.about-map-cta .btn-map {
  background: #fff; color: #c8102e; font-weight: 800; padding: 15px 32px; border-radius: var(--radius-full);
  font-size: 15.5px; white-space: nowrap; box-shadow: var(--shadow-md);
  transition: transform .15s ease;
  animation: pulse-map 2s infinite;
}
.about-map-cta .btn-map:hover { transform: translateY(-2px) scale(1.03); }
@keyframes pulse-map {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,.5); }
  50% { box-shadow: 0 0 0 10px rgba(255,255,255,0); }
}

@media (max-width: 960px) {
  .about-cards { grid-template-columns: 1fr; }
  .about-map-cta { flex-direction: column; text-align: center; padding: 28px 20px; }
  .about-map-cta .btn-map { width: 100%; text-align: center; }
}