/* ==========================================================================
   STRUCTURE.CSS
   Pure spatial layout: display, position, sizing, spacing, overflow.
   No colours, fonts, borders, shadows or other visual properties —
   those belong in theme stylesheets loaded after this file.
   ========================================================================== */


/* --------------------------------------------------------------------------
   0. CUSTOM PROPERTIES (layout tokens)
   -------------------------------------------------------------------------- */
:root {
    /* spacing scale */
    --sp-2xs: 0.125rem;   /*  2px */
    --sp-xs:  0.25rem;    /*  4px */
    --sp-sm:  0.5rem;     /*  8px */
    --sp-md:  1rem;       /* 16px */
    --sp-lg:  1.5rem;     /* 24px */
    --sp-xl:  2rem;       /* 32px */
    --sp-2xl: 3rem;       /* 48px */
    --sp-3xl: 4rem;       /* 64px */

    /* container */
    --container-max: 75rem;             /* 1200px */
    --container-pad: var(--sp-md);

    /* header */
    --header-h: 3.5rem;                /* 56px */
}


/* --------------------------------------------------------------------------
   1. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

a {
    display: inline;
    text-decoration: none;
}


/* --------------------------------------------------------------------------
   1b. PAGE-LEVEL LAYOUT  (sticky footer)
   -------------------------------------------------------------------------- */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.site-main {
    flex: 1 0 auto;
}

.site-header,
.site-footer,
.breadcrumbs {
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   2. SKIP LINK  (visible only on :focus for keyboard users)
   -------------------------------------------------------------------------- */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    z-index: 9999;
}

.skip-link:focus {
    position: fixed;
    top: 0;
    left: 0;
    width: auto;
    height: auto;
    clip: auto;
    overflow: visible;
    padding: var(--sp-sm) var(--sp-md);
    z-index: 9999;
}


/* --------------------------------------------------------------------------
   3. CONTAINER
   -------------------------------------------------------------------------- */
.site-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}


/* --------------------------------------------------------------------------
   4. SITE HEADER
   -------------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    min-height: var(--header-h);
}

.site-header__logo {
    flex-shrink: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-header__menu-toggle {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
}

/* Three-line icon built from a single span + pseudo-elements */
.site-header__menu-icon,
.site-header__menu-icon::before,
.site-header__menu-icon::after {
    display: block;
    width: 1.25rem;
    height: 2px;
    position: relative;
}

.site-header__menu-icon::before,
.site-header__menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: inherit;
    height: inherit;
}

.site-header__menu-icon::before { top: -6px; }
.site-header__menu-icon::after  { top:  6px; }


/* --------------------------------------------------------------------------
   5. SITE NAVIGATION  (mobile-first: off-canvas dropdown)
   -------------------------------------------------------------------------- */
.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 199;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
}

.site-nav.is-open {
    display: block;
}

.site-nav__list {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.site-nav__link {
    display: block;
    padding: var(--sp-sm) var(--container-pad);
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   6. BREADCRUMBS
   -------------------------------------------------------------------------- */
.breadcrumbs {
    padding-block: var(--sp-sm);
}

.breadcrumbs ol,
.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
    list-style: none;
}


/* --------------------------------------------------------------------------
   7. SITE MAIN
   -------------------------------------------------------------------------- */
.site-main {
    padding-top: var(--sp-xl);
    padding-bottom: var(--sp-3xl);
}


/* --------------------------------------------------------------------------
   8. HERO
   -------------------------------------------------------------------------- */
.hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-xl);
    margin-bottom: var(--sp-2xl);
}

.hero__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.hero__stat {
    display: flex;
    flex-direction: column;
    padding: var(--sp-xs) var(--sp-sm);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    padding-top: var(--sp-xs);
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm) var(--sp-lg);
    white-space: nowrap;
}

.hero__widget {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__image {
    display: none;
    position: relative;
    overflow: hidden;
}

.hero__products {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm);
}

.hero__products .product-card {
    flex-direction: column;
}

.hero__products .product-card__row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    flex: 1;
    padding: var(--sp-sm);
    gap: var(--sp-sm);
}

.hero__products .product-card__media {
    flex: 0 0 6rem;
    width: 6rem;
}

.hero__products .product-card__media img {
    height: 100%;
    aspect-ratio: auto;
}

.hero__products .product-card__body {
    flex: 1 1 auto;
    padding: 0;
}

.hero__products .product-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-sm);
    margin-top: auto;
}

.hero__products .product-card__info {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.hero__products .product-card__actions {
    padding: 0;
    flex-shrink: 0;
}

.hero__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* --------------------------------------------------------------------------
   9. NAVIGATION GRID (index page cards)
   -------------------------------------------------------------------------- */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-2xl);
}

.nav-grid__card {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md);
    min-width: 0;
}

.nav-grid__card-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-grid__card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
}

.nav-grid__card-body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2xs);
    min-width: 0;
}

.nav-grid__card-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-grid__card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-grid__card-count {
    flex-shrink: 0;
    align-self: center;
    margin-left: auto;
    padding: var(--sp-2xs) var(--sp-sm);
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   10. CONTENT SECTIONS
   -------------------------------------------------------------------------- */
.section {
    padding-block: var(--sp-xl);
}

.section__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-md);
    flex-wrap: wrap;
    margin-bottom: var(--sp-lg);
}

.section__prose {
    max-width: none;
}

