/* ==========================================================================
   PIAM — storefront styles
   Charte reprise du site Piam d'origine : noir #111, rose #E91E63 / #ff007f,
   jaune #ffeb3b, vert #00e676, brun du logo #7B2E16 ; Montserrat + Pacifico ;
   cartes « néo-brutalistes » (bordure noire épaisse + ombre décalée).
   ========================================================================== */

:root {
  --ink: #111111;
  --ink-soft: #3b3b3b;
  --muted: #6b6b6b;
  --line: #e7e2dc;
  --paper: #ffffff;
  --cream: #fbf6ef;
  --sand: #f4ece1;
  --brand: #7b2e16;
  --wine: #8f2e45;
  --pink: #e91e63;
  --hot: #ff007f;
  --pink-soft: #fff0f5;
  --yellow: #ffeb3b;
  --green: #00c86a;
  --green-bright: #00e676;
  --violet: #7c3aed;
  --sky: #e0f7fa;
  --danger: #d31e1e;
  --radius: 14px;
  --radius-sm: 10px;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-lg: 8px 8px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pacifico", "Brush Script MT", cursive;
  --container: 1240px;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 900; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
[x-cloak] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.script { font-family: var(--script); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 1rem; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border: var(--border); border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 800; font-size: .95rem;
  box-shadow: var(--shadow-sm); cursor: pointer; text-transform: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-pink { background: var(--hot); color: #fff; }
.btn-yellow { background: var(--yellow); }
.btn-green { background: var(--green-bright); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: .85rem; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; }
.btn-lg { padding: 17px 30px; font-size: 1.05rem; }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { box-shadow: none; transform: none; text-decoration: underline; }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.link { font-weight: 800; border-bottom: 3px solid var(--yellow); }
.link:hover { background: var(--yellow); }

/* ---------- Badges, chips ------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border: 2px solid var(--ink); border-radius: 6px;
  font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  background: var(--paper); box-shadow: 2px 2px 0 var(--ink); line-height: 1.4;
}
.badge-hot { background: var(--hot); color: #fff; }
.badge-green { background: var(--green-bright); color: var(--ink); }
.badge-yellow { background: var(--yellow); }
.badge-ink { background: var(--ink); color: #fff; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px;
  border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; font-size: .9rem;
  background: var(--paper); transition: background .15s ease;
}
.chip:hover { background: var(--yellow); }
.chip.is-active { background: var(--ink); color: #fff; }

/* ---------- Announcement + header ---------------------------------------- */
.announce {
  background: var(--ink); color: #fff; font-size: .82rem; font-weight: 600;
  text-align: center; padding: 8px 16px;
}
.announce strong { color: var(--yellow); }

.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header-h); gap: 16px;
}
.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-tab {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px;
  border-radius: 999px; font-weight: 700; font-size: .93rem; border: 2px solid transparent;
  transition: background .15s ease, border-color .15s ease;
}
.nav-tab:hover { background: var(--cream); }
.nav-tab.is-active { border-color: var(--ink); background: var(--yellow); box-shadow: 2px 2px 0 var(--ink); }
.logo { display: flex; justify-content: center; }
.logo img { height: 56px; width: auto; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.header-link { font-weight: 700; font-size: .92rem; padding: 9px 12px; border-radius: 999px; }
.header-link:hover { background: var(--cream); }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: none; cursor: pointer;
}
.icon-btn:hover { background: var(--cream); }
.icon-btn .count {
  position: absolute; top: -2px; right: -4px; min-width: 21px; height: 21px; padding: 0 5px;
  border-radius: 999px; background: var(--hot); color: #fff; font-size: .72rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}
.avatar {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--yellow); display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: .8rem;
}
.dropdown { position: relative; }
.dropdown__menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 220px; z-index: 60;
  background: #fff; border: var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: 8px; display: grid; gap: 2px;
}
.dropdown__menu a, .dropdown__menu button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px;
  font-weight: 700; font-size: .92rem; background: none; border: 0; width: 100%; text-align: left; cursor: pointer;
}
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--yellow); }
.dropdown__menu .is-current { background: var(--cream); }
.menu-toggle { display: inline-flex; }

