/* ====== ROOT TOKENS ====== */
:root {
  /* Colors */
  --canvas:      #FAF8F5;
  --surface:     #F2EDE6;
  --surface-2:   #ECE5DA;
  --ink:         #2A2620;
  --ink-soft:    #6B6358;
  --ink-muted:   #9C9388;
  --moss:        #6B7F5E;
  --moss-light:  #8A9B7D;
  --moss-dark:   #5A6D4F;
  --clay:        #C67D5A;
  --clay-dark:   #B06A48;
  --clay-soft:   #E8C9B5;
  --border:      #D9D0C5;
  --border-soft: #E8E2D9;
  --white:       #FFFFFF;
  --overlay:     rgba(42, 38, 32, 0.55);
  --gold:        #E8A53C;
  --danger:      #C05050;
  --info:        #5B8DB8;

  /* Type */
  --font: 'Vazirmatn', system-ui, sans-serif;
  --fs-hero:    clamp(2.2rem, 6vw, 3.75rem);
  --fs-h2:      clamp(1.6rem, 4vw, 2.25rem);
  --fs-h3:      1.4rem;
  --fs-h4:      1.125rem;
  --fs-body:    1rem;
  --fs-small:   0.875rem;
  --fs-tiny:    0.75rem;
  --lh-tight:   1.25;
  --lh-body:    1.75;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;
  --sp-9: 96px;
  --sp-10: 120px;

  /* Radius */
  --r-card: 16px;
  --r-pill: 9999px;
  --r-input: 12px;
  --r-img: 12px;

  /* Shadow */
  --shadow-soft:  0 2px 16px rgba(42, 38, 32, 0.05);
  --shadow-card:  0 4px 24px rgba(42, 38, 32, 0.06);
  --shadow-hover: 0 12px 40px rgba(42, 38, 32, 0.12);
  --shadow-nav:   0 1px 0 rgba(42, 38, 32, 0.06);

  /* Transition */
  --t:      0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --max-w: 1280px;
  --nav-h: 72px;
}