.section__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    flex-wrap: wrap;
    margin-top: var(--sp-lg);
}


/* --------------------------------------------------------------------------
   11. PREVIEW GRID
   -------------------------------------------------------------------------- */
.preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
}

.preview-card {
    display: flex;
    flex-direction: column;
}

.preview-card__media {
    position: relative;
    overflow: hidden;
}

.preview-card__media img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3 / 2;
}

.preview-card--video .preview-card__media img {
    aspect-ratio: 16 / 9;
}

.preview-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    padding-block: var(--sp-sm);
    min-width: 0;
}

.preview-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* --------------------------------------------------------------------------
   12. DATA TABLE  (rates, comparisons)
   -------------------------------------------------------------------------- */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    min-width: 20rem;
}

.data-table th,
.data-table td {
    padding: var(--sp-sm) var(--sp-md);
    text-align: left;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   13. FEED LIST  (compact news list on index page)
   -------------------------------------------------------------------------- */
.feed-list {
    display: flex;
    flex-direction: column;
    list-style: none;
}

.feed-list__link {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2xs);
    padding-block: var(--sp-sm);
}


/* --------------------------------------------------------------------------
   14. FAQ LIST
   -------------------------------------------------------------------------- */
.faq-list {
    display: flex;
    flex-direction: column;
}

.faq-list__item {
    padding-block: var(--sp-md);
}

.faq-list__answer {
    padding-top: var(--sp-sm);
}


/* --------------------------------------------------------------------------
   15. LEAD-GEN CTA
   -------------------------------------------------------------------------- */
.lead-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--sp-md);
    padding: var(--sp-2xl) var(--sp-md);
}

.lead-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm) var(--sp-xl);
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   16. AD SLOTS
   -------------------------------------------------------------------------- */
.ad-slot {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    min-height: 5.625rem;
    margin-block: var(--sp-lg);
}

.ad-slot:empty {
    display: none;
}

/* ── Ad banner (rich affiliate ad) ── */
.ad-banner {
    display: block;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    margin-block: var(--sp-lg);
}

.ad-banner__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--sp-lg) var(--sp-xl);
    position: relative;
    z-index: 2;
    width: 60%;
}

.ad-banner__title {
    margin: 0 0 var(--sp-sm);
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
}

.ad-banner__subtitle {
    margin: 0 0 var(--sp-lg);
    font-size: 1.125rem;
    line-height: 1.5;
}

.ad-banner__cta {
    display: inline-block;
    align-self: flex-start;
    padding: 0.6em 1.75em;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md, 6px);
    white-space: nowrap;
}

.ad-banner__media {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 45%;
}

.ad-banner__media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ad-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right center;
}

@media (max-width: 599px) {
    .ad-banner__body { width: 65%; padding: var(--sp-md); }
    .ad-banner__media { width: 40%; }
    .ad-banner__title { font-size: 1.25rem; }
    .ad-banner__subtitle { font-size: 0.9375rem; }
}

/* --------------------------------------------------------------------------
   17. CONSENT BANNER
   -------------------------------------------------------------------------- */
.consent-banner {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1000;
}

/* Ensure [hidden] is never overridden by the flex/grid display rules */
.consent-banner[hidden],
.consent-banner__inner[hidden] {
    display: none;
}

.consent-banner__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    padding: var(--sp-lg) var(--container-pad);
}

.consent-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.consent-banner__btn {
    padding: var(--sp-sm) var(--sp-lg);
    white-space: nowrap;
}

/* Settings panel */
.consent-banner__options {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    padding-block: var(--sp-md);
}

.consent-banner__option-toggle {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    cursor: pointer;
}

.consent-banner__option-toggle input[type="checkbox"] {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
}

.consent-banner__option-toggle input:disabled {
    cursor: not-allowed;
}

.consent-banner__option-desc {
    padding-left: calc(1.125rem + var(--sp-sm));
}

.consent-banner__inner--settings .consent-banner__actions {
    padding-top: var(--sp-sm);
}


/* --------------------------------------------------------------------------
   18. SITE FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    padding-block: var(--sp-lg);
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.site-footer__list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm) var(--sp-md);
    list-style: none;
}


/* --------------------------------------------------------------------------
   19. WIDGETS (shared base for all interactive widgets)
   -------------------------------------------------------------------------- */
.widget {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    padding: var(--sp-lg);
    width: 100%;
}

.widget__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.widget__body[hidden],
.widget__result[hidden] {
    display: none;
}

.widget__fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-sm);
}

.widget__field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.widget__field input,
.widget__field select,
.calculator__field input,
.calculator__field select,
.attr-nav-mobile select,
.unit-category-inline {
    width: 100%;
    padding: var(--sp-sm) var(--sp-md);
    min-height: 2.5rem;
}

.widget__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm) var(--sp-lg);
    width: 100%;
    min-height: 2.5rem;
}

/* Result area */
.widget__result {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    padding: var(--sp-md);
}

.widget__result-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--sp-xs);
}

.widget__reset {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-xs) 0;
}

/* BMI meter */
.bmi-meter {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    padding-top: var(--sp-sm);
}

.bmi-meter__bar {
    position: relative;
    height: 0.5rem;
    overflow: visible;
}

.bmi-meter__marker {
    position: absolute;
    top: 50%;
    width: 0.875rem;
    height: 0.875rem;
    transform: translate(-50%, -50%);
}

