/* ============================================
   MATERNA / WARDA — Design System
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Raleway:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ---- Tokens ---- */
:root {
  --color-cream:        #FAF6F0;
  --color-cream-dark:   #F2EBE0;
  --color-lavender:     #EDE8F5;
  --color-lavender-mid: #D8CEF0;
  --color-plum:         #3D1F4E;
  --color-plum-mid:     #5C3474;
  --color-violet:       #7B4FA6;
  --color-violet-light: #9B6FC6;
  --color-violet-pale:  #EBE0F5;
  --color-white:        #FFFFFF;
  --color-text:         #2C1A38;
  --color-text-mid:     #5A4068;
  --color-text-light:   #8E7AA0;
  --color-border:       #E0D5EE;
  --color-gold:         #C9A96E;
  --color-success:      #4A8C6A;

  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Raleway', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  --shadow-sm:  0 1px 4px rgba(61,31,78,0.08);
  --shadow-md:  0 4px 16px rgba(61,31,78,0.12);
  --shadow-lg:  0 8px 32px rgba(61,31,78,0.16);
  --shadow-xl:  0 16px 48px rgba(61,31,78,0.20);

  --transition: 0.22s ease;
  --max-width: 1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--color-cream);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.2;
  color: var(--color-plum);
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
h4 { font-size: clamp(1.1rem, 2vw, 1.4rem); }
p  { font-size: 1rem; color: var(--color-text-mid); }
.lead { font-size: 1.15rem; line-height: 1.75; }
.caption { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-light); }

/* ---- Layout ---- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 80px 0; }
.section--cream  { background: var(--color-cream); }
.section--lav    { background: var(--color-lavender); }
.section--plum   { background: var(--color-plum); }
.section--white  { background: var(--color-white); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary {
  background: var(--color-violet);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(123,79,166,0.35);
}
.btn--primary:hover {
  background: var(--color-plum-mid);
  box-shadow: 0 6px 24px rgba(123,79,166,0.45);
  transform: translateY(-1px);
}
.btn--outline {
  background: transparent;
  color: var(--color-violet);
  border: 2px solid var(--color-violet);
}
.btn--outline:hover {
  background: var(--color-violet);
  color: var(--color-white);
}
.btn--ghost {
  background: transparent;
  color: var(--color-plum);
  border: 1.5px solid var(--color-border);
}
.btn--ghost:hover {
  border-color: var(--color-violet);
  color: var(--color-violet);
}
.btn--gold {
  background: var(--color-gold);
  color: var(--color-white);
}
.btn--gold:hover {
  background: #b8944f;
  transform: translateY(-1px);
}
.btn--sm { padding: 10px 20px; font-size: 0.8rem; }
.btn--lg { padding: 18px 40px; font-size: 1rem; }

/* ---- Badge ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge--violet  { background: var(--color-violet-pale); color: var(--color-violet); }
.badge--plum    { background: var(--color-plum); color: var(--color-white); }
.badge--gold    { background: #F9F0E3; color: var(--color-gold); border: 1px solid #E8D5B0; }
.badge--green   { background: #E6F4ED; color: var(--color-success); }

/* ---- Cards ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

/* ---- Expert badge ---- */
.expert-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-violet-pale);
  border: 1px solid var(--color-lavender-mid);
  border-radius: var(--radius-full);
  padding: 6px 14px 6px 6px;
}
.expert-badge__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-white);
}
.expert-badge__name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-violet);
  letter-spacing: 0.02em;
}

/* ---- Stars ---- */
.stars { display: inline-flex; gap: 2px; color: var(--color-gold); font-size: 0.85rem; }

/* ---- Divider ---- */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--color-violet), var(--color-lavender-mid));
  margin: 20px auto;
  border-radius: 2px;
}
.divider--left { margin-left: 0; }

/* ---- Section header ---- */
.section-header { text-align: center; margin-bottom: 56px; }
.section-header .caption { margin-bottom: 12px; display: block; }
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 540px; margin: 0 auto; }

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,246,240,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--color-plum);
  letter-spacing: -0.02em;
  margin-right: 24px;
}
.nav__logo span { color: var(--color-violet); font-style: italic; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}
.nav__links a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-mid);
  transition: color var(--transition);
  white-space: nowrap;
}
.nav__links a:hover, .nav__links a.active { color: var(--color-violet); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__lang {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  cursor: pointer;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}
.nav__lang:hover { border-color: var(--color-violet); color: var(--color-violet); }
.nav__cart {
  position: relative;
  padding: 8px;
  color: var(--color-plum);
  transition: color var(--transition);
}
.nav__cart:hover { color: var(--color-violet); }
.nav__cart-count {
  position: absolute;
  top: 2px; right: 2px;
  width: 16px; height: 16px;
  background: var(--color-violet);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Language selector ---- */
.nav__lang-selector {
  display: flex;
  gap: 6px;
}
.nav__lang-btn {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: transparent;
  color: var(--color-text-light);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--transition);
}
.nav__lang-btn:hover {
  border-color: var(--color-violet);
  color: var(--color-violet);
}
.nav__lang-btn.active {
  background: var(--color-violet);
  border-color: var(--color-violet);
  color: white;
}

/* ---- Mobile hamburger menu ---- */
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 12px;
}
.nav__hamburger span {
  width: 22px;
  height: 2.5px;
  background: var(--color-plum);
  border-radius: 2px;
  transition: all var(--transition);
}
.nav__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}
.nav__hamburger.active span:nth-child(2) {
  opacity: 0;
}
.nav__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

