/* =========================================================
   Ontimechy — فروشگاه اینترنتی ساعت
   شیوه‌نامه مشترک تمام صفحات
   ========================================================= */

:root {
  --bg: #2E2E2E;
  --panel: #3A3A3A;
  --panel-light: #454545;
  --accent: #50C878;
  --accent-dark: #3faa65;
  --accent-soft: rgba(80, 200, 120, 0.15);
  --text: #F2F2F2;
  --text-muted: #CCCCCC;
  --text-dim: #999999;
  --border: #55555580;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --header-h: 62px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  direction: rtl;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

/* ---------- عناصر مشترک: عنوان‌ها و دکمه‌ها ---------- */

.eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.5px;
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.section-title {
  color: var(--accent);
  font-size: 26px;
  margin: 0 0 8px;
  text-align: center;
}

.section-subtitle {
  color: var(--text-dim);
  text-align: center;
  font-size: 14px;
  margin: 0 0 36px;
}

.divider {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  width: 60%;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease, color 0.25s ease;
  font-family: inherit;
}

.btn-primary {
  background-color: var(--accent);
  color: #1E1E1E;
}

.btn-primary:hover {
  background-color: var(--accent-dark);
  transform: translateY(-1px);
}

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

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

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* =========================================================
   هدر و ناوبری
   ========================================================= */

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: var(--header-h);
  background-color: var(--panel);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  z-index: 1002;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hamburger {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background-color: var(--accent);
  transition: 0.3s ease;
}

.logo {
  color: var(--accent);
  font-size: 20px;
  font-weight: bold;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.search-box {
  flex-grow: 1;
}

.search-box input {
  width: 100%;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #4a4a4a;
  background-color: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.icon-link:hover {
  background-color: var(--panel-light);
  color: var(--accent);
}

.icon-link svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
}

/* سایدبار */

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.sidebar {
  position: fixed;
  top: 0;
  right: -280px;
  width: 270px;
  max-width: 80vw;
  height: 100%;
  background-color: var(--panel);
  padding-top: var(--header-h);
  transition: right 0.3s ease;
  z-index: 1001;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
}

.sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  color: var(--text);
  border-bottom: 1px solid #4a4a4a;
  font-size: 15px;
}

.sidebar a:hover {
  background-color: var(--accent);
  color: #1E1E1E;
}

.sidebar .sidebar-title {
  color: var(--text-dim);
  font-size: 12px;
  padding: 16px 24px 4px;
}

.nav-toggle:checked ~ .sidebar {
  right: 0;
}

.nav-toggle:checked ~ .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

/* محتوای اصلی: فاصله از هدر ثابت */
.page-content {
  flex: 1;
  padding-top: var(--header-h);
}

/* =========================================================
   فوتر
   ========================================================= */

.site-footer {
  background-color: var(--panel);
  border-top: 1px solid #4a4a4a;
  margin-top: 60px;
  padding: 40px 0 20px;
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-col h4 {
  color: var(--accent);
  margin: 0 0 14px;
  font-size: 15px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: var(--text-muted);
  font-size: 14px;
}

.footer-col ul li a:hover {
  color: var(--accent);
}

.footer-col p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid #4a4a4a;
}

/* =========================================================
   صفحه اصلی
   ========================================================= */

.hero {
  position: relative;
  border-radius: var(--radius-lg);
  margin: 24px;
  padding: 70px 24px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(80, 200, 120, 0.18), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(80, 200, 120, 0.12), transparent 45%),
    linear-gradient(160deg, #333333, #232323);
  border: 1px solid #444;
}

.hero-icon {
  font-size: 64px;
  margin-bottom: 18px;
}

.hero h1 {
  color: var(--accent);
  font-size: clamp(32px, 6vw, 64px);
  margin: 0 0 14px;
  letter-spacing: 1px;
}

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

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.notice-box {
  max-width: 720px;
  margin: 36px auto;
  padding: 20px 22px;
  background-color: var(--panel);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
}

.notice-box strong {
  color: var(--accent);
}

.section {
  padding: 50px 0;
}

/* =========================================================
   محصولات: گرید و کارت
   ========================================================= */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 22px;
}

.product-card {
  background-color: var(--panel);
  border: 1px solid #4a4a4a;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  background-color: var(--panel-light);
  border-color: var(--accent);
}

.product-thumb {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 46px;
  color: var(--accent);
  background: linear-gradient(150deg, #333333, #262626);
  border-bottom: 1px solid #4a4a4a;
}

/* وقتی داخل قاب عکس واقعی گذاشته بشه (به‌جای ایموجی ⌚)، این عکس را
   دقیقاً هم‌اندازه‌ی قاب می‌کند و گوشه‌های گرد را هم حفظ می‌کند */
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-name {
  color: var(--text);
  font-size: 15px;
  font-weight: bold;
}

.product-tag {
  color: var(--text-dim);
  font-size: 12px;
}

.product-price {
  color: var(--accent);
  font-size: 15px;
  font-weight: bold;
  margin-top: auto;
}

.product-card .btn {
  margin: 0 16px 16px;
}

/* فیلتر سریع فروشگاه (بدون جاوااسکریپت) */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 30px;
}

.chip {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid #4a4a4a;
  color: var(--text-muted);
  font-size: 13px;
  background-color: var(--panel);
}

.chip.is-active {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-soft);
}