.bmi-meter__labels {
    position: relative;
    height: 1.25rem;
}

.bmi-meter__labels span {
    position: absolute;
    transform: translateX(-50%);
}

/* ── Prose & structured content pages ────────────────────── */
.page-content__title {
    margin-bottom: var(--sp-xl);
}

/* ── FAQ ──────────────────────────────────────────────────── */
.faq {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.faq__q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.faq__q::-webkit-details-marker { display: none; }

.faq__a {
    padding: var(--sp-md) var(--sp-lg) var(--sp-lg);
}

/* ── Glossary ─────────────────────────────────────────────── */
.glossary {
    display: grid;
    grid-template-columns: minmax(10rem, max-content) 1fr;
}

.glossary__term,
.glossary__def {
    padding: var(--sp-sm) var(--sp-md);
}

/* ── Data table ───────────────────────────────────────────── */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: var(--sp-sm) var(--sp-md);
    text-align: left;
}

/* ── Content items (treatment, etc.) ─────────────────────── */
.content-items {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.content-item__title {
    margin-bottom: var(--sp-sm);
}

/* ── Symptom gateway widget ───────────────────────────────── */
.symptom-gw-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-sm) var(--sp-lg);
}

@media (max-width: 47.9375rem) {
    .symptom-gw-row {
        grid-template-columns: 1fr;
    }
}

.sgw-radios {
    display: flex;
    gap: var(--sp-md);
    align-items: center;
    min-height: 2.5rem;
}

.widget--symptom-gw .sc-radio,
.widget--symptom-gw .sc-checkbox {
    padding-top: 0;
    padding-bottom: 0;
}

/* ── Unit converter ───────────────────────────────────────── */

.widget__title-row {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
}

.widget__title-row .widget__title { flex: 1; }

.unit-category-inline { flex-shrink: 0; width: auto; }

/* Swap row: column on mobile, row on desktop */
.unit-swap-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

/* Mobile: label sits inline to the left of the select */
.unit-swap-row .widget__field {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-sm);
}

.unit-swap-row .widget__field label { flex-shrink: 0; min-width: 1.75rem; }
.unit-swap-row .widget__field select { flex: 1; min-width: 0; width: auto; }

.unit-swap-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    cursor: pointer;
    border: 1px solid;
    border-radius: var(--radius-md);
}

.unit-action-row {
    display: flex;
    align-items: flex-end;
    gap: var(--sp-sm);
}

.unit-action-row .widget__field,
.unit-calc-btn {
    flex: 0 0 calc(50% - var(--sp-sm) / 2);
    min-width: 0;
}

@media (min-width: 48rem) {
    /* Desktop: from / ⇄ / to in one row */
    .unit-swap-row {
        flex-direction: row;
        align-items: flex-end;
        gap: var(--sp-sm);
    }

    .unit-swap-row .widget__field {
        flex: 1;
        flex-direction: column;
        align-items: stretch;
        min-width: 0;
    }

    .unit-swap-row .widget__field label { min-width: unset; }
    .unit-swap-row .widget__field select { width: 100%; }

    .unit-swap-btn { align-self: auto; }

    .unit-category-inline { width: auto; }
}

@media (min-width: 24rem) {
    .widget__fields {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 47.9375rem) {
    .widget {
        padding: 0.75rem;
        gap: var(--sp-sm);
    }

    .widget__title,
    .widget__disclaimer {
        display: none;
    }

    .unit-category-inline {
        width: 100%;
    }

    /* Swap row on mobile: grid so ⇄ sits right of the From field */
    .unit-swap-row {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: var(--sp-xs);
    }

    .unit-swap-row .widget__field:first-child { grid-column: 1; grid-row: 1; min-width: 0; }
    .unit-swap-btn                            { grid-column: 2; grid-row: 1; align-self: center; }
    .unit-swap-row .widget__field:last-child  { grid-column: 1; grid-row: 2; min-width: 0; }
    .unit-swap-row .widget__field select      { width: 100%; min-width: 0; }
}


/* --------------------------------------------------------------------------
   20. PAGE HEADER  (shared by all sub-pages)
   -------------------------------------------------------------------------- */
.page-header {
    margin-bottom: var(--sp-xl);
}

.page-header__subtitle {
    margin-top: var(--sp-sm);
}

.page-header__desc {
    margin-top: var(--sp-sm);
    max-width: 65ch;
}

.page-header__count {
    margin-top: var(--sp-sm);
}


/* --------------------------------------------------------------------------
   21. PILL NAVIGATION  (category filter pills)
   -------------------------------------------------------------------------- */
.pill-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-xl);
}

.pill-nav__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-xs) var(--sp-md);
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   22. PRODUCT GRID
   -------------------------------------------------------------------------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}


/* --------------------------------------------------------------------------
   23. PRODUCT CARD
   -------------------------------------------------------------------------- */
.product-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-card__media {
    display: block;
    position: relative;
    overflow: hidden;
}

.product-card__media img {
    width: 100%;
    height: auto;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    flex: 1 0 auto;
    padding: var(--sp-sm) var(--sp-md);
    min-width: 0;
}

.product-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-width: 0;
}

.product-card__rating {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
    flex-wrap: wrap;
}

.product-card__stars {
    display: inline-flex;
    gap: 1px;
    flex-shrink: 0;
}

