:root {
  --bg: #f4efe4;
  --paper: #fffaf0;
  --paper-2: #ebe0cc;
  --ink: #132f43;
  --ink-soft: #28485b;
  --blue: #1e5a78;
  --blue-dark: #0c2f44;
  --blue-light: #d9e7ec;
  --sand: #d7b56d;
  --sand-dark: #9a7531;
  --green: #0a6a4a;
  --red: #a9362a;
  --line: rgba(19, 47, 67, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Tahoma, sans-serif;
  line-height: 1.55;
}

body[data-lang="fr"] .content-ar,
body[data-lang="fr"] .nav-ar,
body[data-lang="ar"] .content-fr,
body[data-lang="ar"] .nav-fr {
  display: none !important;
}

body[data-lang="ar"] { font-family: Tahoma, Arial, sans-serif; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

.topbar {
  min-height: 82px;
  padding: 12px 5vw;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  background: var(--blue-dark);
  color: #fffaf0;
  border-bottom: 6px solid var(--sand);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
  white-space: nowrap;
  border: 2px solid rgba(255, 250, 240, .86);
  padding: 7px 12px 8px;
  background: rgba(255,255,255,.06);
}

.brand-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
}

.brand-text { display: grid; gap: 2px; min-width: 0; }
.brand-line { display: inline-flex; align-items: baseline; gap: 8px; }

.brand-main {
  font-weight: 900;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.04em;
  line-height: 1;
}

.brand-sub {
  text-transform: uppercase;
  font-size: clamp(14px, 2vw, 21px);
  letter-spacing: .03em;
  font-weight: 800;
}

.brand-meaning {
  color: #ead7a4;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body[data-lang="ar"] .brand-meaning { letter-spacing: 0; }

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  font-size: 15px;
}

.nav a,
.lang-btn {
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.04);
  color: #fffaf0;
}

.nav a:hover,
.lang-btn:hover,
.btn:hover { opacity: .88; }

.language-switch { display: flex; gap: 6px; }
.lang-btn { cursor: pointer; min-width: 48px; }
.lang-btn.is-active {
  color: var(--blue-dark);
  background: #fffaf0;
  border-color: #fffaf0;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: calc(100vh - 88px);
  display: grid;
  align-items: center;
  padding: clamp(42px, 6vw, 72px) 5vw;
  overflow: hidden;
  background: radial-gradient(circle at top right, rgba(215,181,109,.18), transparent 34%), var(--blue-dark);
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  opacity: .18;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.85) contrast(.95) brightness(.82);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12,47,68,.94), rgba(12,47,68,.66) 48%, rgba(12,47,68,.32));
  pointer-events: none;
}

.hero-shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(310px, .88fr) minmax(420px, 1.12fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
}

.hero-copy { min-width: 0; }

.hero-panel {
  width: 100%;
  margin: 0;
  padding: clamp(24px, 4vw, 42px);
  background: rgba(255, 250, 240, .95);
  border: 4px solid rgba(215, 181, 109, .86);
  box-shadow: 0 12px 50px rgba(0,0,0,.24);
}

body[data-lang="ar"] .hero-panel { margin-left: 0; }

.hero-photo {
  overflow: hidden;
  min-height: 430px;
  background: var(--paper);
  border: 4px solid rgba(215, 181, 109, .95);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

.hero-photo-img {
  width: 100%;
  height: min(58vw, 560px);
  min-height: 430px;
  object-fit: cover;
  filter: saturate(.94) contrast(.98);
}

.eyebrow,
.section-label {
  margin: 0 0 8px;
  color: var(--sand-dark);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

body[data-lang="ar"] .eyebrow,
body[data-lang="ar"] .section-label { letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 10px;
  font-size: clamp(48px, 8vw, 92px);
  line-height: .94;
  letter-spacing: -.05em;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

h3 { margin-bottom: 8px; font-size: 23px; }

.lead {
  max-width: 650px;
  font-size: clamp(18px, 2.3vw, 24px);
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-block;
  padding: 13px 18px;
  background: var(--blue-dark);
  color: #fffaf0;
  border: 2px solid var(--blue-dark);
  font-weight: 900;
  cursor: pointer;
}

.section { padding: clamp(54px, 7vw, 92px) 5vw; }
.about-section { background: var(--bg); }

.text-card,
.contact-box {
  padding: clamp(22px, 3vw, 36px);
  background: var(--paper);
  border: 3px solid var(--line);
}

.text-card.wide { max-width: 980px; }
.text-card p, .intro, .contact-box p { font-size: 18px; }
.products-section {
  background: var(--paper-2);
  border-block: 2px solid rgba(19,47,67,.14);
}

.intro { max-width: 820px; color: var(--ink-soft); }

.product-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--paper);
  border: 3px solid rgba(19,47,67,.22);
  min-height: 100%;
  overflow: hidden;
}

.product-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
  filter: saturate(.92) contrast(.96);
  border-bottom: 3px solid rgba(19,47,67,.22);
}

.product-body { padding: 20px; }
.product-body p { color: var(--ink-soft); }
.gallery-section { background: #e7dcc8; }

.gallery-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}

.gallery-grid .image-slot { min-height: 260px; }
.gallery-grid img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border: 3px solid rgba(19,47,67,.25);
  background: var(--paper);
  filter: saturate(.92) contrast(.96);
}

.gallery-grid .image-slot:first-child {
  grid-row: span 2;
}

.gallery-grid .image-slot:first-child img { height: 536px; }
.region-section { background: var(--blue-light); }

.region-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 22px;
  align-items: stretch;
}

