/*
Theme Name: Maison Élan
Author: Yiruisen Studio
Description: HATISAN storefront: an editorial catalogue for bags and travel organisers with an editable WordPress product catalogue.
Version: 1.2.0
Requires at least: 6.5
Requires PHP: 7.4
Text Domain: maison-elan
*/
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..600;1,9..144,300..500&family=Instrument+Sans:wght@400..600&display=swap');

/* ---------------------------------------------------------------------------
 * Tokens
 * ------------------------------------------------------------------------- */
:root {
  --paper: #f7f3ec;
  --sand: #efe8dc;
  --card: #ece5da;
  --ink: #1f1d1a;
  --ink-2: #45403a;
  --muted: #665f55;
  --clay: #97472a;
  --olive: #2f3a2a;
  --olive-2: #3d4a36;
  --line: #e0d8cb;
  --line-strong: #8b8173;
  --on-dark: #f7f3ec;
  --on-dark-muted: #c9cbbd;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Instrument Sans', 'Helvetica Neue', 'Segoe UI', Arial, sans-serif;
  --gutter: clamp(16px, 4.2vw, 64px);
  --max: 1400px;
  --edge: max(var(--gutter), calc((100% - var(--max)) / 2));
  --radius: 2px;
  --header-h: 68px;
  --shadow: 0 22px 60px -28px rgba(31, 29, 26, .45);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------------------------------------------------------------------------
 * Base
 * ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); scrollbar-gutter: stable; }
html.no-scroll { overflow: hidden; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; font-optical-sizing: auto; line-height: 1.1; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
h1 em, h2 em { font-style: italic; font-weight: 340; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico-lg { width: 32px; height: 32px; stroke-width: 1.2; margin: 0 auto 14px; color: var(--muted); }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 300; background: var(--ink); color: var(--paper); padding: 12px 16px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }

.eyebrow { font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--clay); margin: 0 0 14px; }

/* ---------------------------------------------------------------------------
 * Buttons and links
 * ------------------------------------------------------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 50px; padding: 0 26px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); font: 600 14px/1.2 var(--sans); letter-spacing: .02em; text-decoration: none; text-align: center; transition: background-color .2s, color .2s, border-color .2s; }
.button:hover { background: var(--olive); border-color: var(--olive); }
.button .ico { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.button:hover .ico { transform: translateX(3px); }
.button-ghost { background: transparent; color: var(--ink); }
.button-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button-block { width: 100%; }
.button-small { min-height: 42px; padding: 0 18px; font-size: 13px; }
.button:disabled, .button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.button:disabled:hover { background: var(--ink); border-color: var(--ink); }
.text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; font-weight: 600; letter-spacing: .01em; text-decoration: underline; text-underline-offset: 6px; }
.text-link .ico { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.text-link:hover .ico { transform: translateX(3px); }
.text-button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; color: var(--ink); }
.text-button .ico { width: 18px; height: 18px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; transition: background-color .2s; }
.icon-btn:hover { background: rgba(31, 29, 26, .07); }
.count-badge { position: absolute; top: 4px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--clay); color: #fff; font: 600 11px/18px var(--sans); text-align: center; pointer-events: none; }

/* ---------------------------------------------------------------------------
 * Announcement and header
 * ------------------------------------------------------------------------- */
