/*
Theme Name: شمعا | Shamaa
Theme URI: https://shamaa.ir
Author: Shamaa Candle Shop
Description: پوسته مینیمال فارسی برای فروشگاه شمع‌های تزئینی - یک پوسته سبک، زیبا و راستچین با پشتیبانی از ووکامرس
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
WooCommerce: true
Text Domain: shamaa
Tags: rtl-language, right-to-left, woocommerce, minimal, persian, candle, shop, ecommerce
*/

/* ─── DESIGN TOKENS ──────────────────────────────────────────────────── */
:root {
  /* Palette */
  --c-bg:        #FAF8F4;        /* warm ivory — like unbleached cotton */
  --c-surface:   #FFFFFF;
  --c-border:    #EDE9E2;
  --c-text:      #1C1917;        /* near-black warm */
  --c-muted:     #78716C;        /* stone-500 */
  --c-accent:    #C4884A;        /* burnished amber — molten wax */
  --c-accent-dk: #A0692E;
  --c-accent-lt: #F5E9D8;
  --c-smoke:     #F0EBE3;

  /* Type scale — one minimal Persian face used everywhere */
  --f-display:   'Vazirmatn', system-ui, sans-serif;
  --f-body:      'Vazirmatn', system-ui, sans-serif;
  --f-mono:      'Vazirmatn', monospace;

  --fs-xs:   .75rem;
  --fs-sm:   .875rem;
  --fs-base: 1rem;
  --fs-lg:   1.125rem;
  --fs-xl:   1.375rem;
  --fs-2xl:  1.75rem;
  --fs-3xl:  2.25rem;
  --fs-4xl:  3rem;

  /* Spacing */
  --sp-1: .25rem;  --sp-2: .5rem;   --sp-3: .75rem;
  --sp-4: 1rem;    --sp-6: 1.5rem;  --sp-8: 2rem;
  --sp-12: 3rem;   --sp-16: 4rem;   --sp-24: 6rem;

  /* Radius — kept tight and architectural, not pillowy */
  --r-sm: 2px;  --r-md: 4px;  --r-lg: 8px;  --r-full: 9999px;

  /* Shadows — barely-there, just enough for depth */
  --shadow-sm:  0 1px 2px rgba(28,25,23,.05);
  --shadow-md:  0 6px 20px rgba(28,25,23,.06);
  --shadow-lg:  0 12px 32px rgba(28,25,23,.08);

  /* Motion */
  --ease: cubic-bezier(.4,0,.2,1);
  --dur: 220ms;

  /* Layout */
  --container: 1200px;
  --sidebar-w: 280px;
}

/* ─── RESET & BASE ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  font-size: var(--fs-base);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ─── TYPOGRAPHY ─────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--c-text);
}
h1 { font-size: clamp(var(--fs-2xl), 4vw, var(--fs-4xl)); }
h2 { font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-3xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin-bottom: var(--sp-4); }
p:last-child { margin-bottom: 0; }

.display-font { font-family: var(--f-display); }

/* ─── LAYOUT UTILITIES ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

.text-muted { color: var(--c-muted); }
.text-accent { color: var(--c-accent); }
.text-center { text-align: center; }

/* ─── HEADER ─────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border);
  transition: box-shadow var(--dur) var(--ease);
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--sp-6);
  padding-block: var(--sp-4);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -.02em;
  color: var(--c-text);
}
.site-logo .flame-icon {
  width: 32px; height: 32px;
  color: var(--c-accent);
  flex-shrink: 0;
}
.site-logo span { font-family: var(--f-display); }

/* Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  justify-content: center;
}
.main-nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-muted);
  padding-block: var(--sp-2);
  position: relative;
  transition: color var(--dur) var(--ease);
}
.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 0; height: 1.5px;
  background: var(--c-accent);
  transition: width var(--dur) var(--ease);
}
.main-nav a:hover,
.main-nav a.current-menu-item { color: var(--c-text); }
.main-nav a:hover::after,
.main-nav a.current-menu-item::after { width: 100%; }

/* Search + actions group */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  justify-self: end;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  border: none;
  background: transparent;
  color: var(--c-muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.icon-btn:hover {
  background: var(--c-smoke);
  color: var(--c-text);
}
.icon-btn svg { width: 20px; height: 20px; }

.cart-count {
  position: relative;
}
.cart-badge {
  position: absolute;
  top: 4px; left: 4px;
  min-width: 18px; height: 18px;
  background: var(--c-accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  padding: 0 4px;
}

/* Search bar */
.search-bar {
  display: flex;
  align-items: center;
  background: var(--c-smoke);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  padding: var(--sp-2) var(--sp-4);
  gap: var(--sp-2);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), width var(--dur) var(--ease);
  width: 180px;
}
.search-bar:focus-within { width: 240px; }
.search-bar:focus-within {
  border-color: var(--c-accent);
  background: var(--c-surface);
}
.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  font-size: var(--fs-sm);
  color: var(--c-text);
}
.search-bar input::placeholder { color: var(--c-muted); }
.search-bar svg { width: 16px; height: 16px; color: var(--c-muted); flex-shrink: 0; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
}