/* ---- Mobile menu dropdown ---- */
.nav__mobile-menu {
  position: absolute;
  top: 68px;
  left: 0;
  right: 0;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-border);
  padding: 20px;
  display: none;
  flex-direction: column;
  z-index: 99;
}
.nav__mobile-menu.active {
  display: flex;
}
.nav__mobile-menu .nav__links {
  flex-direction: column;
  gap: 16px;
}
.nav__mobile-menu .nav__links a {
  display: block;
  padding: 8px 0;
}
.nav__mobile-menu .btn--primary {
  width: 100%;
  justify-content: center;
  padding-top: 16px;
  margin-top: 16px;
}

/* ---- Footer ---- */
.footer {
  background: var(--color-plum);
  color: rgba(255,255,255,0.75);
  padding: 60px 0 32px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer__logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-white);
  margin-bottom: 12px;
}
.footer__logo span { color: var(--color-violet-light); font-style: italic; }
.footer__tagline { font-size: 0.875rem; margin-bottom: 24px; line-height: 1.6; }
.footer__col h5 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 16px;
}
.footer__col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__col a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  transition: color var(--transition);
}
.footer__col a:hover { color: var(--color-white); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer__social { display: flex; gap: 14px; }
.footer__social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.footer__social a:hover {
  border-color: var(--color-violet-light);
  color: var(--color-white);
  background: rgba(123,79,166,0.3);
}

/* ---- Endorsement quote block ---- */
.endorsement {
  background: var(--color-lavender);
  border-left: 3px solid var(--color-violet);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 16px 20px;
  margin: 16px 0;
}
.endorsement__quote {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-plum);
  line-height: 1.55;
  margin-bottom: 10px;
}
.endorsement__author {
  display: flex;
  align-items: center;
  gap: 8px;
}
.endorsement__author img {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
}
.endorsement__author-info { font-size: 0.78rem; }
.endorsement__author-name { font-weight: 700; color: var(--color-plum); }
.endorsement__author-title { color: var(--color-text-light); }

/* ---- Dropdown nav menus ---- */
.nav__links .dropdown { position: relative; }
.nav__links .dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.nav__links .dropdown > a::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
  transition: transform 0.2s;
}
.nav__links .dropdown:hover > a::after { transform: rotate(180deg); }
.dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid rgba(61,31,78,0.10);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(61,31,78,0.12);
  min-width: 200px;
  padding: 16px 0 8px;
  z-index: 200;
}
/* Invisible bridge fills the gap between trigger and menu */
.nav__links .dropdown::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -10px;
  right: -10px;
  height: 16px;
  display: none;
}
.nav__links .dropdown:hover::before { display: block; }
.nav__links .dropdown:hover .dropdown__menu { display: block; }
.dropdown__menu a {
  display: block;
  padding: 10px 20px;
  font-size: 0.85rem;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.dropdown__menu a:hover {
  background: var(--color-lavender);
  color: var(--color-plum);
}

/* ---- RTL Support (Arabic) ---- */
body[dir="rtl"] {
  direction: rtl;
  text-align: right;
}
body[dir="rtl"] .nav__inner {
  flex-direction: row-reverse;
}
body[dir="rtl"] .nav__links {
  flex-direction: row-reverse;
}
body[dir="rtl"] .nav__actions {
  flex-direction: row-reverse;
}
body[dir="rtl"] .footer__grid {
  grid-template-columns: 1fr 1fr 1fr 2fr;
  direction: rtl;
}
body[dir="rtl"] .footer__bottom {
  flex-direction: row-reverse;
}
body[dir="rtl"] .divider--left {
  margin-left: auto;
  margin-right: 0;
}
body[dir="rtl"] .endorsement {
  border-left: none;
  border-right: 3px solid var(--color-violet);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
body[dir="rtl"] .section-header {
  text-align: right;
}
body[dir="rtl"] .section-header p {
  margin-left: auto;
  margin-right: auto;
}
body[dir="rtl"] .nav__mobile-menu {
  left: auto;
  right: 0;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: 16px; text-align: center; }
}
