/* Core design for El Sayed Ramadan — Wholesale Nuts */
:root {
  /* Brand palette */
  --brown: #5a3825; /* Tradition */
  --gold: #c8a951; /* Heritage */
  --crimson: #8b2e35; /* Folklore accent */
  --indigo: #2e3b6f; /* Trust */
  --cream: #f9f5f0; /* Neutral background */

  /* Tokens */
  --bg: var(--cream);
  --text: #2b211b;
  --muted: #786a61;
  --border: #e6e0d9;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  --container: 1200px;
}

/* Base */
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: var(--indigo);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
h1 {
  font-size: clamp(1.8rem, 2.6vw + 1rem, 3rem);
}
h2 {
  font-size: clamp(1.4rem, 1.8vw + 0.9rem, 2.2rem);
}
h3 {
  font-size: clamp(1.1rem, 1.2vw + 0.8rem, 1.4rem);
}
p {
  margin: 0 0 1rem;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 5vw, 2rem);
}

/* More breathing room on small/medium screens */
@media (max-width: 920px) {
  .container { padding-inline: clamp(1.25rem, 6vw, 2rem); }
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.02);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.75rem;
  position: relative;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--brown);
}
.brand .logo { height: 108px; width: auto; display: block; }
.brand .name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav a {
  color: var(--indigo);
  font-weight: 600;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
}
.nav a[aria-current="page"] {
  color: #fff;
  background: var(--indigo);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--indigo);
}
.nav-toggle:hover {
  background: #faf8f5;
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    right: 1rem;
    top: calc(100% + 0.5rem);
    background: #fff;
    flex-direction: column;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    width: min(90vw, 320px);
    box-shadow: var(--shadow);
    display: none;
  }
  .nav.open {
    display: flex;
  }
}

@media (max-width: 820px) {
  html[dir="rtl"] .nav { left: 1rem; right: auto; }
}

/* Hero */
.hero {
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
  padding-block: 2rem;
}
.hero .tag {
  color: var(--crimson);
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  font-size: 0.9rem;
}
.hero p.lead {
  font-size: clamp(1rem, 1.2vw + 0.8rem, 1.2rem);
  color: var(--muted);
}
.hero .cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--indigo);
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.btn.primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #2b211b;
}
.btn.accent {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
.btn:hover {
  filter: brightness(0.98);
  transform: translateY(-1px);
  transition: transform 150ms ease, filter 150ms ease;
}
.hero .media {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

@media (max-width: 920px) {
  .hero .wrap {
    grid-template-columns: 1fr;
  }
}

/* Highlights */
.highlights {
  padding: 2.5rem 0;
}
.highlights .grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.card h3 {
  margin-bottom: 0.25rem;
}
@media (max-width: 920px) {
  .highlights .grid {
    grid-template-columns: 1fr;
  }
}

/* Products Grid */
.products-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.product {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product figure {
  margin: 0;
}
.product .meta {
  padding: 0.9rem;
  display: grid;
  gap: 0.5rem;
}
.product .meta p {
  color: var(--muted);
  margin: 0;
}
.product .actions {
  margin-top: auto;
  padding: 0.9rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.5rem;
}
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* Testimonials */
.testimonials {
  background: #fff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2rem 0;
}
.testimonials .grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}
.quote {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.quote blockquote {
  margin: 0;
  font-style: italic;
}
.quote .by {
  color: var(--muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}
@media (max-width: 920px) {
  .testimonials .grid {
    grid-template-columns: 1fr;
  }
}

/* Sections */
section {
  padding: 2rem 0;
}
.section-title {
  margin-bottom: 1rem;
}

/* Contact */
.contact-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
}
.form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.form .row {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr 1fr;
}
.form .row + .row {
  margin-top: 0.75rem;
}
.form label {
  font-weight: 600;
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  font: inherit;
}
.form textarea {
  min-height: 140px;
  resize: vertical;
}
.form .actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.8rem;
}
.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}
.map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
@media (max-width: 980px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form .row {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 2rem;
}
.site-footer .grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 2fr 1fr 1fr;
}
.site-footer small {
  color: var(--muted);
}
@media (max-width: 920px) {
  .site-footer .grid {
    grid-template-columns: 1fr;
  }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 500ms ease, transform 500ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Lightbox */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.lightbox-backdrop.open {
  display: flex;
}
.lightbox-dialog {
  background: #000;
  padding: 0;
  border-radius: 8px;
  max-width: 90vw;
  max-height: 90vh;
}
.lightbox-dialog img {
  display: block;
  width: 100%;
  height: auto;
}
.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-weight: 700;
}

/* A11y */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* RTL + Arabic support */
html[dir="rtl"] body { direction: rtl; text-align: right; }
html[lang="ar"] body { font-family: "Cairo", "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
html[dir="rtl"] .site-header .wrap { flex-direction: row-reverse; }
html[dir="rtl"] .nav { justify-content: flex-start; }
html[dir="rtl"] .nav a { text-align: right; }