.announcement { display: flex; align-items: center; justify-content: center; gap: 6px 18px; flex-wrap: wrap; padding: 7px var(--gutter); background: var(--olive); color: var(--on-dark); font-size: 13px; line-height: 1.4; text-align: center; }
.announcement p { margin: 0; }
.announcement-short { display: none; }
.announcement-link { min-height: 30px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; color: var(--on-dark); }
.announcement :focus-visible { outline-color: var(--on-dark); }
.editor-preview { padding: 9px var(--gutter); background: #e6e0cf; color: var(--ink); font-size: 13px; text-align: center; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 243, 236, .94); border-bottom: 1px solid var(--line); -webkit-backdrop-filter: saturate(1.2) blur(10px); backdrop-filter: saturate(1.2) blur(10px); }
.header-inner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; height: var(--header-h); padding-inline: var(--edge); }
.menu-btn { display: none; margin-left: -10px; }
.wordmark { padding-block: 11px; font: 500 25px/1 var(--serif); letter-spacing: .22em; margin-right: -.22em; text-decoration: none; white-space: nowrap; font-variation-settings: 'opsz' 72; }
.primary-nav { display: flex; justify-content: center; gap: clamp(14px, 1.9vw, 30px); }
.primary-nav a { position: relative; padding: 12px 0; font-size: 14.5px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.primary-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 6px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease); }
.primary-nav a:hover::after, .primary-nav a[aria-current="true"]::after { transform: scaleX(1); }
.primary-nav .nav-quiet { color: var(--muted); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.header-search { display: inline-flex; align-items: center; gap: 10px; height: 42px; min-width: 170px; margin-right: 6px; padding: 0 16px 0 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 14px; transition: border-color .2s, color .2s; }
.header-search:hover { border-color: var(--line-strong); color: var(--ink); }
.header-search .ico { width: 18px; height: 18px; color: var(--ink); }

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.site-footer { background: var(--olive); color: var(--on-dark); padding: clamp(48px, 6vw, 80px) var(--edge) 28px; }
.site-footer :focus-visible { outline-color: var(--on-dark); }
.footer-inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { font: 500 30px/1 var(--serif); letter-spacing: .22em; text-decoration: none; }
.footer-brand-col p { max-width: 300px; margin-top: 18px; color: var(--on-dark-muted); font-size: 15px; }
.footer-col h2 { font: 600 12px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--on-dark-muted); margin: 0 0 14px; }
.footer-col a, .footer-col button { display: block; padding: 7px 0; font-size: 15px; text-align: left; text-decoration: none; color: var(--on-dark); }
.footer-col a:hover, .footer-col button:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(247, 243, 236, .2); color: var(--on-dark-muted); font-size: 13px; }

/* ---------------------------------------------------------------------------
 * Dialogs and drawers
 * ------------------------------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(24, 22, 19, .5); opacity: 0; transition: opacity .22s ease; }
.modal.visible { opacity: 1; }
.modal-panel { position: relative; width: min(720px, 100%); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; padding: 44px 40px 36px; background: var(--paper); box-shadow: var(--shadow); transform: translateY(10px); transition: transform .28s var(--ease); }
.modal.visible .modal-panel { transform: none; }
.modal-panel h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -.015em; }
.close-floating { position: absolute; top: 10px; right: 10px; z-index: 6; background: var(--paper); }
.drawer { justify-content: flex-end; align-items: stretch; padding: 0; }
.drawer--left { justify-content: flex-start; }
.drawer .drawer-panel { display: flex; flex-direction: column; width: min(440px, 100%); height: 100%; max-height: none; padding: 0; transform: translateX(28px); }
.drawer--left .drawer-panel { transform: translateX(-28px); }
.drawer.visible .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 22px 20px 16px 24px; border-bottom: 1px solid var(--line); }
.drawer-head .eyebrow { margin-bottom: 6px; }
.drawer-head h2 { font-size: 28px; }
.drawer-head h2 span { font-size: .6em; color: var(--muted); font-family: var(--sans); letter-spacing: 0; vertical-align: middle; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 24px; }
.drawer-foot { display: grid; gap: 12px; padding: 18px 24px 22px; border-top: 1px solid var(--line); }
.drawer-foot:empty { display: none; }
.drawer-empty { padding: 56px 12px; text-align: center; color: var(--muted); }
.drawer-empty h3 { font-size: 24px; color: var(--ink); margin-bottom: 8px; }
.drawer-note { margin: 0; font-size: 13px; line-height: 1.55; color: var(--muted); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 15px; }
.line-list { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.line:last-child { border-bottom: 0; }
.line-img { display: block; aspect-ratio: 4 / 5; background: var(--card); }
.line-img img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; padding: 6px; }
.line h3 { font-size: 18px; line-height: 1.25; margin: 0 0 4px; }
.line h3 a { text-decoration: none; }
.line h3 a:hover { text-decoration: underline; }
.line p { margin: 0 0 2px; font-size: 14px; color: var(--muted); }
.line .line-meta { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.line-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; }
.stepper button { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper .ico { width: 16px; height: 16px; }
.stepper span { min-width: 22px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }
.info-panel { width: min(600px, 100%); }
.info-panel h2 { margin-bottom: 18px; }
.info-panel p { color: var(--ink-2); line-height: 1.75; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 400; max-width: min(92vw, 520px); padding: 14px 20px; background: var(--ink); color: var(--paper); font-size: 14px; line-height: 1.45; border-radius: var(--radius); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .22s, transform .22s var(--ease); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-tray .toast { bottom: 96px; }

/* ---------------------------------------------------------------------------
 * Secondary WordPress / WooCommerce pages (page.php)
 * ------------------------------------------------------------------------- */