/* ─── MOBILE NAV ─────────────────────────────────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), visibility var(--dur) var(--ease);
}
.mobile-nav.open { opacity: 1; visibility: visible; }
.mobile-nav-panel {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: min(320px, 85vw);
  background: var(--c-surface);
  padding: var(--sp-8) var(--sp-6);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 300ms var(--ease);
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-8); }
.mobile-nav a {
  display: block;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-md);
  font-weight: 500;
  transition: background var(--dur) var(--ease);
}
.mobile-nav a:hover { background: var(--c-smoke); }
.mobile-nav-close {
  position: absolute; top: var(--sp-4); left: var(--sp-4);
}
.mobile-cart-link {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); font-weight: 600; color: var(--c-accent);
}
.mobile-cart-link .icon { width: 17px; height: 17px; stroke-width: 1.5; }

/* ─── HERO ───────────────────────────────────────────────────────────── */
.hero {
  padding-top: var(--sp-24);
  padding-bottom: var(--sp-12);
}

.hero-content {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--sp-5);
  letter-spacing: -.02em;
}
@media (min-width: 901px) {
  .hero-title { white-space: nowrap; }
}
.hero-title em {
  font-style: normal;
  color: var(--c-accent);
}

.hero-desc {
  font-size: var(--fs-base);
  color: var(--c-muted);
  max-width: 42ch;
  margin-inline: auto;
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-8);
  line-height: 1.8;
}

/* Signature element: wax-drip CTA button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-text);
  color: white;
  padding: var(--sp-3) var(--sp-8);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--c-accent);
  transform: translateY(101%);
  transition: transform 300ms var(--ease);
  border-radius: inherit;
}
.btn-primary:hover::after { transform: translateY(0); }
.btn-primary span, .btn-primary svg { position: relative; z-index: 1; }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(196,136,74,.35); }
.btn-primary:active { transform: scale(.97); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: transparent;
  color: var(--c-text);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 1.5px solid var(--c-border);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap;
}
.btn-secondary:hover { border-color: var(--c-accent); background: var(--c-accent-lt); }

.btn-ghost {
  background: none; border: none; cursor: pointer;
  color: var(--c-muted); font-size: var(--fs-sm);
  font-weight: 500; padding: 0;
  display: inline-flex; align-items: center; gap: var(--sp-1);
  transition: color var(--dur) var(--ease);
}
.btn-ghost:hover { color: var(--c-accent); }

/* ─── SECTION HEADER ─────────────────────────────────────────────────── */
.section-title {
  font-family: var(--f-display);
  font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-3xl));
  margin-bottom: var(--sp-12);
}
.section-title.centered { text-align: center; }

.section-cta { text-align: center; margin-top: var(--sp-12); }

/* ─── PRODUCT CARD ───────────────────────────────────────────────────── */
.product-card {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--c-border);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  position: relative;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--c-smoke);
}
.product-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease);
}
.product-card:hover .product-image img { transform: scale(1.06); }

.product-info {
  padding: var(--sp-4);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-name {
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-1);
  color: var(--c-text);
  line-height: 1.4;
}
.product-name a { transition: color var(--dur); }
.product-name a:hover { color: var(--c-accent); }

