/*
 * Galera — shared UI components: buttons, icons, promo bar
 */

/* ── Icon ───────────────────────────────────────────────────────────────── */
.icon {
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}

/* ── Button ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover        { background: var(--color-primary-dark); color: #FFF; }
.btn:disabled     { opacity: .5; cursor: not-allowed; }

.btn--outline     { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary); color: #FFF; }

.btn--light       { background: #FFF; color: var(--color-primary); }
.btn--light:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }

.btn--sm          { padding: 10px 18px; font-size: 14px; }
.btn--full        { width: 100%; }

/* ── Promo bar ──────────────────────────────────────────────────────────── */
.promo {
    background: var(--color-primary);
    color: #FFF;
    font-size: 13px;
    letter-spacing: .01em;
}

.promo__inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 38px;
    position: relative;
    padding-right: 48px;
}

.promo__text {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 0;
    text-align: center;
}

.promo__icon { opacity: .9; }

.promo__link { text-decoration: underline; text-underline-offset: 3px; }
.promo__link:hover { opacity: .85; }

.promo__close {
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #FFF;
    cursor: pointer;
    transition: background var(--transition);
}

.promo__close:hover { background: rgba(255, 255, 255, .3); }

/* ── Icon button ────────────────────────────────────────────────────────── */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: #FFF;
    color: var(--color-navy);
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.icon-btn:hover                 { border-color: var(--color-primary); color: var(--color-primary); }
.icon-btn[aria-expanded="true"] { border-color: var(--color-primary); background: var(--color-primary); color: #FFF; }

/* ── Search ─────────────────────────────────────────────────────────────── */
.search { position: relative; }

.search__form {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: #FFF;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.search__form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-soft);
}

.search__icon { color: var(--color-muted); }

.search__field {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 16px;
    color: var(--color-text);
}

.search__field::placeholder { color: var(--color-muted); }
.search__field:focus        { outline: none; }
.search__field::-webkit-search-cancel-button { display: none; }

.search__clear {
    display: inline-flex;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-muted);
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.search__clear:hover { background: var(--color-border); color: var(--color-text); }

.search__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 12px 28px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition);
}

.search__submit:hover { background: var(--color-primary-dark); }

.search__submit-icon { display: none; }

/* Results */
.search__results {
    margin-top: 16px;
    max-height: min(56vh, 480px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.search__status {
    margin: 0;
    padding: 14px 4px;
    color: var(--color-muted);
    font-size: 15px;
}

.search__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.search__item { border-bottom: 1px solid var(--color-border); }
.search__item:last-child { border-bottom: 0; }

.search__link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 12px;
    border-radius: var(--radius);
    transition: background var(--transition);
}

.search__link:hover,
.search__link:focus-visible { background: var(--color-primary-soft); }

/* Most product shots are cut out on white — without a tinted plate a light
   boot is invisible in the list. */
.search__thumb {
    flex: 0 0 auto;
    width: 64px;
    height: 64px;
    padding: 4px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #F1EFF5;
    object-fit: contain;
}

.search__name {
    font-size: 15px;
    line-height: 1.35;
    color: var(--color-text);
}

.search__more {
    display: block;
    margin-top: 8px;
    padding: 14px;
    border-radius: var(--radius);
    background: var(--color-bg-alt);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.search__more:hover { background: var(--color-primary-soft); }

@media (max-width: 767px) {
    .promo { font-size: 13px; }
    .promo__text { text-align: left; }
    .search__form   { gap: 6px; padding: 5px 5px 5px 14px; }
    .search__submit { padding: 11px 18px; font-size: 14px; }
    .search__field  { font-size: 15px; }
    .search__thumb  { width: 56px; height: 56px; }
}

/* On narrow phones the label eats the input — the button becomes an icon. */
@media (max-width: 479px) {
    .search__form         { padding-left: 8px; }
    .search__icon         { display: none; }
    .search__submit       { width: 42px; height: 42px; padding: 0; }
    .search__submit-icon  { display: block; }
    .search__submit-text  {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }
}

/* ── Breadcrumbs ────────────────────────────────────────────────────────── */
.breadcrumbs { font-size: 14px; }

.breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumbs__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-muted);
}

/* Separator belongs to the item that follows another one. */
.breadcrumbs__item + .breadcrumbs__item::before {
    content: '';
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-top: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: .6;
}

.breadcrumbs__link:hover { color: var(--color-primary); }
.breadcrumbs__current    { color: var(--color-navy); }

