/* =========================================================
   ADVIRA — Main Stylesheet
   Premium, natural, food-focused, mobile-first, RTL
   ========================================================= */

:root {
  --color-green: #3d5c3a;
  --color-green-dark: #2a4028;
  --color-green-light: #6b8f5f;
  --color-earth: #a8763e;
  --color-earth-light: #d9b48f;
  --color-cream: #faf6f0;
  --color-white: #ffffff;
  --color-text: #2b2621;
  --color-text-muted: #6f6a63;
  --color-border: #e8e1d6;
  --shadow-sm: 0 2px 8px rgba(43, 38, 33, 0.06);
  --shadow-md: 0 8px 24px rgba(43, 38, 33, 0.10);
  --radius: 14px;
  --font-main: 'Vazirmatn', Tahoma, sans-serif;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

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

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

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

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

.skip-link {
  position: absolute;
  right: -999px;
  top: 0;
  background: var(--color-green);
  color: #fff;
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { right: 10px; top: 10px; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--color-green-dark);
}

h1 { font-size: clamp(28px, 5vw, 44px); }
h2 { font-size: clamp(22px, 4vw, 32px); }
h3 { font-size: 19px; }

p { color: var(--color-text-muted); margin: 0 0 14px; }

.section { padding: 56px 0; }
.section-header { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-header .eyebrow {
  display: inline-block;
  color: var(--color-earth);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.bg-cream { background: var(--color-cream); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary { background: var(--color-green); color: #fff; }
.btn-primary:hover { background: var(--color-green-dark); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-green); color: var(--color-green); }
.btn-outline:hover { background: var(--color-green); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo { display: flex; flex-direction: column; line-height: 1.1; }
.logo-fa { font-size: 24px; font-weight: 800; color: var(--color-green-dark); }
.logo-en { font-size: 10px; letter-spacing: 3px; color: var(--color-earth); }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a { font-weight: 500; color: var(--color-text); padding: 6px 2px; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--color-green); border-color: var(--color-green); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: inline-flex; color: var(--color-green-dark); }
.cart-badge {
  position: absolute; top: -8px; left: -10px;
  background: var(--color-earth); color: #fff;
  font-size: 11px; font-weight: 700;
  border-radius: 999px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--color-green-dark); display: block; }

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--color-cream) 0%, #fff 100%);
  padding: 64px 0 56px;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-content .eyebrow { color: var(--color-earth); font-weight: 700; letter-spacing: .5px; display: block; margin-bottom: 14px; }
.hero-content p { font-size: 17px; max-width: 480px; }
.hero-actions { display: flex; gap: 14px; margin-top: 24px; flex-wrap: wrap; }
.hero-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; background: var(--color-earth-light); }

/* Poster slider (homepage banners managed from admin panel) */
.poster-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 8;
  max-height: 560px;
  overflow: hidden;
  background: var(--color-earth-light);
}
.poster-track { position: relative; width: 100%; height: 100%; }
.poster-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease;
}
.poster-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.poster-slide-link, .poster-slide > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.poster-slide img { object-fit: cover; }
.poster-slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(0deg, rgba(20,16,12,.62) 0%, rgba(20,16,12,0) 55%);
  color: #fff;
  padding-bottom: 40px;
  pointer-events: none;
}
.poster-slide-overlay .container { pointer-events: none; }
.poster-slide-overlay h2 { color: #fff; margin: 0 0 8px; font-size: clamp(20px, 3vw, 34px); }
.poster-slide-overlay p { max-width: 520px; margin: 0 0 14px; font-size: 15px; opacity: .95; }
.poster-slide-overlay .btn { pointer-events: none; }
.poster-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.85);
  color: var(--color-text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.poster-nav:hover { background: #fff; }
.poster-prev { right: 16px; }
.poster-next { left: 16px; }
.poster-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.poster-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,.6); cursor: pointer; padding: 0; transition: all .25s ease; }
.poster-dot.is-active { background: #fff; width: 24px; border-radius: 5px; }
@media (max-width: 768px) {
  .poster-slider { aspect-ratio: 4 / 3; max-height: none; }
  .poster-nav { width: 34px; height: 34px; font-size: 18px; }
  .poster-slide-overlay { padding-bottom: 24px; }
}

/* Brand intro */
.intro-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.intro-card { text-align: center; padding: 28px 18px; }
.intro-icon {
  width: 60px; height: 60px; margin: 0 auto 16px;
  background: var(--color-cream); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-green);
}

