/* Fairydent v4: "colour chart". Cool white page; the products' own colours carry the brand.
   v4.1: short rounded floating header, product cutouts floating behind the page. */

@font-face {
  font-family: "Archivo";
  src: url(/assets/fonts/archivo-latin.woff2) format("woff2");
  font-weight: 400 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --paper: #f3f6f6;
  --white: #fff;
  --ink: #0f1f20;
  --muted: #4d5f60;
  --line: #d5dddd;
  --ink-hover: #2b4042; /* buttons, top bar and footer are all --ink */
  --stone-band: linear-gradient(115deg, #ebe3dc 0%, #ddd3cb 50%, #cfc4bb 100%); /* the warm stone behind the product photos, lit from the left */
  --wash: #e3ecec;
  --err: #b3261e;
  --ok: #1d7a45;
  --low: #9a5a00;

  /* product colours, used as category accents */
  --c-burs: #2152c4;
  --c-polishing: #23935a;
  --c-restorative: #6a3fa6;
  --c-examination: #dc2f93;
  --c-setup: #86d23f;
  --c-handpieces: #0f1f20;

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --wrap: 1240px;
  --wide: 125%;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.55 "Archivo", system-ui, sans-serif; font-stretch: 100%; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; padding: 12px 18px; background: var(--ink); color: #fff; border-radius: 999px; }
.skip:focus { top: 8px; }

/* type */
.title, .page-title, .page-h { font-weight: 850; font-stretch: var(--wide); letter-spacing: -.03em; line-height: .98; }
.page-title { font-size: clamp(32px, 4.2vw, 58px); margin: 28px 0 24px; max-width: 16ch; }
.page-h { font-size: clamp(26px, 3vw, 38px); }
h2 { font-weight: 800; font-stretch: 112%; letter-spacing: -.02em; line-height: 1.1; font-size: 21px; }
.price { font-weight: 800; font-stretch: var(--wide); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.more { font-weight: 600; white-space: nowrap; }
.lede { font-size: 17px; color: var(--muted); max-width: 46ch; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 24px; font-size: 15px; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s ease, transform .1s ease; }
.btn:hover { background: var(--ink-hover); }
.btn:active { transform: scale(.98); }
.btn-dark { background: var(--ink); }
.btn-dark:hover { background: #24393a; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-ghost:hover { background: var(--white); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--wash); }
.btn.danger { color: var(--err); box-shadow: inset 0 0 0 1.5px var(--err); }

/* header: a short floating bar with rounded ends, not a full-width strip */
.site-header { position: sticky; top: 14px; z-index: 50; padding-top: 14px; margin-top: -14px; }
main { padding-top: 52px; } /* breathing room under the floating bar on every page */
.bar { width: min(780px, 100% - 24px); margin-inline: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; min-height: 54px; padding: 0 7px 0 22px; border-radius: 999px;
  color: #fff; background: var(--ink);
  box-shadow: 0 10px 30px rgba(15, 31, 32, .16); }
.is-home .bar { background: rgba(15, 31, 32, .8); backdrop-filter: blur(40px) saturate(1.5); -webkit-backdrop-filter: blur(40px) saturate(1.5); box-shadow: 0 1px 0 rgba(255, 255, 255, .16) inset, 0 10px 30px rgba(15, 31, 32, .16); } /* glass over the photo wall; solid ink, like the dark buttons, on every other page */
.brand { display: block; width: 124px; aspect-ratio: 295 / 118; background: var(--ink); -webkit-mask: url(/assets/brand/logo.png) center / contain no-repeat; mask: url(/assets/brand/logo.png) center / contain no-repeat; }
.main-nav { display: flex; gap: 26px; justify-content: center; font-weight: 600; font-size: 14px; }
.main-nav a { text-decoration: none; padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: #bfe6e8; }
.main-nav a[aria-current="page"] { border-bottom-color: #fff; }
.tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 14px; }
.tools a { text-decoration: none; padding: 8px 14px; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; gap: 8px; }
.tools .lang:hover { background: rgba(255, 255, 255, .14); }
.tools .cart-link { background: #fff; color: var(--ink); }
.cart-n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; display: inline-grid; place-items: center; }
.bar .brand { width: 100px; background: #fff; } /* white on the dark bar, like the footer */

/* phone menu: a round button in the bar opens a glass panel with every page and category */
.menu-btn { position: relative; }
.menu-btn { display: none; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #fff; cursor: pointer; place-items: center; touch-action: manipulation; }
.burger, .burger::before, .burger::after { display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, background-color .2s ease; }
.burger { position: relative; }
.burger::before, .burger::after { content: ""; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }
.menu-btn[aria-expanded="true"] .burger { background: transparent; }
.menu-btn[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }
.menu-panel { position: absolute; left: 0; right: 0; top: calc(100% + 8px); width: min(780px, 100% - 24px); margin-inline: auto; max-height: calc(100dvh - 110px); overflow-y: auto; padding: 6px 22px 10px; border-radius: 28px;
  color: #fff; background: var(--ink); box-shadow: 0 20px 50px rgba(15, 31, 32, .22); }
.menu-panel[hidden] { display: none; }
.menu-panel ul { list-style: none; padding: 4px 0 8px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.menu-panel .dot { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .6); }
.menu-panel .cart-n { background: #fff; color: var(--ink); }
.menu-panel :focus-visible { outline-color: #fff; }
.menu-panel li a { display: flex; align-items: center; gap: 12px; min-height: 44px; font-weight: 600; font-size: 16px; text-decoration: none; }
.menu-big { display: flex; align-items: center; gap: 10px; min-height: 56px; font-weight: 800; font-stretch: 112%; font-size: 21px; letter-spacing: -.02em; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.menu-big:has(+ .menu-lang) { border-bottom: 0; }
.menu-lang { display: none; align-items: center; min-height: 52px; font-weight: 600; font-size: 16px; color: #c7d1d1; text-decoration: none; }
.menu-n { display: none; position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; place-items: center; }
.menu-panel a:hover { color: #bfe6e8; }
/* it grows out of the menu button, the links follow one after another; closing is quicker than opening */
.menu-panel { transform-origin: calc(100% - 30px) -20px; animation: menu-in .26s cubic-bezier(.2, .8, .2, 1); }
.menu-panel.is-closing { animation: menu-out .16s cubic-bezier(.4, 0, 1, 1) forwards; }
.menu-panel a { animation: menu-item .3s cubic-bezier(.2, .8, .2, 1) calc(40ms + var(--i, 0) * 28ms) both; }
.menu-panel.is-closing a { animation: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px) scale(.94); } }
@keyframes menu-out { to { opacity: 0; transform: translateY(-6px) scale(.97); } }
@keyframes menu-item { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .menu-panel, .menu-panel a { animation: none !important; } }

/* floating products: our own cutouts drift behind the page, all soft and faint */
body { isolation: isolate; display: flex; flex-direction: column; min-height: 100dvh; } /* footer sits at the bottom on short pages */
main { flex: 1 0 auto; }
.floaters { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fl { position: absolute; display: block; width: var(--w); left: var(--x); top: var(--y); opacity: var(--o, .35); filter: blur(var(--b, 4px)) drop-shadow(0 24px 30px rgba(15, 31, 32, .16)); transform: translateY(var(--py, 0px)); }
.fl img { width: 100%; animation: bob var(--t, 16s) ease-in-out infinite alternate; transform: rotate(var(--r, 0deg)); }
@keyframes bob { from { transform: translateY(-14px) rotate(var(--r, 0deg)); } to { transform: translateY(14px) rotate(calc(var(--r, 0deg) + 6deg)); } }
.fl-0 { --x: 4%; --y: 20%; --w: 72px; --r: -18deg; --t: 15s; }
.fl-1 { --x: 87%; --y: 16%; --w: 112px; --r: 16deg; --t: 18s; }
.fl-2 { --x: 6%; --y: 62%; --w: 124px; --r: 22deg; --t: 20s; }
.fl-3 { --x: 86%; --y: 60%; --w: 118px; --r: -20deg; --t: 17s; }
.fl-4 { --x: 20%; --y: 86%; --w: 76px; --r: 10deg; --t: 13s; }
.fl-5 { --x: 72%; --y: 84%; --w: 60px; --r: -14deg; --t: 16s; }

/* footer */
/* footer: a slab of the product-photo stone, rounded like the bar */
.site-footer { --f-ink: #fff; --f-text: #c7d1d1; --f-line: rgba(255,255,255,.16); position: relative; margin: 112px 12px 0; overflow: hidden; border-radius: var(--r-lg) var(--r-lg) 0 0; background: var(--ink); color: var(--f-text); font-size: 15px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px 48px; padding: 64px 0 52px; align-items: start; }
.foot .brand { width: 132px; background: #fff; }
.foot-about p { max-width: 36ch; margin: 22px 0 26px; line-height: 1.6; }
.foot-ig { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; transition: background-color .2s; }
.foot-ig:hover { background: var(--wash); }
.foot-h { margin: 6px 0 18px; color: var(--f-ink); font-size: 16px; font-stretch: 112%; }
.foot-col ul { list-style: none; margin: 0; display: grid; gap: 10px; }
.foot-col ul a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; transition: color .2s; }
.foot-col ul a:hover, .foot-col dd a:hover { color: #bfe6e8; }
.foot-col .dot { width: 9px; height: 9px; box-shadow: 0 0 0 1.5px rgba(255,255,255,.6); }
.foot-col dl { margin: 0; display: grid; gap: 14px; }
.foot-col dt { color: var(--f-ink); font-weight: 650; font-size: 13px; }
.foot-col dd { margin: 2px 0 0; line-height: 1.5; }
.foot-col dd a { color: #fff; text-decoration-color: rgba(255,255,255,.4); transition: color .2s; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; padding: 22px 0 28px; border-top: 1px solid var(--f-line); font-size: 13px; }
.foot-base p { margin: 0; }
.foot-base a { color: var(--f-ink); font-weight: 650; text-decoration: none; }
.site-footer :focus-visible, .bar :focus-visible, .wall-hero :focus-visible { outline-color: #fff; }

.strip { display: flex; flex-wrap: wrap; gap: 10px 32px; margin-top: 44px; padding-top: 20px; border-top: 2px solid var(--ink); list-style: none; font-weight: 600; font-size: 14px; }

/* sections */
.sec { margin-top: 80px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.sec-h .title { font-size: clamp(26px, 2.9vw, 40px); }

/* category rows */
.cat-rows { list-style: none; border-bottom: 1px solid var(--line); }
.cat-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 10px 0; border-top: 1px solid var(--line); text-decoration: none; }
.dot { width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--ink)); }
.cat-row .name { font-weight: 800; font-stretch: 112%; font-size: clamp(19px, 2vw, 27px); letter-spacing: -.02em; line-height: 1.15; transition: color .2s; }
.cat-row:hover .name { color: var(--c); }
.cat-row .n { color: var(--muted); font-weight: 600; white-space: nowrap; }
.thumbs { display: flex; }
.thumbs img { width: 60px; height: 60px; object-fit: contain; margin-left: -14px; background: #fff; border-radius: 50%; padding: 8px; box-shadow: 0 0 0 3px var(--paper); }
[data-cat="burs"] { --c: var(--c-burs); }
[data-cat="polishing"] { --c: var(--c-polishing); }
[data-cat="restorative"] { --c: var(--c-restorative); }
[data-cat="examination"] { --c: var(--c-examination); }
[data-cat="setup"] { --c: var(--c-setup); }
[data-cat="handpieces"] { --c: var(--c-handpieces); }

/* product cards */
.grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 44%), 1fr)); gap: 28px 16px; }
.card-link { display: block; text-decoration: none; }
.card-img { position: relative; display: block; background: var(--white); border-radius: var(--r-md); aspect-ratio: 1; padding: 10%; overflow: hidden; }
.card-img img, .card-img .noimg { width: 100%; height: 100%; object-fit: contain; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.card-link:hover .card-img img { transform: scale(1.06); }
/* second photo (the product in use) fades in over the first on hover */
.card-img .card-alt { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease, transform .35s cubic-bezier(.2, .8, .2, 1); }
@media (hover: hover) { .card-link:hover .card-alt, .card-link:focus-visible .card-alt { opacity: 1; } }
/* Touch screens have no hover: the two photos sit side by side and swipe, with dots underneath (dots script in layout.php) */
.card-dots { display: none; }
@media (hover: none) {
  .card .card-img:has(.card-alt) { display: flex; overflow: auto hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; scrollbar-width: none; }
  .card .card-img:has(.card-alt)::-webkit-scrollbar { display: none; }
  .card .card-img:has(.card-alt) img { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; border-radius: 0; }
  .card-img .card-alt { position: static; opacity: 1; }
  .card-dots { display: flex; justify-content: center; gap: 6px; margin-top: 8px; }
  .card-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); opacity: .2; transition: opacity .2s ease, width .2s ease; }
  .card-dots i.on { width: 14px; border-radius: 3px; opacity: .7; }
}
.card-name { display: block; font-weight: 600; font-size: 15px; margin-top: 10px; line-height: 1.3; }
.card-meta { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.card-meta .price { font-size: 16px; }
.card.is-out .card-img img { opacity: .45; }
.stock { font-size: 14px; font-weight: 600; color: var(--ok); }
.stock-low { color: var(--low); }
.stock-out { color: var(--muted); }
.noimg { display: block; background: var(--wash); border-radius: var(--r-sm); }

/* colour picker */
.pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.stage { border-radius: var(--r-lg); aspect-ratio: 1; display: grid; place-items: center; background: var(--bg, var(--wash)); transition: background-color .4s ease; }
.stage img { width: 72%; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .2)); }
.pick .title { font-size: clamp(26px, 2.9vw, 40px); }
.pick .price { font-size: 24px; margin: 18px 0 6px; display: block; }
.pick p { color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }
.swatch { width: 48px; height: 48px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: var(--sw); box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px transparent; transition: box-shadow .2s; display: block; }
.swatch[aria-pressed="true"], .swatch[aria-current="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.swatch-name { font-weight: 600; color: var(--ink) !important; }
.pick form { margin-top: 22px; }

/* clinic band */
.clinic-band { background: var(--stone-band); color: var(--ink); border-radius: var(--r-lg); padding: clamp(28px, 5vw, 64px); display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: center; }
.clinic-band .title { font-size: clamp(28px, 3.3vw, 46px); }
.clinic-band p { color: #3b4848; margin: 14px 0 26px; max-width: 38ch; }
.clinic-band .btn-light { background: var(--ink); color: #fff; }
.clinic-band .btn-light:hover { background: var(--ink-hover); }
.clinic-band .row { display: flex; gap: 10px; justify-content: flex-end; }
.clinic-band .row img { width: 30%; background: rgba(255,255,255,.45); border-radius: 16px; padding: 10px; aspect-ratio: 1; object-fit: contain; }

/* shop */
.shop { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-top: 8px; }
.filters { position: sticky; top: 104px; align-self: start; }
.filters-title { font-weight: 700; margin: 34px 0 10px; }
.filters ul { list-style: none; }
.filters a { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-sm); text-decoration: none; font-weight: 500; }
.filters a .dot { width: 10px; height: 10px; }
.filters a:hover { background: var(--white); }
.filters a[aria-current="page"] { background: var(--ink); color: #fff; }
.filters a[aria-current="page"] .dot { box-shadow: 0 0 0 1.5px #fff; }
.filters .n { color: inherit; opacity: .6; font-size: 14px; font-variant-numeric: tabular-nums; }
.shop-head { border-bottom: 2px solid var(--ink); padding-bottom: 18px; margin-bottom: 24px; }
.shop-head .page-title { margin-bottom: 18px; }
.search { display: flex; gap: 8px; max-width: 560px; }
.search input { flex: 1; min-width: 0; min-height: 48px; padding: 10px 18px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); }
.search input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 31, 32, .16); }
.count { color: var(--muted); margin: -8px 0 22px; }
.empty { font-size: 19px; color: var(--muted); margin: 12px 0 20px; max-width: 44ch; }

/* product page */
.crumb { margin: 24px 0 8px; font-weight: 600; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.product-media { position: sticky; top: 104px; align-self: start; }
.product-photo { position: relative; background: var(--white); border-radius: var(--r-lg); aspect-ratio: 1; padding: 8%; }
.product-photo .alt-photo { position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
.product-photo.show-alt .alt-photo { opacity: 1; }
@media (hover: hover) { .product-photo:has(.alt-photo):hover .alt-photo { opacity: 1; } }
.photo-thumbs { display: flex; gap: 10px; margin-top: 12px; }
.photo-thumbs button { width: 72px; aspect-ratio: 1; padding: 0; border: 0; border-radius: var(--r-sm); overflow: hidden; background: #e9e5df; cursor: pointer; opacity: .6; transition: opacity .2s; }
.photo-thumbs button[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink); }
.photo-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-photo img { width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { font-weight: 850; font-stretch: var(--wide); letter-spacing: -.03em; line-height: 1.05; font-size: clamp(28px, 3vw, 42px); margin-top: 10px; }
.product-cat { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; color: var(--muted); }
.price-lg { font-size: 30px; display: block; margin-top: 22px; }
.clinic-line { color: var(--muted); font-size: 15px; margin-top: 4px; }
.product-info .stock { display: block; margin-top: 14px; font-size: 15px; }
.product-info .swatches { margin-top: 26px; }
.variant-label { font-weight: 600; margin-top: 4px; }
.buy { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.buy label { width: 100%; font-weight: 600; font-size: 15px; }
.qty { width: 96px; min-height: 48px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); text-align: center; font-variant-numeric: tabular-nums; }
.qty:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(15, 31, 32, .16); }
.unavail { margin-top: 26px; padding: 18px 20px; background: var(--white); border-radius: var(--r-sm); }
.spec-title { margin-top: 44px; font-size: 20px; }
.spec { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 15px; }
.spec th, .spec td { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); }
.spec th { color: var(--muted); font-weight: 500; width: 40%; }
.spec td { font-weight: 600; }
.related { margin-top: 80px; }
.related h2 { font-weight: 850; font-stretch: var(--wide); letter-spacing: -.03em; font-size: clamp(24px, 2.6vw, 34px); margin-bottom: 18px; }

/* notices */
.notice { background: var(--white); border-left: 4px solid var(--ink); padding: 14px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 16px 0; }
.notice-err { border-left-color: var(--err); }
.note { color: var(--muted); }

/* cart */
.cart { max-width: 900px; }
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 600; padding: 0 0 10px; }
.lines td { padding: 16px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.lines .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.line-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: center; }
.line-img { width: 72px; height: 72px; background: var(--white); border-radius: var(--r-sm); padding: 8px; }
.line-img img { width: 100%; height: 100%; object-fit: contain; }
.line-name { font-weight: 600; text-decoration: none; display: block; }
.line-name:hover { color: var(--muted); }
.line-price { color: var(--muted); font-size: 15px; margin-right: 12px; }
.line-remove { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 15px; }
.line-remove:hover { color: var(--err); }
.cart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-top: 8px; }
.sum { display: flex; gap: 16px; align-items: baseline; justify-content: flex-end; border-top: 2px solid var(--ink); padding-top: 18px; margin-top: 28px; }
.sum dt { font-weight: 600; }
.sum dd { font-size: 30px; font-weight: 800; font-stretch: var(--wide); font-variant-numeric: tabular-nums; }
.cart .note { text-align: right; margin-top: 6px; }
.cart-go { display: flex; justify-content: flex-end; margin-top: 22px; }

/* panels and forms (checkout, order, admin) */
.panel { background: var(--white); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); border: 0; margin: 0 0 16px; min-width: 0; }
.panel h2, .panel legend { font-size: 20px; font-weight: 800; font-stretch: 112%; margin-bottom: 14px; padding: 0; float: left; width: 100%; }
.panel legend + * { clear: both; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.summary { position: sticky; top: 104px; }
.field { margin-bottom: 18px; clear: both; }
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 11px 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line); background: var(--paper); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); background: #fff; box-shadow: 0 0 0 3px rgba(15, 31, 32, .16); }
.has-error input, .has-error textarea { border-color: var(--err); }
.help { color: var(--muted); font-size: 14px; margin-top: 6px; }
.err { color: var(--err); font-size: 14px; font-weight: 600; margin-top: 6px; }
.pay-option { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line); margin-top: 10px; cursor: pointer; clear: both; }
.pay-option:has(input:checked) { border-color: var(--ink); background: var(--wash); }
.pay-option input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.pay-option strong { display: block; }
.pay-option small { color: var(--muted); font-size: 14px; }
.pay-option.is-off { opacity: .5; cursor: not-allowed; }
.sum-lines { list-style: none; clear: both; }
.sum-lines li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sum-lines .sum-name { flex: 1; min-width: 0; }
.sum-img { flex: none; width: 52px; height: 52px; background: var(--paper); border-radius: 10px; padding: 5px; display: block; }
.sum-img img { width: 100%; height: 100%; object-fit: contain; }

/* Product photos with their own stone background (media/ps): fill the frame edge to edge */
.card-img:has(.is-photo), .product-photo:has(.is-photo), .stage:has(.is-photo), .line-img:has(.is-photo), .sum-img:has(.is-photo) { padding: 0; overflow: hidden; background: #e9e5df; }
.card-img .is-photo, .product-photo .is-photo, .line-img .is-photo, .sum-img .is-photo { object-fit: cover; border-radius: inherit; }
.stage:has(.is-photo) { display: block; }
.stage .is-photo { display: block; width: 100%; height: 100%; object-fit: cover; filter: none; border-radius: inherit; }
.clinic-band .row img.is-photo { padding: 0; object-fit: cover; }
.sum-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.sum-name small { display: block; color: var(--muted); font-weight: 400; font-size: 14px; }
.sum-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-totals { margin: 14px 0 20px; }
.sum-totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.sum-totals dt { color: var(--muted); }
.sum-totals dd { font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-total { border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 12px !important; }
.sum-total dt { color: var(--ink) !important; font-weight: 700; }
.sum-total dd { font-size: 26px; font-weight: 800; font-stretch: var(--wide); }
.summary .btn { width: 100%; }
.summary p:last-child { text-align: center; margin-top: 14px; }

.order-page { max-width: 820px; }
.order-head { display: flex; flex-wrap: wrap; gap: 20px 56px; }
.order-head .label { display: block; color: var(--muted); font-size: 14px; }
.order-head strong { font-size: 22px; font-weight: 800; font-stretch: 112%; }
.order-head .ref { font-variant-numeric: tabular-nums; }
.pay-box { background: var(--stone-band); color: var(--ink); }
.pay-box p:first-child { font-size: 20px; font-weight: 600; }
.pay-box .help { color: #3b4848; }
.order-page > .help { margin: 20px 0 16px; }

/* prose pages */
.prose { max-width: 760px; }
.prose h2 { margin: 40px 0 14px; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 10px; margin-bottom: 32px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--white); border-radius: var(--r-sm); padding: 14px 18px 14px 14px; }
.steps li::before { content: counter(s); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* admin */
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin: 24px 0 8px; }
.admin-head .page-title { margin: 0; }
.admin .filters ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 20px 0; }
.admin .filters a { display: inline-flex; gap: 8px; grid-template-columns: none; background: var(--white); }
.order-list { list-style: none; display: grid; gap: 8px; }
.order-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 150px 90px 110px 160px; gap: 14px; align-items: center; background: var(--white); border-radius: var(--r-sm); padding: 14px 18px; text-decoration: none; font-size: 15px; }
.order-row:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.o-ref { font-weight: 700; font-variant-numeric: tabular-nums; }
.o-name small { display: block; color: var(--muted); }
.o-total { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.o-date { color: var(--muted); font-size: 14px; text-align: right; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; font-stretch: 100%; letter-spacing: 0; vertical-align: middle; background: var(--wash); color: var(--ink); }
.badge-new { background: #fde7b0; }
.badge-confirmed { background: #cfe9ea; }
.badge-sent { background: #d8d0f4; }
.badge-delivered { background: #cdebd8; }
.badge-cancelled { background: #eee; color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.kv div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); clear: both; }
.kv dt { color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.admin-login { max-width: 440px; }

@media (max-width: 960px) {
  .main-nav { display: none; }
  .menu-btn { display: inline-grid; }
  .bar { padding-left: 20px; }
  /* tablets and phones: the same background layer as desktop, but spread across the whole screen
     (not pinned to the edges), smaller, all soft and faint; the hero covers them */
  .fl { --b: 2.5px; --o: .28; }
  .fl-0 { --x: 9%;  --y: 20%; --w: 64px; }
  .fl-1 { --x: 70%; --y: 12%; --w: 84px; }
  .fl-2 { --x: 48%; --y: 44%; --w: 104px; }
  .fl-3 { --x: 5%;  --y: 62%; --w: 86px; }
  .fl-4 { --x: 74%; --y: 68%; --w: 74px; }
  .fl-5 { --x: 34%; --y: 86%; --w: 56px; }
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pick, .clinic-band, .product-grid, .checkout-grid, .admin-grid { grid-template-columns: minmax(0, 1fr); }
          .cat-row { grid-template-columns: 12px minmax(0, 1fr) auto; gap: 14px; }
  .cat-row .thumbs { display: none; }
  .clinic-band .row { justify-content: flex-start; }
  .shop { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .filters { position: static; }
  .filters-title { display: none; }
  .filters ul { display: flex; gap: 6px; overflow-x: auto; margin: 16px -16px 0; padding: 0 16px 6px; scrollbar-width: none; }
  .filters a { grid-template-columns: 10px auto auto; white-space: nowrap; background: var(--white); }
  .product-media, .summary { position: static; }
  .product-grid { gap: 28px; }
  /* phones and tablets: a short footer; the categories are already in the menu */
  .site-footer { margin-top: 72px; font-size: 14px; }
  .foot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 20px; padding: 28px 0 22px; }
  .foot-about { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
  .foot-about p, .foot-col:has(ul) { display: none; }
  .foot .brand { width: 108px; }
  .foot-ig { min-height: 40px; padding: 8px 16px; font-size: 13px; }
  .foot-h { margin: 0 0 10px; font-size: 15px; }
  .foot-col dl { gap: 8px; }
  .foot-col dt { font-size: 12px; }
  .foot-col dd { margin: 0; overflow-wrap: anywhere; }
  .foot-base { padding: 14px 0 18px; font-size: 12px; }
  .order-row { grid-template-columns: minmax(0, 1fr) auto; }
  .o-pay, .o-date { display: none; }
  .o-name { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 560px) {
  /* phones: the same spread, a size smaller */
  .fl-0 { --w: 46px; }
  .fl-1 { --w: 60px; }
  .fl-2 { --w: 76px; }
  .fl-3 { --w: 62px; }
  .fl-4 { --w: 54px; }
  .fl-5 { --w: 40px; }
  body { font-size: 16px; }
  /* phones: the bar keeps only the logo and the menu button; cart and language move into the menu */
  .tools .lang, .tools .cart-link { display: none; }
  .menu-lang { display: flex; }
  .menu-n { display: inline-grid; }
  .menu-panel .menu-big:has(+ .menu-lang) { border-bottom: 1px solid rgba(255, 255, 255, .16); }
  .brand { width: 104px; }
  .lines thead { display: none; }
  .lines td:nth-child(2) { width: 84px; }
  .line-item { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; }
  .line-img { width: 56px; height: 56px; }
  .qty { width: 72px; }
  .site-footer { margin: 56px 8px 0; border-radius: 22px 22px 0 0; font-size: 13px; }
  .foot { gap: 22px 14px; padding: 22px 0 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* home hero: a tilted wall of product photos that slowly slides, columns taking turns up and down, with the headline on top */
.wall-hero { position: relative; isolation: isolate; overflow: hidden; display: grid; place-items: center; height: clamp(640px, 100svh, 1040px); margin-top: -106px; padding: 90px 0 84px; background: #2a2f2f; color: #fff; text-align: center; }
.wall-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(12, 22, 23, .32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); } /* the photos sit soft behind the headline */
.wall { --t: clamp(150px, 18.5vw, 340px); --g: 14px; position: absolute; z-index: -1; left: 50%; top: 50%; display: flex; align-items: flex-start; gap: var(--g); height: calc(6 * (var(--t) + var(--g))); transform: translate(-50%, -50%) perspective(1500px) rotateX(26deg) rotateZ(-16deg); }
.wall-col { flex: none; width: var(--t); animation: wall-slide 70s linear infinite; will-change: transform; }
.wall-col:nth-child(even) { animation-direction: reverse; }
.wall-col:nth-child(3n + 1) { animation-delay: -20s; }
.wall-col:nth-child(3n + 2) { animation-delay: -45s; }
.wall-hero.is-away .wall-col { animation-play-state: paused; }
.wall i { display: block; aspect-ratio: 1; margin-bottom: var(--g); border-radius: 18px; background: #cfc4bb var(--wall) no-repeat; background-size: var(--wall-size); } /* every tile is a window onto one image */
@keyframes wall-slide { to { transform: translateY(-50%); } }
.wall-copy { text-shadow: 0 1px 14px rgba(8, 16, 17, .3); }
.wall-copy .title { font-size: clamp(38px, 6.1vw, 96px); max-width: 16ch; margin-inline: auto; }
.wall-copy .lede { margin: 20px auto 0; max-width: 46ch; font-size: 18px; font-weight: 600; color: #fff; }
.wall-copy .btn { margin-top: 26px; text-shadow: none; }
.wall-facts { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 28px; margin: 0; padding: 12px 26px; list-style: none; border-radius: 999px; background: rgba(15, 31, 32, .68); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); font-size: 14px; font-weight: 600; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .wall-col { animation: none; } }
@media (max-width: 960px) {
  .wall-hero::after { backdrop-filter: blur(1.2px); -webkit-backdrop-filter: blur(1.2px); } /* the tiles are small here, so less blur */
  .wall-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; width: calc(100% - 24px); padding: 12px 18px; border-radius: 20px; font-size: 13px; white-space: normal; text-align: left; }
}

/* page transitions (cross-document view transitions; browsers without them just load the page).
   The bar and the floating products stay put; the page underneath fades out up and the new one rises in.
   A product photo morphs from its card into the product page and back (named by the script in layout.php). */
@view-transition { navigation: auto; }
.bar { view-transition-name: bar; } /* on the bar, not the header: a named element cuts its children off from the page behind, which kills the menu blur */
.floaters { view-transition-name: floaters; }
.product-photo { view-transition-name: pic; }
::view-transition-old(root) { animation: vt-out .16s cubic-bezier(.4, 0, 1, 1) both; }
::view-transition-new(root) { animation: vt-in .34s cubic-bezier(.2, .8, .2, 1) .06s both; }
::view-transition-group(pic) { animation-duration: .4s; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
::view-transition-old(pic), ::view-transition-new(pic) { height: 100%; object-fit: cover; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-10px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