/* Yoast prints its own markup inside .breadcrumbs */
.breadcrumbs__inner { color: var(--color-muted); }

/* ── Page hero ──────────────────────────────────────────────────────────── */
.page-hero {
    padding: 28px 0 44px;
    background:
        radial-gradient(80% 140% at 90% 0%, #EFE6F7 0%, rgba(239, 230, 247, 0) 60%),
        var(--color-bg);
}

.page-hero__inner {
    display: flex;
    align-items: center;
    gap: 56px;
}

.page-hero__content { flex: 1 1 560px; min-width: 0; }

/* Without an image the copy would leave half the row empty, so the title and
   the intro sit side by side instead. */
.page-hero--plain .page-hero__content {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    align-items: end;
    gap: 16px 56px;
    width: 100%;
}

.page-hero--plain .breadcrumbs { grid-column: 1 / -1; }

.page-hero--plain .page-hero__text { margin-top: 0; }

.page-hero__title {
    margin: 18px 0 0;
    font-size: 40px;
    line-height: 1.15;
}

.page-hero__text {
    margin: 18px 0 0;
    max-width: 58ch;
    font-size: 17px;
    color: var(--color-muted);
}

.page-hero__media {
    flex: 0 1 460px;
    margin: 0;
}

.page-hero__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

@media (max-width: 1023px) {
    .page-hero        { padding: 20px 0 32px; }
    .page-hero__inner { flex-direction: column; align-items: flex-start; gap: 28px; }
    .page-hero__content,
    .page-hero__media { flex: 0 1 auto; width: 100%; }
    .page-hero--plain .page-hero__content { grid-template-columns: 1fr; gap: 12px; }
    .page-hero__title { font-size: 32px; }
}

@media (max-width: 767px) {
    .page-hero__title { font-size: 26px; }
    .page-hero__text  { font-size: 16px; }
}

/* ── Numbers ────────────────────────────────────────────────────────────── */
.numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0;
}

.numbers__item {
    flex: 1 1 calc(50% - 16px);
    padding: 22px 20px;
    border-radius: var(--radius);
    background: #FFF;
    box-shadow: var(--shadow-soft);
}

.numbers__value {
    font-family: var(--font-heading);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-primary);
}

.numbers__label {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

/* Two per row down to a phone: one per row left the value alone on a wide
   line with nothing beside it. */
@media (max-width: 767px) {
    .numbers__item  { flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); padding: 18px; }
    .numbers__value { font-size: 26px; }
}

@media (max-width: 479px) {
    .numbers__item  { flex: 1 1 100%; max-width: 100%; }
}

/* ── Wholesale ──────────────────────────────────────────────────────────── */
/* The page is light throughout, so the block is a card on a light section:
   colour is spent only on the panel that carries the price and the action. */
.wholesale {
    padding: 72px 0;
    background: var(--color-bg-alt);
}

/* The card is a separate element inside .container: the container's own
   padding used to cut the coloured panel off the right edge. */
.wholesale__inner {
    display: flex;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: calc(var(--radius) + 6px);
    background: #FFF;
    box-shadow: var(--shadow);
}

.wholesale__content {
    flex: 1 1 560px;
    min-width: 0;
    padding: 44px 48px;
}

.wholesale__eyebrow {
    margin: 0 0 10px;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.wholesale__title {
    margin: 0;
    color: var(--color-navy);
    font-size: 32px;
    line-height: 1.15;
}

.wholesale__text {
    margin: 14px 0 0;
    max-width: 46ch;
    color: var(--color-muted);
}

.wholesale__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.wholesale__item {
    position: relative;
    padding-left: 30px;
    color: var(--color-text);
}

.wholesale__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 19px;
    height: 19px;
    border-radius: 50%;
    background: var(--color-primary-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23662C8D' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 12.5 9.5 18 20 6.5'/%3E%3C/svg%3E") center / 11px no-repeat;
}

/* ── Offer panel ────────────────────────────────────────────────────────── */
.wholesale__offer {
    display: flex;
    flex: 0 1 380px;
    flex-direction: column;
    align-items: stretch;
    padding: 40px;
    background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: rgba(255, 255, 255, .78);
}

.wholesale__offer-title {
    margin: 0 0 14px;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: #FFF;
}

.wholesale__offer-text {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, .62);
    font-size: 14px;
}

.tiers { margin: 0 0 18px; }

.tiers__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.tiers__qty {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, .85);
}

.tiers__value {
    margin: 0;
    text-align: right;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #FFF;
}

