@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap");

:root {
  --red: #e10613;
  --red-dark: #b80c16;
  --blue: #0d4fbf;
  --blue-deep: #08368a;
  --highlight: #7ad7ff;
  --black: var(--blue);
  --ink: #1b1b1b;
  --muted: #6f6f6f;
  --line: #e8e8e8;
  --bg: #f3f3f3;
  --card: #fff;
  --soft: #fafafa;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --radius: 14px;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Vazirmatn, Tahoma, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.8;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
.container { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }

.topbar {
  background: linear-gradient(90deg, var(--blue-deep), #1565e0 48%, #3aa0ff);
  color: #e7f6ff; font-size: 12.5px;
}
.topbar-row, .header-row, .nav-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.topbar-row { min-height: 36px; justify-content: space-between; }
.top-links { display: flex; gap: 16px; }
.top-links a:hover { color: var(--highlight); }
.top-phone { color: #fff; font-weight: 600; }

.header {
  background: linear-gradient(180deg, #1a6fe8 0%, var(--blue) 62%, var(--blue-deep) 100%);
  color: #fff; padding-bottom: 14px;
  box-shadow: inset 0 -3px 0 var(--highlight);
}
.header-row { min-height: 74px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.logo-mark {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(145deg, var(--highlight), #1a7dff);
  color: #08306e;
  box-shadow: 0 0 0 2px rgba(255,255,255,.45);
  display: grid; place-items: center;
  font-weight: 800; letter-spacing: -0.5px; font-size: 15px;
}
.logo strong { display: block; font-size: 18px; line-height: 1.2; }
.logo small { color: #d6efff; letter-spacing: 0.4px; }

.search {
  flex: 1; display: flex; background: #fff; border-radius: 12px; overflow: hidden; height: 46px;
}
.search input {
  flex: 1; border: 0; outline: 0; padding: 0 16px; font-size: 14px; color: #222; background: transparent;
}
.search button {
  width: 52px; border: 0; background: transparent; color: #333;
}
.header-actions { display: flex; align-items: center; gap: 8px; }
.ghost, .icon-btn {
  background: transparent; color: #fff; border: 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 10px; font-size: 13.5px;
}
.ghost:hover, .icon-btn:hover { background: rgba(255,255,255,.08); }
.cart-link { position: relative; }
.badge {
  position: absolute; top: 0; left: 0;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--red); color: #fff;
  font-size: 11px; display: grid; place-items: center; font-weight: 700;
}
.menu-toggle { display: none; }

.mainnav { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.nav-row { min-height: 54px; gap: 8px; }
.nav-row > a, .cat-btn {
  padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: 13.5px;
  background: transparent; border: 0; color: var(--ink);
}
.nav-row > a:hover, .cat-btn:hover, .nav-row > a.active { background: #f6f6f6; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.cat-wrap { position: relative; }
.cat-btn { display: inline-flex; align-items: center; gap: 8px; }
.mega {
  display: none; position: absolute; top: calc(100% + 8px); right: 0;
  width: min(920px, 80vw); background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); padding: 18px;
  grid-template-columns: repeat(4, 1fr); gap: 14px; z-index: 30;
}
.cat-wrap.open .mega, .cat-wrap:hover .mega { display: grid; }
.mega h3 { margin: 0 0 8px; font-size: 13px; color: var(--red); }
.mega a { display: block; padding: 3px 0; color: #333; font-size: 13px; }
.mega a:hover { color: var(--red); }
.mega .sub { color: #888; font-size: 12px; padding-right: 10px; }

.page { padding: 18px 0 40px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
}
.slider, .side-card, .tile, .banner, .panel, .shop-card, .form-card, .news-card, .price-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.slider { position: relative; min-height: 340px; overflow: hidden; }
.slide {
  display: none; grid-template-columns: 1.1fr .9fr; min-height: 340px; align-items: center; padding: 28px;
  gap: 12px;
}
.slide.on { display: grid; }
.kicker { color: var(--red); font-weight: 700; font-size: 13px; margin: 0 0 6px; }
.slide h2 { margin: 0 0 8px; font-size: 34px; line-height: 1.35; white-space: pre-line; }
.slide p { margin: 0 0 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.chips span, .tag {
  background: #f4f4f4; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #444;
}
.btn, .btn-line {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 700; border: 0;
}
.btn { background: var(--red); color: #fff; }
.btn:hover { background: var(--red-dark); }
.btn-line { background: #fff; color: var(--ink); border: 1px solid #ddd; }
.btn-line:hover { border-color: var(--red); color: var(--red); }
.btn.block, .btn-line.block { width: 100%; }
.slide-nav {
  position: absolute; inset-inline: 12px; top: 50%; transform: translateY(-50%);
  display: flex; justify-content: space-between; pointer-events: none;
}
.slide-nav button, .rail-btn {
  pointer-events: auto; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid #e5e5e5; background: #fff; color: #222;
}
.dots { position: absolute; bottom: 12px; left: 18px; display: flex; gap: 6px; }
.dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: #ddd; padding: 0; }
.dots button.on { width: 22px; background: var(--red); }

.side-stack { display: flex; flex-direction: column; gap: 14px; }
.price-card {
  display: flex; align-items: center; gap: 12px; padding: 14px;
  min-height: 92px;
}
.price-card .year {
  font-size: 34px; font-weight: 800; color: var(--red); line-height: 1;
  text-shadow: 2px 3px 0 #f3c3c6;
}
.price-card b { display: block; font-size: 16px; }
.price-card span { color: var(--muted); font-size: 12.5px; }
.news-card { padding: 12px 14px 8px; flex: 1; }
.tabs { display: flex; gap: 14px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.tabs button { background: none; border: 0; padding: 6px 0 8px; color: #888; font-weight: 700; }
.tabs button.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }
.notice { display: block; padding: 8px 0; border-bottom: 1px solid #f2f2f2; }
.notice:last-child { border-bottom: 0; }
.notice strong { display: block; font-size: 13.5px; }
.notice p { margin: 2px 0; color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notice time { color: #999; font-size: 11.5px; }

.section { margin-top: 16px; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin: 8px 2px 10px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head a { color: var(--red); font-weight: 700; font-size: 13px; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile { display: grid; grid-template-columns: 92px 1fr; align-items: center; min-height: 104px; overflow: hidden; padding-left: 12px; }
.tile .visual { height: 104px; background: var(--soft); }
.tile h3 { margin: 0; font-size: 15px; }
.tile p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.tile:hover { border-color: #f0b4b8; }

.banners { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; }
.banner { min-height: 112px; padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow: hidden; }
.banner h3 { margin: 0 0 4px; font-size: 18px; }
.banner p { margin: 0; color: var(--muted); }
.banner.dark {
  background: linear-gradient(110deg, var(--blue-deep), #1a6fe0 70%, #49b7ff);
  color: #fff; border-color: transparent;
}
.banner.dark p { color: #e7f4ff; }
.banner.red { background: linear-gradient(120deg, #fff 40%, #fff5f5); }

.rail-wrap { position: relative; }
.rail { display: flex; gap: 12px; overflow: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.form-card { min-width: 230px; scroll-snap-align: start; padding: 12px; }
.form-card .visual, .shop-card .visual { border-radius: 10px; overflow: hidden; background: #f7f7f7; }
.form-card .visual { height: 140px; }
.form-card h3, .shop-card h2 { font-size: 14px; margin: 10px 0 4px; line-height: 1.6; min-height: 44px; }
.tirages { display: flex; flex-wrap: wrap; gap: 6px; }
.tirages a, .opt {
  border: 1px solid #ececec; border-radius: 8px; padding: 4px 8px; font-size: 12px; background: #fff;
}
.tirages a:hover, .opt:hover, .opt.on { border-color: var(--red); color: var(--red); }
.rail-btn { position: absolute; top: 70px; z-index: 2; }
.rail-btn.prev { right: -6px; }
.rail-btn.next { left: -6px; }

.panel { padding: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-weight: 600; }
.filters button.on { background: var(--black); color: #fff; border-color: var(--black); }
.home-grid, .shop-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.shop-card { padding: 10px 10px 14px; display: flex; flex-direction: column; }
.shop-card .visual { aspect-ratio: 1; }
.shop-card .price { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.shop-card .btn-line { margin-top: auto; }
.stock { color: #0d8a3a; font-size: 12px; font-weight: 700; }

.about-band { display: grid; grid-template-columns: 1.4fr .8fr; gap: 18px; padding: 22px; }
.about-band h2 { margin: 0 0 8px; font-size: 22px; }
.about-band ul { margin: 8px 0 0; padding: 0 18px 0 0; }
.about-band li { margin: 4px 0; }

.shop-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
.shop-side { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; position: sticky; top: 70px; }
.shop-side h2 { margin: 0 0 10px; font-size: 16px; }
.shop-side input, .field input, .field select, .field textarea, .sort select, .qty input {
  width: 100%; border: 1px solid #e4e4e4; border-radius: 10px; min-height: 40px; padding: 8px 10px; background: #fff; outline: none;
}
.shop-side input:focus, .field input:focus, .field textarea:focus { border-color: #bbb; }
.cat-list { list-style: none; margin: 12px 0 0; padding: 0; }
.cat-list a, .cat-list button {
  width: 100%; text-align: right; background: none; border: 0;
  display: flex; justify-content: space-between; gap: 8px;
  padding: 7px 2px; border-bottom: 1px solid #f4f4f4; font-size: 13.5px;
}
.cat-list a.on, .cat-list a:hover { color: var(--red); }
.count { color: #999; font-size: 12px; }
.crumb { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.crumb a:hover { color: var(--red); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.sort { display: flex; align-items: center; gap: 8px; }
.sort select { width: auto; }
.shop-grid.store { grid-template-columns: repeat(3, 1fr); }
.pager { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.pager a, .pager span {
  min-width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line);
  display: grid; place-items: center; background: #fff; padding: 0 8px;
}
.pager .on { background: var(--red); color: #fff; border-color: var(--red); }

.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.product-visual { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.buy { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; }
.buy h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.5; }
.meta { color: var(--muted); margin: 0 0 12px; }
.price-lg { font-size: 22px; font-weight: 800; margin: 8px 0 12px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.qty-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.qty { display: flex; width: 132px; }
.qty button { width: 36px; border: 1px solid #e4e4e4; background: #fff; }
.qty input { border-radius: 0; text-align: center; }
.specs { width: 100%; border-collapse: collapse; margin-top: 16px; }
.specs th, .specs td { border-bottom: 1px solid #f1f1f1; padding: 8px 4px; text-align: right; }
.specs th { color: var(--muted); font-weight: 500; width: 38%; }

.cart-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 14px; overflow: hidden; }
.cart-table th, .cart-table td { padding: 12px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
.summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; position: sticky; top: 74px; }
.summary div { display: flex; justify-content: space-between; margin: 8px 0; }
.summary .total { font-size: 18px; font-weight: 800; }
.linkish { background: none; border: 0; color: var(--red); padding: 0; }

.prose { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.prose h1, .prose h2 { margin: 0 0 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.field textarea { min-height: 120px; resize: vertical; }
.note { background: #fff8f8; border: 1px solid #f3d0d2; color: #7a1c22; border-radius: 10px; padding: 10px 12px; }
.ok { background: #f1fbf4; border: 1px solid #cfeedd; color: #146c36; border-radius: 10px; padding: 10px 12px; }
.price-table { width: 100%; border-collapse: collapse; background: #fff; }
.price-table th, .price-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; }
.price-table th { background: var(--blue); color: #fff; font-weight: 600; }
.price-table tr:hover td { background: #fffafa; }
.empty { text-align: center; padding: 40px 10px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); }

.footer {
  background: linear-gradient(180deg, var(--blue), var(--blue-deep));
  color: #d7e9ff; margin-top: 10px; padding: 32px 0 16px; font-size: 13.5px;
  border-top: 3px solid var(--highlight);
}
.foot-grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 18px; }
.footer h3 { color: #fff; margin: 0 0 8px; font-size: 15px; }
.footer a { display: block; padding: 3px 0; color: #d6ebff; }
.footer a:hover { color: var(--highlight); }
.foot-bottom { border-top: 1px solid rgba(122, 215, 255, .35); margin-top: 18px; padding-top: 12px; display: flex; justify-content: space-between; gap: 10px; color: #b7d7f5; font-size: 12.5px; }
.drawer {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40;
}
.drawer.open { display: block; }
.drawer nav {
  background: #fff; width: min(360px, 88vw); height: 100%; margin-right: auto;
  padding: 18px; overflow: auto;
}
.drawer a, .drawer button { display: block; width: 100%; text-align: right; background: none; border: 0; padding: 10px 0; border-bottom: 1px solid #f3f3f3; font-weight: 600; }
.modal {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50;
  align-items: center; justify-content: center; padding: 16px;
}
.modal.open { display: flex; }
.dialog { width: min(420px, 100%); background: #fff; border-radius: 16px; padding: 18px; }
.dialog h2 { margin: 0 0 8px; }
.toast {
  position: fixed; bottom: 16px; left: 16px; background: var(--blue); color: #fff;
  padding: 10px 14px; border-radius: 10px; z-index: 60; display: none;
}
.toast.on { display: block; }

@media (max-width: 980px) {
  .hero-grid, .banners, .about-band, .shop-layout, .product-layout, .cart-layout, .grid-2, .foot-grid {
    grid-template-columns: 1fr;
  }
  .tiles, .home-grid { grid-template-columns: repeat(2, 1fr); }
  .shop-grid.store { grid-template-columns: repeat(2, 1fr); }
  .slide { grid-template-columns: 1fr; }
  .slide-art { display: none; }
  .mega { width: min(92vw, 680px); grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; }
  .shop-side { position: static; }
  .header-row { flex-wrap: wrap; }
  .search { order: 5; flex-basis: 100%; }
}
@media (max-width: 640px) {
  .tiles, .home-grid, .shop-grid.store { grid-template-columns: 1fr; }
  .slide { padding: 22px 16px 36px; min-height: 0; }
  .slide h2 { font-size: 28px; }
  .slide-nav { display: none; }
  .ghost span { display: none; }
  .top-links { display: none; }
  .cart-table .hide-sm { display: none; }
}

.admin-body { background: #f3f3f3; }
.admin-gate {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.admin-gate .dialog { width: min(420px, 100%); }
.admin-shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.admin-side {
  background: linear-gradient(180deg, #1565e0, var(--blue-deep)); color: #fff; padding: 16px 12px 24px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.admin-side .logo { margin-bottom: 16px; }
.admin-side button, .admin-side a.side-link {
  display: block; width: 100%; text-align: right; color: #ddd;
  background: transparent; border: 0; border-radius: 10px;
  padding: 9px 12px; font-weight: 600; margin-bottom: 4px;
}
.admin-side button.on, .admin-side a.side-link:hover, .admin-side button:hover { background: var(--highlight); color: var(--blue-deep); }
.admin-main { padding: 20px 22px 40px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-top h1 { margin: 0; font-size: 22px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 14px; }
.stat b { display: block; font-size: 22px; }
.stat span { color: #6f6f6f; font-size: 13px; }
.admin-card { background: #fff; border: 1px solid #e8e8e8; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.admin-card h2 { margin: 0 0 10px; font-size: 18px; }
.admin-split { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 14px; align-items: start; }
.pick-list { display: flex; flex-direction: column; gap: 6px; max-height: 70vh; overflow: auto; }
.pick-list button { text-align: right; border: 1px solid #eee; background: #fff; border-radius: 10px; padding: 8px 10px; }
.pick-list button.on { border-color: #e10613; color: #e10613; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.checks { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 0; }
.checks label { display: flex; gap: 6px; align-items: center; }
.admin-table input, .admin-table select { min-height: 36px; }
.opt-edit { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 8px; margin-bottom: 8px; }
@media (max-width: 900px) {
  .admin-shell, .admin-split, .stat-grid { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .opt-edit { grid-template-columns: 1fr; }
}
