@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

:root {
  --bg: #0e0e10;
  --bg-soft: #161618;
  --card: #1c1c1f;
  --border: #2b2b2f;
  --text: #f2f0ea;
  --muted: #9a968c;
  --accent: #d4af37;
  --accent-soft: #e9d38a;
  --danger: #e0554c;
  --success: #4caf6d;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Vazirmatn', Tahoma, sans-serif;
  direction: rtl;
  line-height: 1.8;
}

a { color: inherit; text-decoration: none; }

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

/* ------------------- Header ------------------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 14, 16, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent);
}

.logo span { color: var(--text); }

.steps-nav {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.steps-nav .step.active { color: var(--accent); font-weight: 700; }

/* ------------------- Layout ------------------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.hero {
  text-align: center;
  padding: 60px 20px 40px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  margin: 0 0 12px;
  font-weight: 800;
}

.hero p {
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto;
}

/* ------------------- Product Grid ------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
}

.product-card .thumb {
  aspect-ratio: 4 / 5;
  background: var(--bg-soft);
  overflow: hidden;
}

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

.product-card .info {
  padding: 16px 18px 20px;
}

.product-card .category {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.product-card .name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.product-card .price {
  color: var(--accent);
  font-weight: 700;
  font-size: 15px;
}

/* ------------------- Product Detail ------------------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: flex-start;
}

@media (max-width: 800px) {
  .product-detail { grid-template-columns: 1fr; gap: 28px; }
}

.product-detail .image-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/5;
}

.product-detail .image-box img { width: 100%; height: 100%; object-fit: cover; }

.gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.gallery-main {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  touch-action: pan-y;
}

.gallery-track {
  display: flex;
  height: 100%;
  direction: ltr;
  transition: transform 0.35s ease;
  will-change: transform;
}

.gallery-slide {
  flex: 0 0 100%;
  height: 100%;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(14, 14, 16, 0.72);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.gallery-nav:hover {
  border-color: var(--accent);
  background: rgba(14, 14, 16, 0.9);
}

.gallery-nav.prev { right: 12px; }
.gallery-nav.next { left: 12px; }

.gallery.single .gallery-nav,
.gallery.single .gallery-thumbs,
.gallery.single .gallery-dots {
  display: none;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.gallery-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 80px;
  padding: 0;
  border: 2px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  cursor: pointer;
}

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

.gallery-thumb.active {
  border-color: var(--accent);
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
}

.gallery-dot.active {
  background: var(--accent);
}

.product-detail h1 { font-size: 30px; margin: 0 0 6px; }

.product-detail .category-tag {
  display: inline-block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}

.product-detail .price-tag {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  margin: 12px 0 20px;
}

.product-detail .desc {
  color: var(--muted);
  margin-bottom: 26px;
  font-size: 15px;
}

.option-group { margin-bottom: 22px; }

.option-group > label.title {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 14px;
}

.option-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--text);
  padding: 9px 18px;
  border-radius: 30px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pill:hover { border-color: var(--accent-soft); }

.pill.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: #16130a;
  font-weight: 700;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #16130a;
  border: none;
  padding: 15px 30px;
  border-radius: 30px;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s ease, opacity 0.2s ease;
  width: 100%;
}

.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

/* ------------------- Checkout ------------------- */
.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.checkout-steps .dot {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.checkout-steps .dot .num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.checkout-steps .dot.active { color: var(--accent); }
.checkout-steps .dot.active .num { background: var(--accent); color: #16130a; border-color: var(--accent); }
.checkout-steps .sep { color: var(--border); }

.panel {
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.panel h2 { margin-top: 0; font-size: 20px; }

.summary-box {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 24px;
  font-size: 14px;
}

.summary-box div { margin-bottom: 6px; }
.summary-box div:last-child { margin-bottom: 0; }
.summary-box .label { color: var(--muted); }

.bank-card {
  background: linear-gradient(135deg, #26231a, #171510);
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 24px;
}

.bank-card .card-number {
  font-size: 22px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--accent-soft);
  margin-bottom: 10px;
  direction: ltr;
  text-align: center;
}

.bank-card .card-holder { text-align: center; color: var(--muted); font-size: 14px; }

.amount-box {
  text-align: center;
  margin-bottom: 22px;
  font-size: 16px;
}

.amount-box b { color: var(--accent); font-size: 22px; }

.field { margin-bottom: 18px; }

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.file-drop {
  border: 1.5px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  transition: border-color 0.2s ease;
}

.file-drop.has-file { border-color: var(--success); color: var(--text); }
.file-drop:hover { border-color: var(--accent); }

.actions-row {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.success-box {
  text-align: center;
  padding: 40px 20px;
}

.success-box .check {
  font-size: 50px;
  color: var(--success);
  margin-bottom: 14px;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14,14,16,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }

footer.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 30px 20px;
  border-top: 1px solid var(--border);
}
