:root {
  --primary: #1d2a22;          /* overwritten from admin settings */
  --accent: #c8742c;           /* overwritten from admin settings */
  --paper: #f7f1e7;
  --paper-2: #efe6d6;
  --card: #fbf7f0;
  --ink: #1b1a17;
  --ink-soft: #6c665c;
  --line: rgba(27, 26, 23, .12);
  --wa: #1fa855;
  --serif: "Fraunces", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --top-h: 72px;
  --ctrl-h: 64px;
  --mbar-h: 0px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans); color: var(--ink);
  background: radial-gradient(1000px 640px at 50% 40%, color-mix(in srgb, var(--primary) 70%, #fff 8%), transparent 72%), var(--primary);
  overflow: hidden; height: 100dvh; display: flex; flex-direction: column;
  -webkit-tap-highlight-color: transparent;
}
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.fill { fill: currentColor; stroke: none; }
button { font: inherit; }

/* ---------- loader ---------- */
.loader { position: fixed; inset: 0; z-index: 80; background: var(--primary); color: #efe6d6; display: grid; place-content: center; justify-items: center; gap: 16px;
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase; transition: opacity .6s, visibility .6s; }
.loader.hide { opacity: 0; visibility: hidden; }
.loader-dots { display: flex; gap: 8px; }
.loader-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: bob 1s ease-in-out infinite; }
.loader-dots span:nth-child(2) { animation-delay: .15s; } .loader-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-8px); opacity: 1; } }

