/* ================================================================
   MAISON — EDITORIAL MINIMAL · BEAUTY
   White, ultra-generous whitespace, italic display, minimal chrome.
   ================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=DM+Sans:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&family=Amiri:ital,wght@0,400;1,400;0,700&family=Tajawal:wght@300;400;500;700&display=swap");

:root {
  --bg: #ffffff;
  --paper: #faf8f5;
  --bone: #f0ebe3;
  --ink: #1a1a1a;
  --ink-2: #4a4a4a;
  --muted: #8a8682;
  --line: rgba(26,26,26,0.12);
  --line-2: rgba(26,26,26,0.28);
  --accent: #3a3a3a;
  --warm: #c9b89e;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --f-disp: "Cormorant Garamond", serif;
  --f-body: "DM Sans", sans-serif;
  --f-mono: "JetBrains Mono", monospace;
}
html[dir="rtl"] { --f-disp: "Amiri", serif; --f-body: "Tajawal", sans-serif; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); }
body { font-family: var(--f-body); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; overflow-x: hidden; font-weight: 400; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; background: none; border: 0; color: inherit; padding: 0; }
input, textarea, select { font-family: inherit; color: inherit; }
::selection { background: var(--warm); color: var(--ink); }

/* type */
.serif { font-family: var(--f-disp); }
.serif-i { font-family: var(--f-disp); font-style: italic; font-weight: 400; }
.eyebrow { font-family: var(--f-body); font-size: 11px; letter-spacing: 0.42em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.mono { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; }

/* nav */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--line); }
.nav-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; padding: 22px 32px; }
.brand-maison { font-family: var(--f-body); font-weight: 500; font-size: 14px; letter-spacing: 0.5em; text-transform: uppercase; text-align: center; }
.nav-links { display: flex; gap: 28px; }
.nav-link { font-family: var(--f-body); font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 500; transition: color .3s; }
.nav-link:hover, .nav-link.is-active { color: var(--muted); }
.nav-link.is-active { border-bottom: 1px solid var(--ink); padding-bottom: 4px; }
.nav-actions { display: flex; gap: 18px; justify-content: flex-end; }
.nav-actions button, .nav-actions a { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; position: relative; transition: color .3s; }
.nav-actions a:hover, .nav-actions button:hover { color: var(--muted); }
.nav-actions [data-cart-count]::after { content: attr(data-count); position: absolute; top: 0; inset-inline-end: 0; background: var(--ink); color: var(--bg); min-width: 14px; height: 14px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 9px; padding: 0 3px; }
[data-cart-count].is-zero::after { display: none; }

@media (max-width: 900px) { .nav-inner { grid-template-columns: auto 1fr auto; } .nav-links { display: none; } .menu-btn { display: inline-flex !important; } }
.menu-btn { display: none; }

.drawer { position: fixed; inset: 0; z-index: 80; background: var(--bg); transform: translateY(-100%); transition: transform .55s var(--ease); }
.drawer.open { transform: none; }
.drawer .x { position: absolute; top: 20px; inset-inline-end: 20px; width: 40px; height: 40px; display: grid; place-items: center; }
.drawer .inner { padding: 80px 24px; }
.drawer a { display: block; font-family: var(--f-disp); font-style: italic; font-size: 32px; padding: 10px 0; }

/* containers */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
.wrap-tight { max-width: 760px; margin: 0 auto; padding: 0 32px; }
.wrap-prose { max-width: 620px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap, .wrap-tight, .wrap-prose { padding: 0 20px; } }

.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
@media (max-width: 768px) { .section { padding: 80px 0; } .section-tight { padding: 56px 0; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 14px 32px; font-family: var(--f-body); font-size: 11px; letter-spacing: 0.36em; text-transform: uppercase; font-weight: 500; border: 1px solid var(--ink); background: transparent; color: var(--ink); transition: all .4s var(--ease); }
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.ink { background: var(--ink); color: var(--bg); }
.btn.ink:hover { background: var(--bg); color: var(--ink); }
.arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px); }

.ulink { display: inline-block; padding-bottom: 2px; border-bottom: 1px solid var(--ink); transition: color .25s, border-color .25s; }
.ulink:hover { color: var(--muted); border-color: var(--muted); }

/* product card */
.card { display: block; text-align: center; }
.card .frame { aspect-ratio: 3/4; overflow: hidden; background: var(--paper); }
.card .frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.card:hover .frame img { transform: scale(1.04); }
.card .num { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.32em; color: var(--muted); margin-top: 18px; }
.card .name { font-family: var(--f-disp); font-style: italic; font-size: 22px; line-height: 1.25; margin-top: 6px; }
.card .price { font-family: var(--f-body); font-size: 13px; color: var(--muted); margin-top: 6px; letter-spacing: 0.06em; }

/* grid */
.pgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 56px 32px; }
@media (min-width: 768px) { .pgrid { grid-template-columns: repeat(3, 1fr); gap: 88px 48px; } }
@media (min-width: 1100px) { .pgrid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* form */
.field { display: block; width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 18px 0 12px; font-family: var(--f-body); font-size: 15px; color: var(--ink); outline: none; transition: border-color .3s; }
.field:focus { border-bottom-color: var(--ink); }
.field-label { display: block; font-family: var(--f-body); font-size: 10px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.field-box { width: 100%; background: var(--paper); border: 1px solid var(--line); padding: 14px 18px; font-family: var(--f-body); font-size: 15px; outline: none; transition: border-color .3s; }
.field-box:focus { border-color: var(--ink); }

/* footer */
.foot { padding: 120px 32px 40px; border-top: 1px solid var(--line); }
.foot-brand { font-family: var(--f-body); font-weight: 500; font-size: clamp(14px, 1.4vw, 20px); letter-spacing: 0.5em; text-transform: uppercase; text-align: center; padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; max-width: 1240px; margin: 0 auto; }
@media (max-width: 768px) { .foot-cols { grid-template-columns: 1fr 1fr; gap: 32px; } }
.foot-cols h4 { font-family: var(--f-body); font-size: 10px; letter-spacing: 0.36em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-bottom: 14px; }
.foot-cols ul { list-style: none; }
.foot-cols li { padding: 6px 0; font-size: 14px; }
.foot-cols a:hover { color: var(--muted); }
.foot-bottom { max-width: 1240px; margin: 56px auto 0; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-family: var(--f-body); font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--muted); }

/* reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .04s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .10s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .16s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .22s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .28s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .34s; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: .40s; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: .46s; }

/* chip */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; font-family: var(--f-body); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; font-weight: 500; border: 1px solid var(--line); background: transparent; color: var(--ink); transition: all .25s; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* tweaks panel */
.tw-panel { position: fixed; top: 90px; inset-inline-end: 32px; z-index: 90; width: 280px; background: var(--bg); border: 1px solid var(--line); padding: 24px; transform: translateX(120%); opacity: 0; transition: transform .4s var(--ease), opacity .25s; }
.tw-panel.open { transform: none; opacity: 1; }
