@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=Amiri:wght@700&family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --forest: #123A54;
  --forest-light: #1E4F71;
  --citrus: #E2790F;
  --citrus-light: #F0A34C;
  --sun: #F2B705;
  --paper: #FAF9F6;
  --paper-dim: #EFEDE6;
  --ink: #17242E;
  --ink-soft: #56636E;
  --tomato: #B23A3A;
  --line: #DDE3E7;

  --font-display-en: 'Playfair Display', serif;
  --font-display-ar: 'Amiri', serif;
  --font-body: 'Cairo', sans-serif;

  --radius: 18px;
  --shadow: 0 10px 30px -14px rgba(28, 23, 18, 0.35);
  --shadow-lift: 0 20px 40px -16px rgba(28, 23, 18, 0.45);
  --grad-cta: linear-gradient(135deg, var(--citrus), var(--sun));
  --grad-citrus: linear-gradient(135deg, var(--citrus), var(--sun));
}

* { box-sizing: border-box; }

html[dir="rtl"] body { font-family: var(--font-body); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html[lang="ar"] .display,
html[lang="ar"] .brand-name { font-family: var(--font-display-ar); }
html[lang="en"] .display,
html[lang="en"] .brand-name { font-family: var(--font-display-en); }

.display { font-weight: 800; letter-spacing: -0.01em; }

img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--citrus);
  outline-offset: 2px;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--forest); color: var(--sun);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; overflow: hidden;
  border: none; padding: 0; transition: transform .15s ease;
}
.brand-mark:hover { transform: scale(1.05); }
.brand-logo { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.brand-text { line-height: 1.15; min-width: 0; }
.brand-name { font-size: 20px; color: var(--forest); white-space: nowrap; }
.brand-sub { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 420px) {
  .brand-name { font-size: 16px; }
  .brand-sub { font-size: 9px; }
}

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--forest); position: relative; padding-bottom: 2px; }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--citrus); transition: right .2s ease;
}
.main-nav a:hover { color: var(--citrus); }
.main-nav a:hover::after { right: 0; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  border: 1.5px solid var(--forest); background: transparent;
  color: var(--forest); font-weight: 700; font-size: 13px;
  border-radius: 999px; padding: 8px 14px; transition: background .15s ease, color .15s ease, transform .15s ease;
}
.lang-toggle:hover { background: var(--forest); color: var(--paper); transform: translateY(-1px); }

.cart-btn {
  position: relative; border: none; background: var(--forest); color: var(--paper);
  border-radius: 999px; padding: 10px 16px 10px 14px; font-weight: 700; font-size: 14px;
  display: flex; align-items: center; gap: 8px; transition: transform .15s ease, box-shadow .15s ease;
}
.cart-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
html[dir="rtl"] .cart-btn { padding: 10px 14px 10px 16px; }
.cart-count {
  background: var(--tomato); color: #fff; border-radius: 999px;
  min-width: 20px; height: 20px; font-size: 12px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 5px;
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px; position: relative; overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% -10%, rgba(244,196,48,0.35), transparent),
    radial-gradient(500px 260px at -5% 110%, rgba(232,135,58,0.25), transparent);
}
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--forest); color: var(--sun); font-weight: 700; font-size: 13px;
  padding: 8px 16px; border-radius: 999px; transform: rotate(-1.5deg);
  box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(38px, 5vw, 60px); margin: 18px 0 14px; color: var(--forest); line-height: 1.05; }
.hero h1 .accent { color: var(--tomato); }
.hero p.lede { font-size: 17px; color: var(--ink-soft); max-width: 46ch; margin: 0 0 26px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 13px 24px; font-weight: 700; font-size: 15px;
  border: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-primary { background: var(--grad-cta); color: var(--ink); }
.btn-secondary { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-secondary:hover { background: var(--forest); color: var(--paper); }

.hero-art {
  aspect-ratio: 1/1; border-radius: 28px; background: var(--forest);
  position: relative; overflow: hidden; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; padding: 12%;
}
.hero-logo { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; position: relative; z-index: 1; }
.hero-art::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(251,246,234,0.14) 1.5px, transparent 1.5px);
  background-size: 18px 18px;
}