/* ---------- top bar ---------- */
.topbar { height: var(--top-h); flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 20px; color: #f4ede1; position: relative; z-index: 10; }
.brand-name { justify-self: start; font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: -.01em; color: inherit; text-decoration: none; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand { grid-column: 2; display: flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; min-width: 0; }
.top-actions { grid-column: 3; justify-self: end; }
.brand img { height: 60px; width: auto; max-width: 200px; object-fit: contain; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(244,237,225,.22); background: transparent; color: inherit; cursor: pointer; font-size: 13px; font-weight: 600; transition: background .2s, border-color .2s; }
.icon-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(244,237,225,.4); }
.act { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 700; letter-spacing: .01em; transition: transform .2s, filter .2s; }
.act:hover { transform: translateY(-1px); filter: brightness(1.08); }
.act-wa { background: var(--wa); color: #fff; }
.act-mail { background: #f4ede1; color: var(--primary); }

/* ---------- stage & controls ---------- */
.stage { touch-action: pan-y pinch-zoom; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 4px 16px; position: relative; }
.book-wrap { width: 100%; }
.book { margin: 0 auto; }
.controls { height: var(--ctrl-h); flex: none; display: flex; align-items: center; justify-content: center; gap: 18px; color: #efe6d6; }
.ctrl { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(244,237,225,.22); background: transparent; color: #f4ede1; cursor: pointer; display: grid; place-items: center; transition: all .2s; }
.ctrl:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.ctrl:disabled { opacity: .28; cursor: default; }
.progress { width: 180px; display: grid; gap: 7px; justify-items: center; }
.counter { font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.bar { width: 100%; height: 3px; border-radius: 3px; background: rgba(244,237,225,.16); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 3px; transition: width .5s ease; }

.swipe-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px;
  background: rgba(20,20,18,.78); color: #fff; font-size: 12px; font-weight: 600; pointer-events: none; z-index: 6; backdrop-filter: blur(6px); }
.swipe-hint[hidden] { display: none; }
.swipe-hint svg { width: 16px; height: 16px; animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-5px); } }

/* ---------- mobile bar ---------- */
.mobile-bar { display: none; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer.open { visibility: visible; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); opacity: 0; transition: opacity .3s; }
.drawer.open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92vw); background: var(--paper); transform: translateX(100%); transition: transform .38s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column; box-shadow: -20px 0 50px rgba(0,0,0,.25); }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer-head p { font-family: var(--serif); font-size: 22px; font-weight: 600; }
.drawer-head .icon-btn { color: var(--ink); border-color: var(--line); padding: 0 10px; }
.drawer-list { overflow-y: auto; padding: 8px 12px 30px; }
.drawer-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px; border: 0; background: none; border-radius: 12px; cursor: pointer; text-align: left; color: var(--ink); }
.drawer-list button:hover { background: var(--paper-2); }
.drawer-list .sec { margin-top: 10px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.drawer-list .sec .num { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-family: var(--sans); font-size: 12px; font-weight: 700; flex: none; }
.drawer-list .item { padding-left: 14px; font-size: 14px; }
.drawer-list .item img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; background: #fff; flex: none; }
.drawer-list .pg { margin-left: auto; font-size: 11px; color: var(--ink-soft); font-weight: 600; letter-spacing: .08em; }

/* =========================================================
   PAGES  (all sizes scale with the page via container units)
   ========================================================= */
.page { background: var(--paper); overflow: hidden; container-type: size; }
.page-content { position: relative; width: 100%; height: 100%; background: var(--paper); padding: 7cqw 7cqw 11cqw; display: flex; flex-direction: column; }
.page.--left .page-content::after, .page.--right .page-content::after { content: ""; position: absolute; top: 0; bottom: 0; width: 6cqw; pointer-events: none; z-index: 8; }
.page.--left .page-content::after { right: 0; background: linear-gradient(to left, rgba(0,0,0,.16), transparent); }
.page.--right .page-content::after { left: 0; background: linear-gradient(to right, rgba(0,0,0,.16), transparent); }

.photo { position: relative; overflow: hidden; background: var(--paper-2); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.page-footer { position: absolute; left: 7cqw; right: 7cqw; bottom: 4.4cqw; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  font-size: 2.3cqw; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); }
.page-footer b { font-family: var(--serif); font-size: 3.2cqw; letter-spacing: 0; text-transform: none; color: var(--ink); }

.eyebrow { font-size: 2.4cqw; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); }
.title { font-family: var(--serif); font-weight: 600; letter-spacing: -.02em; line-height: 1.02; color: var(--ink); }
.body-text { font-size: 3.05cqw; line-height: 1.65; color: var(--ink-soft); }

/* ---------- full-bleed photo pages ---------- */
.bleed .page-content { padding: 0; background: var(--primary); color: #fff; }
.bleed .photo { position: absolute; inset: 0; }
.bleed .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,8,.55) 0%, rgba(8,10,8,.06) 32%, rgba(8,10,8,.25) 58%, rgba(8,10,8,.9) 100%); }
.bleed .over { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 8cqw 8cqw 10cqw; }
.bleed .eyebrow { color: color-mix(in srgb, var(--accent) 55%, #fff); }

.cover-top { display: flex; justify-content: space-between; align-items: center; gap: 4cqw; }
.cover-logo { height: 11cqw; width: auto; max-width: 42cqw; object-fit: contain; background: #fff; border-radius: 2.4cqw; padding: 1.4cqw 2.6cqw; }
.cover-brand { font-family: var(--serif); font-weight: 700; font-size: 19cqw; line-height: .9; letter-spacing: -.04em; color: #fff; }
.cover-line { width: 16cqw; height: 4px; border-radius: 4px; background: var(--accent); margin: 5cqw 0 4cqw; }
.cover-tag { font-family: var(--serif); font-style: italic; font-size: 5cqw; line-height: 1.25; max-width: 74cqw; color: #f6efe3; }
.cover-meta { display: flex; justify-content: space-between; gap: 4cqw; margin-top: 7cqw; font-size: 2.3cqw; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: #e5dccd; }

.cat-num { font-family: var(--serif); font-weight: 600; font-size: 8cqw; color: #fff; width: 15cqw; height: 15cqw; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); display: grid; place-items: center; }
.category .title { color: #fff; font-size: 11.5cqw; margin: 2.5cqw 0 2.5cqw; }
.cat-sub { font-family: var(--serif); font-style: italic; font-size: 4.6cqw; color: #f2e8d8; margin-bottom: 3cqw; }
.category .body-text { color: #e4dccf; max-width: 76cqw; }
.cat-count { display: inline-flex; align-items: center; gap: 1.6cqw; margin-top: 5cqw; padding: 1.6cqw 3.4cqw; border-radius: 999px; background: rgba(255,255,255,.18);
  font-size: 2.3cqw; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- story page ---------- */
.story .page-content { padding: 0 0 11cqw; }
.story .photo { height: 36cqh; flex: none; }
.story-body { padding: 6cqw 7cqw 0; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.story .title { font-size: 6.6cqw; margin: 2cqw 0 2.6cqw; }
.story .body-text { font-size: 2.8cqw; line-height: 1.6; }
.story .highlights { margin-bottom: 1cqw; }
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3cqw; margin-top: auto; }
.highlight { border-top: 2px solid var(--accent); padding-top: 2.4cqw; }
.highlight strong { display: block; font-family: var(--serif); font-weight: 600; font-size: 7.4cqw; line-height: 1; color: var(--ink); }
.highlight span { display: block; margin-top: 1.2cqw; font-size: 2.4cqw; color: var(--ink-soft); }

/* ---------- promise page ---------- */
.promise .page-content { background: var(--primary); color: #fff; justify-content: center; }
.promise .title { color: #fff; font-size: 9cqw; margin: 3cqw 0 7cqw; }
.promise-list { display: grid; gap: 5cqw; }
.promise-item { display: grid; grid-template-columns: 11cqw 1fr; gap: 4cqw; align-items: start; }
.promise-item i { width: 11cqw; height: 11cqw; border-radius: 50%; background: var(--accent); display: grid; place-items: center; font-style: normal; font-family: var(--serif); font-size: 4.4cqw; font-weight: 600; }
.promise-item strong { display: block; font-family: var(--serif); font-size: 5cqw; font-weight: 600; margin-bottom: 1cqw; }
.promise-item span { font-size: 3cqw; line-height: 1.55; color: #d9d2c4; }
.promise .page-footer { color: #b9b2a4; }
.promise .page-footer b { color: #fff; }

/* ---------- product pages ---------- */
.products .page-content { gap: 3.4cqw; }
.products-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4cqw; padding-bottom: 2.4cqw; border-bottom: 1px solid var(--line); }
.products-head .eyebrow { white-space: nowrap; }
.products-head span { font-family: var(--serif); font-style: italic; font-size: 3.2cqw; color: var(--ink-soft); text-align: right; }

.product { flex: 1; min-height: 0; display: grid; grid-template-columns: 40cqw 1fr; gap: 5cqw; align-items: center; }
.products.single .product { flex: 0 1 50%; }
.p-img { position: relative; width: 100%; aspect-ratio: 1 / 1.06; height: auto; max-height: 100%; min-height: 0; border-radius: 4cqw; background: radial-gradient(circle at 50% 40%, #fff 0%, var(--card) 55%, var(--paper-2) 100%);
  display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.p-img img { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; object-fit: contain; mix-blend-mode: multiply; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.product:hover .p-img img { transform: scale(1.05) rotate(-1.5deg); }
.p-img.photo-fill img { left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; mix-blend-mode: normal; }
.stock { position: absolute; left: 2.4cqw; top: 2.4cqw; display: inline-flex; align-items: center; gap: 1cqw; padding: .8cqw 2cqw; border-radius: 999px; font-size: 1.9cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: #fff; color: #2f7a43; box-shadow: 0 .6cqw 2cqw rgba(0,0,0,.08); }
.stock::before { content: ""; width: 1.4cqw; height: 1.4cqw; border-radius: 50%; background: currentColor; }
.stock.out { color: #9a5b2b; }
.star { position: absolute; left: 2.4cqw; bottom: 2.4cqw; padding: .8cqw 2cqw; border-radius: 999px; background: var(--accent); color: #fff; font-size: 1.9cqw; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.p-info { min-width: 0; }
.p-weight { font-size: 2.2cqw; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.p-name { font-family: var(--serif); font-weight: 600; font-size: 5.6cqw; letter-spacing: -.015em; line-height: 1.05; margin: 1cqw 0 1.6cqw; }
.p-desc { font-size: 2.65cqw; line-height: 1.55; color: var(--ink-soft); margin-bottom: 2cqw; }
.badges { display: flex; flex-wrap: wrap; gap: 1.1cqw; margin-bottom: 2.4cqw; }
.badges span { font-size: 2cqw; font-weight: 600; padding: .7cqw 1.8cqw; border-radius: 999px; background: var(--paper-2); color: var(--ink); }
.p-buy { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; flex-wrap: wrap; }
.price { font-family: var(--serif); font-weight: 600; font-size: 5.4cqw; line-height: 1; color: var(--ink); white-space: nowrap; }
.price small { font-family: var(--sans); font-size: 2cqw; font-weight: 700; letter-spacing: .14em; color: var(--ink-soft); margin-right: .8cqw; vertical-align: .4em; }
.p-actions { display: flex; gap: 1.4cqw; }
.p-btn { display: inline-flex; align-items: center; gap: 1.2cqw; height: 6.6cqw; padding: 0 2.6cqw; border-radius: 999px; text-decoration: none; font-size: 2.2cqw; font-weight: 700; white-space: nowrap; transition: transform .2s, filter .2s; }
.p-btn svg { width: 3cqw; height: 3cqw; }
.p-btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.p-btn.wa { background: var(--wa); color: #fff; }
.p-btn.mail { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.p-btn.mail span { display: none; }

/* ---------- contact ---------- */
.contact .title { font-size: 9cqw; margin: 2.6cqw 0 5cqw; }
.c-cards { display: grid; gap: 2.6cqw; }
.c-card { display: flex; align-items: center; gap: 3.4cqw; padding: 3.4cqw; border-radius: 3.4cqw; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); transition: transform .2s; }
a.c-card:hover { transform: translateX(.8cqw); }
.c-card .ico { width: 10cqw; height: 10cqw; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--primary); flex: none; }
.c-card .ico svg { width: 4.6cqw; height: 4.6cqw; }
.c-card.wa .ico { background: var(--wa); color: #fff; }
.c-card.mail .ico { background: var(--primary); color: #fff; }
.c-card small { display: block; font-size: 2.1cqw; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .6cqw; }
.c-card b { font-size: 3.3cqw; font-weight: 600; word-break: break-word; }
.shop-link { margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 1.6cqw; padding: 2.6cqw 4.6cqw; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-size: 2.6cqw; font-weight: 700; }
.shop-link svg { width: 3.2cqw; height: 3.2cqw; }

/* ---------- back cover ---------- */
.back-cover .over { justify-content: flex-end; }
.back-cover .cover-brand { font-size: 14cqw; }
.back-cover p { margin-top: 2.4cqw; font-family: var(--serif); font-style: italic; font-size: 4cqw; color: #efe6d6; max-width: 70cqw; }
.back-cover .site { margin-top: 6cqw; font-family: var(--sans); font-style: normal; font-size: 2.4cqw; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 50%, #fff); }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 760px) {
  :root { --top-h: 64px; --ctrl-h: 46px; --mbar-h: calc(64px + env(safe-area-inset-bottom)); }
  .topbar { padding: 0 14px; }
  .brand-name { font-size: 19px; }
  .brand img { height: 54px; }
  .top-actions .act, .top-actions #btnContents span { display: none; }
  .top-actions #btnContents { padding: 0 11px; }
  .stage { padding: 0 10px; }
  .controls { gap: 14px; }
  .ctrl { width: 36px; height: 36px; }
  .progress { width: 150px; }
  .mobile-bar { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; flex: none; height: var(--mbar-h); padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--primary) 85%, #000); border-top: 1px solid rgba(255,255,255,.08); }
  .mobile-bar a, .mobile-bar button { display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 14px; border: 0; text-decoration: none; font-size: 13px; font-weight: 700; cursor: pointer;
    background: rgba(255,255,255,.08); color: #f4ede1; }
  .mobile-bar .wa { background: var(--wa); color: #fff; }

  /* a bit larger type inside pages on small screens */
  .p-desc { font-size: 3cqw; }
  .badges span { font-size: 2.3cqw; }
  .p-btn { height: 8cqw; padding: 0 3.2cqw; font-size: 2.8cqw; }
  .p-btn svg { width: 3.8cqw; height: 3.8cqw; }
  .p-weight { font-size: 2.6cqw; }
  .page-footer { font-size: 2.6cqw; }
}
@media (prefers-reduced-motion: reduce) {
  .loader-dots span, .swipe-hint[hidden] { display: none; }
.swipe-hint svg { animation: none; }
}

/* tall, narrow pages (phones): stack product photo above the details */
@container (max-aspect-ratio: 0.64) {
  .products .page-content { gap: 2.6cqw; padding-top: 6cqw; }
  .product { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; gap: 2.4cqw; align-items: stretch; }
  .p-img { max-height: none; height: 100%; aspect-ratio: auto; border-radius: 3.4cqw; }
  .products.single .product { flex: 1 1 auto; }
  .p-img img { left: 6%; top: 5%; width: 88%; height: 90%; }
  .p-name { font-size: 6.4cqw; margin: .6cqw 0 1cqw; }
  .p-desc { margin-bottom: 1.6cqw; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .badges { margin-bottom: 1.8cqw; }
  .p-btn.mail span { display: inline; }
  .story .photo { height: 38cqh; }
  .story .body-text { font-size: 3.05cqw; }
}

/* ---------- performance: keep flipping smooth on phones ---------- */
.page img { -webkit-user-drag: none; user-select: none; }
.page { contain: layout paint; }
@media (hover: none) {
  .product:hover .p-img img { transform: none; }
  .p-img img { transition: none; }
}

/* first / last page buttons */
.ctrl.edge { width: 38px; height: 38px; border-color: transparent; opacity: .85; }
.ctrl.edge:hover:not(:disabled) { opacity: 1; }
.to-start { margin-top: 5cqw; display: inline-flex; align-items: center; gap: 1.6cqw; padding: 2.2cqw 4.4cqw; border-radius: 999px; border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.12); color: #fff; font: inherit; font-size: 2.6cqw; font-weight: 700; cursor: pointer; }
.to-start svg { width: 3.4cqw; height: 3.4cqw; }
.to-start:hover { background: rgba(255,255,255,.22); }
@media (max-width: 760px) {
  .controls { gap: 6px; }
  .ctrl.edge { width: 34px; height: 34px; }
  .progress { width: 120px; }
  .to-start { font-size: 3.2cqw; padding: 2.8cqw 5.4cqw; }
  .to-start svg { width: 4cqw; height: 4cqw; }
}
.ctrl.edge:disabled { opacity: .25; }

/* =========================================================
   v1.4 — cleaner product cards, text limits, certificates, viewer
   ========================================================= */

/* product photo: clean white card, larger image, tap to view */
.p-img { background: #fff; box-shadow: 0 1.2cqw 3.4cqw -1.6cqw rgba(40, 30, 15, .22), inset 0 0 0 1px rgba(27, 26, 23, .06); cursor: zoom-in; }
.p-img img { left: 4%; top: 4%; width: 92%; height: 92%; mix-blend-mode: normal; }
.p-img.photo-fill img { left: 0; top: 0; width: 100%; height: 100%; }
.zoom-hint { position: absolute; right: 2.2cqw; top: 2.2cqw; width: 6.4cqw; height: 6.4cqw; border-radius: 50%; background: rgba(255,255,255,.92);
  display: grid; place-items: center; color: var(--ink); box-shadow: 0 .6cqw 2cqw rgba(0,0,0,.12); pointer-events: none; }
.zoom-hint svg { width: 3.4cqw; height: 3.4cqw; }

/* text never overflows its space, whatever the client types */
.p-info { min-height: 0; overflow: hidden; }
.p-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; cursor: pointer; }
.p-desc { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; margin-bottom: 1cqw; }
.more { display: inline-block; margin: 0 0 1.8cqw; padding: 0; border: 0; background: none; font: inherit; font-size: 2.3cqw; font-weight: 700; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: .5cqw; }
.badges { flex-wrap: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.badges span { white-space: nowrap; flex: none; }
.price { flex: none; }
.p-buy { flex-wrap: wrap; row-gap: 1.6cqw; }
.p-actions { flex: none; margin-left: auto; }
@container (max-aspect-ratio: 0.64) {
  .p-desc { -webkit-line-clamp: 2; }
  .more { font-size: 2.9cqw; margin-bottom: 1.4cqw; }
  .zoom-hint { width: 7.6cqw; height: 7.6cqw; }
  .zoom-hint svg { width: 4cqw; height: 4cqw; }
}

/* certificates page */
.certs .page-content { gap: 0; }
.certs .title { font-size: 8cqw; margin: 2cqw 0 2.4cqw; }
.cert-intro { margin-bottom: 4cqw; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cert-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(0, 1fr); gap: 3.6cqw; margin-top: 2cqw; }
.certs.few .cert-grid { grid-auto-rows: minmax(0, .62fr); }
.cert { min-height: 0; display: flex; flex-direction: column; gap: 1.4cqw; padding: 2.4cqw; border: 0; border-radius: 3cqw; background: #fff; text-align: left; font: inherit; color: var(--ink);
  cursor: zoom-in; box-shadow: 0 1.2cqw 3.4cqw -1.6cqw rgba(40,30,15,.22), inset 0 0 0 1px rgba(27,26,23,.06); }
.cert-img { position: relative; flex: 1; min-height: 0; border-radius: 1.8cqw; overflow: hidden; background: #f6f3ee; }
.cert-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cert-name { font-family: var(--serif); font-weight: 600; font-size: 3.4cqw; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cert-by { font-size: 2.3cqw; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* viewer (product details + certificate zoom) */
.viewer { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; visibility: hidden; }
.viewer.open { visibility: visible; }
.viewer-scrim { position: absolute; inset: 0; background: rgba(8, 10, 8, .72); opacity: 0; transition: opacity .25s; }
.viewer.open .viewer-scrim { opacity: 1; }
.viewer-panel { position: relative; width: min(920px, 100%); max-height: 100%; overflow: auto; background: var(--paper); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  transform: translateY(16px) scale(.98); opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .22s; }
.viewer.open .viewer-panel { transform: none; opacity: 1; }
.viewer-close { position: absolute; right: 12px; top: 12px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.15); }
#viewerBody { display: grid; grid-template-columns: 1.1fr 1fr; }
.v-media { position: relative; background: #fff; min-height: 380px; max-height: 78vh; overflow: auto; cursor: zoom-in; display: grid; place-items: center; }
.v-media img { width: 100%; height: 100%; max-height: 78vh; object-fit: contain; padding: 24px; transition: width .25s; }
.v-media.zoomed { cursor: zoom-out; place-items: start; }
.v-media.zoomed img { width: 220%; max-width: none; height: auto; max-height: none; padding: 0; }
.v-info { padding: 34px 30px 28px; display: flex; flex-direction: column; gap: 12px; }
.v-meta { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.v-meta .stock { position: static; font-size: 11px; padding: 4px 10px; gap: 6px; box-shadow: none; background: #fff; letter-spacing: .08em; }
.v-meta .stock::before { width: 7px; height: 7px; }
.v-info h3 { font-family: var(--serif); font-weight: 600; font-size: 32px; line-height: 1.08; letter-spacing: -.01em; overflow-wrap: anywhere; }
.v-desc { font-size: 15px; line-height: 1.65; color: var(--ink-soft); overflow-wrap: anywhere; white-space: pre-line; }
.v-info .badges { flex-wrap: wrap; -webkit-mask-image: none; mask-image: none; gap: 6px; margin: 0; }
.v-info .badges span { font-size: 12px; padding: 5px 11px; }
.v-buy { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.v-buy .price { font-size: 30px; }
.v-buy .price small { font-size: 12px; }
.v-actions { display: grid; grid-template-columns: auto 1fr; gap: 8px; }
.v-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; }
.v-btn.wa { background: var(--wa); color: #fff; }
.v-btn.mail { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.v-tip { font-size: 13px; color: var(--ink-soft); }
.viewer.is-cert .viewer-panel { width: min(1000px, 100%); }
.viewer.is-cert #viewerBody { grid-template-columns: 1fr; }
.viewer.is-cert .v-media { min-height: 50vh; max-height: 74vh; background: #f6f3ee; }
.viewer.is-cert .v-info { padding: 18px 24px 22px; }
.viewer.is-cert .v-info h3 { font-size: 24px; }

@media (max-width: 760px) {
  .viewer { padding: 0; place-items: end stretch; }
  .viewer-panel { width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; }
  #viewerBody { grid-template-columns: 1fr; }
  .v-media { min-height: 0; height: 46dvh; max-height: none; }
  .v-media img { max-height: 46dvh; padding: 18px; }
  .v-info { padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); gap: 10px; }
  .v-info h3 { font-size: 26px; }
  .viewer.is-cert .v-media { height: 62dvh; max-height: none; }
  .viewer.is-cert .v-info h3 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .viewer-panel, .viewer-scrim { transition: none; } }

/* ---------- product code & sizes (v1.5) ---------- */
.sizes { display: flex; flex-wrap: wrap; gap: 1.1cqw; margin: 0 0 2cqw; }
.size { font: inherit; font-size: 2.1cqw; font-weight: 700; line-height: 1; padding: 1cqw 2.3cqw; border-radius: 999px; border: 0; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; transition: background .2s, color .2s, box-shadow .2s, transform .15s; -webkit-tap-highlight-color: transparent; }
.size:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.size:active { transform: scale(.96); }
.size.on { background: var(--primary); color: #fff; box-shadow: none; }
.size.solo { cursor: default; }
.size.more-sizes { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.p-weight[data-code] { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-meta [data-code] { color: var(--ink-soft); }
.v-sizes { display: grid; gap: 8px; }
.v-sizes-label { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.v-sizes .sizes { gap: 8px; margin: 0; }
.v-sizes .size { font-size: 14px; padding: 10px 18px; }
@container (max-aspect-ratio: 0.64) {
  .size { font-size: 2.7cqw; padding: 1.3cqw 3cqw; }
  .sizes { margin-bottom: 1.6cqw; }
}

/* contact page with a second address: tighter cards so everything fits the page (v1.6) */
.c-cards.many { gap: 1.5cqw; }
.c-cards.many .c-card { padding: 1.7cqw 3cqw; gap: 3cqw; border-radius: 3cqw; }
.c-cards.many .c-card .ico { width: 7.6cqw; height: 7.6cqw; }
.c-cards.many .c-card .ico svg { width: 3.8cqw; height: 3.8cqw; }
.c-cards.many .c-card small { font-size: 1.9cqw; margin-bottom: .3cqw; }
.c-cards.many .c-card b { font-size: 3cqw; line-height: 1.25; }

/* ---------- registration number, PDF button (v1.7) ---------- */
.c-reg { margin-top: 1.4cqw; font-size: 2cqw; font-weight: 600; letter-spacing: .05em; color: var(--ink-soft); }
.back-cover .reg { margin-top: 2cqw; font-family: var(--sans); font-style: normal; font-size: 2.1cqw; font-weight: 600; letter-spacing: .08em; color: rgba(255,255,255,.7); }
.c-actions { margin-top: auto; padding-top: 2.2cqw; display: flex; flex-wrap: wrap; align-items: center; gap: 2cqw; }
.c-actions .shop-link { margin-top: 0; }
.pdf-link { display: inline-flex; align-items: center; gap: 1.4cqw; padding: 2.4cqw 3.8cqw; border-radius: 999px; border: 1px solid var(--line); background: #fff;
  font-size: 2.4cqw; font-weight: 700; color: var(--ink); text-decoration: none; }
.pdf-link svg { width: 3cqw; height: 3cqw; }
.drawer-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--paper); }
.drawer-foot[hidden] { display: none; }
.pdf-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.pdf-btn:hover { filter: brightness(1.15); }

/* size price list used in the PDF */
.size-list { list-style: none; display: grid; margin: 0 0 2cqw; }
.size-list li { display: flex; align-items: baseline; gap: 1.6cqw; padding: .9cqw 0; border-bottom: 1px dashed var(--line); font-size: 2.3cqw; }
.size-list b { min-width: 11cqw; font-weight: 800; }
.size-list em { font-style: normal; font-size: 2cqw; letter-spacing: .06em; color: var(--ink-soft); }
.size-list span { margin-left: auto; font-family: var(--serif); font-weight: 600; font-size: 2.8cqw; }

/* PDF view (index.php?pdf=1) */
@page { size: A4 portrait; margin: 0; }
html.pdf-doc, html.pdf-doc body { height: auto; }
body.pdf-mode { display: block; overflow: visible; height: auto; background: #34322e; }
.pdf-mode * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.pdf-bar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 16px;
  background: #fbf7f0; color: #1b1a17; font-size: 14px; box-shadow: 0 2px 14px rgba(0,0,0,.35); }
.pdf-bar button { border: 0; border-radius: 999px; padding: 10px 18px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; }
.pdf-bar a { margin-left: 14px; font-weight: 700; color: var(--primary); }
.pdf-pages { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 18px 0 40px; }
.pdf-pages .page { width: 210mm; height: 296.6mm; flex: none; box-shadow: 0 8px 30px rgba(0,0,0,.45); }
.pdf-mode .zoom-hint, .pdf-mode .more, .pdf-mode .to-start, .pdf-mode .pdf-link { display: none !important; }
/* PDF: show the full product text (no "..." cut-off) */
.pdf-mode .p-info { overflow: visible; }
.pdf-mode .p-name, .pdf-mode .p-desc { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; }
.pdf-mode .badges { flex-wrap: wrap !important; overflow: visible; -webkit-mask-image: none; mask-image: none; }
.pdf-mode .product { flex: 1 0 auto; }
/* --fit shrinks the text a little on a page whose text is long, so it always fits the A4 sheet */
.pdf-mode .p-name { font-size: calc(5cqw * var(--fit, 1)); margin: .6cqw 0 calc(1.2cqw * var(--fit, 1)); }
.pdf-mode .p-desc { font-size: calc(2.45cqw * var(--fit, 1)); line-height: 1.45; margin-bottom: calc(1.6cqw * var(--fit, 1)); }
.pdf-mode .badges { margin-bottom: calc(1.8cqw * var(--fit, 1)); }
.pdf-mode .badges span { font-size: calc(2cqw * var(--fit, 1)); }
.pdf-mode .size-list { margin-bottom: 0; }
.pdf-mode .size-list li { font-size: calc(2.3cqw * var(--fit, 1)); padding: calc(.9cqw * var(--fit, 1)) 0; }
.pdf-mode .size-list span { font-size: calc(2.8cqw * var(--fit, 1)); }
.pdf-mode .price { font-size: calc(5.2cqw * var(--fit, 1)); }
@media print {
  body.pdf-mode { background: none; }
  .pdf-bar { display: none; }
  .pdf-pages { display: block; padding: 0; zoom: 1 !important; }
  .pdf-pages .page { box-shadow: none; break-after: page; page-break-after: always; }
  .pdf-pages .page:last-child { break-after: auto; page-break-after: auto; }
}
.brand[hidden] { display: none; }

/* cover logo uploaded from admin (v1.8) */
.cover-logo.plain { background: transparent; padding: 0; border-radius: 0; height: 15cqw; max-width: 46cqw; filter: drop-shadow(0 .6cqw 1.8cqw rgba(0,0,0,.35)); }

/* contact page: contact tiles, both offices, registration + developer credit (v1.8) */
.contact .title { font-size: 8cqw; margin: 2cqw 0 3.6cqw; }
.c-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8cqw; }
.c-tile { display: flex; align-items: center; gap: 2cqw; padding: 2.2cqw 2cqw; border-radius: 3cqw; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.c-tile .ico, .c-office .ico { width: 7.4cqw; height: 7.4cqw; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); color: var(--primary); flex: none; }
.c-tile .ico svg, .c-office .ico svg { width: 3.6cqw; height: 3.6cqw; }
.c-tile.wa .ico { background: var(--wa); color: #fff; }
.c-tile.mail .ico { background: var(--primary); color: #fff; }
.c-tile small, .c-office small { display: block; font-size: 1.8cqw; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .4cqw; }
.c-tile b { display: block; font-size: 2.35cqw; font-weight: 600; line-height: 1.25; overflow-wrap: break-word; word-break: normal; }
.c-tile > span:last-child { min-width: 0; }
.c-sub { margin: 4cqw 0 1.6cqw; font-size: 2.2cqw; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--accent); }
.c-offices { display: grid; gap: 1.8cqw; }
.c-offices.two { grid-template-columns: 1fr 1fr; }
.c-office { display: flex; align-items: flex-start; gap: 2.4cqw; padding: 2.4cqw; border-radius: 3cqw; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); min-width: 0; }
.c-office p { font-size: 2.5cqw; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.c-actions { padding-top: 3.4cqw; margin-top: 0; }
.c-legal { margin-top: auto; margin-bottom: 1.2cqw; padding-top: 2.4cqw; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-end; gap: 3cqw; }
.c-legal b { display: block; font-family: var(--serif); font-size: 3.2cqw; font-weight: 600; color: var(--ink); line-height: 1.2; }
.c-legal span { display: block; margin-top: .6cqw; font-size: 2cqw; font-weight: 600; letter-spacing: .05em; color: var(--ink-soft); }
.c-dev { text-align: right; font-size: 2cqw; font-weight: 600; color: var(--ink-soft); letter-spacing: .02em; }
.c-dev a { color: var(--ink); text-decoration: none; font-weight: 700; }

/* PDF output (v1.8.1): no shadows (they print as grey boxes), larger certificates, one weight style */
.pdf-mode *, .pdf-mode *::before, .pdf-mode *::after { box-shadow: none !important; text-shadow: none !important; }
.pdf-mode .cover-logo { filter: none; }
.pdf-mode .stock, .pdf-mode .shop-link, .pdf-mode .c-dev { display: none !important; }
.pdf-mode .cert, .pdf-mode .c-tile, .pdf-mode .c-office { border: 1px solid var(--line); }
.pdf-mode .certs .cert-grid { flex: none; height: 98cqw; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 3.6cqw; }
.pdf-mode .certs.few .cert-grid { grid-auto-rows: 1fr; }
.pdf-mode .certs .cert-grid.one { grid-template-columns: minmax(0, .5fr); justify-content: center; }
.pdf-mode .cert { cursor: default; padding: 2.8cqw; gap: 1.8cqw; }
.pdf-mode .cert-img { background: #fff; box-shadow: none; border: 1px solid var(--line); }
.pdf-mode .cert-name { display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 3cqw; line-height: 1.2; }
.pdf-mode .cert-by { white-space: normal; overflow: visible; font-size: 2.2cqw; }
.pdf-mode .cert-intro { -webkit-line-clamp: unset; display: block; overflow: visible; }

/* PDF certificate page: title - image - details (v1.8.2) */
.pdf-mode .cert-one .page-content { gap: 0; }
.pdf-mode .cert-one .title { font-size: 6.2cqw; line-height: 1.12; margin: 2cqw 0 4cqw; }
.pdf-mode .cert-fig { flex: 1; min-height: 0; position: relative; border-radius: 3cqw; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.pdf-mode .cert-fig img { position: absolute; inset: 3cqw; width: calc(100% - 6cqw); height: calc(100% - 6cqw); object-fit: contain; }
.pdf-mode .cert-desc { flex: none; padding: 3.4cqw 0 2cqw; display: grid; gap: .8cqw; }
.pdf-mode .cert-desc b { font-family: var(--serif); font-size: 3.2cqw; font-weight: 600; line-height: 1.2; }
.pdf-mode .cert-desc span { font-size: 2.5cqw; color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }
.pdf-mode .cert-desc span { font-size: 1.9cqw; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }

/* PDF is printed as a physical catalogue: no screen-only tags or chips (v1.8.3) */
.pdf-mode .star, .pdf-mode .stock, .pdf-mode .cat-count, .pdf-mode .zoom-hint, .pdf-mode .more, .pdf-mode .to-start, .pdf-mode .pdf-link, .pdf-mode .shop-link, .pdf-mode .c-dev { display: none !important; }