.price-amount {
  font-size: var(--fs-base);
  font-weight: 700;
  color: var(--c-accent);
}
.price-amount del {
  font-size: var(--fs-xs);
  color: var(--c-muted);
  font-weight: 400;
  margin-left: var(--sp-1);
}

/* ─── PRODUCTS SECTION ───────────────────────────────────────────────── */
.products-section { padding-top: var(--sp-12); padding-bottom: var(--sp-24); }

.icon-404 { width: 48px; height: 48px; color: var(--c-accent); stroke-width: 1; margin-inline: auto; margin-bottom: var(--sp-6); }

/* ─── FOOTER ─────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding-block: var(--sp-16) var(--sp-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}
.footer-brand .site-logo { margin-bottom: var(--sp-4); font-size: var(--fs-lg); }
.footer-desc { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.8; margin-bottom: var(--sp-6); }
.footer-social {
  display: flex;
  gap: var(--sp-3);
}
.social-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--c-smoke);
  display: flex; align-items: center; justify-content: center;
  color: var(--c-muted);
  font-size: .8rem;
  transition: background var(--dur), color var(--dur);
}
.social-btn:hover { background: var(--c-accent); color: white; }

.footer-col-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-5);
  color: var(--c-text);
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.footer-links a {
  font-size: var(--fs-sm);
  color: var(--c-muted);
  transition: color var(--dur);
}
.footer-links a:hover { color: var(--c-accent); }

.footer-contact-line {
  display: flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm);
}
.footer-contact-line .icon { width: 15px; height: 15px; flex-shrink: 0; stroke-width: 1.5; color: var(--c-accent); }
.footer-address { font-size: var(--fs-xs); color: var(--c-muted); line-height: 1.6; }

.footer-bottom {
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy { font-size: var(--fs-xs); color: var(--c-muted); }

/* ─── WOOCOMMERCE ────────────────────────────────────────────────────── */
/* Shop Archive */
.woocommerce-page .woocommerce {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-8);
  align-items: start;
  margin-block: var(--sp-12);
}

/* Sidebar */
.woocommerce-sidebar {
  position: sticky;
  top: 90px;
}
.widget {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-4);
}
.widget-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
}

/* Shop toolbar */
.woocommerce-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}
.woocommerce-result-count { font-size: var(--fs-sm); color: var(--c-muted); }
.woocommerce-ordering select {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  padding: var(--sp-2) var(--sp-4);
  font-size: var(--fs-sm);
  background: var(--c-surface);
  color: var(--c-text);
  cursor: pointer;
  outline: none;
}

/* Products grid in shop */
ul.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
  margin: 0;
  padding: 0;
  list-style: none;
}
ul.products li.product {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--dur), transform var(--dur);
}
ul.products li.product:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
ul.products li.product a img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  transition: transform 400ms var(--ease);
}
ul.products li.product:hover a img { transform: scale(1.05); }

ul.products li.product .woocommerce-loop-product__title {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
  color: var(--c-text);
}
ul.products li.product .price {
  display: block;
  padding: 0 var(--sp-4) var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--c-accent);
}
ul.products li.product .price del {
  color: var(--c-muted);
  font-weight: 400;
  font-size: var(--fs-xs);
}
ul.products li.product .button {
  display: block;
  margin: 0 var(--sp-4) var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  background: var(--c-smoke);
  color: var(--c-text);
  border: none;
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur), color var(--dur);
}
ul.products li.product .button:hover { background: var(--c-accent); color: white; }

/* Single product */
.woocommerce-single-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  margin-block: var(--sp-12);
  align-items: start;
}

/* Product gallery */
.woocommerce-product-gallery {
  position: sticky;
  top: 90px;
}
.woocommerce-product-gallery__image {
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--c-smoke);
}
.woocommerce-product-gallery__image img {
  width: 100%; height: 100%; object-fit: cover;
}

