@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --accent: #4AA148;
  --accent-dark: #3b8a3a;
  --accent-light: #e8f5e8;
  --text: #1a1a1a;
  --text-soft: #64748b;
  --bg: #fafbfc;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 25px rgba(0,0,0,.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Heebo', sans-serif;
  direction: rtl;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Top bar ── */
.topbar {
  background: var(--accent);
  color: #fff;
  text-align: center;
  padding: 8px 16px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .3px;
}

/* ── Navbar ── */
.navbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo span { font-size: 1.6rem; }
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  font-size: .92rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--text);
  transition: color .2s;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav-cart {
  position: relative;
  font-size: 1.4rem;
  cursor: pointer;
}
.cart-badge {
  position: absolute;
  top: -6px;
  left: -8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0f2617 0%, #1a4a2e 50%, #0f2617 100%);
  padding: 80px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(74,161,72,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.3;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.7);
  max-width: 500px;
  margin: 0 auto 32px;
  line-height: 1.7;
}
.hero-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 14px 36px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Heebo', sans-serif;
  border: none;
  cursor: pointer;
  transition: all .2s;
}
.hero-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(74,161,72,.3);
}

/* ── Section ── */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
}
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-sub {
  color: var(--text-soft);
  font-size: .9rem;
  margin-bottom: 32px;
}

/* ── Category pills ── */
.cat-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cat-pill {
  padding: 8px 20px;
  border-radius: 24px;
  border: 2px solid var(--border);
  background: var(--card);
  font-family: 'Heebo', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
}
.cat-pill:hover { border-color: var(--accent); color: var(--accent); }
.cat-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all .25s;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}
.product-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f0f0f0;
}
.product-card-body {
  padding: 16px;
}
.product-card-name {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.4;
}
.product-card-desc {
  font-size: .78rem;
  color: var(--text-soft);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-current {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}
.price-compare {
  font-size: .85rem;
  color: #999;
  text-decoration: line-through;
}
.price-badge {
  background: #fef2f2;
  color: #ef4444;
  font-size: .7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ── Product page ── */
.product-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px;
}
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .product-layout { grid-template-columns: 1fr; gap: 24px; }
}
.product-gallery {
  position: sticky;
  top: 80px;
}
.product-main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #f0f0f0;
  margin-bottom: 12px;
}
.product-thumbs {
  display: flex;
  gap: 8px;
}
.product-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: border-color .2s;
}
.product-thumb:hover,
.product-thumb.active { border-color: var(--accent); }
.product-info .breadcrumb {
  font-size: .82rem;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.product-info .breadcrumb a { color: var(--accent); }
.product-info h1 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.3;
}
.product-info .price-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.product-info .price-main {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
}
.product-info .price-was {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
}
.product-info .price-save {
  background: #fef2f2;
  color: #ef4444;
  font-size: .78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}
.product-info .desc {
  color: var(--text-soft);
  font-size: .95rem;
  line-height: 1.8;
  margin-bottom: 24px;
}
.variant-section {
  margin-bottom: 20px;
}
.variant-label {
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.variant-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.variant-btn {
  padding: 8px 18px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--card);
  font-family: 'Heebo', sans-serif;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  color: var(--text);
}
.variant-btn:hover { border-color: var(--accent); }
.variant-btn.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent-dark);
}
.variant-btn.unavailable {
  opacity: .4;
  cursor: not-allowed;
  text-decoration: line-through;
}
.add-to-cart-btn {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}
.add-to-cart-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74,161,72,.25);
}
.add-to-cart-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.product-features {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.feature {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-soft);
}
.feature-icon { font-size: 1.1rem; }

/* ── Cart drawer ── */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 1000;
  display: none;
  opacity: 0;
  transition: opacity .3s;
}
.cart-overlay.open { display: block; opacity: 1; }
.cart-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 380px;
  max-width: 90vw;
  height: 100vh;
  background: var(--card);
  z-index: 1001;
  transform: translateX(-100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 10px 0 30px rgba(0,0,0,.1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cart-header h2 { font-size: 1.2rem; font-weight: 700; }
.cart-close {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}
.cart-item-img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.cart-item-info { flex: 1; }
.cart-item-name { font-size: .88rem; font-weight: 600; }
.cart-item-variant { font-size: .75rem; color: var(--text-soft); }
.cart-item-price { font-size: .9rem; font-weight: 700; color: var(--accent); margin-top: 4px; }
.cart-empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }
.cart-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 16px;
}
.cart-checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-family: 'Heebo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

/* ── Footer ── */
.footer {
  background: #0f2617;
  color: rgba(255,255,255,.6);
  padding: 48px 32px;
  margin-top: 48px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 700px) {
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
}
.footer h3 { color: #fff; font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.footer p { font-size: .85rem; line-height: 1.7; }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: .85rem; }
.footer a { color: rgba(255,255,255,.6); transition: color .2s; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1200px;
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.1);
  text-align: center;
  font-size: .78rem;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-family: 'Heebo', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  animation: toast-in .3s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(10px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Back link ── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: .88rem;
  font-weight: 500;
  margin-bottom: 20px;
  transition: color .2s;
}
.back-link:hover { color: var(--accent); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .hero h1 { font-size: 2rem; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .section { padding: 32px 16px; }
  .navbar { padding: 0 16px; }
  .nav-links { gap: 16px; font-size: .82rem; }
}
