/* =============================================
   قصر العود — Qasr Al Oud Design System
   ============================================= */

:root {
  --oud-black: #1A1410;
  --antique-gold: #C9A05C;
  --majlis-burgundy: #6B2737;
  --sand-card: #D8C9A3;
  --parchment: #F5F0E6;

  --font-display: 'Amiri', 'Traditional Arabic', serif;
  --font-body: 'Tajawal', 'Segoe UI', sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --transition: 0.3s ease;
  --header-height: 72px;
}

/* ---- Reset & Base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--parchment);
  background-color: var(--oud-black);
  overflow-x: hidden;
  /* Extra bottom padding for future chat widget */
  padding-bottom: 5rem;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--antique-gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--sand-card);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

address {
  font-style: normal;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-md);
}

.container--narrow {
  max-width: 760px;
}

/* ---- Typography ---- */

.section-header {
  margin-bottom: var(--space-xl);
}

.section-header--center {
  text-align: center;
}

.section-header__label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--antique-gold);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
}

.section-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--parchment);
  line-height: 1.3;
}

.section-header__desc {
  margin-top: var(--space-sm);
  color: var(--sand-card);
  opacity: 0.85;
  max-width: 540px;
  margin-inline: auto;
}

.section {
  padding-block: var(--space-2xl);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.875rem 2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn--primary {
  background: var(--antique-gold);
  color: var(--oud-black);
  border: 2px solid var(--antique-gold);
}

.btn--primary:hover {
  background: var(--sand-card);
  border-color: var(--sand-card);
  color: var(--oud-black);
}

.btn--outline {
  background: transparent;
  color: var(--antique-gold);
  border: 2px solid var(--antique-gold);
}

.btn--outline:hover {
  background: var(--antique-gold);
  color: var(--oud-black);
}

.btn--cart {
  width: 100%;
  background: transparent;
  color: var(--oud-black);
  border: 1.5px solid var(--oud-black);
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
}

.btn--cart:hover {
  background: var(--oud-black);
  color: var(--sand-card);
}

.btn--cart.added {
  background: var(--majlis-burgundy);
  border-color: var(--majlis-burgundy);
  color: var(--parchment);
}

/* ---- Header / Nav ---- */

.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(26, 20, 16, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201, 160, 92, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--antique-gold);
}

.nav__logo:hover {
  color: var(--sand-card);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__menu a {
  font-size: 0.9375rem;
  font-weight: 400;
  color: var(--parchment);
  opacity: 0.85;
  transition: opacity var(--transition), color var(--transition);
}

.nav__menu a:hover {
  opacity: 1;
  color: var(--antique-gold);
}

.nav__cta {
  padding: 0.5rem 1.25rem !important;
  border: 1.5px solid var(--antique-gold) !important;
  border-radius: var(--radius-sm);
  color: var(--antique-gold) !important;
  opacity: 1 !important;
}

.nav__cta:hover {
  background: var(--antique-gold);
  color: var(--oud-black) !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--antique-gold);
  transition: var(--transition);
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: calc(var(--header-height) + var(--space-xl)) var(--space-xl);
  overflow: hidden;
}

.hero__smoke {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.smoke {
  position: absolute;
  bottom: 20%;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0;
  animation: smokeRise 8s ease-in-out infinite;
}

.smoke--1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(201, 160, 92, 0.25) 0%, transparent 70%);
  inset-inline-start: 15%;
  animation-delay: 0s;
}

.smoke--2 {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(107, 39, 55, 0.2) 0%, transparent 70%);
  inset-inline-start: 40%;
  animation-delay: 2s;
}

.smoke--3 {
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(216, 201, 163, 0.18) 0%, transparent 70%);
  inset-inline-start: 60%;
  animation-delay: 4s;
}

.smoke--4 {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(201, 160, 92, 0.15) 0%, transparent 70%);
  inset-inline-start: 75%;
  animation-delay: 1.5s;
}

.smoke--5 {
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(245, 240, 230, 0.1) 0%, transparent 70%);
  inset-inline-start: 30%;
  animation-delay: 5.5s;
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20% {
    opacity: 0.6;
  }
  60% {
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: translateY(-200px) scale(1.4);
  }
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--antique-gold);
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 8vw, 4rem);
  font-weight: 700;
  color: var(--parchment);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 40px rgba(201, 160, 92, 0.2);
}