/* ---------- Category chips ---------- */
.section-title { font-size: 26px; color: var(--forest); margin: 0 0 18px; }
.categories { padding: 44px 0 8px; }
.chip-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.chip {
  flex-shrink: 0; border: 1.5px solid var(--line); background: #fff;
  padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--ink-soft);
  position: relative; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.chip:hover { transform: translateY(-1px); border-color: var(--citrus); color: var(--forest); }
.chip.active { background: var(--forest); border-color: var(--forest); color: var(--paper); box-shadow: 0 8px 18px -8px rgba(28,23,18,0.55); }

/* ---------- Product grid (crate cards) ---------- */
.products { padding: 30px 0 70px; }
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px;
}
.crate {
  background: #fff; border-radius: var(--radius); border: 1px solid var(--line);
  overflow: hidden; position: relative; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.crate:hover { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.crate-media {
  aspect-ratio: 4/3; background: linear-gradient(160deg, var(--paper-dim), var(--paper));
  display: flex; align-items: center; justify-content: center; font-size: 60px;
  position: relative; border-bottom: 3px dashed var(--line); overflow: hidden;
}
.crate-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.crate:hover .crate-media img { transform: scale(1.06); }
.stamp-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: var(--sun); color: var(--ink); font-weight: 800; font-size: 12px;
  border-radius: 999px; padding: 6px 10px; transform: rotate(-3deg);
  border: 2px solid var(--ink);
}
.crate-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.crate-name { font-weight: 700; font-size: 16px; }
.crate-cat {
  font-size: 11px; font-weight: 700; color: var(--forest); background: var(--paper-dim);
  display: inline-block; padding: 3px 10px; border-radius: 999px; width: fit-content;
}
.crate-footer { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 10px; }
.price-stamp {
  border: 2px solid var(--forest); color: var(--forest); border-radius: 50%;
  width: 66px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 800; font-size: 11px; transform: rotate(-3deg); line-height: 1.15; flex-shrink: 0;
  padding: 4px; text-align: center; overflow-wrap: anywhere; background: var(--paper);
}
.price-stamp small { font-size: 8px; font-weight: 600; margin-top: 1px; }
.add-btn {
  background: var(--grad-citrus); color: var(--ink); border: none; border-radius: 12px;
  padding: 10px 18px; font-weight: 800; font-size: 14px; transition: transform .15s ease, box-shadow .15s ease;
}
.add-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(232,135,58,0.7); }
.add-btn:disabled { background: var(--line); color: var(--ink-soft); cursor: not-allowed; transform: none; box-shadow: none; }
.oos-tag { font-size: 12px; font-weight: 700; color: var(--tomato); }

/* ---------- Section divider ---------- */
.divider {
  height: 1px; border: none; margin: 0;
  background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 20px);
}

/* ---------- Cart drawer ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(32,28,20,0.5); z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.overlay.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 92vw);
  background: var(--paper); z-index: 70; box-shadow: var(--shadow);
  transform: translateX(100%); transition: transform .25s ease; display: flex; flex-direction: column;
}
html[dir="rtl"] .drawer { transform: translateX(-100%); }
.drawer.open { transform: translateX(0); }
.drawer-header { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.drawer-title { font-size: 20px; color: var(--forest); }
.icon-btn { background: none; border: none; font-size: 20px; color: var(--ink-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 22px; }
.drawer-footer { padding: 18px 22px 22px; border-top: 1px solid var(--line); }

.cart-line { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-line-thumb { width: 54px; height: 54px; border-radius: 10px; background: var(--paper-dim); display: flex; align-items: center; justify-content: center; font-size: 26px; flex-shrink: 0; overflow: hidden; }
.cart-line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 700; font-size: 14px; }
.cart-line-price { font-size: 13px; color: var(--ink-soft); }
.qty-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; font-weight: 700; }
.qty-val { font-weight: 700; min-width: 18px; text-align: center; }
.remove-link { font-size: 12px; color: var(--tomato); font-weight: 700; background: none; border: none; margin-inline-start: auto; }

.empty-state { text-align: center; padding: 50px 10px; color: var(--ink-soft); }
.empty-state .emoji { font-size: 44px; margin-bottom: 12px; }

.subtotal-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 18px; color: var(--forest); margin-bottom: 14px; }
.full-btn { width: 100%; }

/* ---------- Checkout ---------- */
.checkout-body { display: flex; flex-direction: column; gap: 14px; }
.field label { display: block; font-weight: 700; font-size: 13px; margin-bottom: 6px; color: var(--forest); }
.field input, .field select, .field textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px;
  font-family: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