.tiers__note {
    display: block;
    color: rgba(255, 255, 255, .6);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 400;
}

.wholesale__note {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
}

.wholesale__cta {
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: #FFF;
    color: var(--color-primary);
    font-size: 19px;
}

.wholesale__cta:hover { background: var(--color-primary-soft); color: var(--color-primary-dark); }

.wholesale__messenger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: var(--radius-pill);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    transition: border-color var(--transition), background var(--transition);
}

.wholesale__messenger:hover { border-color: #FFF; background: rgba(255, 255, 255, .1); }

.wholesale__manager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
}

.wholesale__manager::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #7CD992;
    box-shadow: 0 0 0 3px rgba(124, 217, 146, .25);
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
/* Built on <details>: the answers stay in the HTML for crawlers that do not
   click. `[open]` is the element's own state, so it drives the arrow. */
.faq__inner {
    display: flex;
    align-items: flex-start;
    gap: 64px;
}

.faq__aside {
    flex: 0 1 320px;
    position: sticky;
    top: calc(var(--header-height) + 24px);
}

.faq__note {
    margin: 16px 0 0;
    color: var(--color-muted);
    font-size: 15px;
}

.faq__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 700;
    color: var(--color-primary);
}

.faq__phone:hover { color: var(--color-primary-dark); }

.faq__list {
    flex: 1 1 auto;
    min-width: 0;
    border-top: 1px solid var(--color-border);
}

.faq__item { border-bottom: 1px solid var(--color-border); }

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 0;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 600;
    color: var(--color-navy);
    cursor: pointer;
    list-style: none;
}

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

.faq__question::after {
    content: '';
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    transform: translateY(-3px) rotate(45deg);
    transition: transform var(--transition);
}

.faq__item[open] .faq__question::after { transform: translateY(2px) rotate(-135deg); }

.faq__answer {
    padding: 0 0 22px;
    max-width: 70ch;
    color: var(--color-muted);
}

/* Answers come from the editor, so they carry no classes of their own. */
.faq__answer p { margin: 0 0 12px; }

/* ── SEO text ───────────────────────────────────────────────────────────── */
.seo-text { padding-bottom: 72px; }

.seo-text__body {
    margin-top: 20px;
    column-count: 2;
    column-gap: 56px;
    color: var(--color-muted);
}

/* Editor content — no classes available. */
.seo-text__body p { margin: 0 0 14px; break-inside: avoid; }

.faq,
.seo-text { padding: 72px 0; }

.faq__title,
.seo-text__title { margin: 0; }

@media (max-width: 1199px) {
    .wholesale__inner   { flex-direction: column; }
    .wholesale__content { flex: 0 1 auto; padding: 36px 32px; }
    .wholesale__offer   { flex: 0 1 auto; padding: 32px; }
}

@media (max-width: 1023px) {
    .faq,
    .seo-text         { padding: 52px 0; }
    .wholesale        { padding: 52px 0; }
    .faq__inner       { flex-direction: column; gap: 24px; }
    .faq__aside       { position: static; flex: 0 1 auto; }
    .seo-text__body   { column-count: 1; }
}

@media (max-width: 767px) {
    .faq,
    .seo-text         { padding: 40px 0; }
    .wholesale__title   { font-size: 24px; }
    .wholesale__content { padding: 28px 22px; }
    .wholesale__offer   { padding: 28px 22px; }
    .wholesale__cta     { font-size: 17px; }
}

/* ── Messengers ─────────────────────────────────────────────────────────── */
.messengers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.messengers__item { flex: 0 1 auto; }

.messengers__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: #FFF;
    color: var(--color-navy);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    transition: border-color var(--transition), color var(--transition);
}

.messengers__link:hover { border-color: var(--color-primary); color: var(--color-primary); }

/* ── JetFormBuilder ─────────────────────────────────────────────────────── */
/* The plugin ships its own stylesheet; these rules bring it to theme tokens. */
.jet-fb-form-block {
    padding: 32px;
    border-radius: var(--radius);
    background: #FFF;
    /* The card is always light — it may sit inside a dark section. */
    color: var(--color-text);
    box-shadow: var(--shadow);
}

.jet-form-builder .jet-form-builder-row { margin-bottom: 18px; }
.jet-form-builder .jet-form-builder-row:last-of-type { margin-bottom: 0; }

.jet-form-builder .jet-form-builder__label {
    margin-bottom: 7px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-navy);
}

.jet-form-builder .jet-form-builder__required { color: var(--color-sale); }

