:root {
  --color-jade: #00895e;
  --color-jade-dark: #00593d;
  --color-gold: #c9a227;
  --color-white: #ffffff;
  --color-bg: #fbfaf7;
  --color-text: #222222;
  --color-muted: #6b7280;
  --color-border: #e9e6df;
  --radius: 12px;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.03), 0 10px 28px -14px rgba(0,0,0,0.14);
}

/* Alternate color presets - selected via body class from site settings (theme = 1/2/3) */
body.theme-royal-blue {
  --color-jade: #1e4d8c;
  --color-jade-dark: #12325c;
  --color-gold: #d4af37;
}

body.theme-terracotta {
  --color-jade: #a3512b;
  --color-jade-dark: #6e3419;
  --color-gold: #dcae53;
}

body.theme-plum {
  --color-jade: #5c2a4d;
  --color-jade-dark: #3b1a32;
  --color-gold: #c9a227;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

.content img, .page-content img, .post-single .content img {
  border-radius: var(--radius);
  margin: 12px 0;
}

body {
  margin: 0;
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; margin-top: 2.2rem; }
h3 { font-size: 1.15rem; }

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-jade);
  color: var(--color-white);
  box-shadow: 0 2px 14px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 16px;
  gap: 12px;
}

.logo {
  color: var(--color-white);
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.main-nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.main-nav a {
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.94rem;
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--color-gold);
}

.lang-switcher select {
  padding: 6px 10px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
}

.site-search-form input {
  padding: 6px 12px;
  border-radius: var(--radius);
  border: none;
  font-family: inherit;
  width: 140px;
}

/* ---------- Buttons ---------- */
button, .btn {
  background: var(--color-gold);
  color: var(--color-jade-dark);
  border: none;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 14px -6px rgba(0,0,0,0.25);
}

button:hover, .btn:hover {
  background: var(--color-jade);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 72px 20px 60px;
}

.hero h1 {
  color: var(--color-jade-dark);
  font-size: 2.4rem;
  margin-bottom: 14px;
}

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

/* ---------- Home sections ---------- */
.home-section {
  margin: 56px 0;
}

.home-section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
}

.home-section-header h2 {
  margin: 0;
}

.home-section-header a {
  color: var(--color-jade-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Forms ---------- */
form label {
  display: block;
  margin-bottom: 14px;
  font-weight: 500;
}

form input, form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-jade-dark);
  color: var(--color-white);
  text-align: center;
  padding: 20px 0;
  margin-top: 60px;
}

.site-logo-img {
  height: 36px;
  vertical-align: middle;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  height: 40px;
}

.footer-social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-social-links a {
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  transition: background 0.15s ease, color 0.15s ease;
}

.footer-social-links a:hover {
  background: var(--color-gold);
  color: var(--color-jade-dark);
}

/* ---------- Video embeds (Aparat / YouTube) ---------- */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  margin: 20px 0;
}

.video-embed iframe {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--radius);
}

/* ---------- Blog ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.post-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding-bottom: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.post-card:hover {
  transform: translateY(-3px);
}

.post-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.post-card h2, .post-card p, .post-card .btn {
  margin: 10px 16px;
}

.share-box {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.share-box a {
  color: var(--color-jade-dark);
  text-decoration: none;
  font-weight: 500;
}

/* ---------- Tables (cart, invoice) ---------- */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  margin: 16px 0;
}

.admin-table {
  width: 100%;
  min-width: 480px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.admin-table th {
  background: #fafaf7;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-muted);
  padding: 10px 14px;
  text-align: right;
  border-bottom: 1px solid var(--color-border);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Pagination (public pages) ---------- */
.pagination {
  display: flex;
  gap: 6px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.pagination a {
  padding: 6px 12px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #ddd;
  text-decoration: none;
  color: #333;
}

.pagination a.active {
  background: var(--color-jade);
  color: #fff;
  border-color: var(--color-jade);
}

.shop-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
  background: #fff;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
}

.shop-filters input, .shop-filters select {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
}

/* ---------- Shop ---------- */
.product-single {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 20px;
}

.product-main-image {
  width: 100%;
  border-radius: var(--radius);
}

.product-description img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  border-radius: var(--radius);
  margin: 12px 0;
  cursor: zoom-in;
}

.product-thumb {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 6px;
  margin-inline-end: 8px;
}

.product-main-image, .product-thumb {
  cursor: zoom-in;
}

/* ---------- Image lightbox ---------- */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 8px;
}

.price strong {
  font-size: 1.4rem;
  color: var(--color-jade-dark);
}

.product-badge {
  display: inline-block;
  background: var(--color-gold);
  color: var(--color-jade-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.shop-card-badge {
  position: absolute;
  top: 10px;
  inset-inline-start: 10px;
  background: var(--color-gold);
  color: var(--color-jade-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  z-index: 2;
}

.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-stepper button {
  background: #f0efe9;
  color: var(--color-jade-dark);
  border: none;
  box-shadow: none;
  padding: 6px 12px;
  font-weight: 700;
  border-radius: 0;
}

.qty-stepper button:hover {
  background: var(--color-jade);
  color: #fff;
  transform: none;
}

.qty-stepper input {
  width: 46px;
  text-align: center;
  border: none;
  padding: 6px 0;
  -moz-appearance: textfield;
}

.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

.order-summary {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
}

.manual-transfer-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .product-single, .checkout-layout {
    grid-template-columns: 1fr;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .main-nav {
    gap: 10px;
  }
}
