:root {
  --brand: #e10600;
  --brand-deep: #b00000;
  --brand-bright: #ff2a22;
  --ink: #121417;
  --ink-muted: #5c6570;
  --chrome: #8b939c;
  --chrome-light: #d5dae0;
  --steel: #eef1f4;
  --paper: #ffffff;
  --line: rgba(18, 20, 23, 0.08);
  --ok: #1a7a4c;
  --err: #b42318;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 18px 40px rgba(18, 20, 23, 0.08);
  --shadow-soft: 0 8px 24px rgba(18, 20, 23, 0.06);
  --font: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --space: clamp(1rem, 2.5vw, 2rem);
  --wrap: min(1180px, calc(100% - 2.5rem));
  /* legacy aliases */
  --brand-red: var(--brand);
  --brand-red-deep: var(--brand-deep);
  --brand-red-soft: var(--brand-bright);
  --ink-soft: var(--ink-muted);
  --sand: var(--steel);
  --copper: var(--brand);
  --copper-deep: var(--brand-deep);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(225, 6, 0, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 40% at -10% 20%, rgba(139, 147, 156, 0.18), transparent 50%),
    linear-gradient(180deg, #fbfcfd 0%, var(--steel) 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand); }
.container { width: var(--wrap); margin-inline: auto; }
.narrow { width: min(440px, calc(100% - 2.5rem)); margin-inline: auto; }
.text-center { text-align: center; }
.muted { color: var(--ink-muted); }

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  padding: 0.2rem 0.35rem;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.brand-text { display: none; }
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem 1rem;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--ink);
}
.site-main { min-height: 50vh; }
.nav a {
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  padding: 0.25rem 0;
  position: relative;
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -2px;
  height: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }
.nav-cta {
  margin-inline-start: 0.35rem;
  padding: 0.4rem 0.9rem !important;
  border-radius: 999px;
  background: var(--ink);
  color: #fff !important;
  font-size: 0.85rem !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--brand); color: #fff !important; }
.lang-switch {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}
.lang-switch::after { display: none !important; }
.lang-switch:hover { border-color: var(--brand); color: var(--brand); }
.currency-switch select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.45rem;
  font: inherit;
  font-size: 0.85rem;
  background: var(--paper);
  color: var(--ink-muted);
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  cursor: pointer;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-sm);
  font: inherit;
  font-weight: 700;
  text-decoration: none !important;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.88rem; }
