/* El Nawam prototype — tokens */
:root {
  --ink: #23262b;          /* charcoal suiting */
  --ink-2: #555b63;
  --line: #dcdcd8;
  --paper: #ffffff;
  --stone: #f0f0ed;        /* grey flannel surface */
  --gold: #94692c;         /* logo gold, darkened for contrast */
  --gold-soft: #f3ead9;
  --thread: #b3261e;       /* selvedge red: offers + sale only */
  --ok: #2f6b3a;
  --radius-s: 4px;
  --radius-m: 10px;
  --display: "Reem Kufi", "Noto Naskh Arabic", serif;
  --body: "Noto Naskh Arabic", "Segoe UI", Tahoma, serif;
  --wrap: 1180px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.8; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.35; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 5vw, 46px); }
h2 { font-size: clamp(23px, 3.2vw, 30px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; max-width: 68ch; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }

/* demo ribbon */
.demo { background: var(--ink); color: #fff; font-size: 13.5px; text-align: center; padding: 6px 16px; line-height: 1.6; }
.demo b { color: #e8cf9f; font-weight: 600; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.top .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 52px; height: 52px; object-fit: contain; }
.logo span { font-family: var(--display); font-size: 22px; line-height: 1.1; }
.logo small { display: block; font-family: var(--body); font-size: 12px; color: var(--ink-2); }
.search { position: relative; }
.search input { width: 100%; height: 46px; border: 1.5px solid var(--ink); border-radius: var(--radius-s); padding: 0 46px 0 14px; background: #fff; }
.search button { position: absolute; inset-inline-start: 0; top: 0; height: 46px; width: 46px; border: 0; background: none; cursor: pointer; }
.search svg { width: 22px; height: 22px; }
.icons { display: flex; gap: 6px; }
.icon-btn { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: var(--radius-s); background: #fff; text-decoration: none; cursor: pointer; }
.icon-btn svg { width: 22px; height: 22px; }
.badge { position: absolute; top: -6px; inset-inline-end: -6px; min-width: 20px; height: 20px; border-radius: 10px; background: var(--gold); color: #fff; font-size: 12px; display: grid; place-items: center; padding: 0 5px; font-family: system-ui, sans-serif; }
[hidden] { display: none !important; }
.nav { border-top: 1px solid var(--line); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { display: block; padding: 9px 12px; text-decoration: none; white-space: nowrap; font-size: 15.5px; border-bottom: 2px solid transparent; }
.nav a[aria-current="page"], .nav a:hover { border-bottom-color: var(--gold); }
@media (max-width: 760px) {
  .top .wrap { grid-template-columns: 1fr auto; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .logo img { width: 42px; height: 42px; }
}

/* hero */
.hero { background: var(--stone); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-top: 40px; padding-bottom: 28px; }
.hero h1 { max-width: 15ch; }
.hero .lead { font-size: 19px; color: var(--ink-2); }
.season { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.chip { border: 1.5px solid var(--ink); background: #fff; border-radius: 999px; padding: 6px 16px; cursor: pointer; text-decoration: none; font-size: 16px; }
.chip[aria-pressed="true"], .chip.on { background: var(--ink); color: #fff; }
.hero-photo { aspect-ratio: 4/3; border-radius: var(--radius-m); overflow: hidden; background: #ddd; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.proof { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 14px; font-size: 15px; }
.proof a { text-decoration: none; }
.stars { color: var(--gold); letter-spacing: 1px; }
@media (max-width: 760px) { .hero .wrap { grid-template-columns: 1fr; padding-top: 24px; } .hero-photo { order: -1; aspect-ratio: 16/9; } }

/* tape measure — the one signature element */
.tape { height: 30px; background: #e9c46a; background:
  repeating-linear-gradient(to left, var(--ink) 0 1px, transparent 1px 10px) bottom/100% 7px no-repeat,
  repeating-linear-gradient(to left, var(--ink) 0 1.5px, transparent 1.5px 50px) bottom/100% 13px no-repeat,
  #e7c36b; border-block: 1px solid #b8913a; position: relative; }
.tape span { position: absolute; top: 2px; font: 600 11px/1 system-ui, sans-serif; color: var(--ink); }

/* sections */
.sec { padding: 40px 0; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sec-head a { font-size: 15.5px; }

/* category tiles */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.cat { text-decoration: none; }
.cat .ph { aspect-ratio: 1; border-radius: var(--radius-m); overflow: hidden; background: var(--stone); }
.cat img { width: 100%; height: 100%; object-fit: cover; }
.cat b { display: block; margin-top: 8px; font-weight: 600; }
.cat small { color: var(--ink-2); font-size: 14px; }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 16px; }
.card { text-decoration: none; display: flex; flex-direction: column; }
.card .ph { position: relative; aspect-ratio: 4/5; border-radius: var(--radius-m); overflow: hidden; background: var(--stone); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; }
.card .tag { position: absolute; top: 10px; inset-inline-start: 10px; background: #fff; border-radius: var(--radius-s); padding: 0 8px; font-size: 13.5px; }
.card .tag.sale { background: var(--thread); color: #fff; }
.card .tag.oos { background: var(--ink); color: #fff; }
.card .swatches { position: absolute; bottom: 8px; inset-inline-end: 8px; background: rgba(255,255,255,.92); border-radius: 999px; padding: 0 9px; font-size: 13px; }
.card h3 { font-family: var(--body); font-size: 16.5px; font-weight: 600; margin: 10px 0 2px; line-height: 1.55; }
.card .spec { font-size: 14px; color: var(--ink-2); }
.price { font-weight: 700; font-size: 18px; }
.price small { font-weight: 400; font-size: 14px; color: var(--ink-2); }
.price del { color: var(--ink-2); font-weight: 400; font-size: 15px; margin-inline-start: 6px; }
.price .cut { color: var(--thread); }

/* listing layout */
.listing { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding-top: 24px; padding-bottom: 48px; }
.filters fieldset { border: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; margin: 0 0 14px; }
.filters legend { font-family: var(--display); font-size: 17px; margin-bottom: 6px; padding: 0; }
.filters label { display: flex; align-items: center; gap: 8px; font-size: 15.5px; cursor: pointer; padding: 2px 0; }
.filters label span { color: var(--ink-2); font-size: 13px; margin-inline-start: auto; }
.filters input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--ink); }
.range { display: flex; gap: 8px; }
.range input { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 8px; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.bar select { height: 42px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 10px; background: #fff; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.active-filters button { border: 1px solid var(--line); background: var(--stone); border-radius: 999px; padding: 2px 12px; font-size: 14px; cursor: pointer; }
.filter-toggle { display: none; }
@media (max-width: 860px) {
  .listing { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters { display: none; }
  .filters.open { display: block; position: fixed; inset: 0; z-index: 50; background: #fff; overflow: auto; padding: 16px; }
}
.filters .close { display: none; }
.filters.open .close { display: block; position: sticky; bottom: 0; width: 100%; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: var(--radius-s); border: 1.5px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 16.5px; }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.gold { background: var(--gold); border-color: var(--gold); }
.btn.wa { background: #1f7a45; border-color: #1f7a45; }
.btn svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* product page */
.crumbs { font-size: 14.5px; color: var(--ink-2); padding: 14px 0 0; }
.crumbs a { text-decoration: none; }
.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; padding-top: 14px; padding-bottom: 40px; align-items: start; }
.gallery .main { aspect-ratio: 1; border-radius: var(--radius-m); overflow: hidden; background: var(--stone); position: relative; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .main .code { position: absolute; bottom: 10px; inset-inline-start: 10px; background: #fff; border-radius: var(--radius-s); padding: 2px 10px; font-size: 15px; }
.gallery .main .zoom { position: absolute; top: 10px; inset-inline-end: 10px; }
.colours { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 8px; margin-top: 12px; }
.colours button { position: relative; padding: 0; border: 2px solid transparent; border-radius: var(--radius-s); overflow: hidden; aspect-ratio: 1; cursor: pointer; background: var(--stone); }
.colours button img { width: 100%; height: 100%; object-fit: cover; }
.colours button[aria-pressed="true"] { border-color: var(--ink); }
.colours button span { position: absolute; bottom: 0; inset-inline: 0; background: rgba(255,255,255,.9); font-size: 12px; line-height: 1.5; }
.colours button.out::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top left, transparent 48%, var(--thread) 49% 51%, transparent 52%); }
.buy { display: flex; flex-direction: column; }
.buy > .qty { order: 2; } .buy > .actions { order: 3; } .buy > .assure { order: 4; }
.buy > .calc { order: 5; } .buy > .specs { order: 6; }
.buy h1 { font-size: clamp(25px, 3.4vw, 34px); }
.buy .price { font-size: 26px; margin: 4px 0 12px; }
.specs { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 16px; }
.specs th { text-align: start; font-weight: 400; color: var(--ink-2); width: 38%; padding: 7px 0; border-bottom: 1px solid var(--line); }
.specs td { padding: 7px 0; border-bottom: 1px solid var(--line); font-weight: 600; }
.specs td.todo { font-weight: 400; color: var(--gold); }
.qty { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; flex-wrap: wrap; }
.qty .stepper { display: flex; border: 1.5px solid var(--ink); border-radius: var(--radius-s); }
.qty .stepper button { width: 44px; height: 46px; border: 0; background: #fff; font-size: 22px; cursor: pointer; }
.qty .stepper input { width: 70px; text-align: center; border: 0; border-inline: 1px solid var(--line); font-weight: 700; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions .full { grid-column: 1 / -1; }
.assure { list-style: none; padding: 14px 16px; margin: 16px 0; background: var(--stone); border-radius: var(--radius-m); font-size: 15.5px; }
.assure li { padding: 3px 0; }
.assure b { font-weight: 600; }
@media (max-width: 860px) {
  .pdp { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pdp > * { min-width: 0; }
  .colours { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .colours button { flex: 0 0 64px; scroll-snap-align: start; }
}

/* metre calculator (uses the tape) */
.calc { border: 1.5px solid var(--ink); border-radius: var(--radius-m); overflow: hidden; margin: 18px 0; }
.calc .body { padding: 14px 16px; }
.calc .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.calc label { font-size: 14.5px; color: var(--ink-2); display: block; }
.calc select, .calc input { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 0 10px; background: #fff; color: var(--ink); }
.calc input[type=checkbox] { width: 18px; height: 18px; display: inline-block; vertical-align: middle; accent-color: var(--ink); }
.calc #vestWrap { display: flex; align-items: center; gap: 8px; }
.calc output { display: block; font-family: var(--display); font-size: 26px; margin-top: 10px; }
@media (max-width: 520px) { .calc .row { grid-template-columns: 1fr 1fr; } }

/* details blocks */
.details { padding-bottom: 40px; }
.details details { border-top: 1px solid var(--line); padding: 12px 0; }
.details summary { font-family: var(--display); font-size: 19px; cursor: pointer; }
.desc { white-space: pre-line; }
.review-empty { background: var(--stone); border-radius: var(--radius-m); padding: 18px; }

/* info pages */
.page { padding: 28px 0 56px; }
.page .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .page .cols { grid-template-columns: 1fr; } }
.table { width: 100%; border-collapse: collapse; font-size: 16px; }
.table th, .table td { text-align: start; padding: 9px 8px; border-bottom: 1px solid var(--line); }
.table th { background: var(--stone); font-weight: 600; }
.todo { color: var(--gold); }
.map { width: 100%; aspect-ratio: 4/3; border: 0; border-radius: var(--radius-m); background: var(--stone); }
.guide { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.guide article { border-top: 3px solid var(--ink); padding-top: 10px; }
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust div { border-inline-start: 3px solid var(--gold); padding-inline-start: 12px; }
.trust b { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr 1fr; } }
.review-sum { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.review-sum .big { font-family: var(--display); font-size: 64px; line-height: 1; }

/* cart & checkout */
.cart-line { display: grid; grid-template-columns: 86px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line img { width: 86px; height: 86px; object-fit: cover; border-radius: var(--radius-s); }
.checkout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 28px; }
@media (max-width: 860px) { .checkout { grid-template-columns: 1fr; } }
.form label { display: block; margin-bottom: 12px; font-size: 15.5px; }
.form input, .form select, .form textarea { display: block; width: 100%; min-height: 46px; border: 1px solid #b9b9b4; border-radius: var(--radius-s); padding: 6px 12px; margin-top: 4px; background: #fff; }
.pay label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.pay input { width: 18px; height: 18px; margin-top: 6px; accent-color: var(--ink); }
.summary { background: var(--stone); border-radius: var(--radius-m); padding: 18px; align-self: start; position: sticky; top: 150px; }
.summary .line { display: flex; justify-content: space-between; padding: 4px 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-weight: 700; font-size: 19px; }
.note-demo { border: 1.5px dashed var(--gold); background: var(--gold-soft); border-radius: var(--radius-m); padding: 12px 14px; font-size: 15px; }

/* footer */
.foot { background: var(--ink); color: #e9e9e6; padding: 36px 0 90px; margin-top: 20px; }
.foot .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 24px; }
.foot h3 { font-size: 17px; color: #fff; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { padding: 2px 0; font-size: 15.5px; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.social { display: flex; gap: 8px; margin-top: 10px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid #5a5f66; border-radius: var(--radius-s); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr 1fr; } }

.wa-float { position: fixed; bottom: 18px; inset-inline-start: 18px; z-index: 40; width: 58px; height: 58px; border-radius: 50%; background: #1f7a45; display: grid; place-items: center; box-shadow: 0 3px 12px rgba(0,0,0,.25); }
.wa-float svg { width: 30px; height: 30px; fill: #fff; }
.toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: var(--radius-s); z-index: 60; font-size: 15.5px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.empty { text-align: center; padding: 48px 16px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
