/* Khawater — identity taken from the brand logo: crimson calligraphy, an orange cabinet frame,
   pink / green / coral drawer fronts, on a warm cream ground. */
:root {
  --cream: #FFF6EA;
  --cream-2: #FBEBD6;
  --paper: #FFFFFF;
  --crimson: #B42F3A;
  --crimson-deep: #8F2330;
  --coral: #E85A47;
  --orange: #F59A57;
  --orange-soft: #F8B784;
  --pink: #F6A2A6;
  --green: #4DB34B;
  --ink: #2E2422;
  --ink-soft: #6E5F59;
  --line: #EEDDC8;
  --ok: #2E7D4F;
  --err: #B3261E;

  --font-script: 'Aref Ruqaa', 'Alexandria', serif;
  --font-body: 'Alexandria', system-ui, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: clamp(1.7rem, 1.4rem + 1.2vw, 2.3rem);
  --step-3: clamp(2.3rem, 1.6rem + 3vw, 3.8rem);

  --gutter: 16px;
  --max: 1180px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.3; }
h1, h2 { font-family: var(--font-script); font-weight: 700; color: var(--crimson); }
h1 { font-size: var(--step-3); line-height: 1.35; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); font-weight: 600; }
h4 { font-size: var(--step-0); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--crimson); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }

.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { inset-inline-start: 8px; }
.sub { color: var(--ink-soft); max-width: 52ch; margin: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 0 1.3em;
  font: 500 var(--step-0)/1 var(--font-body);
  border: 1.5px solid var(--crimson); border-radius: 8px;
  background: transparent; color: var(--crimson);
  text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { background: var(--crimson-deep); border-color: var(--crimson-deep); }
.btn-ghost:hover, .btn-quote:hover { background: var(--paper); }
.btn-small { min-height: 40px; padding: 0 1em; font-size: var(--step--1); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.link { background: none; border: 0; padding: 4px; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font: inherit; font-size: var(--step--1); }

/* ---------- header ---------- */
.top { background: var(--cream); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-row { display: flex; align-items: center; gap: 16px; min-height: 66px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand-ar { font-family: var(--font-script); font-size: 2rem; font-weight: 700; color: var(--crimson); line-height: 1; }
.brand-en { font-size: var(--step--1); color: var(--ink-soft); letter-spacing: .02em; }
.nav { display: none; gap: 28px; margin-inline-start: 28px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { color: var(--crimson); }
@media (min-width: 860px) { .nav { display: flex; } }
.top-actions { display: flex; gap: 8px; margin-inline-start: auto; }
.lang, .cart-btn {
  min-height: 40px; padding: 0 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 500 var(--step--1) var(--font-body);
  display: inline-flex; align-items: center; gap: 6px;
}
.cart-btn[hidden] { display: none; }
.badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--crimson); color: #fff; font-size: .75rem; display: inline-grid; place-items: center; }
@media (max-width: 420px) { .brand-en, .cart-btn [data-i18n] { display: none; } }

/* ---------- hero: the logo's cabinet holds the photo ---------- */
.hero { padding-block: 36px 56px; overflow: hidden; }
.hero-grid { display: grid; gap: 36px; align-items: center; }
@media (min-width: 860px) { .hero-grid { grid-template-columns: 1fr minmax(0, 470px); gap: 64px; } .hero { padding-block: 64px 88px; } }
.hero-copy h1 { max-width: 13ch; }
[lang="en"] .hero-copy h1 { max-width: 15ch; }
.lead { font-size: var(--step-1); color: var(--ink-soft); line-height: 1.65; max-width: 40ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.cabinet { margin: 0 auto; width: min(100%, 470px); direction: ltr; display: grid; grid-template-columns: 30% 1fr; grid-template-rows: auto auto; column-gap: 8px; }
.drawers { display: grid; grid-template-rows: 1fr 1fr 1fr; gap: 8px; }
.drawers span { border-radius: 6px; position: relative; }
.drawers span::after { content: ''; position: absolute; left: 30%; right: 30%; height: 7px; border-radius: 4px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.drawers span:nth-child(1) { background: var(--pink); }
.drawers span:nth-child(1)::after, .drawers span:nth-child(2)::after { bottom: 14%; }
.drawers span:nth-child(2) { background: linear-gradient(90deg, var(--green), #9BDF7C); }
.drawers span:nth-child(3) { background: linear-gradient(90deg, var(--coral), #F49088); }
.drawers span:nth-child(3)::after { top: 14%; }
.panel {
  border: 10px solid var(--orange); border-inline-end-width: 16px; border-radius: 6px 10px 4px 4px;
  background: var(--paper); overflow: hidden; aspect-ratio: 3 / 4;
}
.panel img { width: 100%; height: 100%; object-fit: cover; }
.legs { grid-column: 1 / -1; display: flex; justify-content: space-between; padding-inline: 4%; height: 22px; background: linear-gradient(var(--orange-soft), var(--orange-soft)) top / 100% 10px no-repeat; }
.legs span { width: 14px; margin-top: 10px; background: var(--coral); border-radius: 0 0 4px 4px; }
.legs span:nth-child(2) { margin-inline-start: 26%; }

/* ---------- our work ---------- */
.work { background: var(--paper); padding-block: 56px 72px; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 16px; border-radius: 20px; cursor: pointer;
  border: 1px solid var(--line); background: var(--cream); color: var(--ink); font: 500 var(--step--1) var(--font-body);
}
.chip[aria-selected="true"] { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.status { color: var(--ink-soft); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
@media (max-width: 559px) { .grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; } }
.card { display: flex; flex-direction: column; }
.card-img { border: 0; padding: 0; cursor: zoom-in; background: var(--cream-2); border-radius: 8px; overflow: hidden; aspect-ratio: 4 / 5; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding-top: 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-body h3 { font-size: var(--step-0); font-weight: 500; margin: 0; line-height: 1.5; }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.price { color: var(--crimson); font-weight: 600; margin: 0 0 12px; }
.price.muted { color: var(--ink-soft); font-weight: 400; font-size: var(--step--1); }
.empty { color: var(--ink-soft); }
@media (max-width: 559px) { .card-body .btn { padding: 0 .8em; font-size: .8rem; } }

/* ---------- shop fit-outs ---------- */
.shops { padding-block: 64px 72px; }
.shops-head { margin-bottom: 28px; }
.gallery { list-style: none; margin: 0; padding: 0; columns: 2 220px; column-gap: 16px; }
.gallery li { break-inside: avoid; margin-bottom: 16px; }
.gallery button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; text-align: start; font: inherit; color: var(--ink); }
.gallery img { width: 100%; border-radius: 8px; }
.gallery span { display: block; padding-top: 8px; font-size: var(--step--1); color: var(--ink-soft); }
@media (min-width: 900px) { .gallery { columns: 3; } }

.steps-wrap { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); display: grid; gap: 20px; }
@media (min-width: 860px) { .steps-wrap { grid-template-columns: 220px 1fr; gap: 48px; } }
.steps-wrap h3 { font-family: var(--font-script); font-size: var(--step-2); color: var(--crimson); font-weight: 700; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 20px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 28px; } }
.steps li { counter-increment: s; }
.steps li::before { content: counter(s, arabic-indic); display: block; font-family: var(--font-script); font-size: 2.4rem; line-height: 1; color: var(--orange); margin-bottom: 8px; }
[lang="en"] .steps li::before { content: counter(s); }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- contact ---------- */
.contact { background: var(--paper); padding-block: 64px 80px; border-top: 1px solid var(--line); }
.contact-grid { display: grid; gap: 32px; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 64px; } }
.contact-lines { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 6px; }

.about-product { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--cream); }
.about-product[hidden] { display: none; }
.about-product img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; }
.about-product div { flex: 1; line-height: 1.4; font-size: var(--step--1); }

.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: var(--step--1); font-weight: 500; }
.form input, .form select, .form textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #D9C5AE; background: var(--paper); color: var(--ink); font: var(--step-0) var(--font-body);
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--crimson); outline: 2px solid var(--crimson); outline-offset: 0; }
.form-msg { margin: 0; min-height: 1.5em; font-size: var(--step--1); }
.form-msg.ok { color: var(--ok); }
.form-msg.err { color: var(--err); }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- footer ---------- */
.foot { background: var(--crimson); color: #FBE3DF; padding-block: 26px; }
.foot-row { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: baseline; }
.foot .brand-ar { color: #fff; font-size: 1.8rem; }
.foot .copy { margin-inline-start: auto; }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: rgba(46, 36, 34, .55); }
.close { position: absolute; inset-inline-end: 8px; top: 8px; z-index: 1; width: 44px; height: 44px; border: 0; background: rgba(255,255,255,.85); font-size: 1.8rem; line-height: 1; cursor: pointer; color: var(--ink); border-radius: 22px; }

.product-sheet { width: min(100% - 24px, 920px); max-height: calc(100dvh - 24px); border-radius: 10px; overflow: auto; }
.pd { display: grid; }
@media (min-width: 720px) { .pd { grid-template-columns: 1.1fr 1fr; } }
.pd-img { background: var(--cream-2); }
.pd-img img { width: 100%; height: 100%; max-height: 70dvh; object-fit: cover; }
@media (min-width: 720px) { .pd-img img { max-height: 80dvh; } }
.pd-body { padding: 28px 24px 28px; display: flex; flex-direction: column; align-items: flex-start; }
.pd-cat { color: var(--ink-soft); font-size: var(--step--1); margin: 0 0 4px; }
.pd-body h2 { font-size: var(--step-2); }
.buy { margin-bottom: 12px; }
.buy[hidden] { display: none; }
.stock { color: var(--ink-soft); font-size: var(--step--1); }
.qty-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.qty-row label { display: grid; gap: 4px; font-size: var(--step--1); }
.qty-row input { width: 84px; min-height: 46px; padding: 0 10px; border: 1px solid #D9C5AE; border-radius: 8px; font: inherit; }

.viewer { background: transparent; max-width: min(100vw - 16px, 1100px); max-height: calc(100dvh - 16px); }
.viewer::backdrop { background: rgba(20, 14, 12, .96); }
.viewer figure { margin: 0; }
.viewer img { max-width: 100%; max-height: calc(100dvh - 80px); margin-inline: auto; border-radius: 6px; }
.viewer figcaption { color: #fff; text-align: center; padding-top: 10px; font-size: var(--step--1); }
.close-light { background: rgba(255,255,255,.9); }

.drawer {
  margin: 0; margin-inline-start: auto; height: 100dvh; max-height: 100dvh;
  width: min(100%, 440px); display: none; flex-direction: column;
}
.drawer[open] { display: flex; }
.drawer-head { position: relative; padding: 20px 24px 12px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-body { padding: 16px 24px 32px; overflow-y: auto; flex: 1; }
.drawer-body .form { margin-top: 24px; }
.drawer-body h3 { margin-bottom: 4px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 4px 12px; align-items: center; padding-block: 12px; border-bottom: 1px solid var(--line); }
.line img { grid-row: span 2; width: 64px; height: 64px; object-fit: cover; border-radius: 6px; }
.line-info { display: grid; line-height: 1.4; }
.line-info span { color: var(--crimson); font-size: var(--step--1); }
.line input { width: 64px; min-height: 40px; padding: 0 8px; border: 1px solid #D9C5AE; border-radius: 8px; font: inherit; }
.line .link { grid-column: 2; justify-self: start; }
.total-row { display: flex; justify-content: space-between; padding-block: 16px; font-size: var(--step-1); }
.pay-note { margin: 0; color: var(--ink-soft); font-size: var(--step--1); }

.nav a[hidden], .calc-band[hidden] { display: none; }
.calc-band { margin-top: 24px; padding: 14px 16px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
  display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; }