/* ====== RESET ====== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--ink);
  background: var(--canvas);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
input, textarea { font-family: inherit; }

/* ====== FOCUS ====== */
:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ====== UTILITIES ====== */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--sp-5); }
.section { padding: var(--sp-9) 0; }
.section-head { text-align: center; margin-bottom: var(--sp-7); }
.section-head h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-3);
}
.section-head p { color: var(--ink-soft); font-size: var(--fs-body); max-width: 520px; margin: 0 auto; }
.eyebrow {
  display: inline-block;
  font-size: var(--fs-tiny);
  font-weight: 600;
  color: var(--moss);
  letter-spacing: 0.15em;
  margin-bottom: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  background: rgba(107, 127, 94, 0.08);
  border-radius: var(--r-pill);
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-pill);
  font-size: var(--fs-body);
  font-weight: 500;
  transition: all var(--t);
  white-space: nowrap;
  cursor: pointer;
}
.btn-clay {
  background: var(--clay);
  color: var(--white);
}
.btn-clay:hover { background: var(--clay-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(198, 125, 90, 0.3); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-moss {
  background: var(--moss);
  color: var(--white);
}
.btn-moss:hover { background: var(--moss-dark); }
.btn-sm { padding: var(--sp-2) var(--sp-4); font-size: var(--fs-small); }

/* ====== NAV ====== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 1000;
  transition: all var(--t);
}
.nav.scrolled {
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-nav);
}
.nav-inner {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--white);
  transition: color var(--t);
}
.nav.scrolled .logo { color: var(--ink); }
.logo-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--moss);
  border-radius: 8px;
  font-size: 1rem;
}
.logo span { letter-spacing: -0.01em; }
.logo .logo-art { font-weight: 400; }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
}
.nav-links a {
  font-size: var(--fs-small);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--t);
  position: relative;
}
.nav.scrolled .nav-links a { color: var(--ink-soft); }
.nav-links a:hover { color: var(--clay); }
.nav.scrolled .nav-links a:hover { color: var(--clay); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); }
.cart-btn {
  position: relative;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  color: var(--white);
  transition: all var(--t);
}
.nav.scrolled .cart-btn { color: var(--ink); }
.cart-btn:hover { background: rgba(255,255,255,0.12); }
.nav.scrolled .cart-btn:hover { background: var(--surface); }
.cart-btn svg { width: 22px; height: 22px; }
.cart-badge {
  position: absolute;
  top: 4px; left: 4px;
  background: var(--clay);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: var(--r-pill);
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--canvas);
}
.cart-badge.hidden { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  border-radius: var(--r-pill);
  cursor: pointer;
}
.hamburger span {
  width: 22px; height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--t);
}
.nav.scrolled .hamburger span { background: var(--ink); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 0; right: 0;
  width: 80%; max-width: 320px;
  height: 100vh;
  background: var(--canvas);
  z-index: 999;
  transform: translateX(100%);
  transition: transform var(--t);
  display: flex;
  flex-direction: column;
  padding: var(--sp-8) var(--sp-5);
  box-shadow: -4px 0 40px rgba(42,38,32,0.1);
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--border-soft);
  transition: color var(--t);
}
.mobile-menu a:hover { color: var(--clay); }
.menu-overlay {
  position: fixed; inset: 0;
  background: rgba(42, 38, 32, 0.4);
  z-index: 998;
  opacity: 0; visibility: hidden;
  transition: all var(--t);
}
.menu-overlay.open { opacity: 1; visibility: visible; }

/* ====== HERO ====== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-image: url('{% static "images/hero.png" %}');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  z-index: 0;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(42, 38, 32, 0.65) 0%, rgba(58, 50, 42, 0.5) 50%, rgba(42, 38, 32, 0.65) 100%);
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 0 var(--sp-5);
  margin: 0 auto;
}
.hero-content .eyebrow {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  margin-bottom: var(--sp-4);
}
.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 600;
  color: var(--white);
  line-height: var(--lh-tight);
  margin-bottom: var(--sp-4);
}
.hero p {
  font-size: clamp(1rem, 2.5vw, 1.15rem);
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  margin-bottom: var(--sp-6);
  font-weight: 300;
}
.hero-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.scroll-indicator {
  position: absolute;
  bottom: var(--sp-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  color: rgba(255,255,255,0.6);
  font-size: var(--fs-tiny);
}
.scroll-indicator .mouse {
  width: 24px; height: 38px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 4px; height: 8px;
  background: rgba(255,255,255,0.6);
  border-radius: 2px;
  animation: scrollDot 1.8s infinite;
}
@keyframes scrollDot {
  0% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* ====== FEATURES STRIP ====== */
.features-strip {
  background: var(--surface);
  padding: var(--sp-5) 0;
  border-bottom: 1px solid var(--border-soft);
}
.features-grid {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-small);
  color: var(--ink-soft);
  font-weight: 500;
}
.feature-item .icon { font-size: 1.25rem; }

/* ====== CATEGORIES ====== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
}
.cat-card {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  transition: transform var(--t);
  display: block;
}
.cat-card:hover { transform: translateY(-4px); }
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.cat-card:hover img { transform: scale(1.08); }
.cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(42,38,32,0.7) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--sp-4);
}
.cat-overlay h3 {
  font-size: var(--fs-h4);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-1);
}
.cat-overlay span {
  font-size: var(--fs-tiny);
  color: rgba(255,255,255,0.7);
}

/* ====== PRODUCTS ====== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}
.product-card {
  background: var(--white);
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--t);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}
.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
  display: block;
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }
.product-badge {
  position: absolute;
  top: var(--sp-3); right: var(--sp-3);
  background: var(--moss);
  color: var(--white);
  font-size: var(--fs-tiny);
  font-weight: 600;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
}
.product-info {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.product-cat {
  font-size: var(--fs-tiny);
  color: var(--ink-muted);
  font-weight: 500;
}
.product-name {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: var(--sp-2);
}
.product-price {
  font-size: var(--fs-body);
  font-weight: 700;
  color: var(--clay);
}
.product-price .unit { font-size: var(--fs-tiny); font-weight: 400; color: var(--ink-soft); }
.add-cart-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border-radius: var(--r-pill);
  color: var(--ink);
  transition: all var(--t);
  flex-shrink: 0;
}
.add-cart-btn:hover { background: var(--clay); color: var(--white); }
.add-cart-btn svg { width: 18px; height: 18px; }

/* ====== ABOUT ====== */
.about {
  background: var(--surface);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: center;
}
.about-img {
  border-radius: var(--r-card);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-card);
}
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-text h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.about-text p {
  color: var(--ink-soft);
  line-height: var(--lh-body);
  margin-bottom: var(--sp-4);
}
.about-stats {
  display: flex;
  gap: var(--sp-6);
  margin-top: var(--sp-5);
}
.stat-item .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--moss);
  display: block;
}
.stat-item .label {
  font-size: var(--fs-small);
  color: var(--ink-soft);
}