/* Product grid */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s ease, transform .2s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.product-thumb { aspect-ratio: 1/1; background: var(--color-cream); overflow: hidden; position: relative; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge-unavailable {
  position: absolute; top: 10px; right: 10px;
  background: #b3492f; color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.badge-featured {
  position: absolute; top: 10px; left: 10px;
  background: var(--color-earth); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.product-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { margin: 0; font-size: 16px; }
.product-body h3 a { color: var(--color-text); }
.product-desc { font-size: 13px; margin: 0; flex: 1; }
.product-meta { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--color-text-muted); }
.product-price { font-weight: 700; color: var(--color-green-dark); font-size: 16px; }
.product-price small { font-weight: 400; font-size: 12px; color: var(--color-text-muted); }
.product-actions { margin-top: 10px; display: flex; gap: 8px; }

/* Category grid */
.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.category-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 1/1; background: var(--color-earth-light);
  display: flex; align-items: flex-end; box-shadow: var(--shadow-sm);
}
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.category-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.55), transparent 60%);
}
.category-card span {
  position: relative; z-index: 1; color: #fff; font-weight: 700; padding: 18px;
  font-size: 17px;
}

/* Why Advira */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.why-card { padding: 26px 20px; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); }
.why-card .num { color: var(--color-earth-light); font-size: 34px; font-weight: 800; margin-bottom: 6px; }

/* How to use */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step-card { text-align: center; }
.step-num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--color-green);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; margin: 0 auto 14px;
}

/* Recipes */
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.recipe-card { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); background: #fff; }
.recipe-thumb { aspect-ratio: 16/10; background: var(--color-cream); overflow: hidden; }
.recipe-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recipe-body { padding: 18px 20px; }

/* CTA */
.cta-section {
  background: var(--color-green-dark);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  padding: 56px 24px;
  margin: 0 20px;
}
.cta-section h2, .cta-section p { color: #fff; }
.cta-section p { opacity: .85; }

/* Footer */
.site-footer { background: var(--color-cream); margin-top: 60px; border-top: 1px solid var(--color-border); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 48px 20px; }
.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; color: var(--color-text-muted); font-size: 14px; }
.footer-col ul li a:hover { color: var(--color-green); }
.footer-social { display: inline-block; margin-top: 10px; color: var(--color-green); font-weight: 600; font-size: 14px; }
.footer-bottom { border-top: 1px solid var(--color-border); padding: 16px 0; text-align: center; font-size: 13px; color: var(--color-text-muted); }

/* Breadcrumb */
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--color-green); }

/* Filters (products page) */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.filter-pill {
  padding: 8px 18px; border-radius: 999px; border: 1px solid var(--color-border);
  font-size: 13px; font-weight: 600; color: var(--color-text-muted);
}
.filter-pill.active, .filter-pill:hover { background: var(--color-green); color: #fff; border-color: var(--color-green); }

/* Product detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.product-detail-image { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 1/1; background: var(--color-cream); }
.product-detail-image img { width: 100%; height: 100%; object-fit: cover; }
.product-detail-info .price-row { display: flex; align-items: baseline; gap: 10px; margin: 16px 0; }
.product-detail-info .price-row strong { font-size: 28px; color: var(--color-green-dark); }
.product-tabs { margin-top: 24px; }
.product-tabs h4 { margin-top: 22px; font-size: 15px; }
.qty-form { display: flex; gap: 10px; margin-top: 18px; align-items: center; }
.qty-input { width: 70px; padding: 11px; border: 1px solid var(--color-border); border-radius: 8px; text-align: center; font-family: var(--font-main); }
.stock-note { font-size: 13px; margin-top: 10px; }
.stock-ok { color: var(--color-green); }
.stock-bad { color: #b3492f; }

/* Forms */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.form-control {
  width: 100%; padding: 13px 14px; border: 1px solid var(--color-border);
  border-radius: 10px; font-family: var(--font-main); font-size: 15px; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--color-green); }
