/* =========================================================
   Theme – light editorial wellness look
   ========================================================= */
:root {
    --outer: #dbe3e8;      /* page backdrop (grey-blue) */
    --paper: #ffffff;      /* main sheet */
    --ink: #161616;        /* text + dark buttons */
    --ink-2: #3a3e42;
    --muted: #6c7278;
    --line: #d7dadd;       /* thin dividers */
    --soft: #eef1f3;       /* product panels */
    --soft-2: #f5f7f8;
    --sky: #e2eefb;        /* highlight behind headline */
    --sky-2: #cfe1f4;
    --tint: #f6f8fa;       /* neutral panel tint */
    --steel: #86a7bb;      /* hero photo blue */
    --steel-2: #6f93a8;
    --social: #a3b1bd;
    --danger: #c0392b;
    --ok: #2f7d55;
    --radius: 6px;

    --bs-body-font-family: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
    --bs-body-color: var(--ink);
    --bs-body-bg: #ffffff;          /* Bootstrap uses this for inputs, cards, modals */
    --bs-border-color: var(--line);
    --bs-link-color: var(--ink);
    --bs-link-color-rgb: 22, 22, 22;
    --bs-link-hover-color: var(--steel-2);
    --bs-link-hover-color-rgb: 111, 147, 168;
    --bs-primary: #161616;
    --bs-primary-rgb: 22, 22, 22;
    --bs-focus-ring-color: rgba(134, 167, 187, .35);
}

body {
    background: var(--outer);
    font-weight: 400;
    letter-spacing: .005em;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Sheet (white page on the grey-blue backdrop) ---------- */
.sheet {
    background: var(--paper);
    max-width: 1240px;
    margin: 32px auto;
    padding: 0 40px 28px;
    min-height: calc(100vh - 64px);
    display: flex;
    flex-direction: column;
}
.sheet-wide { max-width: 1440px; }
@media (max-width: 767.98px) {
    .sheet { margin: 0; padding: 0 16px 20px; min-height: 100vh; }
}
.page { flex: 1; padding-top: 28px; }



/* ---------- Top bar ---------- */
.topbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 22px 0 16px;
    border-bottom: 1px solid var(--line);
}
.menu-btn {
    justify-self: start;
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 0; padding: 0;
    color: var(--ink); font-size: 1rem; text-decoration: none;
}
.menu-btn i { font-size: 1.4rem; line-height: 1; }
.brand {
    font-size: 1.3rem; font-weight: 400; letter-spacing: .02em;
    color: var(--ink); text-decoration: none; text-align: center;
}
.top-actions {
    justify-self: end;
    display: flex; align-items: center; gap: 18px;
}
.top-actions a { color: var(--ink); text-decoration: none; }
.top-actions a.active { text-decoration: underline; text-underline-offset: 4px; }
.icon-link-btn { font-size: 1.15rem; position: relative; line-height: 1; }
.cart-badge {
    position: absolute; top: -7px; right: -10px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: var(--ink); color: #fff;
    font-size: .68rem; line-height: 17px; text-align: center;
}
.area-tag {
    border: 1px solid var(--ink); border-radius: 999px;
    padding: 2px 12px; font-size: .8rem; font-style: italic;
}
@media (max-width: 575.98px) {
    .menu-btn span { display: none; }
    .top-actions { gap: 14px; }
}

.sponsor-strip {
    margin-top: 10px;
    padding: 8px 14px;
    background: var(--soft-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: .92rem;
    color: var(--ink-2);
}
.sponsor-strip i { margin-right: 6px; }

/* ---------- Off-canvas menu ---------- */
.menu-panel { --bs-offcanvas-width: 340px; font-family: inherit; }
.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list li a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid var(--line);
    color: var(--ink); text-decoration: none;
}
.menu-list li a span { font-size: .8rem; color: var(--muted); width: 22px; }
.menu-list li a:hover, .menu-list li a.active { background: var(--sky); }
.menu-list li.sub a { padding-left: 38px; font-size: .92rem; color: var(--ink-2); }