/* =========================================================
   صفحه محصول
   ========================================================= */

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.product-gallery .product-thumb {
  border-radius: var(--radius);
  border: 1px solid #4a4a4a;
  font-size: 90px;
  aspect-ratio: 1 / 1;
}

.breadcrumb {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 20px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.product-info h1 {
  color: var(--text);
  font-size: 26px;
  margin: 0 0 10px;
}

.product-info .price {
  color: var(--accent);
  font-size: 24px;
  font-weight: bold;
  margin: 10px 0 18px;
}

.product-info .desc {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 24px;
}

.spec-list {
  margin: 20px 0;
  border-top: 1px solid #4a4a4a;
}

.spec-list li {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #4a4a4a;
  font-size: 14px;
  color: var(--text-muted);
}

.spec-list li span:first-child {
  color: var(--text-dim);
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.qty-row label {
  color: var(--text-muted);
  font-size: 14px;
}

.qty-input {
  width: 70px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #666;
  background-color: var(--bg);
  color: var(--text);
  font-size: 15px;
  text-align: center;
}

.product-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   سبد خرید
   ========================================================= */

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

.cart-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--panel);
  border-radius: var(--radius);
  overflow: hidden;
}

.cart-table th,
.cart-table td {
  padding: 14px 16px;
  text-align: right;
  font-size: 14px;
}

.cart-table thead th {
  background-color: var(--panel-light);
  color: var(--accent);
  font-size: 13px;
}

.cart-table tbody tr:not(:last-child) {
  border-bottom: 1px solid #4a4a4a;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-product .product-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  font-size: 24px;
  flex-shrink: 0;
}

.cart-product-name {
  color: var(--text);
  font-weight: bold;
  font-size: 14px;
}

.cart-product-meta {
  color: var(--text-dim);
  font-size: 12px;
}

.cart-qty select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #666;
  background-color: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.remove-link {
  color: #e07777;
  font-size: 13px;
}

.remove-link:hover {
  text-decoration: underline;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.cart-empty .hero-icon {
  color: var(--text-dim);
}

.summary-card {
  background-color: var(--panel);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.summary-card h3 {
  color: var(--accent);
  margin: 0 0 18px;
  font-size: 17px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 0;
}

.summary-row.total {
  color: var(--text);
  font-weight: bold;
  font-size: 16px;
  border-top: 1px solid #4a4a4a;
  margin-top: 8px;
  padding-top: 14px;
}

.summary-row.total span:last-child {
  color: var(--accent);
}

.promo-row {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}

.promo-row input {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid #666;
  background-color: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
}

/* =========================================================
   تسویه حساب
   ========================================================= */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 30px;
  align-items: start;
}

.checkout-card {
  background-color: var(--panel);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.checkout-card h3 {
  color: var(--accent);
  font-size: 16px;
  margin: 0 0 18px;
}

.checkout-card + .checkout-card {
  margin-top: 20px;
}

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

.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #4a4a4a;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
}

.payment-option:has(input:checked) {
  border-color: var(--accent);
  color: var(--text);
  background-color: var(--accent-soft);
}

.payment-option input {
  accent-color: var(--accent);
}

.order-items {
  margin-bottom: 14px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-muted);
  padding: 8px 0;
  border-bottom: 1px solid #4a4a4a;
}

.order-item span:last-child {
  color: var(--text);
}

/* =========================================================
   فرم‌ها (تماس، ورود، ثبت‌نام، تسویه)
   ========================================================= */

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 14px;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #666;
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.input-group textarea {
  resize: vertical;
  min-height: 100px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 6px var(--accent-soft);
}

/* =========================================================
   کارت‌های مرکزی (ورود / ثبت‌نام)
   ========================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background-color: var(--panel);
  padding: 40px 30px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
}

.auth-logo {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 32px;
  font-weight: bold;
  margin-bottom: 6px;
}

.auth-back {
  display: block;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 18px;
}

.auth-back:hover {
  color: var(--accent);
}

.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
}

.auth-tabs a {
  color: var(--text-dim);
  padding: 4px 6px;
}

.auth-tabs a.is-active {
  color: var(--accent);
  font-weight: bold;
  border-bottom: 2px solid var(--accent);
}

.auth-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 26px;
}

.terms {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.8;
}

.terms a {
  color: var(--accent);
}

.terms a:hover {
  text-decoration: underline;
}

.auth-footer {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

.auth-footer a {
  color: var(--accent);
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* =========================================================
   صفحه تماس با ما
   ========================================================= */

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.contact-card {
  background-color: var(--panel);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
}

.contact-card h3 {
  color: var(--accent);
  margin: 0 0 16px;
  font-size: 17px;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #4a4a4a;
  font-size: 14px;
}

.contact-list li:last-child {
  border-bottom: none;
}

.contact-list .icon-link {
  background-color: var(--panel-light);
}

/* =========================================================
   واکنش‌گرا: تبلت و موبایل
   ========================================================= */

@media (max-width: 900px) {
  .product-detail,
  .cart-layout,
  .checkout-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    margin: 12px;
    padding: 50px 18px;
  }

  .section {
    padding: 34px 0;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    padding: 14px 0;
  }

  .cart-table td {
    padding: 6px 0;
  }

  .cart-table td::before {
    content: attr(data-label);
    color: var(--text-dim);
    font-size: 12px;
    display: block;
    margin-bottom: 4px;
  }

  .footer-grid {
    flex-direction: column;
    gap: 26px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .logo {
    font-size: 17px;
  }

  .search-box {
    display: none;
  }
}