.btn-primary,
.btn {
  background: linear-gradient(180deg, var(--brand-bright), var(--brand));
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(225, 6, 0, 0.28);
}
.btn-primary:hover,
.btn:hover {
  background: linear-gradient(180deg, var(--brand), var(--brand-deep));
  color: #fff !important;
}
.btn-outline {
  background: transparent;
  color: var(--ink) !important;
  border: 1px solid var(--chrome-light);
  box-shadow: none;
}
.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand) !important;
  background: rgba(225, 6, 0, 0.04);
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: min(92vh, 760px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(105deg, rgba(10, 11, 13, 0.96) 0%, rgba(18, 20, 23, 0.82) 42%, rgba(225, 6, 0, 0.62) 100%),
    radial-gradient(circle at 78% 22%, rgba(255, 255, 255, 0.14), transparent 28%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Ccircle cx='100' cy='100' r='72' fill='none' stroke='%23ffffff' stroke-opacity='0.06' stroke-width='2'/%3E%3Ccircle cx='100' cy='100' r='36' fill='none' stroke='%23e10600' stroke-opacity='0.28' stroke-width='2'/%3E%3Ccircle cx='100' cy='100' r='8' fill='%23e10600' fill-opacity='0.35'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #1c1e22, #0a0b0d);
  background-size: auto, auto, 200px 200px, auto;
  animation: hero-drift 16s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 5.5rem;
  background: linear-gradient(180deg, transparent, rgba(251, 252, 253, 0.95));
}
@keyframes hero-drift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(-1.5%, 1%, 0); }
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 10vw, 7rem) 0 4.5rem;
  max-width: 36rem;
  animation: rise-in 0.85s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes rise-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.brand-hero-logo {
  height: clamp(96px, 20vw, 148px);
  width: auto;
  margin: 0 0 1.35rem;
  padding: 0.85rem 1.1rem;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 18px 40px rgba(0, 0, 0, 0.35);
  animation: logo-in 1s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes logo-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
.brand-hero {
  margin: 0 0 0.65rem;
  font-size: clamp(2.6rem, 8vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
}
.hero h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
}
.hero-lead {
  margin: 0 0 1.75rem;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.02rem;
  max-width: 28rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-actions .btn-primary {
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
}

/* ——— Sections ——— */
.section { padding: clamp(3rem, 6vw, 4.75rem) 0; }
.section-muted {
  background: rgba(255, 255, 255, 0.72);
  border-block: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section-head h1,
.section-head h2,
.section > h1,
.section > h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-head h2::after,
.section > h1::after {
  content: "";
  display: block;
  width: 2.75rem;
  height: 3px;
  margin-top: 0.55rem;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
}
.section-link {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand);
  white-space: nowrap;
}

/* ——— Categories ——— */
.category-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.category-item {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.category-item:hover {
  border-color: rgba(225, 6, 0, 0.45);
  color: var(--brand);
  transform: translateY(-2px);
  text-decoration: none;
}

/* ——— Products ——— */
.product-grid,
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}
.product-tile,
.product {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.product-tile:hover,
.product:hover {
  transform: translateY(-4px);
  border-color: rgba(225, 6, 0, 0.28);
  box-shadow: var(--shadow);
}
.product-tile a,
.product a {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
}
.product-visual,
.product-media {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 28%, rgba(225, 6, 0, 0.22), transparent 46%),
    linear-gradient(145deg, #f4f6f8, #c9ced4);
  color: var(--ink-muted);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.product-visual::before,
.product-media:not(:has(img))::before {
  content: "";
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid rgba(225, 6, 0, 0.55);
  box-shadow:
    inset 0 0 0 10px rgba(18, 20, 23, 0.08),
    0 0 0 14px rgba(255, 255, 255, 0.35);
  background: radial-gradient(circle at 40% 35%, #ff4d45, var(--brand-deep));
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-tile h3,
.product-body h3 {
  margin: 0 0 0.35rem;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.35;
}
.product-tile > a > h3,
.product-tile > a > .price,
.product-tile > a > .stock {
  padding-inline: 1rem;
}
.product-tile > a > h3 { padding-top: 0.95rem; }
.product-tile > a > .stock { padding-bottom: 1rem; display: inline-block; }
.product-body { padding: 1rem 1.05rem 1.15rem; }
.price {
  margin: 0;
  font-weight: 800;
  color: var(--brand-deep);
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}
.stock {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.product-detail {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.product-detail .product-media {
  min-height: 320px;
  border-radius: 0;
  aspect-ratio: auto;
}
.product-detail .product-body {
  padding: 1.75rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}
.product-detail h1 { margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.product-detail .price { font-size: 1.35rem; }
.product-description {
  width: var(--wrap);
  margin: 1.5rem auto 0;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ——— Forms / Auth ——— */
.flash {
  margin: 1rem auto;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  width: var(--wrap);
  font-weight: 600;
}
.flash-success { background: #e8f7ef; color: var(--ok); }
.flash-error { background: #fdeceb; color: var(--err); }

.auth-section {
  padding-top: 3rem;
  padding-bottom: 4rem;
  display: grid;
  justify-items: center;
}
.auth-card,
.page-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
}
.auth-card {
  width: min(420px, calc(100% - 2.5rem));
}
.auth-card--wide {
  width: min(520px, calc(100% - 2.5rem));
}
.auth-card h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
}
.auth-form,
.form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  max-width: 520px;
}
.auth-form label,
.form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.92rem;
}
.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  max-width: 640px;
}
.search-bar input { flex: 1 1 220px; }
.search-bar.form { max-width: 640px; }
.auth-form input,
.form input,
.form select,
.form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--chrome-light);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-form input:focus,
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.15);
}
.auth-switch { margin-top: 1.1rem; color: var(--ink-muted); }

/* ——— Tables / Cart ——— */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.table th,
.table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  text-align: start;
  vertical-align: middle;
}
.table th {
  background: #f7f8fa;
  font-size: 0.85rem;
  color: var(--ink-muted);
  font-weight: 700;
}
.table tr:last-child td { border-bottom: 0; }
.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.25rem;
}
.qty-form {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
}
.qty-form input { width: 72px; padding: 0.45rem 0.5rem; }

.stack { display: grid; gap: 1rem; }
.bank-box {
  background: #fff;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.checkout-summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.checkout-summary p { margin: 0.35rem 0; }

/* ——— Footer ——— */
.site-footer {
  margin-top: 3rem;
  border-top: 3px solid var(--brand);
  padding: 2.75rem 0 2.25rem;
  color: #c5ccd3;
  background:
    radial-gradient(ellipse 50% 80% at 100% 0%, rgba(225, 6, 0, 0.18), transparent 55%),
    linear-gradient(180deg, #1a1c20 0%, #0e0f12 100%);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.footer-logo {
  height: 70px;
  width: auto;
  margin-bottom: 0.85rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border-radius: 12px;
}
.footer-copy { margin: 0.4rem 0 0; color: #8b939c; font-size: 0.9rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.85rem;
}
.footer-links a { color: #e8eaed; font-weight: 600; }
.footer-links a:hover { color: #ffb3ae; }
.shop-contact__title,
.trust-seals__title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.85rem;
}
.shop-contact__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.shop-contact__label {
  font-weight: 700;
  color: var(--ink);
  margin-inline-end: 0.25rem;
}
.shop-contact a { color: var(--brand-deep); }
.shop-contact a:hover { color: var(--brand); }

/* Footer overrides (dark background) */
.site-footer .shop-contact__title,
.site-footer .trust-seals__title { color: #fff; }
.site-footer .shop-contact__list { color: #c5ccd3; font-size: 0.9rem; }
.site-footer .shop-contact__label { color: #fff; }
.site-footer .shop-contact a { color: #ffb3ae; }

.trust-seals__items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.trust-seals__item img {
  max-width: 120px;
  background: #fff;
  border-radius: 4px;
  padding: 0.25rem;
}
.trust-seals__code { line-height: 0; }
.contact-panel {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.25rem;
  width: 100%;
}
.contact-panel .shop-contact,
.contact-panel .trust-seals {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow-soft);
}

.page-body {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  line-height: 1.85;
  width: 100%;
}
.page-body p { margin: 0 0 0.85rem; }
.page-body p:last-child { margin-bottom: 0; }

/* Browser autofill (Chrome blue) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: var(--ink) !important;
  -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  transition: background-color 99999s ease-out;
  caret-color: var(--ink);
}

/* ——— Breadcrumbs ——— */
.breadcrumbs {
  margin: 1rem auto 0.25rem;
  font-size: 0.88rem;
  width: var(--wrap);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0;
  margin: 0;
  color: var(--ink-muted);
}
.breadcrumbs li:not(:last-child)::after {
  content: "/";
  margin-inline-start: 0.35rem;
  opacity: 0.5;
}
.breadcrumbs a { color: inherit; }
.breadcrumbs a:hover { color: var(--brand); }

/* Layout helpers for older section markup */
.section > h1,
.section > h2,
.section > .form,
.section > .grid,
.section > .table,
.section > .stack,
.section > .search-bar,
.section > .cart-actions,
.section > .checkout-summary,
.section > p,
.section > .page-panel {
  width: var(--wrap);
  margin-inline: auto;
}
.section > h1,
.section > h2 { margin-bottom: 1.1rem; }

@media (max-width: 900px) {
  .product-detail { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

@media (max-width: 720px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.75rem 0;
    min-height: 0;
  }
  .nav-toggle { display: inline-flex; margin-inline-start: auto; }
  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding-bottom: 0.5rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 0.55rem 0.35rem; }
  .nav-cta { text-align: center; }
  .hero { min-height: 78vh; }
  .brand-logo { height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