/* ---------- Drawer (menu latéral, comme sur le site d'origine) ----------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(17, 17, 17, .45); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 100;
  background: #fff; border-left: 4px solid var(--pink); overflow-y: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.drawer__head img { height: 54px; }
.drawer-link {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px; border: 2px solid var(--ink); border-radius: 12px; background: #fff;
  font-weight: 800; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .2s cubic-bezier(.175, .885, .32, 1.275), box-shadow .2s ease;
}
.drawer-link span { display: inline-flex; align-items: center; gap: 12px; }
.drawer-link:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); background: #fafafa; }
.drawer-link.is-active { background: var(--ink); color: #fff; box-shadow: 1px 1px 0 var(--ink); transform: translate(1.5px, 1.5px); }
.drawer__langs { display: flex; gap: 8px; margin-top: 8px; }
.drawer__foot { margin-top: auto; padding-top: 16px; }

/* ---------- Flash -------------------------------------------------------- */
.flash {
  margin: 18px auto 0; max-width: var(--container); padding: 0 20px;
}
.flash__box {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); font-weight: 700; background: var(--sky);
}
.flash__box.is-error { background: #ffe1e6; }
.flash__box.is-success { background: #d9fbe8; }

/* ---------- Sections ------------------------------------------------------ */
.section { padding: 72px 0; }
.section-sm { padding: 40px 0; }
.section-cream { background: var(--cream); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 620px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: .12em; color: var(--pink); margin-bottom: 10px;
}
.page-title { padding: 32px 0 24px; }
.page-title h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 10px; }
.page-title p { color: var(--muted); font-size: 1.08rem; max-width: 680px; }
.breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Hero ---------------------------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--cream); border-bottom: var(--border); }
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background: repeating-linear-gradient(90deg, var(--ink) 0 22px, var(--yellow) 22px 44px, var(--green) 44px 66px, var(--pink) 66px 88px, var(--brand) 88px 110px);
}
.hero__inner { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding: 64px 20px 86px; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); line-height: 1.02; margin-bottom: 20px; }
.hero h1 .script { color: var(--pink); display: block; font-size: .78em; margin-top: 10px; }
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 520px; margin-bottom: 30px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__trust { display: flex; gap: 22px; margin-top: 34px; flex-wrap: wrap; font-weight: 700; font-size: .9rem; }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__art { position: relative; height: 480px; }
.hero__frame {
  position: absolute; border: var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-lg); background: #fff;
}
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }
.hero__frame--a { width: 62%; height: 78%; left: 0; top: 4%; transform: rotate(-3deg); }
.hero__frame--b { width: 50%; height: 56%; right: 0; top: 0; transform: rotate(4deg); }
.hero__frame--c { width: 44%; height: 40%; right: 8%; bottom: 0; transform: rotate(-2deg); }
.sticker {
  position: absolute; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 118px; height: 118px; border-radius: 50%; border: var(--border); background: var(--yellow);
  font-weight: 900; text-align: center; line-height: 1.05; box-shadow: var(--shadow-sm); transform: rotate(-12deg);
}
.sticker strong { font-size: 1.9rem; }
.sticker small { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.sticker--hero { left: 52%; top: 52%; }

/* Short laptop screens (14", browser chrome included): keep the whole hero,
   reassurance row included, above the fold. */
@media (min-width: 961px) and (max-height: 820px) {
  .hero__inner { padding: 28px 20px 48px; gap: 40px; }
  .hero h1 { font-size: clamp(2.2rem, 7.2vh, 4.4rem); margin-bottom: 12px; }
  .hero h1 .script { margin-top: 4px; }
  .hero__lead { font-size: 1.05rem; margin-bottom: 20px; }
  .hero__trust { margin-top: 20px; gap: 18px; }
  .hero__art { height: clamp(340px, calc(100vh - 230px), 480px); }
}

/* ---------- Marquee ------------------------------------------------------- */
.marquee { background: var(--ink); color: #fff; overflow: hidden; border-bottom: var(--border); }
.marquee__track { display: flex; gap: 48px; padding: 16px 0; width: max-content; animation: marquee 38s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.marquee__item svg { color: var(--yellow); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- Product cards ------------------------------------------------- */
.grid { display: grid; gap: 28px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  position: relative; background: #fff; border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.card__media { position: relative; aspect-ratio: 4 / 5; background: var(--sand); border-bottom: var(--border); overflow: hidden; }
.card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.card__media img.is-alt { opacity: 0; }
.card:hover .card__media img.is-alt { opacity: 1; }
.card:hover .card__media img { transform: scale(1.04); }
.card__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 2; }
.card__fav { position: absolute; top: 10px; right: 10px; z-index: 2; }
.fav-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--ink); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 2px 2px 0 var(--ink);
}
.fav-btn:hover, .fav-btn.is-on { background: var(--hot); color: #fff; }
.fav-btn.is-on svg { fill: currentColor; }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__cat { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--pink); }
.card__title { font-size: 1.05rem; font-weight: 800; line-height: 1.25; }
.card__title a:hover { text-decoration: underline; }
.card__desc { color: var(--muted); font-size: .88rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.price__now { font-size: 1.2rem; font-weight: 900; }
.price__old { color: var(--muted); text-decoration: line-through; font-weight: 600; font-size: .9rem; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }

.stock-gauge { margin-top: 4px; }
.stock-gauge__bar { height: 10px; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.stock-gauge__fill { height: 100%; background: linear-gradient(90deg, var(--hot), var(--pink)); }
.stock-gauge__label { font-size: .75rem; font-weight: 700; color: var(--ink-soft); margin-top: 4px; display: flex; justify-content: space-between; }

.countdown {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px;
  background: var(--ink); color: var(--yellow); font-weight: 800; font-size: .78rem; font-variant-numeric: tabular-nums;
}

/* Offer card, wide variant (une offre seule dans sa catégorie) */
.offer-wide { display: grid; grid-template-columns: 1.1fr 1fr; }
.offer-wide .card__media { aspect-ratio: auto; min-height: 380px; border-bottom: 0; border-right: var(--border); }
.offer-wide .card__body { padding: 32px; gap: 14px; justify-content: center; }
.offer-wide .card__title { font-size: 1.7rem; }

/* ---------- Category tiles ------------------------------------------------ */
.cat-tile {
  position: relative; display: flex; align-items: flex-end; min-height: 230px; border: var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: #fff;
  transition: transform .2s ease, box-shadow .2s ease;
}
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, .78)); }
.cat-tile__label { position: relative; z-index: 2; padding: 18px; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.cat-tile__label strong { font-size: 1.25rem; display: block; }
.cat-tile__label small { opacity: .85; font-weight: 600; }
.cat-tile:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }
.cat-tile .arrow-dot { width: 42px; height: 42px; border-radius: 50%; background: var(--yellow); color: var(--ink); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* Home page: every category on one row, so the tiles are compact. */
.cat-grid { grid-template-columns: repeat(var(--cat-count, 4), minmax(0, 1fr)); gap: 18px; }
.cat-grid .cat-tile { min-height: 180px; }
.cat-grid .cat-tile__label { padding: 12px; align-items: flex-end; }
.cat-grid .cat-tile__label strong { font-size: 1rem; line-height: 1.2; }
.cat-grid .cat-tile__label small { font-size: .75rem; display: block; line-height: 1.3; }
.cat-grid .cat-tile .arrow-dot { width: 30px; height: 30px; }
.cat-grid .cat-tile .arrow-dot svg { width: 14px; height: 14px; }

/* ---------- Concept trio -------------------------------------------------- */
.feature {
  background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 30px 26px; text-align: center;
}
.feature img { height: 72px; margin: 0 auto 16px; }
.feature h3 { font-size: 1.15rem; }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Blog / projects ---------------------------------------------- */
.post-card .card__media { aspect-ratio: 16 / 10; }
.post-card .card__body { gap: 10px; }
.post-meta { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; gap: 14px; flex-wrap: wrap; }
.funding { padding: 12px; border: 2px solid var(--ink); border-radius: 10px; background: #f9fafb; box-shadow: var(--shadow-sm); }
.funding__bar { height: 12px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; margin: 8px 0 6px; }
.funding__fill { height: 100%; background: var(--green-bright); }
.funding__nums { display: flex; justify-content: space-between; font-size: .8rem; font-weight: 800; }
.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.article {
  background: #fff; border: 4px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: clamp(22px, 4vw, 44px);
}
.article__cover { border: var(--border); border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 28px; max-height: 480px; }
.article__cover img { width: 100%; height: 100%; object-fit: cover; }
.prose { font-size: 1.05rem; line-height: 1.75; color: var(--ink-soft); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose a { font-weight: 700; border-bottom: 2px solid var(--pink); }
.prose blockquote { margin: 1.4em 0; padding: 16px 22px; border-left: 6px solid var(--pink); background: var(--pink-soft); border-radius: 0 10px 10px 0; font-weight: 600; }
.prose ul { padding-left: 1.2em; }

/* ---------- Catalogue layout --------------------------------------------- */
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 36px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 22px; }
.filter-box { border: var(--border); border-radius: var(--radius); padding: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.filter-box h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.filter-list { display: grid; gap: 4px; }
.filter-list a { display: flex; justify-content: space-between; padding: 8px 10px; border-radius: 8px; font-weight: 600; font-size: .92rem; }
.filter-list a:hover { background: var(--cream); }
.filter-list a.is-active { background: var(--ink); color: #fff; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.searchbar { display: flex; align-items: center; gap: 10px; border: var(--border); border-radius: 999px; padding: 4px 6px 4px 16px; background: #fff; box-shadow: var(--shadow-sm); }
.searchbar input { border: 0; outline: 0; background: transparent; padding: 8px 0; min-width: 0; flex: 1; font-weight: 600; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 44px; height: 44px; padding: 0 12px; border: 2px solid var(--ink); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; background: #fff; }
.pagination a:hover { background: var(--yellow); }
.pagination .is-current { background: var(--ink); color: #fff; }
.empty {
  text-align: center; padding: 56px 24px; border: 3px dashed var(--ink); border-radius: var(--radius); background: var(--cream);
}
.empty h3 { font-size: 1.3rem; }

/* ---------- Product page -------------------------------------------------- */
.product-page { display: grid; grid-template-columns: 1.1fr 1fr; gap: 52px; align-items: start; padding: 28px 0 72px; }
.gallery { display: grid; gap: 14px; position: sticky; top: calc(var(--header-h) + 20px); }
.gallery__main { border: var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 1 / 1; background: var(--sand); }
.gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.gallery__thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.gallery__thumbs button { padding: 0; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 1 / 1; cursor: pointer; background: none; }
.gallery__thumbs button.is-active { border-color: var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.gallery__thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.product-info .price__now { font-size: 2rem; }
.product-info .price { margin: 10px 0 18px; }
.option-group { margin: 20px 0; }
.option-group > label, .option-label { display: block; font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 10px; }
.size-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.size-picker input { position: absolute; opacity: 0; pointer-events: none; }
.size-picker label {
  min-width: 52px; height: 46px; padding: 0 14px; border: 2px solid var(--ink); border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 800; cursor: pointer; background: #fff;
}
.size-picker input:checked + label { background: var(--ink); color: #fff; box-shadow: 2px 2px 0 var(--pink); }
.size-picker input:focus-visible + label { outline: 3px solid var(--pink); outline-offset: 2px; }
.qty { display: inline-flex; align-items: center; border: var(--border); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { width: 44px; height: 46px; border: 0; background: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.qty button:hover { background: var(--yellow); }
.qty input { width: 48px; text-align: center; border: 0; outline: 0; font-weight: 900; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.buy-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 24px 0; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 26px 0; }
.fact { border: 2px solid var(--ink); border-radius: 12px; padding: 14px; background: var(--cream); font-size: .88rem; }
.fact strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.reassurance { display: grid; gap: 10px; padding: 18px; border: 2px dashed var(--ink); border-radius: 12px; font-size: .9rem; font-weight: 600; }
.reassurance div { display: flex; align-items: center; gap: 10px; }
.stock-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .9rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); display: inline-block; border: 2px solid var(--ink); }
.dot.is-low { background: var(--yellow); }
.dot.is-out { background: var(--danger); }

/* ---------- Cart / checkout ---------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 36px; align-items: start; padding-bottom: 72px; }
.cart-line { display: grid; grid-template-columns: 110px 1fr auto; gap: 18px; align-items: center; padding: 18px; border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.cart-line + .cart-line { margin-top: 16px; }
.cart-line__img { width: 110px; height: 110px; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.cart-line__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line__name { font-weight: 800; font-size: 1.05rem; }
.cart-line__meta { color: var(--muted); font-size: .85rem; font-weight: 600; }
.cart-line__side { display: grid; justify-items: end; gap: 10px; }
.summary { position: sticky; top: calc(var(--header-h) + 20px); border: var(--border); border-radius: var(--radius); background: var(--pink-soft); box-shadow: var(--shadow-lg); padding: 24px; }
.summary h2 { font-size: 1.3rem; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; font-weight: 600; }
.summary__row.is-total { border-top: 3px solid var(--ink); margin-top: 8px; padding-top: 14px; font-size: 1.25rem; font-weight: 900; }
.summary__note { font-size: .82rem; color: var(--ink-soft); background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.free-ship { margin: 12px 0; }
.free-ship .stock-gauge__fill { background: var(--green-bright); }
.coupon-form { display: flex; gap: 8px; margin-top: 12px; }
.coupon-form input { flex: 1; min-width: 0; }
.pay-options { display: grid; gap: 12px; }
.pay-option { position: relative; }
.pay-option input { position: absolute; opacity: 0; }
.pay-option label {
  display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px solid var(--ink); border-radius: 12px;
  background: #fff; cursor: pointer; font-weight: 700; transition: box-shadow .15s ease, background .15s ease;
}
.pay-option label img { height: 30px; width: auto; }
.pay-option label small { display: block; color: var(--muted); font-weight: 500; }
.pay-option input:checked + label { background: var(--yellow); box-shadow: var(--shadow-sm); }
.pay-option input:focus-visible + label { outline: 3px solid var(--pink); outline-offset: 2px; }
.steps { display: flex; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: .88rem; color: var(--muted); }
.step b { width: 30px; height: 30px; border-radius: 50%; border: 2px solid currentColor; display: inline-flex; align-items: center; justify-content: center; }
.step.is-done, .step.is-current { color: var(--ink); }
.step.is-current b { background: var(--yellow); border-color: var(--ink); }
.step + .step::before { content: ""; width: 28px; height: 3px; background: var(--line); }

/* ---------- Forms ---------------------------------------------------------- */
.panel { background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.panel + .panel { margin-top: 24px; }
.panel h2 { font-size: 1.3rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; }
.field label, .label { font-weight: 800; font-size: .85rem; }
.input, .field input[type="text"], .field input[type="email"], .field input[type="password"], .field input[type="tel"],
.field input[type="number"], .field input[type="search"], .field input[type="url"], .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 2px solid var(--ink); border-radius: 10px; background: #fff;
  font-weight: 500; outline: 0; transition: box-shadow .15s ease;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { box-shadow: 3px 3px 0 var(--pink); }
.field textarea { min-height: 140px; resize: vertical; }
.field .hint { font-size: .8rem; color: var(--muted); }
.field .error, .field-error + .error { color: var(--danger); font-size: .82rem; font-weight: 700; }
.field-error { border-color: var(--danger) !important; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); }
.alert { padding: 14px 16px; border: 2px solid var(--ink); border-radius: 10px; background: #ffe1e6; font-weight: 700; margin-bottom: 18px; }
.alert.is-info { background: var(--sky); }
.alert.is-success { background: #d9fbe8; }

/* ---------- Auth ------------------------------------------------------------ */
.auth-wrap { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--header-h)); }
.auth-art { position: relative; border-right: var(--border); overflow: hidden; background: var(--cream); }
.auth-art img { width: 100%; height: 100%; object-fit: cover; }
.auth-art__quote { position: absolute; left: 32px; right: 32px; bottom: 32px; background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.auth-art__quote .script { font-size: 2rem; color: var(--pink); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-form .panel { width: 100%; max-width: 460px; }
.auth-form h1 { font-size: 2rem; }

/* ---------- Account ---------------------------------------------------------- */
.account-layout { display: grid; grid-template-columns: 280px 1fr; gap: 34px; align-items: start; padding: 10px 0 72px; }
.account-nav { display: grid; gap: 10px; position: sticky; top: calc(var(--header-h) + 20px); }
.account-card { display: flex; gap: 14px; align-items: center; padding: 18px; border: var(--border); border-radius: var(--radius); background: var(--yellow); box-shadow: var(--shadow-sm); margin-bottom: 6px; }
.account-card .avatar { width: 52px; height: 52px; font-size: 1.1rem; background: #fff; }
.table-wrap { overflow-x: auto; border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; background: var(--cream); }
.table tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 2px solid var(--ink); font-size: .75rem; font-weight: 800; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status.tone-warning { background: #fff7c2; color: #7a5b00; }
.status.tone-info { background: var(--sky); color: #035b67; }
.status.tone-violet { background: #ede4ff; color: #5b21b6; }
.status.tone-success { background: #d9fbe8; color: #036b3a; }
.status.tone-danger { background: #ffe1e6; color: #9b1030; }
.status.tone-muted { background: #f1f1f1; color: #555; }
.timeline { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 18px 1fr; gap: 12px; }
.timeline li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--ink); background: var(--yellow); margin-top: 4px; }
.timeline small { color: var(--muted); display: block; font-weight: 600; }
.address-card { border: 2px solid var(--ink); border-radius: 12px; padding: 18px; background: #fff; display: grid; gap: 6px; }
.address-card.is-default { background: var(--cream); box-shadow: var(--shadow-sm); }

/* ---------- Contact / FAQ / legal ------------------------------------------ */
.contact-grid { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; padding-bottom: 72px; }
.info-list { display: grid; gap: 18px; }
.info-item { display: flex; gap: 14px; align-items: flex-start; }
.info-item .ico { width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--ink); background: var(--yellow); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.info-item strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.faq { display: grid; gap: 16px; max-width: 860px; margin: 0 auto 72px; }
.faq details { border: var(--border); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 22px; font-weight: 800; font-size: 1.05rem; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { transition: transform .2s ease; flex-shrink: 0; }
.faq details[open] summary { background: var(--yellow); border-bottom: var(--border); }
.faq details[open] summary svg { transform: rotate(180deg); }
.faq .answer { padding: 18px 22px 22px; color: var(--ink-soft); line-height: 1.7; }
.legal { max-width: 860px; margin: 0 auto 72px; }
.legal section { margin-bottom: 26px; }
.legal h2 { font-size: 1.25rem; }
.legal p { color: var(--ink-soft); line-height: 1.75; }

/* ---------- Newsletter / app / footer -------------------------------------- */
.newsletter {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center;
  border: var(--border); border-radius: var(--radius); background: var(--hot); color: #fff; padding: clamp(26px, 4vw, 48px); box-shadow: var(--shadow-lg);
}
.newsletter h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.newsletter form { display: flex; gap: 10px; background: #fff; border: var(--border); border-radius: 999px; padding: 6px; }
.newsletter input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 10px 14px; color: var(--ink); font-weight: 600; background: transparent; }
.app-block { text-align: center; padding: 72px 0 56px; }
.app-block h2 { font-family: var(--script); font-weight: 400; font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 30px; }
.app-block__qr { display: inline-block; padding: 18px; background: #f8f9fa; border-radius: 16px; margin-bottom: 28px; border: 2px solid var(--ink); box-shadow: var(--shadow-sm); }
.app-block__qr img { width: 180px; height: 180px; }
.app-block__stores { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.app-block__stores img { height: 46px; width: auto; }
.site-footer { background: #f8f9fa; border-top: var(--border); padding: 64px 0 36px; text-align: center; }
.site-footer__brand { font-family: var(--script); font-size: clamp(3.6rem, 9vw, 5.6rem); line-height: 1.1; margin: 0; }
.site-footer__motto { font-family: var(--script); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 6px 0 4px; }
.site-footer__since { font-family: var(--script); font-size: 1.25rem; margin-bottom: 26px; }
.site-footer__logo { width: 200px; margin: 0 auto 28px; }
.socials { display: flex; justify-content: center; gap: 14px; margin-bottom: 30px; flex-wrap: wrap; }
.social {
  width: 58px; height: 58px; border-radius: 50%; background: #fff; border: 2px solid var(--ink);
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.social:hover { transform: translate(-2px, -2px); background: var(--ink); color: #fff; }
.payments { display: flex; justify-content: center; align-items: center; gap: 22px; margin-bottom: 30px; flex-wrap: wrap; }
.payments img { height: 46px; width: auto; }
.footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 14px; font-size: .95rem; }
.footer-links a:hover { text-decoration: underline; }
.copyright { color: var(--ink-soft); font-size: .92rem; margin-top: 22px; }
.copyright p { margin: 4px 0; }

/* ---------- Responsive ------------------------------------------------------ */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .main-nav .nav-tab span.label { display: none; }
}
@media (max-width: 960px) {
  .site-header__inner { grid-template-columns: auto 1fr auto; }
  .main-nav { display: none; }
  .logo { justify-content: flex-start; }
  .header-link.hide-md { display: none; }
  .hero__inner { grid-template-columns: 1fr; padding-top: 44px; }
  .hero__art { height: 360px; }
  .shop-layout, .cart-layout, .account-layout, .contact-grid, .product-page { grid-template-columns: 1fr; }
  .filters, .gallery, .summary, .account-nav { position: static; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offer-wide { grid-template-columns: 1fr; }
  .offer-wide .card__media { border-right: 0; border-bottom: var(--border); min-height: 300px; }
  .newsletter { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
}
@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2, .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .card__body { padding: 12px; }
  .card__title { font-size: .92rem; }
  .card__desc { display: none; }
  .price__now { font-size: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .cart-line { grid-template-columns: 80px 1fr; }
  .cart-line__img { width: 80px; height: 80px; }
  .cart-line__side { grid-column: 1 / -1; grid-template-columns: auto auto; justify-content: space-between; align-items: center; }
  .logo img { height: 46px; }
  .hero__art { height: 300px; }
  .sticker { width: 92px; height: 92px; }
  .sticker strong { font-size: 1.4rem; }
  .table th, .table td { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .grid-4.single-sm, .grid-3.single-sm { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .announce, .site-footer, .app-block, .no-print { display: none !important; }
}

.icon { flex-shrink: 0; }
/* Grid children must be allowed to shrink, or a wide table pushes the page
   wider than the phone (the table scrolls inside .table-wrap instead). */
.account-layout > *, .cart-layout > *, .shop-layout > *, .contact-grid > *, .product-page > *, .grid > * { min-width: 0; }
html { overflow-x: clip; }
@media (max-width: 640px) {
  .sticker--hero { left: auto; right: 8px; top: auto; bottom: 8px; }
  .newsletter { padding: 22px; }
  .newsletter form { flex-wrap: wrap; border-radius: 18px; }
  .newsletter form .btn { width: 100%; }
  .cat-tile { min-height: 170px; }
  .cat-tile__label small { display: none; }
  .cat-tile .arrow-dot { width: 34px; height: 34px; }
  .account-nav .drawer-link { padding: 12px 14px; }
}
.pay-brand { display: grid; gap: 12px; margin: 18px 0; padding: 18px; border: 2px dashed var(--ink); border-radius: 12px; background: var(--cream); }
.pay-brand img { height: 34px; width: auto; }
.pay-brand p { margin: 0; }
.pay-brand--paypal img { height: 26px; }

/* ==========================================================================
   Mobile journey — bottom tab bar, sticky action bars, app (shell) layout.
   Phones get the tab bar; inside the Android / iOS shell the page also drops
   what only makes sense in a browser (the "download our app" block…).
   ========================================================================== */
:root { --tabbar-h: 64px; --safe-bottom: env(safe-area-inset-bottom, 0px); }
.tabbar, .sticky-buy, .mobile-chips { display: none; }

@media (max-width: 960px) {
  body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom);
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px); border-top: var(--border);
  }
  .tabbar__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    font-size: .68rem; font-weight: 800; color: var(--ink-soft); -webkit-tap-highlight-color: transparent;
  }
  .tabbar__item.is-active { color: var(--ink); }
  .tabbar__item.is-active .icon { color: var(--pink); }
  .tabbar__item:active { transform: scale(.94); }
  .tabbar__bubble {
    position: relative; width: 50px; height: 50px; margin-top: -24px; border-radius: 50%; border: var(--border);
    background: var(--yellow); display: inline-flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm); color: var(--ink);
  }
  .tabbar__bubble b {
    position: absolute; top: -6px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px;
    background: var(--hot); color: #fff; font-size: .7rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
  }
  /* The tab bar already holds the cart and the account. */
  .header-actions a[href="/cart"], .header-actions > a[href="/login"], .header-actions > .dropdown:not(.hide-md) { display: none; }
  .site-header__inner { height: 64px; }
  .drawer { padding-bottom: calc(24px + var(--safe-bottom)); }

  /* Sticky action bar above the tab bar (product page, cart, checkout). */
  .sticky-buy {
    position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); z-index: 70;
    display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: #fff; border-top: 2px solid var(--ink);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
  }
  .sticky-buy__price { display: grid; line-height: 1.15; }
  .sticky-buy__price strong { font-size: 1.15rem; font-weight: 900; }
  .sticky-buy__price small { color: var(--muted); font-weight: 700; font-size: .75rem; }
  .sticky-buy .btn { flex: 1; padding: 14px 16px; }
  .has-sticky-buy { padding-bottom: 76px; }

  /* Catalogue: categories as a swipeable row instead of the sidebar. */
  .filters { display: none; }
  .mobile-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; margin: 0 -20px 6px; padding-left: 20px; scrollbar-width: none; }
  .mobile-chips::-webkit-scrollbar { display: none; }
  .mobile-chips .chip { flex-shrink: 0; }
  .toolbar .searchbar { max-width: none !important; }

  /* Bigger touch targets. */
  .btn { min-height: 48px; }
  .btn-sm { min-height: 40px; }
  .qty button { width: 48px; height: 48px; }
  .size-picker label { min-width: 56px; height: 50px; }
  .pay-option label { padding: 18px 16px; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .summary { box-shadow: var(--shadow); }
  .cart-layout .summary .btn-ink.btn-block { display: none; }
}

/* Inside the app shell / installed app. */
.is-app .app-block, .is-app .app-only-hide { display: none; }
.is-app .announce { font-size: .75rem; padding: 6px 12px; }
.is-app body { -webkit-user-select: none; user-select: none; }
.is-app input, .is-app textarea, .is-app .prose, .is-app .table { -webkit-user-select: text; user-select: text; }
.is-app .site-footer { padding: 32px 0 calc(24px + var(--safe-bottom)); }
.is-app .site-footer__brand { font-size: 3rem; }
.is-app .site-header { padding-top: env(safe-area-inset-top, 0px); }
.share-btn[hidden] { display: none; }
.mobile-only { display: none !important; }
@media (max-width: 960px) { .mobile-only { display: inline-flex !important; } }
@media (max-width: 960px) { .checkout-submit { display: none; } }
@media (max-width: 960px) {
  .sticky-buy__price small { white-space: nowrap; }
  .steps { gap: 6px; font-size: .8rem; margin-bottom: 16px; }
  .step + .step::before { width: 10px; }
  .step b { width: 26px; height: 26px; }
  .page-title { padding: 28px 0 16px; }
  .announce { font-size: .74rem; }
}

/* ==========================================================================
   App mode (html.is-app: Android / iOS shell or installed web app).
   The site chrome gives way to an app bar, the bottom tabs and app screens.
   ========================================================================== */
.app-only { display: none !important; }
.is-app .app-only { display: block !important; }
.is-app .appbar.app-only { display: flex !important; }
.is-app .web-only { display: none !important; }

.is-app body { background: #fff; }
.is-app .tabbar { display: grid; }
.is-app body { padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom)); }

.appbar {
  position: sticky; top: 0; z-index: 60; align-items: center; gap: 6px;
  min-height: calc(56px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 8px 0;
  background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.appbar__brand { padding: 0 8px; display: inline-flex; }
.appbar__brand img { height: 34px; width: auto; }
.appbar__title { margin: 0; font-size: 1.05rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0; }
.appbar__btn {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.appbar__btn:active { background: var(--cream); }
.appbar__btn[aria-label="Retour"] .icon { transform: rotate(180deg); }

/* Inner pages: the app bar carries the title — no breadcrumb, no hero title. */
.is-app .breadcrumb, .is-app .page-title .eyebrow, .is-app .page-title h1, .is-app .page-title > .container > p { display: none; }
.is-app .page-title { padding: 14px 0 4px; }
.is-app .page-title:not(:has(.steps, .tabs)) { display: none; }
.is-app .container { padding: 0 16px; }
.is-app .section { padding: 28px 0; }
.is-app .account-nav { display: none; }
.is-app .account-layout { grid-template-columns: 1fr; padding-top: 16px; }
.is-app .shop-layout, .is-app .cart-layout, .is-app .contact-grid { padding-top: 12px; }
.is-app .product-page { padding-top: 0; gap: 18px; }
.is-app .product-info h1 { font-size: 1.45rem; margin-bottom: 6px; }
.is-app .product-info .price__now { font-size: 1.6rem; }

/* Lighter surfaces: same palette, less weight. */
.is-app .card { border-width: 2px; border-radius: 16px; box-shadow: 2px 2px 0 var(--ink); }
.is-app .card:hover { transform: none; box-shadow: 2px 2px 0 var(--ink); }
.is-app .panel, .is-app .summary, .is-app .table-wrap, .is-app .filter-box { border-width: 2px; border-radius: 16px; box-shadow: none; }
.is-app .panel { padding: 18px; }
.is-app .btn { box-shadow: none; border-width: 2px; }
.is-app .btn:hover { transform: none; box-shadow: none; }
.is-app .btn:active { transform: scale(.97); }
.is-app .empty { border-width: 2px; padding: 36px 18px; }

/* Flash messages become a toast under the app bar. */
.is-app .flash { position: fixed; top: calc(64px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 95; margin: 0; padding: 0; }
.is-app .flash__box { border-width: 2px; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }

/* Sign-in screens: full width, no card. */
.is-app .auth-form { padding: 20px 16px; align-items: flex-start; }
.is-app .auth-form .panel { border: 0; padding: 0; }

/* --- App home -------------------------------------------------------------- */
.app-home { padding-bottom: 12px; }
.app-home__hello { padding: 18px 16px 10px; }
.app-home__hello p { margin: 0; color: var(--muted); font-weight: 700; }
.app-home__hello h1 { font-size: 1.6rem; margin: 2px 0 14px; }
.app-search {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 14px;
  background: var(--cream); border: 2px solid var(--ink); color: var(--muted); font-weight: 600;
}
.app-rail {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.app-rail::-webkit-scrollbar { display: none; }
.app-rail > * { flex-shrink: 0; scroll-snap-align: start; }
.app-rail--chips { padding-top: 8px; scroll-snap-type: none; }
.app-section { margin-top: 14px; }
.app-section__head { display: flex; align-items: center; justify-content: space-between; padding: 0 16px; margin-bottom: 8px; }
.app-section__head h2 { font-size: 1.1rem; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.app-section__head a { color: var(--pink); font-weight: 800; font-size: .85rem; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 16px; }

.app-card { display: flex; flex-direction: column; background: #fff; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; }
.app-card--wide { width: 200px; }
.app-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--sand); }
.app-card__media img { width: 100%; height: 100%; object-fit: cover; }
.app-card__media .badge { position: absolute; top: 8px; left: 8px; }
.app-card__timer {
  position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 7px;
  border-radius: 6px; background: var(--ink); color: var(--yellow); font-size: .7rem; font-weight: 800; font-variant-numeric: tabular-nums;
}
.app-card__body { display: grid; gap: 3px; padding: 9px 10px 11px; }
.app-card__body small { color: var(--pink); font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.app-card__body strong { font-size: .86rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-card__price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.app-card__price b { font-size: .98rem; font-weight: 900; }
.app-card__price s { color: var(--muted); font-size: .72rem; font-weight: 600; }
.app-card__stock { display: block; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 4px; }
.app-card__stock i { display: block; height: 100%; background: var(--hot); }
.app-card__stock--green i { background: var(--green-bright); }
.app-project { width: 260px; display: flex; flex-direction: column; border: 2px solid var(--ink); border-radius: 14px; overflow: hidden; background: #fff; }
.app-project img { height: 130px; width: 100%; object-fit: cover; }
.app-project > span { display: grid; gap: 6px; padding: 10px 12px 12px; }
.app-project strong { font-size: .9rem; }
.app-project small { color: var(--muted); font-weight: 700; font-size: .75rem; }

/* --- App product gallery ---------------------------------------------------- */
.app-gallery { position: relative; margin: 0 -16px; }
.app-gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.app-gallery__track::-webkit-scrollbar { display: none; }
.app-gallery__track img { flex: 0 0 100%; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; scroll-snap-align: center; }
.app-gallery__dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 6px; }
.app-gallery__dots i { width: 8px; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .6); border: 1px solid rgba(0, 0, 0, .3); transition: width .2s ease; }
.app-gallery__dots i.is-on { width: 22px; background: #fff; }
.app-gallery__badge { position: absolute; top: 12px; left: 12px; }

/* --- "Compte / Plus" screen (also on the web) -------------------------------- */
.app-screen { max-width: 720px; padding-top: 18px; padding-bottom: 32px; }
.menu-hero { display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px solid var(--ink); border-radius: 16px; background: var(--yellow); }
.menu-hero img { border-radius: 14px; border: 2px solid var(--ink); }
.menu-hero .avatar { width: 56px; height: 56px; font-size: 1.1rem; background: #fff; }
.menu-hero div { flex: 1; display: grid; gap: 2px; min-width: 0; }
.menu-hero span { color: var(--ink-soft); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; }
.menu-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.menu-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 24px 4px 8px; }
.menu-list { border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; background: #fff; }
.menu-list a { display: flex; align-items: center; gap: 14px; padding: 0 16px; min-height: 54px; font-weight: 700; -webkit-tap-highlight-color: transparent; }
.menu-list a + a { border-top: 1px solid var(--line); }
.menu-list a span { flex: 1; }
.menu-list a > .icon:last-child { transform: rotate(-90deg); color: var(--muted); }
.menu-list a:active { background: var(--cream); }
.menu-langs { display: flex; gap: 8px; flex-wrap: wrap; }
.menu-logout { margin-top: 24px; }
.menu-foot { text-align: center; margin-top: 28px; color: var(--muted); font-size: .82rem; }
.menu-foot .socials { margin-bottom: 12px; }
.menu-foot .social { width: 44px; height: 44px; box-shadow: none; }
.menu-foot .script { font-size: 1.4rem; color: var(--ink); margin: 0; }
.appbar__title--root { font-size: 1.35rem; font-weight: 900; padding-left: 8px; }
@media (max-width: 960px) {
  /* The sticky bar is the add-to-cart button on phones. */
  .has-sticky-buy .buy-row .btn-ink { display: none; }
}
.is-app .product-info > .row:first-child { display: none; }
.is-app .auth-form .eyebrow, .is-app .auth-form h1 { display: none; }
.is-app .product-page .facts { grid-template-columns: repeat(2, 1fr); }
/* Orders as cards on phones (the table stays on wide screens). */
.order-cards { display: none; }
@media (max-width: 960px) {
  .order-cards { display: grid; gap: 12px; }
  .orders-table { display: none; }
  .pay-cta__via { display: none; }
}
.order-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; background: #fff;
  border: 2px solid var(--ink); border-radius: 16px; -webkit-tap-highlight-color: transparent;
}
.order-card:active { background: var(--cream); }
.order-card__thumbs { display: flex; flex-shrink: 0; }
.order-card__thumbs img { width: 46px; height: 46px; object-fit: cover; border-radius: 10px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.order-card__thumbs img + img { margin-left: -18px; }
.order-card__body { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.order-card__body strong { font-size: .9rem; }
.order-card__body small { color: var(--muted); font-weight: 600; font-size: .78rem; }
.order-card__total { display: inline-flex; align-items: center; gap: 6px; font-weight: 900; font-size: .92rem; white-space: nowrap; }
.order-card__total .icon { transform: rotate(-90deg); color: var(--muted); }

/* Phones: offers and Qprojects/Qblog as swipeable carousels of smaller cards. */
@media (max-width: 640px) {
  .rail-sm {
    display: flex !important; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 4px 20px 14px; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .rail-sm::-webkit-scrollbar { display: none; }
  .rail-sm > * { flex: 0 0 62%; max-width: 240px; scroll-snap-align: start; }
  .rail-sm--posts > * { flex-basis: 72%; max-width: 280px; }
  .rail-sm .card { box-shadow: 3px 3px 0 var(--ink); border-width: 2px; }
  .rail-sm .card:hover { transform: none; box-shadow: 3px 3px 0 var(--ink); }
  .rail-sm .card__media { aspect-ratio: 1 / 1; }
  .rail-sm .card__body { padding: 10px; gap: 5px; }
  .rail-sm .card__title { font-size: .86rem; }
  .rail-sm .card__desc, .rail-sm .price .badge, .rail-sm .stock-gauge__label { display: none; }
  .rail-sm .price__now { font-size: .98rem; }
  .rail-sm .price__old { font-size: .74rem; }
  .rail-sm .countdown { font-size: .68rem; padding: 3px 7px; }
  .rail-sm .card__cat { font-size: .6rem; }
  .rail-sm .fav-btn { width: 34px; height: 34px; }
  .rail-sm .stock-gauge__bar { height: 7px; }
  /* The single-offer "wide" card becomes a regular tile in the carousel. */
  .rail-sm .offer-wide { display: flex; }
  .rail-sm .offer-wide .card__media { min-height: 0; border-right: 0; border-bottom: 2px solid var(--ink); }
  .rail-sm .offer-wide .card__title { font-size: .86rem; }
  .rail-sm .offer-wide .row:last-child .btn { display: none; }
  .rail-sm--posts .card__media { aspect-ratio: 16 / 10; }
  .rail-sm--posts .funding { padding: 8px; box-shadow: none; }
  .rail-sm--posts .post-meta { font-size: .7rem; }
}
/* App home: smaller tiles in its carousels too. */
.app-card--wide { width: 156px; }
.app-card--wide .app-card__body strong { font-size: .8rem; }
.app-card--wide .app-card__price b { font-size: .9rem; }
.app-project { width: 220px; }
.app-project img { height: 110px; }
@media (max-width: 640px) {
  .rail-sm { scroll-padding-left: 20px; scroll-padding-right: 20px; align-items: flex-start; }
  .rail-sm > * { flex-basis: 44%; max-width: 190px; }
  .rail-sm--posts > * { flex-basis: 64%; max-width: 250px; }
  .rail-sm .card__badges { top: 8px; left: 8px; gap: 4px; }
  .rail-sm .badge { font-size: .62rem; padding: 2px 6px; }
  .rail-sm .card__fav { top: 6px; right: 6px; }
  .rail-sm .price { gap: 6px; }
  .rail-sm--posts .funding__nums.muted { display: none; }
  .rail-sm--posts .card__title { font-size: .9rem; }
}

/* Checkout steps: always one line — Panier → Livraison → Paiement. */
.steps { flex-wrap: nowrap; align-items: center; }
.step { white-space: nowrap; flex-shrink: 0; }
.step + .step::before { flex-shrink: 1; }
@media (max-width: 640px) {
  .steps { gap: 6px; font-size: .78rem; justify-content: space-between; }
  .step { gap: 6px; }
  .step + .step::before { width: auto; min-width: 8px; flex: 1; }
  .steps .step + .step { flex: 1 1 auto; }
  .step b { width: 24px; height: 24px; font-size: .72rem; }
}
@media (max-width: 360px) {
  .steps { gap: 4px; font-size: .7rem; }
  .step { gap: 4px; }
  .step b { width: 20px; height: 20px; font-size: .65rem; border-width: 1.5px; }
  .step b .icon { width: 11px; height: 11px; }
  .step + .step::before { min-width: 4px; }
}
@media (max-width: 360px) {
  .steps { font-size: .66rem; gap: 3px; }
  .step + .step::before { min-width: 2px; }
}
/* Logo on every app screen: full size on the tabs, compact next to "back". */
.appbar__brand { flex-shrink: 0; padding: 0 6px 0 8px; }
.appbar--inner .appbar__brand { padding: 0 4px 0 0; }
.appbar--inner .appbar__brand img { height: 26px; }
.appbar__title--root { font-size: 1.15rem; padding-left: 4px; border-left: 2px solid var(--line); margin-left: 4px; }
.appbar--inner .appbar__title { font-size: .98rem; border-left: 2px solid var(--line); padding-left: 10px; }
.appbar { min-width: 0; }
.appbar__title { min-width: 0; flex: 0 1 auto; }
.invoice-panel { display: flex; align-items: center; gap: 14px; background: #d9fbe8; }
.invoice-panel__icon { width: 52px; height: 52px; border-radius: 14px; border: 2px solid var(--ink); background: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.invoice-panel__text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.invoice-panel__text small { color: var(--ink-soft); font-weight: 600; }
@media (max-width: 480px) { .invoice-panel { flex-wrap: wrap; } .invoice-panel .btn { width: 100%; } }
.is-app .app-only.btn { display: inline-flex !important; }

/* Password field with its show / hide eye */
.password-field { position: relative; }
.password-field input { padding-right: 52px !important; }
.password-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink); cursor: pointer;
}
.password-toggle[hidden] { display: none; }
.password-toggle:hover { background: var(--cream, #fff6d6); }
.password-toggle:focus-visible { outline: 2px solid var(--pink); outline-offset: 1px; }
.password-toggle .icon:last-child { display: none; }
.password-toggle[aria-pressed="true"] .icon:first-child { display: none; }
.password-toggle[aria-pressed="true"] .icon:last-child { display: block; }

/* Honeypot field of the contact and newsletter forms: off screen, never filled by people */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
