/* =========================================================
   ROYLE للأثاث — نظام التصميم
   خلفية إسبريسو دافئة + لون خشب الجوز + برونز خافت
   خط El Messiri (عناوين) + Tajawal (نصوص)
   ========================================================= */

:root {
  --ink:        #1A1714;
  --ink-soft:   #241F1A;
  --sand:       #F6F1E7;
  --sand-2:     #ECE4D4;
  --walnut:     #8B5E3C;
  --walnut-lt:  #A97B54;
  --gold:       #C6A15B;
  --muted-dk:   #B3A794;
  --muted-lt:   #7A7062;
  --line-dk:    rgba(246, 241, 231, 0.12);
  --line-lt:    rgba(26, 23, 20, 0.1);

  --font-display: 'El Messiri', serif;
  --font-body: 'Tajawal', sans-serif;

  --container: 1220px;
  --radius: 4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--walnut);
  outline-offset: 3px;
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--walnut);
  font-weight: 700;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  color: var(--ink);
  margin-bottom: 0.8rem;
}

.btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.92rem;
  border: 1px solid transparent;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  cursor: pointer;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--walnut-lt); transform: translateY(-2px); color: var(--sand); }
.btn-ghost { border-color: rgba(246,241,231,0.4); color: var(--sand); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-full { width: 100%; text-align: center; }

/* ===================== HEADER ===================== */

.nav-toggle { display: none; }

.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  background: rgba(26, 23, 20, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dk);
  transition: box-shadow 0.3s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,0.3); }

.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo, .footer-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sand);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.logo span, .footer-logo span {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted-dk);
}

.main-nav { display: flex; align-items: center; gap: 2.1rem; }
.main-nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted-dk);
  transition: color 0.2s ease;
}
.main-nav a:not(.nav-cta):hover { color: var(--sand); }
.main-nav a.is-active { color: var(--gold); }

.nav-cta {
  background: var(--gold);
  color: var(--ink) !important;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius);
  font-weight: 700;
}
.nav-cta:hover { background: var(--walnut-lt); }

.nav-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.4rem; }
.nav-burger span { width: 22px; height: 2px; background: var(--sand); }

/* ===================== HERO ===================== */

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  padding: 0 1.5rem 5rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center 30%;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(26,23,20,0.92) 5%, rgba(26,23,20,0.55) 55%, rgba(26,23,20,0.35) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 680px; color: var(--sand); }
.hero .eyebrow { color: var(--gold); }
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.1;
}
.hero-tagline {
  color: var(--muted-dk);
  max-width: 46ch;
  margin: 1.4rem 0 2.2rem;
  font-size: 1.05rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ===================== CATEGORY SECTIONS ===================== */

.category { padding: 6rem 1.5rem; max-width: var(--container); margin: 0 auto; }
.category.alt { background: var(--sand-2); max-width: none; }
.category.alt .category-head,
.category.alt .product-grid { max-width: var(--container); margin: 0 auto; }

.category-head { margin-bottom: 2.8rem; max-width: 640px; }
.category-sub { color: var(--muted-lt); font-size: 1rem; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
}
.product-grid-2 { grid-template-columns: repeat(2, 1fr); max-width: 900px; }

.product-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--ink);
}
.product-card img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-grid-2 .product-card img { aspect-ratio: 4/3; }
.product-card.wide img { aspect-ratio: 16/10; }
.product-card:hover img { transform: scale(1.06); }

.product-card figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem 1rem 0.9rem;
  background: linear-gradient(0deg, rgba(26,23,20,0.85), transparent);
  color: var(--sand);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===================== VISIT / CONTACT ===================== */

.visit { padding: 7rem 1.5rem; background: var(--ink); color: var(--sand); }
.visit-grid { max-width: var(--container); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; }
.visit .eyebrow { color: var(--gold); }
.visit-info h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3vw, 2.5rem);
  margin-bottom: 2.4rem;
}
.info-block { margin-bottom: 2rem; }
.info-block h3 { color: var(--gold); font-size: 0.95rem; margin-bottom: 0.6rem; }
.info-block p { color: var(--muted-dk); }
.hours-list { list-style: none; }
.hours-list li {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0; border-bottom: 1px solid var(--line-dk);
  color: var(--muted-dk); font-size: 0.92rem;
}

.visit-form { background: var(--ink-soft); border: 1px solid var(--line-dk); border-radius: var(--radius); padding: 2.4rem; }
.visit-form h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.4rem; margin-bottom: 1.6rem; }
.form-row { margin-bottom: 1.2rem; }
.form-row label { display: block; font-size: 0.85rem; color: var(--muted-dk); margin-bottom: 0.5rem; }
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--ink);
  border: 1px solid var(--line-dk);
  border-radius: var(--radius);
  color: var(--sand);
  font-family: var(--font-body);
  font-size: 0.92rem;
  resize: vertical;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus { border-color: var(--gold); outline: none; }
.form-row input::placeholder,
.form-row textarea::placeholder { color: #5C554A; }

.form-success {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(198, 161, 91, 0.14);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  color: var(--gold);
  font-size: 0.88rem;
  text-align: center;
}
button[disabled] { opacity: 0.7; cursor: not-allowed; }

/* ===================== FOOTER ===================== */

.site-footer { background: var(--ink); color: var(--sand); padding: 3.5rem 1.5rem 2.2rem; text-align: center; border-top: 1px solid var(--line-dk); }
.footer-logo { justify-content: center; }
.footer-tag { color: var(--muted-dk); font-size: 0.88rem; margin: 1rem 0 1.8rem; }
.footer-social { display: flex; justify-content: center; gap: 1.8rem; margin-bottom: 2rem; }
.footer-social a { color: var(--muted-dk); font-size: 0.85rem; transition: color 0.2s ease; }
.footer-social a:hover { color: var(--gold); }
.footer-copy { color: #5C554A; font-size: 0.78rem; }

/* ===================== LIGHTBOX ===================== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(26, 23, 20, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 3rem 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(900px, 100%); max-height: 85vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 1.5rem; left: 1.5rem;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(246, 241, 231, 0.1);
  color: var(--sand);
  border: 1px solid var(--line-dk);
  font-size: 1.1rem;
  cursor: pointer;
}
.lightbox-close:hover { background: var(--gold); color: var(--ink); }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 980px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid-2 { grid-template-columns: 1fr; }
  .visit-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

@media (max-width: 720px) {
  .nav-burger { display: flex; }
  .main-nav {
    position: absolute;
    top: 100%; right: 0; left: 0;
    background: var(--ink-soft);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--line-dk);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .main-nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--line-dk); }
  .nav-cta { margin-top: 0.8rem; text-align: center; }
  .nav-toggle:checked ~ .site-header .main-nav { max-height: 420px; }
  .hero { align-items: center; padding-top: 7rem; }
}