.commerce-page { width: min(100% - 2 * var(--gutter), 900px); margin: 0 auto; padding: clamp(40px, 6vw, 88px) 0; min-height: 60vh; font-size: 16px; line-height: 1.75; }
.commerce-page h1 { font-size: clamp(36px, 5vw, 56px); letter-spacing: -.02em; margin: 0 0 28px; }
.commerce-notice { padding: 16px 20px; margin-bottom: 28px; background: var(--sand); border-left: 3px solid var(--clay); font-size: 15px; }
.commerce-page input, .commerce-page select, .commerce-page textarea { max-width: 100%; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: #fff; }
.commerce-page button, .commerce-page .button, .commerce-page input[type="submit"] { min-height: 46px; padding: 0 22px; background: var(--ink); color: var(--paper); border: 1px solid var(--ink); border-radius: var(--radius); font-weight: 600; cursor: pointer; }
.commerce-page .woocommerce-message, .commerce-page .woocommerce-info, .commerce-page .woocommerce-error { padding: 14px 18px; margin: 0 0 24px; list-style: none; background: var(--sand); border-left: 3px solid var(--clay); }
.commerce-page table { width: 100%; border-collapse: collapse; }
.commerce-page th, .commerce-page td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.commerce-footer { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 26px var(--edge); background: var(--olive); color: var(--on-dark); font-size: 14px; }
.commerce-footer a { color: var(--on-dark); }
.commerce-nav { display: flex; justify-content: flex-end; gap: 22px; }
.commerce-nav a { font-size: 14.5px; font-weight: 500; text-decoration: none; padding: 12px 0; }
.commerce-nav a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------------------
 * Responsive foundation
 * ------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .header-search { min-width: 0; width: 44px; height: 44px; padding: 0; margin: 0; justify-content: center; border: 0; border-radius: 50%; }
  .header-search:hover { background: rgba(31, 29, 26, .07); }
  .header-search-label { display: none; }
  .header-search .ico { width: 20px; height: 20px; }
}
@media (max-width: 960px) {
  :root { --header-h: 62px; }
  .menu-btn { display: inline-grid; }
  .primary-nav { display: none; }
  .header-inner { gap: 8px; }
  .wordmark { font-size: 22px; justify-self: start; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .announcement-long { display: none; }
  .announcement-short { display: inline; }
  .announcement { font-size: 12.5px; padding-block: 5px; }
  .modal { padding: 12px; }
  .modal-panel { padding: 40px 20px 28px; max-height: calc(100dvh - 24px); }
  .drawer { padding: 0; }
  .drawer-head { padding: 18px 12px 14px 20px; }
  .drawer-body { padding: 4px 20px; }
  .drawer-foot { padding: 16px 20px 20px; }
  .footer-col a, .footer-col button { padding: 9px 0; }
}
@media (max-width: 380px) {
  .header-inner { gap: 2px; }
  .wordmark { font-size: 19px; letter-spacing: .18em; margin-right: -.18em; }
  .header-actions .icon-btn, .header-search { width: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media (forced-colors: active) {
  .chip[aria-pressed="true"], .swatch[aria-checked="true"] .swatch-img { outline: 2px solid CanvasText; }
}