.product-card__actions {
    padding: 0 var(--sp-md) var(--sp-md);
}

.product-card__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-sm) var(--sp-md);
    width: 100%;
    min-height: 2.5rem;
    white-space: nowrap;
}


/* --------------------------------------------------------------------------
   24. EMPTY STATE
   -------------------------------------------------------------------------- */
.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--sp-3xl) var(--sp-md);
    text-align: center;
}

/* --------------------------------------------------------------------------
   25. NEWS PAGE
   -------------------------------------------------------------------------- */

/* ── Featured block ── */

.news-featured {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-2xl);
}

.news-featured__aside {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

/* ── Grid ── */

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
}

/* ── Card base (mobile: compact horizontal list item) ── */

.news-card {
    min-width: 0;
}

.news-card__link {
    display: flex;
    flex-direction: row;
    gap: var(--sp-md);
    width: 100%;
    min-width: 0;
}

.news-card__media {
    flex-shrink: 0;
    overflow: hidden;
    margin: 0;
    width: 8rem;
    aspect-ratio: 3 / 2;
}

.news-card__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2xs);
    min-width: 0;
    flex: 1;
    justify-content: center;
}

.news-card__title {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

/* ── Hero — always vertical ── */

.news-card--hero .news-card__link {
    flex-direction: column;
    gap: var(--sp-sm);
}

.news-card--hero .news-card__media {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.news-card--hero .news-card__title {
    -webkit-line-clamp: 4;
}

/* ── No-image fallback ── */

.news-card--no-image .news-card__link {
    gap: 0;
}


/* ── NEWS — Tablet  (≥ 48 rem) ──────────────────────────────── */

@media (min-width: 48rem) {

    .news-featured {
        display: grid;
        grid-template-columns: 3fr 2fr;
        align-items: start;
        gap: var(--sp-lg);
    }

    .news-card--side .news-card__media {
        width: 10rem;
    }

    /* grid: 2-column vertical cards */
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--sp-lg);
    }

    .news-card--grid {
        overflow: hidden;
    }

    .news-card--grid .news-card__link {
        flex-direction: column;
        gap: 0;
        height: 100%;              /* fill grid cell → body absorbs extra space */
    }

    .news-card--grid .news-card__media {
        width: 100%;
        aspect-ratio: 16 / 9;
        flex-shrink: 0;             /* image never collapses */
    }

    .news-card--grid .news-card__body {
        padding: var(--sp-sm) var(--sp-md) var(--sp-md);
    }

    .news-card--grid .news-card__title {
        -webkit-line-clamp: 3;
    }

    .news-card--no-image.news-card--grid .news-card__body {
        padding: var(--sp-xl);
    }
}


/* ── NEWS — Desktop  (≥ 64 rem) ─────────────────────────────── */

@media (min-width: 64rem) {

    .news-featured {
        grid-template-columns: 2fr 1fr;
    }

    /*
     * Side cards: vertical with fixed 2 : 1 image.
     * Two cards + gap ≈ hero height — no stretching needed.
     */
    .news-card--side {
        overflow: hidden;
    }

    .news-card--side .news-card__link {
        flex-direction: column;
        gap: 0;
    }

    .news-card--side .news-card__media {
        width: 100%;
        aspect-ratio: 2 / 1;
    }

    .news-card--side .news-card__body {
        padding: var(--sp-sm) var(--sp-md) var(--sp-md);
    }

    /* grid: 3 columns, dense packing */
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-auto-flow: dense;
    }

    /* wide card: horizontal, spans 2 columns */
    .news-card--wide {
        grid-column: span 2;
    }

    .news-card--wide .news-card__link {
        flex-direction: row;
        gap: 0;
        /* height: 100% inherited from --grid rule */
    }

    /*
     * Image stretches to fill the row height (flex cross-axis).
     * aspect-ratio: auto removes the base 3 : 2 so stretch is honoured.
     * min-height keeps the card sensible when it's alone in a row.
     */
    .news-card--wide .news-card__media {
        width: 40%;
        aspect-ratio: auto;
        min-height: 14rem;
    }

    .news-card--wide .news-card__body {
        padding: var(--sp-lg);
    }

    .news-card--wide .news-card__title {
        -webkit-line-clamp: 3;
    }

    /* no-image + wide: revert to single column */
    .news-card--no-image.news-card--wide {
        grid-column: span 1;
    }

    .news-card--no-image.news-card--wide .news-card__link {
        flex-direction: column;
    }

    .news-card--no-image.news-card--wide .news-card__body {
        padding: var(--sp-xl);
    }
}

/* ───────────────────────────────────────────────
   Map page – layout & box model
   ─────────────────────────────────────────────── */

.map-controls {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    padding: .75rem 0;
    align-items: center;
}

.map-controls__search {
    display: flex;
    flex: 1 1 260px;
}

.map-controls__input {
    flex: 1;
    padding: .5rem .75rem;
}

.map-controls__input:focus {
    z-index: 1;
}

.map-controls__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    flex-shrink: 0;
}

.map-controls__geo-btn {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem .75rem;
    white-space: nowrap;
}

.map-controls__geo-btn.is-loading {
    pointer-events: none;
}

