/* El Koubasy 3D — main stylesheet. Logical properties keep Arabic (RTL) and English (LTR) in sync. */

:root {
  --navy: #1a2044;
  --navy-2: #2b3366;
  --orange: #f19020;
  --orange-2: #ffb347;
  --green: #5fae3a;
  --cream: #fff7ec;
  --paper: #ffffff;
  --ink: #1a2044;
  --muted: #5d627c;
  --line: rgba(26, 32, 68, .1);
  --accent: #f19020;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 20px 50px -20px rgba(26, 32, 68, .25);
  --shadow-sm: 0 8px 24px -12px rgba(26, 32, 68, .25);
  --header-h: 76px;
  --font: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--cream);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
  position: fixed; inset-inline-start: 16px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); }
.center { text-align: center; }
.section { padding-block: clamp(72px, 10vw, 130px); position: relative; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 700; letter-spacing: .02em;
  color: var(--orange); margin-bottom: .8em;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }
.lang-en .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; }
.section-title { font-size: clamp(1.9rem, 4vw, 3rem); color: var(--navy); }
.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head .eyebrow::after { content: ""; width: 28px; height: 3px; border-radius: 3px; background: currentColor; }

/* Buttons */
.btn {
  --b: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border-radius: 999px;
  background: var(--b); color: #fff; font-weight: 700; text-decoration: none;
  border: 2px solid var(--b); cursor: pointer;
  box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--b) 80%, transparent);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px color-mix(in srgb, var(--b) 90%, transparent); }
.btn--ghost { background: transparent; color: var(--navy); --b: var(--navy); box-shadow: none; }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--small { min-height: 42px; padding: 0 20px; font-size: .95rem; }