.hero__tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 300;
  color: var(--sand-card);
  max-width: 580px;
  margin-inline: auto;
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  color: var(--antique-gold);
  opacity: 0.5;
  font-size: 0.8125rem;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ---- Najdi Divider ---- */

.najdi-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
}

.najdi-divider__svg {
  width: 100%;
  height: 60px;
}

/* ---- Brand Story ---- */

.story {
  background: linear-gradient(180deg, var(--oud-black) 0%, #221a14 100%);
}

.story__grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: var(--space-xl);
  align-items: center;
}

.story__text p {
  margin-bottom: var(--space-md);
  color: var(--parchment);
  opacity: 0.9;
}

.story__text p:last-child {
  margin-bottom: 0;
}

.story__text strong {
  color: var(--antique-gold);
  font-weight: 500;
}

.story__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.story__ornament {
  width: 200px;
  height: 200px;
  color: var(--antique-gold);
  opacity: 0.4;
}

/* ---- Products ---- */

.products {
  background: #221a14;
}

.products__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.product-card {
  background: var(--sand-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.product-card__image-container {
  position: relative;
  height: 240px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(38, 28, 20, 0.4) 0%, rgba(13, 10, 8, 0.9) 100%);
}

.product-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.product-card:hover .product-card__image {
  transform: scale(1.06);
}

.product-card__info {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  color: var(--oud-black);
}

.product-card__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.product-card__transliteration {
  font-size: 0.75rem;
  color: rgba(26, 20, 16, 0.5);
  margin-bottom: var(--space-sm);
  direction: ltr;
  text-align: start;
}

.product-card__notes {
  margin-bottom: var(--space-md);
  flex: 1;
}

.product-card__notes li {
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 0.25rem;
  color: rgba(26, 20, 16, 0.75);
}

.notes__label {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--majlis-burgundy);
  margin-inline-end: 0.35rem;
}

.product-card__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(26, 20, 16, 0.12);
}

.product-card__size {
  font-size: 0.875rem;
  color: rgba(26, 20, 16, 0.6);
}

.product-card__price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--majlis-burgundy);
}

.currency {
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ---- Why Section ---- */

.why {
  background: var(--oud-black);
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

.why-card {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  border: 1px solid rgba(201, 160, 92, 0.15);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), background var(--transition);
}

.why-card:hover {
  border-color: rgba(201, 160, 92, 0.4);
  background: rgba(201, 160, 92, 0.04);
}

.why-card__icon {
  width: 48px;
  height: 48px;
  margin-inline: auto;
  margin-bottom: var(--space-md);
  color: var(--antique-gold);
}

.why-card__title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--parchment);
}

.why-card__desc {
  font-size: 0.9375rem;
  color: var(--sand-card);
  opacity: 0.8;
  line-height: 1.65;
}

/* ---- FAQ ---- */

.faq {
  background: linear-gradient(180deg, var(--oud-black) 0%, #221a14 100%);
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.faq-item {
  border: 1px solid rgba(201, 160, 92, 0.2);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item:hover,
.faq-item.is-open {
  border-color: rgba(201, 160, 92, 0.45);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
  color: var(--parchment);
  text-align: start;
  background: rgba(201, 160, 92, 0.03);
  transition: background var(--transition);
}

.faq-item__question:hover {
  background: rgba(201, 160, 92, 0.08);
}

.faq-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--antique-gold);
  transition: transform var(--transition);
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(180deg);
}

.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding-inline: var(--space-lg);
}

.faq-item.is-open .faq-item__answer {
  max-height: 300px;
  padding-block: 0 var(--space-md);
}

.faq-item__answer p {
  font-size: 0.9375rem;
  color: var(--sand-card);
  opacity: 0.85;
  line-height: 1.7;
}

/* ---- Chat CTA ---- */