.map-controls__filters {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    flex: 1 1 100%;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.map-controls__filters::-webkit-scrollbar {
    display: none;
}

.map-controls__chip {
    white-space: nowrap;
    padding: .375rem .75rem;
}

.map-embed {
    margin-top: .5rem;
    overflow: hidden;
}

.map-embed__frame {
    display: block;
    width: 100%;
    height: 450px;
    border: 0;
}

@media (min-width: 768px) {
    .map-embed__frame {
        height: 600px;
    }
}

.map-embed__prompt {
    padding: 1rem;
    text-align: center;
}

/* ==========================================================================
   RESPONSIVE — MOBILE  (< 48 rem / 768 px)
   ========================================================================== */
@media (max-width: 47.9375rem) {

    .product-grid {
        gap: var(--sp-sm);
    }

    .product-card__body {
        padding: var(--sp-xs) var(--sp-sm);
    }

    .product-card__actions {
        padding: 0 var(--sp-sm) var(--sp-sm);
    }

}


/* ==========================================================================
   RESPONSIVE — TABLET  (≥ 48 rem / 768 px)
   ========================================================================== */
@media (min-width: 48rem) {

    :root {
        --container-pad: var(--sp-lg);
    }

    /* ── header: inline nav, hide hamburger ── */
    .site-header__menu-toggle {
        display: none;
    }

    .site-nav {
        display: block;
        position: static;
        overflow-x: auto;
        overflow-y: visible;
        max-height: none;
        margin-left: auto;
    }

    .site-nav__list {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: var(--sp-2xs) var(--sp-xs);
    }

    .site-nav__link {
        padding: var(--sp-xs) var(--sp-sm);
    }

    /* ── product grid: 3 columns ── */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ================================================================
   SYMPTOM CHECKER — Structure (layout, spacing, display only)
   Prefix: sc-
   ================================================================ */

/* ── Wrapper ─────────────────────────────────────────────────── */
.sc {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

/* ── Header & progress ───────────────────────────────────────── */
.sc-header { margin-bottom: 1.5rem; }
.sc-title  { margin: 0 0 0.75rem; }
.sc-subtitle { margin: 2rem 0 0.75rem; }
.sc-instruction { margin-bottom: 1rem; }
.sc-hint { margin-bottom: 0.5rem; }

.sc-progress {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.sc-progress__dot {
    display: block;
    width: 10px;
    height: 10px;
    flex-shrink: 0;
}

/* ── Symptom tags ────────────────────────────────────────────── */
.sc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.sc-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem 0.3rem 0.75rem;
    line-height: 1.3;
}
.sc-tag__label { display: inline; }
.sc-tag__del   { display: inline-flex; margin: 0; padding: 0; }
.sc-tag__x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Emergency banner ────────────────────────────────────────── */
.sc-emergency {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.sc-emergency p { margin: 0 0 0.25rem; }
.sc-emergency p:last-of-type { margin-bottom: 0; }
.sc-emergency__item { margin: 0 0 0.5rem; }
.sc-emergency__actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ── Demographics — 3-column grid ────────────────────────────── */
.sc-demographics-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

/* ── Category grid ───────────────────────────────────────────── */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.sc-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}
.sc-grid__card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.5rem;
    text-align: center;
    text-decoration: none;
    min-height: 56px;
}
.sc-grid__label { display: block; }

/* ── Symptom selection list ──────────────────────────────────── */
.sc-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.5rem;
}
.sc-list__item-form { display: contents; }
.sc-list__item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    cursor: pointer;
    font: inherit;
    text-align: left;
}
.sc-list__label { flex: 1; min-width: 0; }
.sc-list__flag  { flex-shrink: 0; }

/* ── Forms ───────────────────────────────────────────────────── */
.sc-form { margin-bottom: 1.5rem; }

.sc-followup-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
    margin-bottom: var(--sp-lg);
}

.sc-field { margin-bottom: 0; }
.sc-field > label {
    display: block;
    margin-bottom: 0.4rem;
}

.sc-input {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font: inherit;
}

.sc-fieldset {
    margin: 0 0 1.25rem;
    padding: 1rem 1.25rem;
}
.sc-followup-grid .sc-fieldset { margin-bottom: 0; }
.sc-fieldset__legend { padding: 0 0.5rem; }

/* Radio / checkbox groups */
.sc-radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.sc-option-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.sc-radio,
.sc-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    cursor: pointer;
    line-height: 1;
}

.sc-radio input[type="radio"],
.sc-checkbox input[type="checkbox"] {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    align-self: center;
    position: relative;
    top: 0;
}

.sc-checkbox--standalone {
    padding: 0;
    margin-bottom: 0.25rem;
    display: flex !important;
}

/* ── Entry list (summary) ────────────────────────────────────── */
.sc-entry-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sc-entry { padding: 0.875rem 1rem; }
.sc-entry__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}
.sc-entry__del { display: inline; flex-shrink: 0; }
.sc-entry__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}
.sc-entry__chip { display: inline-block; padding: 0.15rem 0.5rem; }