/* ---------- Type ---------- */
.display-title {
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(2.2rem, 6.2vw, 4.4rem);
    line-height: 1;
    letter-spacing: -.01em;
    margin: 0;
}
.display-title em { font-style: italic; font-weight: 400; }
.small-title { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 1.2rem; }
/* Soft highlight behind part of a headline word – hugs the capital letters, fades in from the left */
.hl { position: relative; z-index: 0; display: inline-block; line-height: 1; white-space: nowrap; }
.hl::before {
    content: ""; position: absolute; z-index: -1;
    top: .02em; height: .84em;                 /* cap height of the headline font */
    left: 34%; right: -.16em;
    background: linear-gradient(90deg, rgba(207, 225, 244, 0) 0%, rgba(207, 225, 244, .85) 22%, #d9e8f7 60%, #e6f0fb 100%);
    border-radius: 2px;
}
.small-title .hl::before { top: .04em; height: .8em; }
.kicker { font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-bottom: .4rem; }
.section-label { font-weight: 500; text-transform: uppercase; font-size: .95rem; letter-spacing: .02em; }
.section-label .hl-soft { background: var(--sky); padding: 1px 4px; }
.lede { color: var(--ink-2); max-width: 38ch; }
.italic { font-style: italic; }

/* ---------- Buttons ---------- */
.btn { font-family: inherit; }
.btn-pill { border-radius: 999px; padding-left: 1.2rem; padding-right: 1.2rem; }
.btn-ink {
    --bs-btn-color: #fff; --bs-btn-bg: var(--ink); --bs-btn-border-color: var(--ink);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: #333; --bs-btn-hover-border-color: #333;
    --bs-btn-active-bg: #000; --bs-btn-active-color: #fff;
    --bs-btn-disabled-bg: #8a8f94; --bs-btn-disabled-border-color: #8a8f94; --bs-btn-disabled-color: #fff;
    font-style: italic;
}
.btn-outline-ink {
    --bs-btn-color: var(--ink); --bs-btn-border-color: var(--ink);
    --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--ink); --bs-btn-hover-border-color: var(--ink);
    --bs-btn-active-bg: var(--ink); --bs-btn-active-color: #fff;
}
.btn-arrow::after { content: "⟶"; margin-left: .5rem; font-style: normal; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: none; }
.link-btn:hover, .footer-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.underline-link { text-decoration: underline; text-underline-offset: 3px; font-style: italic; }

.circle-cta {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 84px; height: 84px; border-radius: 50%;
    border: 1px solid var(--ink);
    font-size: .78rem; line-height: 1.2; text-transform: uppercase; text-align: center;
    color: var(--ink); text-decoration: none;
    transition: background .2s, color .2s;
}
.circle-cta::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 1px; background: var(--ink);
}
.circle-cta::before {
    content: ""; position: absolute; left: calc(50% + 72px); top: calc(50% - 3px);
    border-left: 7px solid var(--ink); border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}
.circle-cta span { background: var(--paper); position: relative; z-index: 1; padding: 0 2px; }
.circle-cta:hover { background: var(--sky); }
.circle-cta:hover span { background: var(--sky); }

/* ---------- Chips / pills ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--ink); border-radius: 999px;
    padding: 2px 11px; font-size: .82rem; background: #fff; color: var(--ink);
    text-decoration: none; white-space: nowrap;
}
.chip::before { content: "•"; }
.chip.no-dot::before { content: none; }
.chip.tilt { transform: rotate(9deg); }
a.chip:hover, .chip.active { background: var(--ink); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

.bullet-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.bullet-tags li { background: rgba(255,255,255,.92); padding: 1px 10px 1px 8px; font-size: .9rem; }
.bullet-tags li::before { content: "•"; color: var(--muted); margin-right: 6px; }

.float-chip {
    position: absolute;
    display: inline-flex; align-items: center; gap: 8px;
    background: #fff; border-radius: 999px;
    padding: 4px 4px 4px 12px; font-size: .8rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.float-chip i {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sky); font-size: .85rem;
}

/* ---------- Home ---------- */
.hero-head { padding: 40px 0 64px; }
.hero-line2 { display: flex; align-items: center; justify-content: flex-end; gap: 32px; margin-top: 18px; flex-wrap: wrap; }
.hero-line2 .lede { text-align: right; font-size: .95rem; margin: 0; }
.hero-line2 .dash { width: 52px; height: 1px; background: var(--ink); display: inline-block; vertical-align: middle; margin-right: 18px; }
.hero-cta-wrap { display: flex; justify-content: flex-end; padding-right: 60px; }
@media (max-width: 991.98px) { .hero-cta-wrap { justify-content: flex-start; padding: 20px 0 0; } .hero-line2 { justify-content: flex-start; } .hero-line2 .lede { text-align: left; } }