.jet-form-builder .jet-form-builder__field:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.4;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.jet-form-builder .jet-form-builder__field::placeholder { color: var(--color-muted); }

.jet-form-builder .jet-form-builder__field:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: var(--focus-ring);
}

/* ── Checkbox and radio rows ────────────────────────────────────────────── */
.jet-form-builder .jet-form-builder__fields-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.jet-form-builder .jet-form-builder__field-label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    font-size: 15px;
    cursor: pointer;
}

/* The plugin hides the native input and draws its own box — leave its
   geometry alone and only set the brand colour. */
.jet-form-builder .jet-form-builder__field[type="checkbox"],
.jet-form-builder .jet-form-builder__field[type="radio"] {
    accent-color: var(--color-primary);
    cursor: pointer;
}

.jet-form-builder textarea.jet-form-builder__field {
    min-height: 130px;
    resize: vertical;
}

.jet-form-builder .jet-form-builder__field.hidden-field { display: none; }

.jet-form-builder .jet-form-builder__action-button,
.jet-form-builder button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 6px;
    padding: 15px 28px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--transition);
}

.jet-form-builder .jet-form-builder__action-button:hover,
.jet-form-builder button[type="submit"]:hover { background: var(--color-primary-dark); }

.jet-form-builder .jet-form-builder__fields-error,
.jet-form-builder .field-has-error .jet-form-builder__field { border-color: var(--color-sale); }

.jet-form-builder .jet-form-builder__fields-error-label {
    margin-top: 6px;
    color: var(--color-sale);
    font-size: 14px;
}

.jet-form-builder-messages-wrap:empty { display: none; }

.jet-form-builder-messages-wrap {
    margin: 18px 0 0;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-soft);
    color: var(--color-navy);
    font-size: 15px;
}

@media (max-width: 767px) {
    .jet-fb-form-block { padding: 22px 18px; }
}

/* ── Numbered steps ─────────────────────────────────────────────────────── */
.steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.steps__item {
    display: flex;
    flex: 0 1 auto;
    align-items: flex-start;
    gap: 14px;
}

.steps__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.steps__body { min-width: 0; }

.steps__title {
    margin: 4px 0 2px;
    font-size: 16px;
    color: var(--color-navy);
}

.steps__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
}

/* ── Product card ───────────────────────────────────────────────────────── */
/* One card for the whole site: home page, catalogue, category, search and
   related products all render pages/content/product-card.php. */
.product-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.product-grid__item {
    flex: 1 1 calc(25% - 18px);
    max-width: calc(25% - 18px);
}

/* Three per row where a sidebar eats part of the width. */
.product-grid--3 .product-grid__item {
    flex: 1 1 calc(33.333% - 16px);
    max-width: calc(33.333% - 16px);
}

/* ── Slider variant ─────────────────────────────────────────────────────── */
/* Used where products are a row to browse (home, related) rather than a
   catalogue to page through. Built on scroll-snap: swipe works natively on
   touch, the arrows are for the mouse, and without JavaScript it is still a
   scrollable row. */
/* Clips the track: with scroll-snap the browser counts the off-screen cards
   in the ancestor's scroll width, which gave the whole page a horizontal
   scrollbar even though the row scrolls on its own. */
.product-slider {
    position: relative;
    overflow: hidden;
}

.product-slider__head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 16px;
}

.product-slider__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    background: #FFF;
    color: var(--color-navy);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), opacity var(--transition);
}

.product-slider__button:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.product-slider__button:disabled { opacity: .35; cursor: default; }

.product-slider__button .icon--left  { transform: rotate(90deg); }
.product-slider__button .icon--right { transform: rotate(-90deg); }

/* Nothing to scroll — hide the controls rather than show dead buttons. */
.product-slider.is-static .product-slider__head { display: none; }

.product-grid--slider {
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 0;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.product-grid--slider::-webkit-scrollbar { display: none; }

.product-grid--slider .product-grid__item {
    flex: 0 0 calc(25% - 18px);
    max-width: calc(25% - 18px);
    scroll-snap-align: start;
}

.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #FFF;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.product-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow); }

.product-card__link { display: block; }

.product-card__media {
    position: relative;
    margin: 0 0 14px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
}

.product-card__image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1;
    padding: 5px 11px;
    border-radius: var(--radius-pill);
    background: var(--color-sale);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    letter-spacing: .01em;
}

.product-card__title {
    margin: 0;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-text);
}

.product-card__price {
    margin: 10px 0 16px;
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-navy);
}