/* ====== TESTIMONIALS ====== */
.testi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.testi-card {
  background: var(--white);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.testi-stars {
  display: flex;
  gap: 2px;
  color: #E8A53C;
  font-size: 1rem;
}
.testi-text {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: var(--fs-small);
  flex: 1;
}
.testi-author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border-soft);
}
.testi-avatar {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--moss);
}
.testi-author .name {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink);
}
.testi-author .role {
  font-size: var(--fs-tiny);
  color: var(--ink-muted);
}

/* ====== CONTACT ====== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.contact-info h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  margin-bottom: var(--sp-4);
}
.contact-info > p {
  color: var(--ink-soft);
  margin-bottom: var(--sp-5);
}
.contact-items { display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.contact-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border-radius: var(--r-card);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.contact-item .label { font-size: var(--fs-tiny); color: var(--ink-muted); }
.contact-item .value { font-size: var(--fs-body); font-weight: 500; color: var(--ink); }
.social-links { display: flex; gap: var(--sp-2); margin-top: var(--sp-5); }
.social-link {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border-radius: var(--r-card);
  color: var(--ink-soft);
  transition: all var(--t);
}
.social-link:hover { background: var(--moss); color: var(--white); }
.social-link svg { width: 20px; height: 20px; }

.contact-form {
  background: var(--white);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
}
.form-group { margin-bottom: var(--sp-4); }
.form-group label {
  display: block;
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--sp-2);
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-input);
  font-size: var(--fs-body);
  color: var(--ink);
  background: var(--canvas);
  transition: border-color var(--t);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--moss);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-error {
  font-size: var(--fs-tiny);
  color: #C05050;
  margin-top: var(--sp-1);
  display: none;
}
.form-error.show { display: block; }
.form-success {
  background: rgba(107, 127, 94, 0.1);
  color: var(--moss-dark);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-input);
  font-size: var(--fs-small);
  margin-bottom: var(--sp-4);
  display: none;
}
.form-success.show { display: block; }

/* ====== FOOTER ====== */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  padding: var(--sp-8) 0 var(--sp-5);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.footer-brand .logo { color: var(--white); margin-bottom: var(--sp-3); }
.footer-brand p {
  font-size: var(--fs-small);
  line-height: 1.7;
  max-width: 320px;
}
.footer-col h4 {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--sp-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-col a {
  font-size: var(--fs-small);
  color: rgba(255,255,255,0.6);
  transition: color var(--t);
}
.footer-col a:hover { color: var(--clay); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--sp-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
}
.footer-bottom p { font-size: var(--fs-tiny); color: rgba(255,255,255,0.5); }

/* ====== BLOOM-IN ANIMATION ====== */
.bloom-in {
  opacity: 0;
  transform: translateY(30px) scale(0.96);
  transition: opacity 0.7s cubic-bezier(0.4,0,0.2,1), transform 0.7s cubic-bezier(0.4,0,0.2,1);
}
.bloom-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .section { padding: var(--sp-8) 0; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
  .testi-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .about-img { aspect-ratio: 4/3; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .about-stats { gap: var(--sp-4); }
  .product-info { padding: var(--sp-3); }
  .product-name { font-size: var(--fs-small); }
  .features-grid { gap: var(--sp-3); }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
}

/* ====== REDUCED MOTION ====== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .bloom-in { opacity: 1; transform: none; }
  .scroll-indicator .mouse::after { animation: none; }
}

/* ====== CART DRAWER (اصلاح شده برای موبایل) ====== */
.cart-overlay {
    position: fixed; inset: 0;
    background: rgba(42, 38, 32, 0.5);
    z-index: 1100;
    opacity: 0; visibility: hidden;
    transition: all var(--t);
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed;
    top: 0; left: 0;
    width: 400px;
    max-width: 100vw; /* اصلاح: در موبایل به 100% برسد */
    height: 100vh;
    background: var(--canvas);
    z-index: 1101;
    transform: translateX(-100%);
    transition: transform var(--t);
    display: flex;
    flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--sp-5);
    border-bottom: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.cart-header h3 { font-size: var(--fs-h4); font-weight: 600; }
.cart-close {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    background: var(--surface);
    transition: background var(--t);
}
.cart-close:hover { background: var(--surface-2); }
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: var(--sp-4) var(--sp-5);
    min-height: 0; /* برای جلوگیری از overflow در موبایل */
}
.cart-empty {
    text-align: center;
    padding: var(--sp-8) var(--sp-4);
    color: var(--ink-muted);
}
.cart-empty .icon { font-size: 3rem; margin-bottom: var(--sp-4); display: block; }
.cart-item {
    display: flex;
    gap: var(--sp-3);
    padding: var(--sp-3) 0;
    border-bottom: 1px solid var(--border-soft);
    align-items: center;
}
.cart-item-img {
    width: 72px; height: 72px;
    border-radius: var(--r-img);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--surface);
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); min-width: 0; }
.cart-item-name { font-size: var(--fs-small); font-weight: 600; color: var(--ink); }
.cart-item-price { font-size: var(--fs-tiny); color: var(--clay); font-weight: 600; }
.cart-item-controls {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    margin-top: var(--sp-2);
    flex-wrap: wrap;
}
.qty-btn {
    width: 26px; height: 26px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    background: var(--surface);
    font-size: var(--fs-small);
    color: var(--ink);
    transition: all var(--t);
    border: none;
    cursor: pointer;
}
.qty-btn:hover { background: var(--moss); color: var(--white); }
.qty-val { font-size: var(--fs-small); font-weight: 600; min-width: 24px; text-align: center; }
.cart-item-remove {
    font-size: var(--fs-tiny);
    color: var(--ink-muted);
    margin-right: auto;
    transition: color var(--t);
    background: none;
    border: none;
    cursor: pointer;
}
.cart-item-remove:hover { color: #C05050; }

/* === اصلاح فوتر سبد خرید برای موبایل === */
.cart-footer {
    padding: var(--sp-5);
    border-top: 1px solid var(--border-soft);
    flex-shrink: 0;
    background: var(--canvas);
    /* در موبایل به پایین بچسبد */
    position: sticky;
    bottom: 0;
    z-index: 5;
}
.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--sp-4);
}
.cart-total .label { font-size: var(--fs-body); color: var(--ink-soft); }
.cart-total .amount { font-size: 1.25rem; font-weight: 700; color: var(--ink); }
.cart-total .amount .unit { font-size: var(--fs-small); font-weight: 400; color: var(--ink-soft); }
.cart-checkout {
    width: 100%;
    padding: var(--sp-4);
    font-size: var(--fs-body);
    font-weight: 600;
}