.product-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.product-thumbnail {
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 1;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--c-smoke);
  transition: border-color var(--dur);
}
.product-thumbnail.active, .product-thumbnail:hover { border-color: var(--c-accent); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

/* Product summary */
.product-summary .product-title {
  font-family: var(--f-display);
  font-size: clamp(var(--fs-xl), 2.5vw, var(--fs-3xl));
  margin-bottom: var(--sp-4);
}
.product-summary .price {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--c-accent);
  margin-bottom: var(--sp-6);
}
.product-summary .price del {
  font-size: var(--fs-lg);
  color: var(--c-muted);
  font-weight: 400;
  margin-left: var(--sp-2);
}
.product-short-desc {
  color: var(--c-muted);
  font-size: var(--fs-base);
  line-height: 1.8;
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--c-border);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.quantity-selector label { font-size: var(--fs-sm); font-weight: 600; }
.qty-control {
  display: flex; align-items: center;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  overflow: hidden;
}
.qty-btn {
  width: 36px; height: 36px;
  background: var(--c-smoke);
  border: none; cursor: pointer;
  font-size: var(--fs-lg);
  color: var(--c-text);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--dur);
}
.qty-btn:hover { background: var(--c-accent); color: white; }
.qty-input {
  width: 48px; text-align: center;
  border: none; outline: none;
  font-size: var(--fs-sm); font-weight: 700;
  background: white;
}

.add-to-cart-btn {
  width: 100%;
  padding: var(--sp-4);
  background: var(--c-text);
  color: white;
  border: none;
  border-radius: var(--r-full);
  font-size: var(--fs-base);
  font-weight: 700;
  cursor: pointer;
  margin-bottom: var(--sp-3);
  transition: background var(--dur);
  display: flex; align-items: center; justify-content: center; gap: var(--sp-2);
}
.add-to-cart-btn:hover { background: var(--c-accent); }
.add-to-cart-btn .icon { width: 17px; height: 17px; stroke-width: 1.5; }

.trust-badges { display: flex; gap: var(--sp-4); margin-top: var(--sp-6); padding-top: var(--sp-6); border-top: 1px solid var(--c-border); flex-wrap: wrap; }
.trust-badge { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-xs); color: var(--c-muted); }
.trust-badge .icon { width: 15px; height: 15px; stroke-width: 1.5; color: var(--c-accent); }

.product-meta-info {
  margin-top: var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.product-meta-row {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}
.product-meta-row .meta-label {
  color: var(--c-muted);
  min-width: 80px;
}

/* Cart & Checkout */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  margin-block: var(--sp-12);
}

table.shop_table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--sp-8);
}
table.shop_table th {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--c-muted);
  padding-block: var(--sp-3);
  border-bottom: 2px solid var(--c-border);
  text-align: right;
}
table.shop_table td {
  padding-block: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
  font-size: var(--fs-sm);
  vertical-align: middle;
  text-align: right;
}
table.shop_table td.product-thumbnail { width: 80px; }
table.shop_table td.product-thumbnail img {
  width: 64px; height: 64px; object-fit: cover;
  border-radius: var(--r-md);
}

.cart-collaterals {
  display: flex;
  justify-content: flex-start;
}
.cart_totals {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  min-width: 320px;
}
.cart_totals h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-5); }

/* Checkout form */
.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
  font-size: var(--fs-xl);
  margin-bottom: var(--sp-6);
}
.form-row {
  margin-bottom: var(--sp-4);
}
.form-row label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--c-text);
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  outline: none;
  background: var(--c-surface);
  color: var(--c-text);
  font-size: var(--fs-sm);
  transition: border-color var(--dur);
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--c-accent); }

/* ─── BREADCRUMB ─────────────────────────────────────────────────────── */
.breadcrumb {
  padding-block: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--c-muted);
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.breadcrumb a { color: var(--c-muted); transition: color var(--dur); }
.breadcrumb a:hover { color: var(--c-accent); }
.breadcrumb .sep { color: var(--c-border); }

/* ─── PAGINATION ─────────────────────────────────────────────────────── */
.woocommerce-pagination {
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-12);
}
.page-numbers {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  border: 1.5px solid var(--c-border);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-muted);
  transition: all var(--dur);
}
.page-numbers.current,
.page-numbers:hover {
  background: var(--c-text);
  color: white;
  border-color: var(--c-text);
}