.chat-cta {
  background: linear-gradient(135deg, var(--majlis-burgundy) 0%, #4a1a28 100%);
  position: relative;
  overflow: hidden;
}

.chat-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='30,5 55,52 5,52' fill='none' stroke='%23C9A05C' stroke-width='0.5' opacity='0.1'/%3E%3C/svg%3E");
  opacity: 0.5;
}

.chat-cta__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.chat-cta__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: var(--space-md);
}

.chat-cta__desc {
  font-size: 1.0625rem;
  color: var(--sand-card);
  opacity: 0.9;
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.chat-cta__hint {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  color: var(--antique-gold);
  font-weight: 500;
}

.chat-cta__visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-start;
}

.chat-cta__bubble {
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  max-width: 90%;
  line-height: 1.5;
  animation: fadeSlideIn 0.6s ease both;
}

.chat-cta__bubble--1 {
  background: rgba(26, 20, 16, 0.3);
  color: var(--parchment);
  align-self: flex-end;
  border-bottom-left-radius: 4px;
  animation-delay: 0.2s;
}

.chat-cta__bubble--2 {
  background: rgba(201, 160, 92, 0.2);
  color: var(--sand-card);
  align-self: flex-start;
  border-bottom-right-radius: 4px;
  animation-delay: 0.6s;
}

.chat-cta__bubble--3 {
  background: rgba(26, 20, 16, 0.3);
  color: var(--parchment);
  align-self: flex-end;
  border-bottom-left-radius: 4px;
  animation-delay: 1s;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Footer ---- */

.footer {
  background: #120e0a;
  padding-block: var(--space-xl) var(--space-lg);
  border-top: 1px solid rgba(201, 160, 92, 0.1);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--antique-gold);
  margin-bottom: var(--space-xs);
}

.footer__tagline {
  font-size: 0.9375rem;
  color: var(--sand-card);
  opacity: 0.7;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--parchment);
  margin-bottom: var(--space-md);
}

.footer__address p {
  font-size: 0.9375rem;
  color: var(--sand-card);
  opacity: 0.75;
  margin-bottom: 0.35rem;
}

.footer__address a {
  color: var(--sand-card);
  opacity: 0.75;
}

.footer__address a:hover {
  color: var(--antique-gold);
  opacity: 1;
}

.footer__social-list {
  display: flex;
  gap: var(--space-sm);
}

.footer__social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(201, 160, 92, 0.3);
  border-radius: 50%;
  color: var(--antique-gold);
  transition: all var(--transition);
}

.footer__social-link svg {
  width: 18px;
  height: 18px;
}

.footer__social-link:hover {
  background: var(--antique-gold);
  color: var(--oud-black);
  border-color: var(--antique-gold);
}

.footer__bottom {
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(201, 160, 92, 0.1);
  text-align: center;
}

.footer__bottom p {
  font-size: 0.8125rem;
  color: var(--sand-card);
  opacity: 0.5;
}

/* ---- Cart Toast ---- */

.cart-toast {
  position: fixed;
  bottom: 6rem;
  inset-inline-start: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--antique-gold);
  color: var(--oud-black);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.cart-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.cart-toast__count {
  background: var(--oud-black);
  color: var(--antique-gold);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

/* ---- Responsive ---- */

@media (max-width: 1024px) {
  .products__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .why__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .story__grid {
    grid-template-columns: 1fr;
  }

  .story__visual {
    order: -1;
  }

  .story__ornament {
    width: 140px;
    height: 140px;
  }
}

@media (max-width: 768px) {
  :root {
    --space-2xl: 4rem;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    inset-inline: 0;
    background: rgba(26, 20, 16, 0.98);
    flex-direction: column;
    padding: var(--space-lg);
    gap: var(--space-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    border-bottom: 1px solid rgba(201, 160, 92, 0.15);
  }

  .nav__menu.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav__menu a {
    font-size: 1.0625rem;
    padding-block: var(--space-xs);
  }

  .products__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .why__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-inline: auto;
  }

  .chat-cta__inner {
    grid-template-columns: 1fr;
  }

  .chat-cta__visual {
    display: none;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }

  .footer__social-list {
    justify-content: center;
  }
}

@media (max-width: 375px) {
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .container {
    padding-inline: var(--space-sm);
  }
}
