/* ==========================================================================
   Kashkha — style.css
   Narrow, centered, linktree/card layout. White ground, black ink, no accent
   pop — restrained per brand direction (ref: ounass.com). Cairo (Arabic +
   Latin) for Arabic mode, Public Sans for English mode.
   ========================================================================== */

@font-face {
  font-family: "Cairo";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/cairo-400.woff2") format("woff2");
}
@font-face {
  font-family: "Cairo";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/cairo-700.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/publicsans-400.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/publicsans-700.woff2") format("woff2");
}
@font-face {
  font-family: "Cairo";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/cairo-500.woff2") format("woff2");
}
@font-face {
  font-family: "Public Sans";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/publicsans-500.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/spectral-400.woff2") format("woff2");
}
@font-face {
  font-family: "Spectral";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/spectral-700.woff2") format("woff2");
}

:root {
  /* Single accent — change this to re-brand. Used sparingly (focus rings,
     chevrons, hover) so the page reads as black-on-white by design. */
  --accent: #4a4a4a;

  --ink: #111111;
  --paper: #ffffff;
  --line: #e2e2e2;
  --muted: #6e6e6e;
  --muted-2: #a3a3a3;
  --surface: #f8f8f8; /* sampled from dior.com's own page background — neutral, no warm cast */
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--paper);
}

html[lang="ar"] body {
  font-family: "Cairo", sans-serif;
}
html[lang="en"] body {
  font-family: "Public Sans", sans-serif;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Headings get Spectral (serif). It has no Arabic glyphs, so Arabic-mode
   headings fall through to Cairo automatically — no separate rule needed. */
h2,
h3 {
  font-family: "Spectral", "Cairo", sans-serif;
}

.page {
  max-width: 440px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.section-heading {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: #272b2f;
  margin: 0 0 1.1rem;
}

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

.site-header {
  position: relative;
  text-align: center;
  padding: 2.25rem 0 1.5rem;
}

.lang-switch {
  position: absolute;
  left: 0; /* fixed physical side — always left, regardless of AR/EN direction */
  top: 2.1rem;
  height: 2.15rem;
  display: inline-flex;
  direction: ltr; /* lock internal order to DOM order (ع, then EN) so labels
    stay put and only the thumb slides — otherwise this flips with dir=rtl */
  unicode-bidi: isolate; /* fully cut off the surrounding RTL context — without
    this, Chrome subtly re-shapes/re-measures the Latin "EN" label a couple
    px narrower under dir="rtl" even though direction is forced to ltr here */
  align-items: stretch;
  gap: 0.1rem;
  padding: 0.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-switch-thumb {
  position: absolute;
  top: 0.15rem;
  bottom: 0.15rem;
  left: 0; /* positioned precisely in px by JS (positionLangThumb) */
  border-radius: 999px;
  background: #272b2f;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1), width 0.25s cubic-bezier(0.4, 0, 0.2, 1),
    background-color 0.2s ease;
}
.lang-switch:hover .lang-switch-thumb,
.lang-switch:active .lang-switch-thumb {
  background: #4b5559;
}

.lang-switch-option {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 1.3rem;
  padding: 0.28rem 0.55rem;
  font-family: "Public Sans", sans-serif; /* fixed regardless of page language —
    otherwise this inherits body's font (Cairo vs Public Sans per html[lang]),
    so the "EN" label subtly changes width between the two site languages */
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  border-radius: 999px;
  color: var(--ink); /* dark even when inactive — muted grey was too hard to read, esp. for "ع" */
  transition: color 0.25s ease;
}
/* A single isolated Arabic letter needs more size than "EN" to render its
   curve legibly, especially reversed white-on-black — Cairo's isolated ع
   otherwise blurs into an ambiguous shape at UI-label sizes. */
.lang-switch-option[data-lang="ar"] {
  font-family: "Cairo", sans-serif;
  font-size: 0.78rem;
  font-weight: 700; /* Cairo's thin curved strokes anti-alias into a muddy
    grey at this size on the dark hover/active fill — 600 read as barely-there
    white-on-dark; bumping to 700 gives the stroke enough fill to read crisp */
  -webkit-font-smoothing: antialiased;
  padding-top: 0.22rem; /* Cairo's Arabic glyphs sit visually high in the line box; nudge down to optically match "EN" */
}
.lang-switch-option.is-active {
  color: var(--paper);
}
/* while hovering the switch, the thumb visually follows the cursor —
   so the real active option must give up white text unless it's the
   one currently hovered, or it reads as blank on the now-bare track */
.lang-switch:hover .lang-switch-option.is-active:not(:hover) {
  color: var(--ink);
}
.lang-switch-option:hover {
  color: var(--paper);
}

.header-icon-link {
  position: absolute;
  right: 0; /* fixed physical side — always right, regardless of AR/EN direction */
  top: 2.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  border: 1px solid rgba(105, 176, 221, 0.4); /* Dior baby blue, softened */
  border-radius: 999px;
  background: rgba(105, 176, 221, 0.08); /* faint tint at rest instead of flat
    white — gives the accent some presence without shouting */
  color: #69b0dd;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, transform 0.15s ease;
}
.header-icon-link:hover {
  background: #69b0dd;
  border-color: #69b0dd;
  color: var(--paper);
  box-shadow: 0 4px 14px rgba(105, 176, 221, 0.45); /* soft glow instead of a flat fill swap */
  transform: translateY(-1px);
}
.header-icon-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(105, 176, 221, 0.35);
}
.header-icon-link svg {
  width: 16px;
  height: 16px;
  transform: translateY(-0.5px); /* the box-and-arrow glyph is visually
    bottom-heavy (solid tray vs. a thin arrow tip) even though its bounding
    box is mathematically centered — nudge it up a hair to look centered */
}

.share-toast {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  background: #272b2f;
  color: var(--paper);
  font-size: 0.75rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  z-index: 50;
}
.share-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0s;
}

.logo-link {
  display: inline-flex;
  justify-content: center;
}

.logo {
  height: 1.6rem;
  width: auto;
  color: #272b2f;
}
.logo.is-hidden {
  display: none;
}

/* ---------- Catalogue / accordion ---------- */

.catalogue {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.catalogue-header {
  margin-bottom: 1.1rem;
}
.catalogue-header .section-heading {
  margin: 0;
  text-align: start;
}

.accordion {
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 12px 28px -12px rgba(17, 17, 17, 0.16), 0 2px 10px rgba(17, 17, 17, 0.06);
  padding-inline: 1.1rem;
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--line);
}
.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.95rem 0;
  text-align: start;
  font-size: 0.98rem;
  font-weight: 700;
}