.country-list {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: clamp(22px, 3vw, 36px);
  background: var(--blue-dark);
  color: #fffaf0;
  border: 3px solid var(--sand);
}

.country-list span {
  padding: 12px 14px;
  background: rgba(255,255,255,.07);
  border-left: 5px solid var(--sand);
  font-weight: 900;
}

body[data-lang="ar"] .country-list span {
  border-left: 0;
  border-right: 5px solid var(--sand);
}

.contact-section { background: var(--blue-dark); }
.contact-box {
  max-width: 980px;
  background: var(--paper);
  border-color: var(--sand);
}

.contact-form {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.contact-form label { font-weight: 900; color: var(--ink); }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(19,47,67,.24);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--blue); }
.form-btn { margin-top: 12px; width: fit-content; }
.hp-field { display: none !important; }

.form-message {
  margin: 18px 0;
  padding: 12px 14px;
  border: 2px solid currentColor;
  font-weight: 800;
}

.form-message.ok { color: var(--green); background: #edf8f2; }
.form-message.error { color: var(--red); background: #fff0ed; }

.email-line {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 3px solid var(--sand);
  font-weight: 900;
  color: var(--blue-dark);
}

.footer {
  padding: 24px 5vw;
  background: #081f2e;
  color: #fffaf0;
  border-top: 6px solid var(--sand);
}
.footer p { margin: 0; }

.image-slot { position: relative; }

/* Admin */
.admin-toolbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 5vw;
  background: #111827;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.20);
}

.admin-toolbar span {
  display: block;
  margin-top: 2px;
  color: #d1d5db;
  font-size: 13px;
}

.admin-actions { display: flex; align-items: center; gap: 8px; }
.admin-actions form { margin: 0; }
.admin-save,
.admin-logout {
  padding: 10px 12px;
  border: 0;
  cursor: pointer;
  font-weight: 900;
}
.admin-save { background: #d7b56d; color: #111827; }
.admin-logout { background: #374151; color: #fff; }

.admin-flash {
  position: sticky;
  top: 60px;
  z-index: 49;
  padding: 10px 5vw;
  font-weight: 900;
}
.admin-ok { background: #d1fae5; color: #065f46; }
.admin-error { background: #fee2e2; color: #991b1b; }

.admin-mode [contenteditable="true"] {
  outline: 2px dashed rgba(30,90,120,.45);
  outline-offset: 3px;
  cursor: text;
}

.admin-mode [contenteditable="true"]:focus {
  outline: 3px solid #d7b56d;
  background: rgba(255,255,255,.55);
}

.image-edit-form {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 6;
}

.image-edit-form label {
  display: inline-block;
  padding: 8px 10px;
  background: rgba(17,24,39,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.image-edit-form input { display: none; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #0c2f44, #1e5a78);
}

.login-card {
  width: min(440px, 100%);
  padding: 34px;
  background: var(--paper);
  border: 4px solid var(--sand);
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
}

.login-card h1 { font-size: 38px; margin-bottom: 8px; }
.login-logo {
  display: inline-block;
  margin-bottom: 20px;
  padding: 8px 12px;
  color: #fffaf0;
  background: var(--blue-dark);
  border-bottom: 4px solid var(--sand);
  font-weight: 900;
  font-size: 30px;
  letter-spacing: -.04em;
}
.login-logo span { font-size: 16px; letter-spacing: .02em; text-transform: uppercase; }

/* Simple mobile scroll animation, similar to light WordPress reveal effects. */
.reveal { will-change: transform, opacity; }

@media (max-width: 760px) {
  body.js-ready .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .75s ease, transform .75s ease;
  }

  body.js-ready .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  body.js-ready .hero-photo.reveal {
    transform: translateY(18px) scale(.985);
    transition: opacity 1s ease, transform 1.15s ease;
  }

  body.js-ready .hero-photo.reveal.is-visible { transform: translateY(0) scale(1); }
  body.js-ready .product-card.reveal:nth-child(2),
  body.js-ready .gallery-grid .image-slot.reveal:nth-child(2) { transition-delay: .07s; }
  body.js-ready .product-card.reveal:nth-child(3),
  body.js-ready .gallery-grid .image-slot.reveal:nth-child(3) { transition-delay: .12s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body.js-ready .reveal,
  body.js-ready .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

@media (max-width: 1050px) {
  .topbar { grid-template-columns: 1fr; align-items: start; }
  .nav { justify-content: flex-start; }
  .hero-shell { grid-template-columns: 1fr; }
  .hero-photo { max-width: 820px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-grid .image-slot:first-child { grid-row: auto; }
  .gallery-grid .image-slot:first-child img { height: 260px; }
  .region-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .product-grid, .gallery-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 22px 16px 34px; }
  .hero::after { background: linear-gradient(180deg, rgba(12,47,68,.72), rgba(12,47,68,.94)); }
  .hero-shell { grid-template-columns: 1fr; gap: 18px; }
  .hero-photo { order: -1; min-height: 250px; }
  .hero-photo-img { height: 285px; min-height: 0; }
  .hero-panel { width: auto; padding: 24px; }
  .btn { width: 100%; text-align: center; }
  .form-btn { width: 100%; }
  .gallery-grid img, .gallery-grid .image-slot:first-child img { height: 260px; }
  .admin-toolbar { align-items: flex-start; flex-direction: column; }
  .admin-actions { width: 100%; }
  .admin-save, .admin-logout { width: 100%; }
  .brand { width: 100%; min-width: 0; white-space: normal; }
  .brand-logo { width: 48px; height: 48px; }
  .brand-line { flex-wrap: wrap; }
}