textarea.form-control { resize: vertical; min-height: 100px; }

.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.alert-success { background: #e7f2e5; color: var(--color-green-dark); border: 1px solid #c6dfc0; }
.alert-error { background: #fbe9e5; color: #a03a24; border: 1px solid #f0c6ba; }

/* Cart table */
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th, .cart-table td { padding: 14px 10px; border-bottom: 1px solid var(--color-border); text-align: right; font-size: 14px; }
.cart-table th { color: var(--color-text-muted); font-weight: 600; font-size: 13px; }
.cart-product { display: flex; align-items: center; gap: 12px; }
.cart-product img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: var(--color-cream); }
.cart-qty-form { display: flex; align-items: center; gap: 6px; }
.cart-qty-form input { width: 55px; padding: 7px; border: 1px solid var(--color-border); border-radius: 8px; text-align: center; font-family: var(--font-main); }
.remove-link { color: #a03a24; font-size: 13px; }

.cart-summary { max-width: 360px; margin-inline-start: auto; background: var(--color-cream); border-radius: var(--radius); padding: 22px; }
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 14px; }
.cart-summary .total { font-weight: 800; font-size: 18px; color: var(--color-green-dark); border-top: 1px solid var(--color-border); padding-top: 12px; margin-top: 12px; }

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

/* Checkout */
.checkout-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: start; }
.order-summary-box { background: var(--color-cream); border-radius: var(--radius); padding: 22px; }
.order-summary-box .item-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; color: var(--color-text-muted); }

/* 404 */
.error-page { text-align: center; padding: 100px 20px; }
.error-page h1 { font-size: 90px; color: var(--color-earth-light); }

/* Responsive */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image { order: -1; aspect-ratio: 16/9; }
  .intro-grid, .why-grid, .steps-grid, .recipe-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid, .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .main-nav {
    position: absolute; top: 76px; right: 0; left: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    display: none; box-shadow: var(--shadow-sm);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; padding: 10px 20px; gap: 0; }
  .main-nav a { display: block; padding: 14px 0; border-bottom: 1px solid var(--color-border); }
  .nav-toggle { display: flex; }
  .product-grid, .category-grid { grid-template-columns: repeat(2, 1fr); }
  .intro-grid, .why-grid, .steps-grid, .recipe-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .cart-summary { margin-inline-start: 0; max-width: 100%; }
  .hero-actions { justify-content: center; }
  .cta-section { margin: 0; border-radius: 0; }
}

/* Advira Kitchen Hub */
.advira-kitchen-hub .section-header-eyebrow{display:inline-block;color:var(--color-earth);font-weight:700;font-size:13px;margin-bottom:8px}.kitchen-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:960px;margin:0 auto}.kitchen-choice-card{display:flex;align-items:center;gap:22px;min-height:190px;padding:30px;background:#fff;border:1px solid var(--color-border);border-radius:var(--radius);box-shadow:var(--shadow-sm);transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}.kitchen-choice-card:hover{transform:translateY(-3px);box-shadow:var(--shadow-md);border-color:rgba(61,92,58,.28)}.kitchen-choice-icon{width:76px;height:76px;flex:0 0 76px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:var(--color-cream);font-size:36px}.kitchen-choice-content h2{margin-bottom:8px;font-size:22px}.kitchen-choice-content p{margin-bottom:12px;font-size:14px}.kitchen-choice-link{color:var(--color-green);font-size:13px;font-weight:700}@media(max-width:640px){.kitchen-choice-grid{grid-template-columns:1fr;gap:14px}.kitchen-choice-card{min-height:0;padding:20px;gap:15px}.kitchen-choice-icon{width:58px;height:58px;flex-basis:58px;font-size:28px}.kitchen-choice-content h2{font-size:18px}.kitchen-choice-content p{font-size:13px}}