/* ====== TOAST ====== */
.toast {
    position: fixed;
    bottom: var(--sp-6);
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--ink);
    color: var(--white);
    padding: var(--sp-3) var(--sp-6);
    border-radius: var(--r-pill);
    font-size: var(--fs-small);
    font-weight: 500;
    z-index: 1300;
    transition: transform var(--t);
    box-shadow: 0 8px 32px rgba(42,38,32,0.2);
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ====== MODAL OVERLAY ====== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(42, 38, 32, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.modal {
    background: #FAF8F5;
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.92);
    transition: transform 0.3s ease;
    position: relative;
}
.modal-overlay.open .modal {
    transform: scale(1);
}
.modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    z-index: 20;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.modal-close:hover {
    background: #ffffff;
    transform: scale(1.05);
}
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* ====== MODAL SLIDER ====== */
.modal-slider {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
    background: #F2EDE6;
}
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
.slider-track {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}
.slider-slide {
    min-width: 100%;
    height: 100%;
    flex-shrink: 0;
}
.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    border: none;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2A2620;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.slider-btn:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.05);
}
.slider-btn.prev {
    left: 12px;
}
.slider-btn.next {
    right: 12px;
}
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}
.slider-dot.active {
    background: #ffffff;
    width: 24px;
    border-radius: 4px;
}