/* ── Result cards ────────────────────────────────────────────── */
.sc-results {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.sc-result { padding: 1rem 1.25rem; }
.sc-result__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.sc-result__name   { margin: 0; flex: 1; min-width: 0; }
.sc-result__badge  { flex-shrink: 0; padding: 0.2rem 0.6rem; white-space: nowrap; }
.sc-result__meta   { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.sc-result__details { margin: 0.75rem 0; }
.sc-result__details summary { cursor: pointer; padding: 0.25rem 0; }
.sc-result__action  { margin: 0.75rem 0 0; padding-top: 0.75rem; }

/* ── Text list (replaces unicode bullets everywhere) ─────────── */
.sc-text-list {
    margin: 0.35rem 0 0.5rem 0;
    padding-left: 1.25rem;
    list-style: disc;
}
.sc-text-list li { padding: 0.2rem 0; }

/* ── Fallback info (neutral box, shown after results) ────────── */
.sc-fallback-info { padding: 1.25rem; margin-bottom: 1.5rem; }
.sc-fallback-info__msg { margin: 0 0 0.75rem; }
.sc-fallback-info__heading { margin: 0.75rem 0 0.25rem; }
.sc-fallback-info__selfcare {
    margin-top: 1rem;
    padding-top: 1rem;
}
.sc-fallback-info__selfcare h3 { margin: 0 0 0.5rem; }
.sc-fallback-info__selfcare-body { margin: 0; }
.sc-fallback-info__selfcare-body p { margin: 0 0 0.25rem; }

/* ── Buttons ─────────────────────────────────────────────────── */
.sc-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.25rem;
}
.sc-actions__start {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.sc-actions__end {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.sc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1.5rem;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    min-height: 42px;
    border: 1px solid transparent;
}
.sc-btn--primary { min-width: 120px; }
.sc-btn--sm      { padding: 0.25rem 0.75rem; min-height: 0; }
.sc-btn--icon    {
    padding: 0.2rem 0.4rem;
    min-height: 0;
    border: none;
    background: none;
    cursor: pointer;
    line-height: 1;
}

/* ── Disclaimer ──────────────────────────────────────────────── */
.sc-disclaimer {
    margin-top: 2rem;
    padding: 0.75rem 1rem;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (min-width: 641px) {
    .sc-followup-grid {
        grid-template-columns: 1fr 1fr;
    }
    .sc-followup-grid .sc-fieldset,
    .sc-followup-wide {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .sc {
        padding-top: 1rem;
        padding-bottom: 2rem;
    }

    /* Demographics stacks vertically on mobile */
    .sc-demographics-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Category grid → 2 columns on mobile */
    .sc-grid--compact {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    /* Actions stack vertically, full width */
    .sc-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .sc-actions__start,
    .sc-actions__end {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }
    /* Primary action on top on mobile */
    .sc-actions__end {
        order: -1;
    }

    /* All buttons full width on mobile */
    .sc-btn {
        width: 100%;
        justify-content: center;
    }
    /* Except small/icon variants */
    .sc-btn--sm,
    .sc-btn--icon {
        width: auto;
    }

    .sc-result__head {
        flex-direction: column;
        gap: 0.35rem;
    }
    .sc-radio-group {
        flex-direction: column;
        gap: 0;
    }
    .sc-fieldset { padding: 0.75rem 1rem; }
    .sc-list__item { padding: 0.625rem 0.75rem; }

    /* Forms inside action rows must also stretch */
    .sc-actions__start form,
    .sc-actions__end form {
        width: 100%;
    }
}


/* =============================================
   Videos page – structural rules
   ============================================= */

/* ── Grid ── */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: var(--grid-gap, 1.5rem);
}

.video-grid > .ad-slot--in-grid {
    grid-column: 1 / -1;
}

/* ── Card ── */

.video-card__player {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-card__thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card__play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-card__play-icon {
    width: 48px;
    height: 48px;
}

.video-card__body {
    padding: 0.75rem 0 0.25rem;
}

.video-card__title {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card__meta {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
}

/* ── Overlay – layout ── */

.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-overlay[hidden] {
    display: none;
}

.video-overlay__backdrop {
    position: absolute;
    inset: 0;
}

.video-overlay__wrap {
    position: relative;
    width: 100%;
    max-width: 960px;
}

.video-overlay__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.75rem;
}

.video-overlay__title {
    min-width: 0;              /* allow flex child to shrink */
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-overlay__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
}

.video-overlay__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.video-overlay__player iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-overlay__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    font-size: 0.85rem;
}

.video-overlay__channel {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-overlay__yt-link {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}


/* ==========================================================================
   RESPONSIVE — DESKTOP  (≥ 64 rem / 1024 px)
   ========================================================================== */
@media (min-width: 64rem) {

    /* ── hero: two-column when widget, image, or products are present ── */
    .hero--with-widget,
    .hero--with-image,
    .hero--with-products {
        grid-template-columns: 1fr 1fr;
        align-items: stretch;
    }

    .hero__image {
        display: block;
    }

    .hero__products {
        display: flex;
    }

    /* ── nav grid: 3 columns ── */
    .nav-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ── preview grid: 3 columns ── */
    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* ── product grid: 4 columns ── */
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ==========================================================================
   RESPONSIVE — WIDE  (≥ 80 rem / 1280 px)
   ========================================================================== */
@media (min-width: 80rem) {

    /* ── nav grid: 4 columns for large page counts ── */
    .nav-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    /* ── product grid: 5 columns ── */
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* --------------------------------------------------------------------------
   RATES TABLE — sortable headers & mobile overflow
   -------------------------------------------------------------------------- */
th[data-sort] { cursor: pointer; user-select: none; }

@media (max-width: 599px) {
    #rates-table { table-layout: fixed; }
    #rates-table th:nth-child(1),
    #rates-table td:nth-child(1) { width: 4.5rem; }
    #rates-table th:nth-child(3),
    #rates-table td:nth-child(3) { width: 5.5rem; }
    #rates-table td:nth-child(2) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 0;
    }
}

/* --------------------------------------------------------------------------
   RATE CARDS (index page preview)
   -------------------------------------------------------------------------- */
.rate-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--sp-md);
}

.rate-card {
    flex: 0 1 10rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--sp-md);
    text-align: center;
}

.rate-card__code  { font-weight: 700; font-size: 1.125rem; }
.rate-card__value { font-size: 1rem; margin-top: var(--sp-xs); }
.rate-card__name  { font-size: 0.75rem; margin-top: var(--sp-xs); }

@media (max-width: 599px) {
    .rate-card { flex-basis: calc(50% - var(--sp-md)); }
}

/* --------------------------------------------------------------------------
   WEATHER WIDGET (index page)
   -------------------------------------------------------------------------- */
.wx-widget__current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-md);
    margin-bottom: var(--sp-sm);
}

.wx-widget__left {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-top: var(--sp-sm);
}

.wx-widget__mini-forecast {
    display: flex;
    gap: var(--sp-md);
}

.wx-widget__mini-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15em;
    font-size: 0.8125rem;
    min-width: 3.5rem;
}