.accordion-trigger .count {
  font-weight: 400;
  color: var(--muted-2);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.accordion-item.is-disabled .accordion-trigger-static {
  color: var(--muted-2);
}

.coming-soon {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.accordion-trigger-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.accordion-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.accordion-item.is-open .accordion-chevron {
  transform: rotate(180deg);
}

.accordion-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.28s ease;
}
.accordion-item.is-open .accordion-panel {
  grid-template-rows: 1fr;
}

.accordion-panel-inner {
  overflow: hidden;
  min-height: 0;
}

.product-list {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 0.25rem 0.1rem 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.product-list::-webkit-scrollbar {
  display: none;
}

.product-card {
  flex: 0 0 78%;
  scroll-snap-align: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--line);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card.out-of-stock .product-media img {
  filter: grayscale(1);
  opacity: 0.5;
}

.new-badge {
  position: absolute;
  inset-inline-start: 0.65rem;
  top: 0.65rem;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 0.28rem 0.65rem;
  border-radius: 8px;
}

.stock-badge {
  position: absolute;
  inset-inline-start: 0.65rem;
  top: 0.65rem;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
}

.product-body {
  padding: 0.9rem 1rem 1rem;
}

.product-name {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 400;
}

.product-note {
  margin: 0 0 0.7rem;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.4;
}

.product-enquire {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  font-size: 0.8rem;
  font-weight: 700;
  transition: border-color 0.2s ease;
}
.enquire-price {
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.product-card.out-of-stock .product-enquire {
  color: var(--muted);
  border-color: var(--line);
}
.product-card.out-of-stock .enquire-price {
  color: var(--muted);
}
.product-enquire:hover,
.product-enquire:active {
  border-color: var(--ink);
}

/* ---------- About ---------- */

.about {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.about p {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.65;
  color: var(--muted);
}

/* ---------- FAQ modal — centered card, dior.com-style flat list ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(17, 17, 17, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.modal {
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border-radius: 16px;
  transform: scale(0.96);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.modal-overlay.is-open .modal {
  transform: scale(1);
  opacity: 1;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1.3rem;
}

.modal-title {
  margin: 0 0 0.3rem;
  font-family: "Spectral", "Cairo", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}

.modal-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.modal-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  background: #272b2f;
  color: var(--paper);
  transition: background-color 0.2s ease;
}
.modal-close:hover,
.modal-close:active {
  background: #4b5559;
}

.modal-body {
  padding: 0.6rem 1.1rem 1.1rem;
  overflow-y: auto;
}

.faq-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* single shared highlight that slides behind whichever row is hovered —
   travel speed is set per-move in script.js so long jumps don't lag behind
   the cursor while adjacent-row moves keep a gentle glide */
.faq-hover-highlight {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 0;
  background: #fbfbfb;
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition-property: transform, height, opacity;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item {
  position: relative;
  z-index: 1;
  border-radius: 10px;
  transition: background-color 0.22s ease;
}
.faq-item.is-open {
  background: var(--surface);
}

.faq-trigger {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.85rem;
  text-align: start;
}

.faq-question {
  font-family: "Spectral", "Cairo", sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.4;
  transition: color 0.18s ease;
}
.faq-item.is-hovered .faq-question {
  color: #000;
}

.faq-icon {
  position: relative;
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  color: var(--muted-2);
  transition: color 0.18s ease;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  border-radius: 1px;
}
.faq-icon::before {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1.3px;
  transform: translateY(-50%);
}
.faq-icon::after {
  left: 50%;
  top: 0;
  width: 1.3px;
  height: 100%;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 0.28s cubic-bezier(0.65, 0, 0.35, 1);
}
.faq-item.is-open .faq-icon,
.faq-item.is-hovered .faq-icon {
  color: var(--ink);
}
.faq-item.is-open .faq-icon::after {
  transform: translateX(-50%) rotate(90deg);
}

.faq-panel {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s ease;
}
.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}

.faq-panel-inner {
  overflow: hidden;
}

.faq-answer {
  margin: 0;
  padding: 0 0.85rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
}

/* ---------- Full-screen legal modals ---------- */

.fullscreen-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.fullscreen-modal.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.fullscreen-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.25rem 1.1rem;
  flex-shrink: 0;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.fullscreen-modal-title {
  margin: 0;
  font-family: "Spectral", "Cairo", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.legal-label {
  margin: 0 0 0.9rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-intro {
  margin: 0 0 0.2rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--ink);
}

.legal-intro-sub {
  margin: 0 0 1.3rem;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--muted);
}

.fullscreen-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 1.25rem 3rem;
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
}

.legal-section {
  margin-bottom: 1.1rem;
  text-align: start;
}
.legal-section-title {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.76rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
  text-align: start;
}
.legal-section-body {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  text-align: start;
}

/* ---------- USP row ---------- */

.usp-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  direction: ltr; /* lock column order to DOM order (tailoring, then delivery)
    regardless of page language — otherwise the grid mirrors under dir="rtl"
    and the two items swap sides between the English and Arabic site */
  unicode-bidi: isolate;
  border-radius: 4px;
  overflow: hidden;
  background: #f5f5f5;
  margin: 0;
  text-align: center;
}

.usp-item {
  padding: 1.2rem 0.5rem;
}

.usp-item svg {
  width: 20px;
  height: 20px;
  color: var(--ink);
  margin-bottom: 0.55rem;
}

.usp-item span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

/* ---------- Support — plain footer-style link columns ---------- */

.contact-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2.125rem 0 1.75rem;
}

.support,
.social {
  min-width: 0;
}

.contact-columns .section-heading {
  text-align: start;
  margin-bottom: 0.85rem;
}

.link-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 400;
  font-family: inherit;
  color: #9a9a9a;
  background: none;
  border: none;
  padding: 0;
  text-align: start;
  transition: color 0.2s ease;
}
.link-row:hover,
.link-row:active {
  color: #1c1c1c;
}
.link-row svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted-2);
  transition: color 0.2s ease;
}
.link-row:hover svg,
.link-row:active svg {
  color: #1c1c1c;
}
.link-row span {
  position: relative;
}
.link-row span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: #1c1c1c;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
html[dir="rtl"] .link-row span::after {
  transform-origin: right;
}
.link-row:hover span::after,
.link-row:active span::after {
  transform: scaleX(1);
}

.social-icons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1.6rem;
}
.social-icon-link {
  color: var(--muted);
  transition: color 0.15s ease;
}
.social-icon-link svg {
  width: 19px;
  height: 19px;
}
.social-icon-link:hover,
.social-icon-link:active {
  color: var(--ink);
}

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

.site-footer {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted-2);
  font-size: 0.76rem;
  line-height: 1.8;
}

.site-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
  text-align: start;
}
.site-footer-row .social-icons {
  gap: 1rem;
}
.site-footer-row .social-icon-link svg {
  width: 15px;
  height: 15px;
}

.site-footer p {
  margin: 0;
}