/* WooCommerce prints the old price as <del> and the new one as <ins>;
   without this they read as one long number. */
.product-card__price del {
    margin-right: 8px;
    color: var(--color-muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: line-through;
}

.product-card__price ins {
    color: var(--color-sale);
    text-decoration: none;
}

.product-card__price .woocommerce-Price-currencySymbol { font-size: .85em; }

.product-card__button {
    min-height: 44px;
    margin-top: auto;
}

@media (max-width: 1199px) {
    .product-grid__item,
    .product-grid--3 .product-grid__item {
        flex: 1 1 calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }

    .product-grid--slider .product-grid__item {
        flex: 0 0 calc(33.333% - 16px);
        max-width: calc(33.333% - 16px);
    }
}

@media (max-width: 1023px) {
    .product-grid { gap: 16px; }
    .product-grid__item,
    .product-grid--3 .product-grid__item {
        flex: 1 1 calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
    }

    .product-grid--slider .product-grid__item {
        flex: 0 0 calc(33.333% - 11px);
        max-width: calc(33.333% - 11px);
    }
}

@media (max-width: 767px) {
    .product-grid__item,
    .product-grid--3 .product-grid__item {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }

    /* The slider runs edge to edge so the next card peeks in and invites a
       swipe. The bleed sits on the wrapper, which is the element that clips. */
    .product-slider {
        margin-left: calc(-1 * var(--gutter));
        margin-right: calc(-1 * var(--gutter));
    }

    .product-grid--slider {
        padding-left: var(--gutter);
        padding-right: var(--gutter);
        scroll-padding-left: var(--gutter);
    }

    /* Two cards with the third peeking in — 60% made a single card fill the
       screen on a tablet. */
    .product-grid--slider .product-grid__item {
        flex: 0 0 calc(45% - 8px);
        max-width: calc(45% - 8px);
    }

    .product-slider__head { display: none; }
}

@media (max-width: 479px) {
    .product-grid--slider .product-grid__item {
        flex: 0 0 calc(62% - 8px);
        max-width: calc(62% - 8px);
    }
}

@media (max-width: 479px) {
    .product-card         { padding: 12px; }
    .product-card__price  { font-size: 16px; margin-bottom: 12px; }

    /* Two cards per row leave ~125px of button; at 14px the label wrapped. */
    .product-card__button { padding: 10px 10px; font-size: 13px; }
    .product-card__badge  { padding: 4px 9px; font-size: 12px; }
}

/* ── "Added to cart" dialog ─────────────────────────────────────────────── */
.cart-popup {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--gutter);
    background: rgba(10, 20, 40, .5);
    visibility: hidden;
    opacity: 0;
    transition: opacity var(--transition), visibility var(--transition);
}

.cart-popup.is-open { visibility: visible; opacity: 1; }

.cart-popup__window {
    position: relative;
    width: 100%;
    max-width: 440px;
    padding: 28px;
    border-radius: var(--radius);
    background: #FFF;
    box-shadow: var(--shadow);
    transform: translateY(12px);
    transition: transform var(--transition);
}

.cart-popup.is-open .cart-popup__window { transform: none; }

.cart-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: var(--color-bg-alt);
    color: var(--color-navy);
    cursor: pointer;
    transition: background-color var(--transition);
}

.cart-popup__close:hover { background: var(--color-border); }

.cart-popup__status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    color: var(--color-success);
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.cart-popup__product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border);
}

.cart-popup__image {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    object-fit: contain;
    mix-blend-mode: multiply;
}

.cart-popup__info { min-width: 0; }

.cart-popup__title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-navy);
}

.cart-popup__meta {
    margin: 4px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

.cart-popup__meta:empty { display: none; }

.cart-popup__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.cart-popup__button { flex: 1 1 160px; }

/* The add-to-cart button while the request is in flight. */
.single_add_to_cart_button.is-loading { opacity: .7; cursor: progress; }

@media (max-width: 479px) {
    .cart-popup__window     { padding: 22px 18px; }
    .cart-popup__button { flex: 1 1 100%; }
}

/* ── WooCommerce pages inside the editor content ────────────────────────── */
/* Cart, checkout and account render through a shortcode inside
   .entry-content, which is capped at 78ch for readable prose. That cap is
   right for text and wrong for an interface. */
.woocommerce-cart .page__content,
.woocommerce-checkout .page__content,
.woocommerce-account .page__content {
    max-width: none;
}

/* ── WooCommerce notices ────────────────────────────────────────────────── */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 0 0 24px;
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-radius: var(--radius-sm);
    background: var(--color-bg-alt);
    color: var(--color-text);
    font-size: 15px;
    list-style: none;
}