.product-tile {
    position: relative; display: block;
    background: var(--soft); border-radius: 2px; overflow: hidden;
    aspect-ratio: 4 / 5; text-decoration: none; color: var(--ink);
}
.product-tile img { width: 100%; height: 100%; object-fit: contain; padding: 12% 10% 18%; transition: transform .35s; }
.product-tile:hover img { transform: scale(1.03); }
.product-tile .tile-icons { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.round-icon {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--ink);
    display: inline-flex; align-items: center; justify-content: center; font-size: .8rem;
    background: rgba(255,255,255,.6); color: var(--ink);
}
.product-tile .bullet-tags { position: absolute; left: 0; bottom: 12px; }

.hero-stage {
    position: relative; background: var(--steel); border-radius: 2px; overflow: hidden;
    min-height: 420px; height: 100%;
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s; display: flex; align-items: center; justify-content: center; }
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 62%; max-height: 82%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(20,40,55,.35)); }
.hero-badge { position: absolute; top: 16px; right: 16px; text-align: right; color: #fff; z-index: 2; }
.hero-badge small { display: block; font-style: italic; font-size: .9rem; }
.hero-badge span { display: inline-block; margin-top: 6px; border: 1px solid #fff; border-radius: 999px; padding: 2px 12px; font-size: 1.05rem; }
.hero-controls { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; color: #fff; font-size: .85rem; z-index: 2; }
.hero-controls button {
    width: 28px; height: 28px; border-radius: 50%; border: 1px solid #fff; background: transparent; color: #fff;
    display: inline-flex; align-items: center; justify-content: center; padding: 0;
}
.hero-controls button.next { background: #fff; color: var(--ink); }

.numbered { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.numbered li { display: flex; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: .95rem; }
.numbered li span { font-size: .8rem; color: var(--muted); padding-top: 2px; min-width: 18px; }

.ingredients { display: flex; gap: 6px; flex-wrap: wrap; }
.ingredients span {
    width: 44px; height: 44px; border-radius: 50%; background: var(--soft);
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

.standards { border-top: 1px solid var(--line); margin-top: 96px; padding-top: 56px; }
.home-bestsellers { margin-top: 96px; }
.home-bestsellers .section-label { margin-bottom: 0; }
.home-bestsellers > div:first-child { margin-bottom: 28px !important; }
.area-shop .site-footer { margin-top: 96px; padding-top: 36px; }
@media (max-width: 767.98px) {
    .hero-head { padding: 20px 0 36px; }
    .standards, .home-bestsellers { margin-top: 56px; }
    .standards { padding-top: 36px; }
}
.standard { border-left: 1px solid var(--line); padding: 4px 0 4px 18px; height: 100%; }
.standard h3 { font-size: 1.05rem; font-weight: 500; text-transform: uppercase; }
.standard p { color: var(--ink-2); font-size: .95rem; margin: 0; }

/* ---------- Shop grid ---------- */
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.search-pill { position: relative; min-width: 260px; }
.search-pill input { border-radius: 999px; padding-left: 38px; border-color: var(--ink); }
.search-pill i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.product-card { display: flex; flex-direction: column; height: 100%; }
.product-card .meta { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-card .name { font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.product-card .cat { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.product-card .row-end { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; gap: 8px; }
.price { font-size: 1.05rem; }
.points { font-size: .8rem; color: var(--steel-2); font-style: italic; }
.out { font-size: .8rem; color: var(--danger); }

/* ---------- Product page ---------- */
.pdp-image { background: var(--soft); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; position: relative; }
.pdp-image img { width: 72%; height: 72%; object-fit: contain; }
.pdp-title { font-size: clamp(1.8rem, 3.4vw, 2.8rem); font-weight: 400; text-transform: uppercase; line-height: 1.05; }
.qty {
    display: inline-flex; align-items: center; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden;
}
.qty button { background: none; border: 0; width: 34px; height: 36px; font-size: 1.05rem; color: var(--ink); }
.qty input { width: 40px; border: 0; text-align: center; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm button { width: 28px; height: 30px; }
.qty-sm input { width: 30px; }

/* ---------- Cart / checkout ---------- */
.line-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line-item img { width: 84px; height: 84px; object-fit: contain; background: var(--soft); padding: 8px; }
.summary-card { background: var(--soft-2); border: 1px solid var(--line); padding: 22px; border-radius: var(--radius); position: sticky; top: 20px; }
.summary-row { display: flex; justify-content: space-between; padding: 6px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; font-size: 1.15rem; }
.form-section { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 22px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section h2 { font-size: 1rem; font-weight: 500; text-transform: uppercase; margin-bottom: 14px; }
.form-section h2 span { color: var(--muted); font-size: .8rem; margin-right: 8px; }

.form-control, .form-select { border-color: #c9cdd1; border-radius: 8px; padding: .6rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--steel); box-shadow: 0 0 0 .2rem rgba(134, 167, 187, .25); }
.form-label { font-size: .88rem; color: var(--ink-2); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
.form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(134, 167, 187, .3); border-color: var(--steel); }

.pay-option { display: block; cursor: pointer; }
.pay-option input { position: absolute; opacity: 0; }
.pay-option .box {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    border: 1px solid #c9cdd1; border-radius: 10px; transition: border-color .15s, background .15s;
}
.pay-option .box i { font-size: 1.5rem; }
.pay-option input:checked + .box { border-color: var(--ink); background: var(--sky); }
.pay-option input:focus-visible + .box { outline: 2px solid var(--steel); outline-offset: 2px; }

.sponsor-box { background: var(--sky); border-radius: 10px; padding: 14px 16px; }
.sponsor-result { font-size: .88rem; margin-top: 6px; min-height: 1.3em; }
.sponsor-result.ok { color: var(--ok); }
.sponsor-result.bad { color: var(--danger); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 24px; }
.mission { max-width: 34ch; font-size: .95rem; }
.mission em { font-weight: 500; }
.socials { display: flex; gap: 8px; }
.socials a {
    width: 32px; height: 32px; border-radius: 50%; background: var(--social); color: #fff;
    display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
}
.socials a:hover { background: var(--steel-2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; justify-content: flex-end; margin-bottom: 8px; font-size: .92rem; }
.footer-links a { text-decoration: none; }
@media (max-width: 767.98px) { .footer-links { justify-content: flex-start; } }

/* ---------- Alerts / toasts / status ---------- */
.soft-alert { border-radius: 10px; border: 0; }
.alert-info { background: var(--sky); color: var(--ink); }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 1090; display: flex; flex-direction: column; gap: 8px; }
.toast-msg {
    background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: .9rem;
    box-shadow: 0 6px 20px rgba(0,0,0,.18); animation: toastIn .25s ease;
}
.toast-msg.error { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.status { display: inline-block; border-radius: 999px; padding: 1px 10px; font-size: .78rem; border: 1px solid; }
.status-pending { border-color: #c9a227; color: #8a6d10; background: #fbf5df; }
.status-paid { border-color: var(--steel-2); color: #2c5469; background: var(--sky); }
.status-shipped { border-color: #6a5acd; color: #463a99; background: #efedfb; }
.status-done { border-color: var(--ok); color: var(--ok); background: #e8f4ee; }
.status-cancelled { border-color: #b5b9bd; color: #6c7278; background: #f1f2f3; }

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
    width: min(860px, calc(100% - 24px)); z-index: 1080;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 12px 40px rgba(30, 50, 65, .18);
    padding: 16px 18px; display: flex; gap: 18px; align-items: center; font-size: .9rem;
}
.cookie-banner[hidden] { display: none; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 767.98px) { .cookie-banner { flex-direction: column; align-items: stretch; } .cookie-actions { justify-content: stretch; } .cookie-actions .btn { flex: 1; } }
.cookie-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cookie-row:last-child { border-bottom: 0; }
.cookie-row p { font-size: .85rem; color: var(--muted); margin: 2px 0 0; }
.modal-content { border-radius: 14px; border: 0; font-family: inherit; }

/* ---------- Auth pages ---------- */
.auth-main { max-width: 440px; width: 100%; margin: 0 auto; padding: 48px 0 24px; flex: 1; }
.auth-alt { margin-top: 18px; font-size: .92rem; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Backends ---------- */
.panel-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; padding-top: 24px; flex: 1; }
.panel-nav .menu-list li a { font-size: .95rem; }
.panel-nav .menu-list li a i { color: var(--ink-2); }
.panel-main { min-width: 0; }
.panel-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 400; text-transform: uppercase; margin-bottom: 20px; }
@media (max-width: 991.98px) { .panel-layout { grid-template-columns: 1fr; gap: 0; } .panel-nav { --bs-offcanvas-width: 300px; } }
@media (min-width: 992px) { .panel-nav { position: sticky; top: 20px; align-self: start; } }

.stat {
    border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; height: 100%; background: #fff;
}
.stat .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.stat .value { font-size: 1.6rem; line-height: 1.2; margin-top: 4px; }
.stat .sub { font-size: .82rem; color: var(--muted); }
.stat.accent { background: var(--sky); border-color: var(--sky-2); }

.card-soft { border: 1px solid var(--line); border-radius: 10px; padding: 20px; background: #fff; }
.card-soft h2 { font-size: 1rem; font-weight: 500; text-transform: uppercase; margin-bottom: 14px; }

.table-clean { --bs-table-bg: transparent; margin: 0; font-size: .93rem; }
.table-clean thead th { font-weight: 500; font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--ink); }
.table-clean td { vertical-align: middle; border-color: var(--line); }
.table-clean tbody tr:hover td { background: var(--soft-2); }
.thumb { width: 44px; height: 44px; object-fit: contain; background: var(--soft); padding: 4px; border-radius: 4px; }

.share-box { display: flex; gap: 8px; }
.share-box input { border-radius: 999px; background: #fff; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters .form-control, .filters .form-select { width: auto; border-radius: 999px; padding: .35rem .9rem; }

.pagination { --bs-pagination-color: var(--ink); --bs-pagination-active-bg: var(--ink); --bs-pagination-active-border-color: var(--ink); --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(134,167,187,.3); }

/* ---------- Genealogy ---------- */
.tree-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tree-toolbar .search-pill { min-width: 220px; flex: 1; max-width: 360px; }
.tree-toolbar .form-select { width: auto; border-radius: 999px; }
.tree-search-results {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.tree-search-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.tree-search-results button:hover { background: var(--sky); }
.tree-search-results small { color: var(--muted); margin-left: 6px; }
.tree-stage {
    position: relative; background: #f6f7f8; border: 1px solid var(--line); border-radius: 10px;
    height: calc(100vh - 290px); min-height: 460px; overflow: hidden; cursor: grab; touch-action: none;
}
.tree-stage.dragging { cursor: grabbing; }
.tree-stage svg { display: block; width: 100%; height: 100%; user-select: none; }
.tree-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: .85rem; color: var(--ink-2); }
.tree-legend i { display: inline-block; width: 26px; height: 12px; border-radius: 6px; vertical-align: -1px; margin-right: 6px; border: 1px solid rgba(0,0,0,.2); }
.tree-status { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 6px; font-size: .88rem; color: var(--muted); }
.tree-status strong { color: var(--ink); font-weight: 500; }

/* ---------- Language switch ---------- */
.lang-switch { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; font-size: .74rem; line-height: 1; }
.lang-switch a { padding: 4px 8px; text-decoration: none; color: var(--ink); letter-spacing: .04em; }
.lang-switch a.active { background: var(--ink); color: #fff; }
.lang-switch a:not(.active):hover { background: var(--sky); }
/* keep the end of the page reachable while the cookie banner is open */
body.has-cookie-banner { padding-bottom: 150px; }
@media (max-width: 767.98px) { body.has-cookie-banner { padding-bottom: 300px; } }
/* headings always use the ink colour, whatever Bootstrap build is loaded */
:root { --bs-heading-color: var(--ink); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 { color: var(--ink); }
@media (max-width: 575.98px) {
    .product-card .row-end .btn { width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
    .product-card .row-end .btn .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

.share-card { background: var(--sky); border-color: var(--sky-2); }
.req { color: var(--danger); font-weight: 500; }
@media (min-width: 992px) { .panel-menu-btn { visibility: hidden; } }   /* keeps the logo centred */

/* ---------- Partner page & bookings ---------- */
.partner-hero { padding: 12px 0 8px; }
.avatar-xl, .avatar-md {
    flex-shrink: 0; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--steel); color: #fff; letter-spacing: .04em;
}
.avatar-xl { width: 104px; height: 104px; font-size: 2.2rem; font-weight: 300; box-shadow: 0 0 0 6px var(--sky); }
.avatar-md { width: 52px; height: 52px; font-size: 1.1rem; }
.key-info { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.key-info li { display: flex; gap: 12px; align-items: center; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.key-info i { color: var(--steel-2); }
.booking-card { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: #fff; box-shadow: 0 10px 30px rgba(30, 50, 65, .06); }
.booking-card legend { font-size: .88rem; }
.partner-modal { border-radius: 18px; }
.find-partner { background: var(--soft-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.partner-pick { display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.partner-pick[hidden], #pcPickActions[hidden] { display: none !important; }
.menu-badge {
    display: inline-block; min-width: 20px; margin-left: auto; padding: 1px 7px; border-radius: 999px;
    background: var(--danger); color: #fff; font-size: .72rem; font-weight: 600; line-height: 1.5; text-align: center;
}
td .menu-badge, h2 .menu-badge { margin-left: 6px; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 520px; overflow-y: auto; padding: 4px; }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; background: var(--soft-2); border: 1px solid var(--line); }
.msg.mine { align-self: flex-end; background: var(--sky); border-color: var(--sky-2); border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-meta { font-size: .74rem; color: var(--muted); margin-bottom: 3px; }
.msg-body { font-size: .94rem; white-space: normal; }
.approve-only[hidden] { display: none; }

/* ---------- Genealogy tree (themed) ---------- */
.tree-stage {
    background-color: #fbfcfd;
    background-image: radial-gradient(#dfe4e8 1px, transparent 1px);
    background-size: 18px 18px;
    border-radius: 14px;
}
.tree-stage svg text { font-family: var(--bs-body-font-family); }
.tnode .pill { transition: filter .15s, stroke-width .15s; }
.tnode:hover .pill, .tnode:focus-visible .pill { filter: drop-shadow(0 4px 10px rgba(22, 22, 22, .14)); stroke-width: 1.6; }
.tnode:focus { outline: none; }
.tnode:focus-visible .pill { stroke: var(--steel-2); stroke-width: 2.5; }
.tree-legend i { border: 1px solid; border-radius: 7px; width: 28px; height: 13px; }
.tree-legend i.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--steel-2); border-color: var(--steel-2); vertical-align: 0; }
@media (min-width: 992px) { .area-shop .sheet { padding-left: 56px; padding-right: 56px; } }

/* ---------- Language menu ---------- */
.lang-btn {
    background: none; border: 1px solid var(--ink); border-radius: 999px;
    padding: 3px 10px; font-size: .78rem; letter-spacing: .04em; color: var(--ink); line-height: 1.4;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { background: var(--sky); }
.lang-btn::after { margin-left: .4em; vertical-align: .12em; }
.lang-menu .dropdown-menu { --bs-dropdown-link-active-bg: var(--ink); --bs-dropdown-link-active-color: #fff; border-radius: 12px; font-size: .92rem; min-width: 190px; padding: 6px; box-shadow: 0 10px 30px rgba(30, 50, 65, .12); border-color: var(--line); }
.lang-menu .dropdown-item { border-radius: 8px; padding: 6px 10px; }
.lang-menu .lang-code { display: inline-block; width: 30px; font-size: .74rem; color: var(--muted); letter-spacing: .04em; }
.lang-menu .dropdown-item.active .lang-code { color: rgba(255, 255, 255, .7); }
/* Thai and Cyrillic fall back to system fonts where Jost has no glyphs */
:lang(th) body, :lang(th) .btn { font-family: 'Jost', 'Noto Sans Thai', 'Leelawadee UI', 'Thonburi', system-ui, sans-serif; }
:lang(th) .display-title, :lang(th) .pdp-title, :lang(th) .panel-title { letter-spacing: 0; line-height: 1.25; }