/* ─── NOTICES ────────────────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  font-size: var(--fs-sm);
}
.woocommerce-message { background: #ECFDF5; border-right: 3px solid #10B981; color: #065F46; }
.woocommerce-info { background: #EFF6FF; border-right: 3px solid #3B82F6; color: #1E40AF; }
.woocommerce-error { background: #FEF2F2; border-right: 3px solid #EF4444; color: #991B1B; }

/* ─── REVIEWS ────────────────────────────────────────────────────────── */
.review-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
}
.review-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--sp-3); }
.reviewer-name { font-weight: 700; font-size: var(--fs-sm); }
.review-date { font-size: var(--fs-xs); color: var(--c-muted); }
.review-text { font-size: var(--fs-sm); color: var(--c-muted); line-height: 1.7; }

/* ─── SCROLL TO TOP ──────────────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: var(--sp-8);
  left: var(--sp-8);
  width: 44px; height: 44px;
  background: var(--c-text);
  color: white;
  border: none;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: all var(--dur) var(--ease);
  z-index: 50;
  box-shadow: var(--shadow-md);
}
.scroll-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--c-accent); }
.scroll-top svg { width: 18px; height: 18px; }

/* ─── ACCESSIBILITY ──────────────────────────────────────────────────── */
:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .woocommerce-page .woocommerce { grid-template-columns: 1fr; }
  .woocommerce-single-product { grid-template-columns: 1fr; }
  ul.products { grid-template-columns: repeat(2, 1fr); }
  .header-inner { grid-template-columns: auto auto; }
  .main-nav { display: none; }
  .search-bar { display: none; }
  .menu-toggle { display: flex; }
  .mobile-nav { display: block; }
}

@media (max-width: 600px) {
  :root { --sp-24: 3.5rem; --sp-16: 2.5rem; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  ul.products { grid-template-columns: 1fr 1fr; }
}
.shamaa-product-card{
    background:#fff;
    border-radius:24px;
    overflow:hidden;
    padding:15px;
    text-align:center;
    transition:.3s;
    border:1px solid #eee;
}

.shamaa-product-card:hover{
    transform:translateY(-6px);
    box-shadow:0 15px 40px rgba(0,0,0,.08);
}

.product-image img{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    border-radius:18px;
}

.product-title{
    font-size:18px;
    margin:15px 0 10px;
}

.product-price{
    color:#8b6548;
    font-weight:700;
}

.product-button a{
    display:block;
    margin-top:15px;
    background:#7a5c45;
    color:white;
    padding:12px;
    border-radius:12px;
}

.shamaa-shop-page {
    direction: rtl;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
    direction: rtl;
}

/* سایدبار سمت راست */
.shop-sidebar {
    grid-column: 1;
}

/* محصولات سمت چپ */
.shop-content {
    grid-column: 2;
}


/* گرید محصولات */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 0;
}


/* ریسپانسیو */
@media(max-width: 1024px) {

    .shop-layout {
        grid-template-columns: 220px 1fr;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media(max-width: 768px) {

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar,
    .shop-content {
        grid-column: auto;
    }

    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

}
.shamaa-product-card {
    direction: rtl;
}


.shamaa-product-card .woocommerce-loop-product__title {
    text-align: right;
    margin: 15px 0 10px;
}


.product-price {
    text-align: right;
}


.old-price {
    color: #999;
    font-size: 14px;
    text-decoration: line-through;
    margin-bottom: 4px;
}


.sale-price {
    color: #7a5c45;
    font-size: 18px;
    font-weight: bold;
}


.normal-price {
    color: #333;
    font-size: 18px;
    font-weight: bold;
}
.shamaa-product-card {
    direction: rtl;
}

.shamaa-product-card .woocommerce-loop-product__title {
    text-align: right !important;
    width: 100%;
}


/* قیمت را عمودی کن */
.shamaa-product-card .price {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: right !important;
    direction: rtl;
}


/* قیمت قبلی بالا */
.shamaa-product-card .price del {
    display: block !important;
    order: 1;
}


/* قیمت تخفیف پایین */
.shamaa-product-card .price ins {
    display: block !important;
    order: 2;
    text-decoration: none;
}