/* ====== MODAL INFO ====== */
.modal-info {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 90vh;
}
.modal-info .product-cat {
    font-size: 12px;
    color: #9C9388;
    font-weight: 500;
    letter-spacing: 0.5px;
}
.modal-info h3 {
    font-size: 22px;
    font-weight: 600;
    color: #2A2620;
    margin: 0;
}
.modal-price {
    font-size: 24px;
    font-weight: 700;
    color: #C67D5A;
}
.modal-price .unit {
    font-size: 14px;
    font-weight: 400;
    color: #6B6358;
}
.modal-price .old-price {
    font-size: 16px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    margin-right: 10px;
}
.modal-description {
    font-size: 14px;
    color: #6B6358;
    line-height: 1.9;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}
.modal-description::-webkit-scrollbar {
    width: 4px;
}
.modal-description::-webkit-scrollbar-thumb {
    background: #D9D0C5;
    border-radius: 4px;
}
.modal-description ul {
    padding-right: 20px;
    margin: 8px 0;
}
.modal-description ul li {
    margin-bottom: 4px;
}
.modal-description strong {
    color: #2A2620;
}
.modal-description em {
    color: #C67D5A;
    font-style: italic;
}
.modal-specs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 0;
    border-top: 1px solid #E8E2D9;
    border-bottom: 1px solid #E8E2D9;
}
.modal-spec {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.modal-spec .key {
    color: #9C9388;
}
.modal-spec .val {
    color: #2A2620;
    font-weight: 500;
}
.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr !important;
    }
    .modal-slider {
        border-radius: 16px 16px 0 0;
        aspect-ratio: 4/3;
    }
    .modal-info {
        padding: 20px;
        max-height: none;
    }
    .modal-description {
        max-height: 150px;
    }
    .slider-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}
@media (max-width: 480px) {
    .modal-info {
        padding: 16px;
    }
    .modal-info h3 {
        font-size: 18px;
    }
    .modal-price {
        font-size: 20px;
    }
    .modal-description {
        font-size: 13px;
        max-height: 120px;
    }
}

/* ====== ALERT MESSAGES ====== */
.alert {
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-card);
    margin-bottom: var(--sp-2);
    box-shadow: var(--shadow-card);
    position: relative;
}
.alert-success {
    background: var(--moss);
    color: var(--white);
}
.alert-error {
    background: var(--danger);
    color: var(--white);
}
.alert-info {
    background: var(--ink);
    color: var(--white);
}
.alert .close-btn {
    position: absolute;
    top: 50%;
    left: var(--sp-3);
    transform: translateY(-50%);
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
}
.alert .close-btn:hover {
    opacity: 1;
}

/* ====== TOAST ANIMATIONS ====== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
}

.message-toast {
    animation: slideDown 0.3s ease-out;
}
.message-toast.removing {
    animation: slideUp 0.3s ease-in forwards;
}

/* ====== SIDEBAR ====== */
.sidebar-nav {
    padding: var(--sp-3);
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
}

.sidebar-divider {
    height: 1px;
    background: var(--border-soft);
    margin: var(--sp-2) var(--sp-4);
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
    border-radius: var(--r-input);
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--ink-soft);
    transition: all var(--t);
    cursor: pointer;
    margin-bottom: var(--sp-1);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}
.sidebar-nav-item:hover {
    background: var(--surface);
    color: var(--ink);
}
.sidebar-nav-item.active {
    background: var(--clay);
    color: var(--white);
}
.sidebar-nav-item .count {
    margin-right: auto;
    background: rgba(0,0,0,0.08);
    color: inherit;
    font-size: var(--fs-tiny);
    font-weight: 700;
    padding: 1px 8px;
    border-radius: var(--r-pill);
    min-width: 22px;
    text-align: center;
}
.sidebar-nav-item.active .count {
    background: rgba(255,255,255,0.25);
}

/* ====== RESPONSIVE MOBILE ====== */
@media (max-width: 768px) {
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding: var(--sp-3) var(--sp-4);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: var(--sp-2);
        align-items: center;
    }
    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }
    .sidebar-nav-item {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .sidebar-divider {
        width: 1px;
        height: 30px;
        margin: 0 var(--sp-2);
        flex-shrink: 0;
    }
}

/* ====== BUTTONS ====== */
.btn-danger {
    background: var(--danger);
    color: var(--white);
    border-radius: var(--r-pill);
    padding: var(--sp-2) var(--sp-4);
    font-size: var(--fs-small);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--t);
}
.btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ====== MEMORIES ====== */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
}