/* Background + 3D stage */
.ek-bg { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: linear-gradient(180deg, #fffaf3 0%, var(--cream) 100%); }
.ek-bg__blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; transition: background 1s var(--ease); }
.ek-bg__blob--a { width: 46vmax; height: 46vmax; inset-inline-end: -12vmax; top: -10vmax; background: color-mix(in srgb, var(--accent) 55%, #fff); }
.ek-bg__blob--b { width: 34vmax; height: 34vmax; inset-inline-start: -14vmax; bottom: -8vmax; background: color-mix(in srgb, var(--green) 35%, #fff); }
.ek-bg__blob--c { width: 22vmax; height: 22vmax; inset-inline-start: 30%; top: 40%; background: color-mix(in srgb, var(--orange-2) 40%, #fff); opacity: .35; }
.ek-stage { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.ek-stage canvas { width: 100%; height: 100%; display: block; }
.poster { opacity: 0; transition: opacity .6s var(--ease); }
.no-3d .poster { opacity: 1; }
.has-3d .poster { opacity: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  transition: background .3s, box-shadow .3s;
}
.site-header.is-scrolled { background: rgba(255, 250, 243, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.admin-bar .site-header { top: 32px; }
.site-header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { width: auto; height: 46px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.site-nav a {
  display: block; padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--navy);
  transition: background .25s, color .25s;
}
.site-nav a:hover, .site-nav a.is-current { background: rgba(241, 144, 32, .14); color: #b9620a; }
.site-nav__lang-mobile { display: none; }
.site-header__actions { display: flex; align-items: center; gap: 12px; }
.lang-switch { font-weight: 700; text-decoration: none; padding: 8px 12px; border-radius: 10px; color: var(--navy); }
.lang-switch:hover { background: rgba(26, 32, 68, .06); }
.nav-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 12px; background: var(--navy); cursor: pointer; padding: 0 12px; flex-direction: column; justify-content: center; gap: 6px; }
.nav-toggle__bar { display: block; height: 2px; background: #fff; border-radius: 2px; transition: transform .3s var(--ease); }
.nav-open .nav-toggle__bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-open .nav-toggle__bar:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero */
.hero { min-height: calc(100svh - var(--header-h)); display: flex; align-items: center; position: relative; padding-block: 40px 90px; }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 40px; }
.hero__title {
  font-size: clamp(2.6rem, 7vw, 5.6rem); font-weight: 900; letter-spacing: -.01em; line-height: 1.08;
  background: linear-gradient(100deg, var(--navy) 0%, var(--navy-2) 45%, var(--orange) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-block: .08em;
}
.lang-ar .hero__title { line-height: 1.3; }
.hero__sub { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__visual { height: min(72vh, 680px); display: grid; place-items: center; position: relative; }
.hero__visual::before {
  content: ""; position: absolute; width: 74%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 35%, #fff) 0%, color-mix(in srgb, var(--accent) 12%, transparent) 60%, transparent 72%);
  transition: background 1s var(--ease);
}
.hero__visual .poster { max-height: 90%; width: auto; position: relative; filter: drop-shadow(0 30px 40px rgba(26, 32, 68, .25)); }
.scroll-hint {
  position: absolute; bottom: 22px; inset-inline-start: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: .8rem; font-weight: 600; color: var(--muted); text-decoration: none;
}
[dir="rtl"] .scroll-hint { transform: translateX(50%); }
.scroll-hint i { width: 24px; height: 38px; border: 2px solid currentColor; border-radius: 14px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; top: 7px; inset-inline-start: 50%; width: 4px; height: 8px; margin-inline-start: -2px; border-radius: 2px; background: var(--orange); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 80% { opacity: 0; transform: translateY(12px); } 100% { opacity: 0; } }

/* Stats */
.stats { position: relative; z-index: 1; }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.stat { background: rgba(255, 255, 255, .92); padding: 30px 20px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.stat strong { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; color: var(--orange); line-height: 1; }
.stat span { color: var(--muted); font-weight: 600; }

/* About */
.about__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.about__copy p { color: var(--muted); }
.fresh-card {
  margin-top: 28px; padding: 24px 26px; border-radius: var(--radius); background: var(--navy); color: #fff;
  position: relative; overflow: hidden;
}
.fresh-card::after { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--orange); opacity: .25; inset-inline-end: -50px; top: -60px; }
.fresh-card h3 { color: var(--orange-2); font-size: 1.3rem; }
.fresh-card p { color: rgba(255, 255, 255, .85); margin: 0; position: relative; z-index: 1; }
.about__media { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 30%; gap: 12px; align-items: center; }
.about__photo { margin: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); position: relative; aspect-ratio: 4 / 3.4; }
.about__photo img { width: 100%; height: 100%; object-fit: cover; }
.about__photo figcaption {
  position: absolute; inset-inline-start: 18px; bottom: 18px; background: #fff; border-radius: 16px; padding: 12px 18px;
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-sm); line-height: 1.2;
}
.about__photo figcaption strong { font-size: 2rem; color: var(--orange); font-weight: 900; }
.about__photo figcaption span { font-weight: 700; color: var(--navy); max-width: 7em; }
.about__anchor { height: 420px; pointer-events: none; }

/* Products (sticky scroll stage) */
.products { position: relative; height: calc(var(--count) * 38vh + 100vh); }
.products__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; align-items: center; overflow: hidden; padding-top: var(--header-h); }
.products__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; height: 100%; }
.products__panel { max-height: 100%; overflow: auto; padding-block: 16px; scrollbar-width: thin; }
.products__hint { color: var(--muted); font-size: .95rem; }
.chips__label { font-weight: 800; font-size: .85rem; color: var(--navy); margin: 14px 0 8px; opacity: .7; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 6px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .85); color: var(--navy);
  cursor: pointer; font-weight: 600; font-size: .9rem; white-space: nowrap; transition: background .3s, color .3s, transform .3s var(--ease), border-color .3s;
}
[dir="rtl"] .chip { padding: 4px 6px 4px 14px; }
.chip img { width: 22px; height: 32px; object-fit: contain; }
.chip:hover { transform: translateY(-2px); border-color: var(--c); }
.chip.is-active { background: var(--c); color: #fff; border-color: var(--c); }
.product-card {
  margin-top: 22px; padding: 24px 26px; border-radius: var(--radius); background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow); border-top: 5px solid var(--accent); transition: border-color .6s var(--ease);
}
.product-card__count { font-weight: 800; color: var(--accent); font-size: .9rem; margin-bottom: 4px; transition: color .6s; }
.product-card h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--navy); }
.product-card p { color: var(--muted); }
.product-card__meta { display: flex; gap: 26px; margin: 0 0 12px; }
.product-card__meta div { display: flex; flex-direction: column; }
.product-card__meta dt { font-size: .8rem; color: var(--muted); }
.product-card__meta dd { margin: 0; font-weight: 800; color: var(--navy); }
.product-card.is-swapping [data-p] { animation: swap .5s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.products__stage { height: 100%; max-height: 720px; display: grid; place-items: center; position: relative; }
.products__stage::before {
  content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, #fff) 0%, transparent 70%);
  transition: background .8s var(--ease);
}
.products__stage .poster { max-height: 80%; width: auto; position: relative; filter: drop-shadow(0 30px 40px rgba(26, 32, 68, .25)); }

/* Brands */
.brands { background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .7) 18%, rgba(255, 255, 255, .7) 82%, transparent); }
.brands__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.brand-card {
  background: var(--paper); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm);
  border: 1px solid var(--line); transition: box-shadow .4s var(--ease), transform .4s var(--ease);
  transform-style: preserve-3d; will-change: transform;
}
.brand-card:hover { box-shadow: var(--shadow); }
.brand-card__img { aspect-ratio: 4 / 3; display: grid; place-items: center; border-radius: var(--radius-sm); background: linear-gradient(160deg, #fff4e6, #fff); margin-bottom: 16px; overflow: hidden; }
.brand-card__img img { max-height: 90%; width: auto; object-fit: contain; transform: translateZ(30px); transition: transform .5s var(--ease); }
.brand-card:hover .brand-card__img img { transform: translateZ(30px) scale(1.06); }
.brand-card h3 { font-size: 1.35rem; color: var(--navy); }
.brand-card p { color: var(--muted); font-size: .97rem; margin-bottom: .6em; }
.brand-card__more { font-size: .88rem !important; border-top: 1px dashed var(--line); padding-top: .6em; }

/* Packaging */
.pack__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.pack__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.pack__list { margin: 0; display: grid; gap: 14px; }
.pack__list div { background: rgba(255, 255, 255, .9); border-radius: var(--radius-sm); padding: 16px 20px; border-inline-start: 4px solid var(--orange); box-shadow: var(--shadow-sm); }
.pack__list dt { font-weight: 800; color: var(--navy); }
.pack__list dd { margin: 4px 0 0; color: var(--muted); }

/* Chairman */
.chairman { background: var(--navy); color: #fff; overflow: hidden; }
.chairman::before { content: ""; position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 60px solid rgba(241, 144, 32, .12); inset-inline-end: -160px; top: -200px; }
.chairman__grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; position: relative; }
.chairman__photo { margin: 0; border-radius: 50%; overflow: hidden; aspect-ratio: 1; border: 6px solid var(--orange); box-shadow: 0 0 0 12px rgba(241, 144, 32, .15); }
.chairman__photo img { width: 100%; height: 100%; object-fit: cover; }
.chairman blockquote { margin: 30px 0 20px; font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.8; font-weight: 600; position: relative; }
.chairman blockquote::before { content: "“"; position: absolute; top: -.55em; inset-inline-start: -.1em; font-size: 5rem; color: var(--orange); opacity: .5; line-height: 1; }
.chairman blockquote p { margin: 0; position: relative; }
.chairman__name { display: flex; flex-direction: column; }
.chairman__name strong { color: var(--orange-2); font-size: 1.2rem; }
.chairman__name span { color: rgba(255, 255, 255, .7); }

/* Certificates */
.certs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; perspective: 1200px; }
.cert { margin: 0; background: #fff; border-radius: var(--radius-sm); padding: 14px; box-shadow: var(--shadow-sm); text-align: center; transition: box-shadow .4s, transform .4s var(--ease); transform-style: preserve-3d; }
.cert img { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.cert figcaption { font-weight: 800; color: var(--navy); margin-top: 10px; font-size: .95rem; }

/* Clients marquee */
.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee__track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__item { flex: none; width: 150px; height: 90px; margin-inline: 10px; background: #fff; border-radius: 16px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.marquee__item img { max-width: 70%; max-height: 55%; object-fit: contain; filter: grayscale(1); opacity: .75; transition: filter .3s, opacity .3s; }
.marquee__item:hover img { filter: none; opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Branches */
.branches__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.branch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.branch-list li { background: #fff; border-radius: var(--radius-sm); padding: 14px 20px; font-weight: 700; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 12px; }
.branch-list li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 4px solid var(--orange); flex: none; }
.branch-list em { font-style: normal; font-size: .8rem; background: var(--green); color: #fff; padding: 2px 10px; border-radius: 999px; margin-inline-start: auto; }
.branches__globe img { width: min(440px, 100%); margin-inline: auto; animation: float 7s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(26, 32, 68, .2)); }
@keyframes float { 50% { transform: translateY(-14px) rotate(2deg); } }

/* Contact */
.contact__card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: clamp(28px, 5vw, 56px);
  border-radius: calc(var(--radius) + 8px); background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%); color: #fff;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.contact__card::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: var(--orange); opacity: .18; inset-inline-end: -120px; bottom: -160px; }
.contact__card .section-title { color: #fff; }
.contact__intro p { color: rgba(255, 255, 255, .8); }
.contact__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; position: relative; z-index: 1; }
.contact__list li { background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; flex-direction: column; gap: 2px; }
.contact__list span { font-size: .85rem; color: var(--orange-2); font-weight: 700; }
.contact__list a { color: #fff; font-weight: 700; text-decoration: none; }
.contact__list a:hover { color: var(--orange-2); }
.contact__list address { font-style: normal; }
[dir="rtl"] .contact__list a[dir="ltr"] { text-align: end; }

/* Footer */
.site-footer { background: #11163a; color: rgba(255, 255, 255, .75); padding-top: 56px; margin-top: 40px; }
.site-footer__inner { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: 32px; padding-bottom: 36px; }
.site-footer__brand img { height: 52px; width: auto; filter: brightness(0) invert(1); margin-bottom: 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--orange-2); }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 18px; font-size: .85rem; }
.wa-float {
  position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center; box-shadow: 0 12px 28px -8px rgba(37, 211, 102, .7);
  transition: transform .3s var(--ease);
}
.wa-float:hover { transform: scale(1.08); }

/* Single product */
.product-page { min-height: calc(100svh - var(--header-h)); padding-block: 30px 80px; }
.product-page__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.product-page__viewer { height: min(78vh, 720px); display: grid; place-items: center; position: relative; cursor: grab; touch-action: pan-y; }
.product-page__viewer:active { cursor: grabbing; }
.product-page__viewer::before { content: ""; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 30%, #fff) 0%, transparent 70%); }
.product-page__viewer .poster { max-height: 85%; width: auto; position: relative; }
.product-page__drag { position: absolute; bottom: 0; font-size: .85rem; color: var(--muted); margin: 0; opacity: 0; transition: opacity .6s; }
.has-3d .product-page__drag { opacity: 1; }
.back-link { display: inline-block; margin-bottom: 18px; font-weight: 700; text-decoration: none; color: var(--muted); }
.back-link::before { content: "→ "; }
.lang-en .back-link::before { content: "← "; }
.product-page__desc { color: var(--muted); font-size: 1.1rem; }
.product-page__others { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.product-page__others a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: #fff; border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .88rem; transition: border-color .3s; }
[dir="rtl"] .product-page__others a { padding: 4px 4px 4px 12px; }
.product-page__others a:hover { border-color: var(--c); }
.product-page__others img { width: 22px; height: 32px; object-fit: contain; }

/* Generic pages */
.entry__content { color: var(--muted); }

/* Responsive */
@media (max-width: 1024px) {
  .brands__grid { grid-template-columns: repeat(2, 1fr); }
  .certs { grid-template-columns: repeat(2, 1fr); }
  .site-nav a { padding: 8px 10px; }
}

@media (max-width: 860px) {
  :root { --header-h: 66px; }
  body { font-size: 16px; }
  .brand img { height: 38px; }
  .nav-toggle { display: flex; }
  .site-header__actions .btn, .site-header__actions .lang-switch { display: none; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; background: rgba(255, 250, 243, .97); backdrop-filter: blur(14px);
    padding: 12px 16px 20px; box-shadow: 0 20px 30px -20px rgba(26, 32, 68, .3);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all .3s var(--ease);
  }
  .nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; }
  .site-nav a { padding: 12px 14px; font-size: 1.05rem; }
  .site-nav__lang-mobile { display: block; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }

  .hero { min-height: auto; padding-block: 10px 70px; }
  .hero__grid { grid-template-columns: 1fr; gap: 0; }
  .hero__visual { order: -1; height: 46vh; }
  .hero__copy { text-align: center; }
  .hero__copy .eyebrow::before { display: none; }
  .hero__actions { justify-content: center; }
  .scroll-hint { display: none; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .about__grid, .pack__grid, .branches__grid, .contact__card, .product-page__grid { grid-template-columns: 1fr; }
  .about__media { grid-template-columns: 1fr; }
  .about__anchor { display: none; }

  /* Mobile: no sticky scroll-jacking, the section scrolls like normal content */
  .products { height: auto; }
  .products__sticky { position: static; height: auto; overflow: visible; padding-block: calc(var(--header-h) + 8px) 40px; }
  .products__grid { grid-template-columns: 1fr; grid-template-rows: none; gap: 0; height: auto; }
  .products__stage { order: -1; height: 36vh; height: 36svh; }
  .products__panel { max-height: none; overflow: visible; padding-block: 0; }
  .products__panel .section-title { font-size: 1.5rem; margin-bottom: .2em; }
  .products__panel .eyebrow, .products__hint { display: none; }
  .chips__label { margin: 12px 0 6px; }
  .chips { flex-wrap: wrap; gap: 8px; }
  .chip { font-size: .85rem; padding-block: 3px; }
  .product-card { margin-top: 12px; padding: 16px 18px; }
  .product-card p[data-p="desc"] { font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

  .brands__grid { grid-template-columns: 1fr; }
  .chairman__grid { grid-template-columns: 1fr; text-align: center; }
  .chairman__photo { width: 200px; margin-inline: auto; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .product-page__viewer { height: 52vh; }
  .admin-bar .site-header { top: 46px; }
}

@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* The 3D canvas sits behind the page (z-index -1), so these glow circles were
   painted ON TOP of the bottle and washed it out. Hide them once 3D is running;
   they still show behind the static poster image when 3D is off. */
.has-3d .hero__visual::before,
.has-3d .products__stage::before,
.has-3d .product-page__viewer::before { opacity: 0; }

/* Flying fruit around the product (assets/js/fruits.js) */
.fly { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.fly__item {
  position: absolute; width: var(--sz); height: var(--sz);
  margin: calc(var(--sz) / -2) 0 0 calc(var(--sz) / -2);
  translate: calc(var(--mx, 0) * var(--depth) * -40px) calc(var(--my, 0) * var(--depth) * -30px);
  opacity: 0; scale: .2;
  left: 50%; top: 50%;
  transition: left .9s var(--ease) var(--in), top .9s var(--ease) var(--in), opacity .5s var(--ease) var(--in), scale .9s var(--ease) var(--in), translate .4s ease-out;
}
.fly__item.is-in { left: var(--x); top: var(--y); opacity: 1; scale: 1; }
.fly__item.is-out { left: 50%; top: 50%; opacity: 0; scale: .2; transition-delay: 0s; transition-duration: .5s; }
.fly__item.is-far { filter: blur(1.5px) saturate(.9); }
.fly__item.is-far.is-in { opacity: .75; }
.fly__item img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  filter: drop-shadow(0 14px 18px rgba(26, 32, 68, .22));
  rotate: var(--rot);
  animation: fly-float var(--dur) ease-in-out var(--delay) infinite;
}
@keyframes fly-float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(6px, -16px) rotate(8deg); }
  66% { transform: translate(-8px, 10px) rotate(-6deg); }
}
@media (prefers-reduced-motion: reduce) { .fly__item img { animation: none; } }

/* ===== Hero: full-screen flavour slider (assets/js/hero.js) ===== */
.hero {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; align-items: stretch;
  height: 100vh; height: 100svh; min-height: 560px;
  margin-top: calc(var(--header-h) * -1); padding: var(--header-h) 0 0;
  position: relative; overflow: hidden; overflow: clip;
}
.admin-bar .hero { height: calc(100svh - 32px); }
/* Colour panels sit behind the 3D canvas (z-index -1) so the bottle renders on top of them. */
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--cream); }
.hero__panel {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: var(--c); background: color-mix(in srgb, var(--c) 60%, #fff);
  transition: clip-path .95s cubic-bezier(.7, 0, .2, 1);
}
.hero__panel::after {
  content: ""; position: absolute; left: 50%; bottom: 15%; width: min(300px, 50vw); height: 30px; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(26, 32, 68, .22), transparent); filter: blur(4px);
}
.hero__word {
  font-weight: 900; font-size: min(24vw, 42vh); line-height: 1; color: #fff; white-space: nowrap;
  margin-top: -16vh; user-select: none;
  transition: translate .95s cubic-bezier(.7, 0, .2, 1);
}
.lang-en .hero__word { letter-spacing: -.03em; font-size: min(20vw, 40vh); margin-top: -10vh; }

.hero__tabs {
  position: relative; z-index: 3; display: flex; justify-content: center; gap: clamp(18px, 3vw, 44px);
  padding: 14px 16px 0; overflow-x: auto; scrollbar-width: none;
}
.hero__tabs::-webkit-scrollbar { display: none; }
.hero__tab {
  flex: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 6px 2px; cursor: pointer;
  color: #fff; font-weight: 700; font-size: 1.02rem; opacity: .82; text-shadow: 0 1px 10px rgba(26, 32, 68, .18);
  transition: opacity .3s, border-color .3s, transform .3s var(--ease);
}
.hero__tab:hover { opacity: 1; transform: translateY(-2px); }
.hero__tab.is-active { opacity: 1; border-color: #fff; }

.hero__visual { height: auto; min-height: 0; width: min(560px, 86vw); margin-inline: auto; }

.hero__bottom {
  position: relative; z-index: 3; display: grid; grid-template-columns: auto 1fr auto; align-items: end; gap: 12px;
  padding: 0 clamp(16px, 4vw, 56px) clamp(54px, 9vh, 92px);
}
.hero__arrow {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .85); background: rgba(255, 255, 255, .16); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.hero__arrow:hover { background: #fff; color: var(--navy); transform: scale(1.08); }
.hero__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
[dir="rtl"] .hero__arrow svg { transform: scaleX(-1); }
.hero__center { text-align: center; color: #fff; text-shadow: 0 1px 12px rgba(26, 32, 68, .2); }
.hero__title, .lang-ar .hero__title {
  background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #fff;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem); font-weight: 900; line-height: 1.35; padding: 0; margin: 0;
}
.hero__flavor { margin: 0 0 12px; font-weight: 600; font-size: .98rem; }
.hero__cta {
  display: inline-block; padding: 10px 28px; border: 2px solid #fff; border-radius: 999px;
  color: #fff; font-weight: 800; text-decoration: none; text-shadow: none;
  transition: background .3s, color .3s, transform .3s var(--ease);
}
.lang-en .hero__cta { text-transform: uppercase; letter-spacing: .16em; font-size: .9rem; }
.hero__cta:hover { background: #fff; color: var(--navy); transform: translateY(-2px); }

.hero__wave { position: absolute; inset-inline: 0; bottom: -1px; height: clamp(34px, 5.5vw, 68px); z-index: 1; pointer-events: none; direction: ltr; overflow: hidden; }
.hero__wave svg { display: block; width: 200%; height: 100%; fill: var(--cream); animation: hero-wave 16s linear infinite; }
@keyframes hero-wave { to { transform: translateX(-50%); } }

/* Big soft-focus fruit close to the camera, like a shallow depth of field. */
.fly__item.is-near { filter: blur(7px); }
.fly__item.is-near.is-in { opacity: .92; }

@media (max-width: 860px) {
  .hero { min-height: 520px; padding: var(--header-h) 0 0; }
  .admin-bar .hero { height: calc(100svh - 46px); }
  .hero__tabs { justify-content: center; gap: 11px; padding-inline: 8px; }
  .hero__tab { font-size: .86rem; padding: 8px 1px; }
  .hero__visual { order: 0; height: auto; }
  .hero__bottom { position: static; grid-template-columns: 1fr; }
  .hero__arrow { width: 44px; height: 44px; position: absolute; top: 48%; z-index: 3; }
  .hero__arrow[data-hero="prev"] { inset-inline-start: 10px; }
  .hero__arrow[data-hero="next"] { inset-inline-end: 10px; }
  .hero__center { position: relative; z-index: 3; }
  .hero__bottom { padding-bottom: 46px; }
  .hero__word { margin-top: -18vh; font-size: min(30vw, 30vh); }
}
@media (prefers-reduced-motion: reduce) { .hero__wave svg { animation: none; } }

/* Very narrow phones: let the flavour tabs scroll instead of squeezing. */
@media (max-width: 359px) { .hero__tabs { justify-content: flex-start; } }