.woocommerce-message { border-left-color: var(--color-success); }
.woocommerce-info    { border-left-color: var(--color-primary); }
.woocommerce-error   { border-left-color: var(--color-sale); }

.woocommerce-message .button,
.woocommerce-info .button {
    margin-left: auto;
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.woocommerce-error li { margin-bottom: 4px; }
.woocommerce-error li:last-child { margin-bottom: 0; }

/* ── Category chips ─────────────────────────────────────────────────────── */
.shop-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.shop-cats__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    background: #FFF;
    color: var(--color-navy);
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 600;
    transition: border-color var(--transition), color var(--transition);
}

.shop-cats__link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.shop-cats__count {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 400;
}


@media (max-width: 767px) {
    .shop-cats { gap: 6px; }
    .shop-cats__link { padding: 9px 14px; font-size: 14px; }
}

/* ── Info sections (delivery, returns) ──────────────────────────────────── */
/* Shared building blocks for the content templates: a heading with a lead,
   a grid of cards, numbered steps, a checklist and two kinds of panel. */
.section-title {
    margin: 0 0 12px;
    font-size: 28px;
}

.section-text {
    max-width: 70ch;
    margin: 0 0 28px;
    color: var(--color-muted);
    font-size: 17px;
}

/* ── Cards ──────────────────────────────────────────────────────────────── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: #FFF;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-soft);
}

.feature-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
    border-radius: 50%;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.feature-card__title {
    margin: 0 0 6px;
    font-size: 18px;
}

.feature-card__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
}

.feature-card__meta {
    margin-top: 14px;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: var(--color-bg-alt);
    color: var(--color-navy);
    font-size: 13px;
    font-weight: 600;
}

/* ── Facts ──────────────────────────────────────────────────────────────── */
.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-border);
    list-style: none;
    overflow: hidden;
}

.fact-grid__item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px 22px;
    background: #FFF;
}

.fact-grid__value {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-navy);
}

.fact-grid__text {
    color: var(--color-muted);
    font-size: 15px;
}

/* ── Panels ─────────────────────────────────────────────────────────────── */
.note-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 0;
    padding: 16px 20px;
    border-radius: var(--radius);
    background: var(--color-primary-soft);
    font-size: 16px;
}

.note-panel__icon { flex: 0 0 auto; color: var(--color-primary); }

.warn-panel {
    flex: 1 1 320px;
    padding: 22px 24px;
    border: 1px solid #F3C7C5;
    border-radius: var(--radius);
    background: #FCEBEA;
}

.warn-panel__title {
    margin: 0 0 12px;
    font-size: 17px;
    color: var(--color-sale);
}

.warn-panel__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.warn-panel__item {
    position: relative;
    padding-left: 18px;
    font-size: 15px;
}

.warn-panel__item + .warn-panel__item { margin-top: 8px; }

.warn-panel__item::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-sale);
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: step;
}

.step-card {
    position: relative;
    padding: 24px 24px 24px 74px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    counter-increment: step;
}

.step-card::before {
    content: counter(step);
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #FFF;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
}

.step-card__title {
    margin: 0 0 6px;
    font-size: 17px;
}

.step-card__text {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
}

/* ── Checklist ──────────────────────────────────────────────────────────── */
.check-grid {
    margin: 0;
    padding: 0;
    list-style: none;
}

.check-grid__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 16px;
}

.check-grid__item + .check-grid__item { margin-top: 12px; }

.check-grid__icon {
    flex: 0 0 auto;
    margin-top: 4px;
    color: var(--color-primary);
}

/* ── Key-value list ─────────────────────────────────────────────────────── */
.req-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    margin: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-border);
    overflow: hidden;
}

.req-list__row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 22px;
    background: #FFF;
}

.req-list__label {
    color: var(--color-muted);
    font-size: 14px;
}

.req-list__value {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--color-navy);
    overflow-wrap: anywhere;
}

@media (max-width: 767px) {
    .section-title { font-size: 23px; }
    .section-text  { font-size: 16px; margin-bottom: 22px; }

    .feature-grid,
    .step-grid { gap: 14px; }

    .feature-card { padding: 20px; }
    .step-card    { padding: 20px 20px 20px 66px; }
    .step-card::before { top: 20px; left: 20px; }

    .note-panel { align-items: flex-start; font-size: 15px; }
}