.wx-widget__mini-label { font-weight: 600; }
.wx-widget__mini-temps { white-space: nowrap; }
.wx-widget__mini-temps span { opacity: 0.6; }

@media (max-width: 599px) {
    .wx-widget__mini-day:last-child { display: none; }
}

.wx-widget__temp { display: flex; flex-direction: column; }
.wx-widget__value { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.wx-widget__cond  { font-size: 0.875rem; margin-top: 0.15em; }

.wx-widget__details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15em var(--sp-md);
    font-size: 0.8125rem;
}

.wx-widget__more {
    display: inline-flex;
    text-align: center;
}

/* --------------------------------------------------------------------------
   WEATHER
   -------------------------------------------------------------------------- */
.wx-section__title { margin-bottom: var(--sp-md); }

/* ── Current ── */
.wx-current       { margin-bottom: var(--sp-xl); }
.wx-current__main {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    margin-bottom: var(--sp-md);
}
.wx-current__icon  { flex-shrink: 0; }
.wx-current__temp  { display: flex; flex-direction: column; }
.wx-current__value { font-size: 2.5rem; font-weight: 700; line-height: 1; }
.wx-current__condition { font-size: 1.125rem; margin-top: var(--sp-xs); }
.wx-current__feels     { font-size: 0.875rem; margin-top: var(--sp-xs); }

.wx-details {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: var(--sp-sm);
    margin-bottom: var(--sp-md);
    min-width: max-content;
}

.wx-current {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wx-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--sp-sm);
    gap: var(--sp-xs);
}

.wx-detail__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.wx-wind-arrow { vertical-align: middle; display: inline-block; opacity: 0.6; }
.wx-detail__value { font-size: 1rem; font-weight: 600; }

.wx-astro {
    display: flex;
    gap: var(--sp-lg);
}

/* ── Hourly ── */
.wx-hourly       { margin-bottom: var(--sp-xl); overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--sp-sm); }
.wx-hourly__scroll {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--sp-sm);
    min-width: max-content;
}

.wx-hour-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    padding: var(--sp-sm) var(--sp-xs);
    flex: 0 0 auto;
    min-width: 4rem;
}

.wx-hour-card__time { font-size: 0.8125rem; font-weight: 600; }
.wx-hour-card__temp { font-size: 1rem; font-weight: 700; }
.wx-hour-card__wind { font-size: 0.75rem; }
.wx-hour-card__rain { font-size: 0.75rem; }

/* ── Daily ── */
.wx-daily       { margin-bottom: var(--sp-xl); }
.wx-daily__list { display: flex; flex-direction: column; gap: var(--sp-xs); }

.wx-day-row {
    display: grid;
    grid-template-columns: 1fr 2.5rem 5rem 5rem;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm);
}

.wx-day-row__date      { font-weight: 600; font-size: 0.875rem; }
.wx-day-row__condition  { font-size: 0.8125rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wx-day-row__temps     { display: flex; align-items: baseline; gap: 0.2em; font-size: 0.875rem; white-space: nowrap; }
.wx-day-row__max       { font-weight: 700; }
.wx-day-row__sep       { font-weight: 400; }
.wx-day-row__min       { font-weight: 400; font-size: 0.8125rem; }
.wx-day-row__wind      { font-size: 0.8125rem; white-space: nowrap; text-align: right; }
.wx-day-row__rain      { font-size: 0.8125rem; white-space: nowrap; }

@media (max-width: 599px) {
    .wx-day-row {
        grid-template-columns: 1fr 2.5rem auto;
    }
    .wx-day-row__condition,
    .wx-day-row__wind,
    .wx-day-row__rain { display: none; }
}

@media (min-width: 600px) {
    .wx-day-row {
        grid-template-columns: 10rem 2.5rem 1fr 7rem 6rem 7rem;
    }
}

/* --------------------------------------------------------------------------
   ACCOMMODATION
   -------------------------------------------------------------------------- */
.acc-category       { margin-bottom: var(--sp-xl); }
.acc-category__title { margin-bottom: var(--sp-md); }

.acc-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--sp-md);
}

@media (min-width: 480px)  { .acc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px)  { .acc-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .acc-grid { grid-template-columns: repeat(4, 1fr); } }