.field textarea { resize: vertical; min-height: 60px; }
.radio-row { display: flex; gap: 10px; }
.radio-opt {
  flex: 1; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.radio-opt.checked { border-color: var(--citrus); background: rgba(232,135,58,0.08); }

.order-summary { background: var(--paper-dim); border-radius: 12px; padding: 12px 14px; font-size: 13px; }
.order-summary-row { display: flex; justify-content: space-between; padding: 3px 0; }

.success-state { text-align: center; padding: 30px 6px; }
.success-state .emoji { font-size: 52px; }
.success-state h3 { color: var(--forest); font-size: 22px; margin: 10px 0 4px; }
.order-number-badge {
  display: inline-block; background: var(--forest); color: var(--sun); font-weight: 800;
  border-radius: 999px; padding: 8px 18px; margin: 10px 0 16px; font-size: 18px;
}

/* ---------- About / Visit ---------- */
.split-section { padding: 60px 0; }
.split-section .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split-section p { color: var(--ink-soft); font-size: 16px; max-width: 50ch; }
.about-art {
  aspect-ratio: 4/3; border-radius: var(--radius); background: var(--grad-citrus);
  display: flex; align-items: center; justify-content: center; font-size: 90px;
  box-shadow: var(--shadow);
}
#visit { background: var(--forest); color: var(--paper); padding: 60px 0; }
#visit .section-title, #visit h2 { color: var(--sun); }
#visit .visit-item { margin-bottom: 12px; }
#visit .visit-label { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.7; }
#visit .visit-value { font-size: 15px; font-weight: 700; line-height: 1.5; }
#visit .visit-value a { text-decoration: underline; text-underline-offset: 2px; }
.map-frame { border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; border: 0; width: 100%; height: 220px; display: block; }

.branch-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.branch-card {
  background: rgba(251,246,234,0.06); border: 1px solid rgba(251,246,234,0.16);
  border-radius: var(--radius); overflow: hidden;
}
.branch-info { padding: 18px 20px 20px; }
.branch-name { font-weight: 800; font-size: 17px; color: var(--sun); margin-bottom: 12px; }
.directions-btn { width: 100%; margin-top: 6px; border-color: var(--sun); color: var(--sun); }
.directions-btn:hover { background: var(--sun); color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 28px 0; text-align: center; font-size: 13px; color: var(--ink-soft);
  border-top: 1px solid var(--line); background: var(--paper-dim);
}

/* ---------- Entrance animation (hero only, CSS-only so it can never get stuck hidden) ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge, .hero h1, .hero p.lede, .hero-ctas { animation: fade-up .6s ease both; }
.hero h1 { animation-delay: .08s; }
.hero p.lede { animation-delay: .16s; }
.hero-ctas { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero p.lede, .hero-ctas { animation: none; }
}

@media (max-width: 860px) {
  .main-nav { display: none; }
  .hero .wrap, .split-section .wrap { grid-template-columns: 1fr; }
  .hero-art, .about-art { order: -1; max-width: 340px; margin: 0 auto; }
}