.memory-card {
    background: #F5F0EB;
    padding: var(--sp-8) var(--sp-6);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.memory-card h3 {
    font-size: var(--fs-h3);
    font-weight: 500;
    color: var(--ink);
    margin-bottom: var(--sp-4);
    font-family: 'Vazirmatn', serif;
}

.memory-card p {
    font-size: var(--fs-body);
    color: var(--ink-soft);
    line-height: 2;
    max-width: 360px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .memories-grid {
        grid-template-columns: 1fr;
    }
    .memory-card {
        padding: var(--sp-6) var(--sp-4);
        min-height: 300px;
        border-bottom: 1px solid var(--border-soft);
    }
    .memory-card:last-child {
        border-bottom: none;
    }
}

/* ====== فرم آپلود چند عکس ====== */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--r-card);
    padding: var(--sp-6);
    text-align: center;
    cursor: pointer;
    transition: all var(--t);
    background: var(--canvas);
    position: relative;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: var(--clay);
    background: var(--surface);
}

.upload-zone .icon {
    font-size: 2.5rem;
    color: var(--ink-muted);
    margin-bottom: var(--sp-2);
}

.upload-zone .text {
    font-size: var(--fs-small);
    color: var(--ink-muted);
}

.upload-zone .subtext {
    font-size: var(--fs-tiny);
    color: var(--ink-muted);
    margin-top: var(--sp-1);
}

.upload-zone.dragover {
    border-color: var(--clay);
    background: var(--clay-soft);
}

.preview-container {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-2);
    margin-top: var(--sp-3);
}

.preview-item {
    position: relative;
    width: 72px;
    height: 72px;
    border-radius: var(--r-img);
    overflow: hidden;
    border: 1px solid var(--border-soft);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--danger);
    color: var(--white);
    border: none;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ====== MEMORIES GRID ====== */
.memories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.memory-card {
    background: var(--surface);
    padding: var(--sp-7) var(--sp-5);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

@media (max-width: 1024px) {
    .memories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .memory-card {
        min-height: 280px;
        padding: var(--sp-6) var(--sp-4);
    }
}

@media (max-width: 768px) {
    .memories-grid {
        grid-template-columns: 1fr;
    }
    .memory-card {
        min-height: 240px;
        padding: var(--sp-5) var(--sp-4);
        border-bottom: 1px solid var(--border-soft);
    }
    .memory-card:last-child {
        border-bottom: none;
    }
    .about-grid {
        grid-template-columns: 1fr !important;
    }
    .about-img img {
        width: 100% !important;
        height: auto !important;
        display: block;
    }
}

/* ====== FAQ ====== */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
}
.faq-item {
    background: var(--white);
    border-radius: var(--r-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: all var(--t);
}
.faq-item:hover {
    border-color: var(--border);
}
.faq-question {
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: var(--ink);
    user-select: none;
}
.faq-question i {
    transition: transform var(--t);
    color: var(--clay);
}
.faq-item.active .faq-question i {
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    padding: 0 var(--sp-5);
}
.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 var(--sp-5) var(--sp-5);
}
.faq-answer p {
    color: var(--ink-soft);
    line-height: 1.8;
    font-size: var(--fs-small);
    opacity: 0;
    transition: opacity 0.4s ease 0.1s;
}
.faq-item.active .faq-answer p {
    opacity: 1;
}

/* ====== RELATED PRODUCTS ====== */
.related-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.hidden-product {
    display: none;
}
@media (max-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .related-products-grid {
        grid-template-columns: 1fr;
    }
}

/* ====== PRODUCT DETAIL ====== */
.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
}
.slider-btn:hover {
    background: var(--white) !important;
    transform: translateY(-50%) scale(1.1);
}

/* ====== FRAME COLOR ====== */
.frame-color-label {
    border: 2px solid var(--border-soft) !important;
}
.frame-color-label.selected {
    border-color: var(--clay) !important;
    background: rgba(198, 125, 90, 0.08) !important;
}
.frame-color-label.selected .color-dot {
    border-color: var(--clay) !important;
    box-shadow: 0 0 0 2px var(--clay);
}

.add-cart-in-details-btn {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface);
    border-radius: var(--r-pill);
    color: var(--ink);
    transition: all var(--t);
    flex-shrink: 0;
}