.acc-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.acc-card__media {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.acc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.acc-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    padding: var(--sp-md);
    flex: 1;
}

.acc-card__name { margin: 0; font-size: 1rem; }

.acc-card__meta {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-wrap: wrap;
}

.acc-card__stars { font-size: 0.875rem; letter-spacing: 0.05em; }

.acc-card__pill {
    display: inline-block;
    padding: 0.1em 0.5em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.acc-card__address { margin: 0; font-size: 0.8125rem; }

.acc-card__actions {
    display: flex;
    justify-content: space-between;
    gap: var(--sp-sm);
    margin-top: auto;
    padding-top: var(--sp-sm);
}

.acc-card__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.35em 0.75em;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm, 4px);
    text-decoration: none;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   ATTRACTIONS
   -------------------------------------------------------------------------- */
.attr-summary     { display: none; }
@media (min-width: 600px) { .attr-summary { display: block; } }

.attr-nav-mobile  { margin-bottom: var(--sp-md); }
.attr-nav-mobile select { width: 100%; }
.attr-nav-desktop { display: none; }

@media (min-width: 600px) {
    .attr-nav-mobile  { display: none; }
    .attr-nav-desktop { display: flex; }
}

.attr-category       { margin-bottom: var(--sp-xl); }
.attr-category__title { margin-bottom: var(--sp-md); }

.attr-list { display: grid; grid-template-columns: 1fr; gap: var(--sp-md); }

@media (min-width: 600px) {
    .attr-list { grid-template-columns: 1fr 1fr; }
}

.attr-card { padding: var(--sp-md); }

.attr-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-sm);
    flex-wrap: wrap;
    margin-bottom: var(--sp-sm);
}

.attr-card__name { margin: 0; font-size: 1.125rem; }

.attr-card__sig {
    flex-shrink: 0;
    padding: 0.15em 0.6em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 999px;
    white-space: nowrap;
}

.attr-card__desc { margin: 0 0 var(--sp-sm); }
.attr-card__hint { margin: 0 0 var(--sp-sm); font-size: 0.875rem; display: none; }

@media (min-width: 600px) {
    .attr-card__hint { display: block; }
}

.attr-card__location {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    flex-wrap: wrap;
    margin-bottom: var(--sp-sm);
    font-size: 0.875rem;
}

.attr-card__map-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.3em 0.75em;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm, 4px);
    text-decoration: none;
    white-space: nowrap;
}

.attr-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-xs);
}

.attr-tag {
    display: inline-block;
    padding: 0.15em 0.5em;
    font-size: 0.75rem;
    border-radius: var(--radius-sm, 4px);
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   GALLERY
   -------------------------------------------------------------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: var(--sp-sm);
}

.gallery-thumb {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── Overlay ── */
.gallery-overlay[hidden] { display: none; }

.gallery-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-overlay__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery-overlay__image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.gallery-overlay__info {
    width: 100%;
    padding: var(--sp-sm) 0;
    text-align: center;
}

.gallery-overlay__close,
.gallery-overlay__prev,
.gallery-overlay__next {
    position: fixed;
    z-index: 1001;
    border: none;
    background: none;
    cursor: pointer;
    padding: var(--sp-sm);
    line-height: 1;
}

.gallery-overlay__close { top: var(--sp-md); right: var(--sp-md); font-size: 2rem; }
.gallery-overlay__prev  { left: var(--sp-md); top: 50%; transform: translateY(-50%); font-size: 3rem; }
.gallery-overlay__next  { right: var(--sp-md); top: 50%; transform: translateY(-50%); font-size: 3rem; }

.gallery-overlay__desc   { margin: 0 0 var(--sp-xs); }
.gallery-overlay__credit { margin: 0; font-size: 0.8125rem; }

/* --------------------------------------------------------------------------
   CALCULATOR PAGE
   -------------------------------------------------------------------------- */
.calculator { max-width: 32rem; margin-left: auto; margin-right: auto; }

.calculator__form    { display: flex; flex-direction: column; gap: var(--sp-md); }
.calculator__row     { display: flex; flex-direction: column; gap: var(--sp-sm); }
.calculator__row--pair {
    display: flex;
    flex-direction: column;
    gap: var(--sp-sm);
    align-items: stretch;
}

.calculator__field        { display: flex; flex-direction: column; gap: var(--sp-xs); flex: 1; min-width: 0; }
.calculator__field select,
.calculator__field input  { width: 100%; }

.calculator__swap {
    flex-shrink: 0;
    align-self: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
}

.calculator__btn {
    align-self: flex-start;
    padding: var(--sp-sm) var(--sp-lg);
    min-height: 2.5rem;
    cursor: pointer;
}

.calculator__result       { display: flex; flex-direction: column; gap: var(--sp-sm); }
.calculator__result-line  { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-xs); }
.calculator__result-value { font-size: 1.5rem; font-weight: 700; }

.calculator__reset {
    align-self: flex-start;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--sp-xs) 0;
}

.calculator__rate-info  { margin: 0; }
.calculator__disclaimer { margin-top: var(--sp-md); }
.calculator__meta       { margin-top: var(--sp-sm); }

@media (min-width: 600px) {
    .calculator__row--pair {
        flex-direction: row;
        align-items: flex-end;
        gap: var(--sp-md);
    }
}