/* ==========================================================================
   Horsify Store — design system
   --------------------------------------------------------------------------
   Hand-written plain CSS (NOT processed by Tailwind) so it ships reliably
   without an npm build step, and so the storefront can be re-skinned per club
   with zero markup changes.

   CLUBSITE FLOW-THROUGH
   ---------------------
   Every branded colour below reads from a `--theme-*` custom property with a
   Horsify-brand fallback:

       --store-brand: var(--theme-primary, #2E4E3F);

   On the main Horsify platform `--theme-primary` is never declared, so the
   fallback (#2E4E3F Deep Sage Green) wins. On a club subdomain the generated
   `/site-theme.css` declares `--theme-primary` (and friends) on :root, so the
   store automatically inherits the club's brand palette — buttons, prices,
   badges, hero, focus rings and hover states all re-tint with no per-page
   conditionals. Wrap the storefront root in `.store-scope` to activate.
   ========================================================================== */

.store-scope {
    /* Brand ---------------------------------------------------------------- */
    --store-brand: var(--theme-primary, #2E4E3F);
    --store-on-brand: var(--theme-on-primary, #FFFFFF);
    --store-accent: var(--theme-accent, #8A6B14);
    --store-on-accent: var(--theme-on-accent, #FFFFFF);

    /* Brand "ink" — the brand colour used for TEXT / icons / borders / rings.
       In light mode it equals the brand; in dark mode it is lightened (below)
       so brand-coloured text stays legible on dark surfaces. Solid button
       FILLS keep --store-brand; only on-surface brand marks use --store-ink. */
    --store-ink: var(--store-brand);

    /* Derived brand tints (work for any hue via color-mix) ----------------- */
    --store-brand-tint: color-mix(in srgb, var(--store-brand) 8%, transparent);
    --store-brand-tint-strong: color-mix(in srgb, var(--store-brand) 14%, transparent);
    --store-brand-ring: color-mix(in srgb, var(--store-ink) 55%, transparent);
    --store-brand-soft-border: color-mix(in srgb, var(--store-ink) 32%, transparent);

    /* Surfaces / neutrals (light) ------------------------------------------ */
    --store-surface: #FFFFFF;
    --store-surface-sunken: #F6F5F0;      /* warm sandstone wash */
    --store-border: #E4E1D8;
    --store-border-strong: #D6D2C6;
    --store-text: #23291F;
    --store-text-muted: #5C6157;

    /* Shape / depth -------------------------------------------------------- */
    --store-radius-sm: 0.625rem;
    --store-radius: 1rem;
    --store-radius-lg: 1.375rem;
    --store-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .06);
    --store-shadow-lift: 0 18px 40px -18px color-mix(in srgb, var(--store-brand) 40%, rgba(16, 24, 40, .35));
    --store-ease: cubic-bezier(.4, 0, .2, 1);
}

/* ON A CLUB'S OWN SITE the storefront is a page of that site, so its neutrals, corners and heading
   font are the site theme's as well as its brand colour. Until December 2026 only the brand flowed
   through: a club's /store kept Horsify's warm sandstone surfaces and borders, its own near-black
   and its own corner radius beside pages drawn in the club's greys, ink and corners. The three
   wrappers are the club page (.club-site-page, where the product blocks are drawn), the riding
   school's landing page and the app pages a club host serves (.site-shell-page, /store itself).
   Declared before the dark block below, which still wins where a page is in dark mode. */
.club-site-page .store-scope,
.riding-school-page .store-scope,
.site-shell-page .store-scope {
    --store-surface: var(--theme-block-background, #FFFFFF);
    --store-surface-sunken: var(--theme-section-tint, #F3F4F6);
    --store-border: color-mix(in srgb, var(--theme-text, #1F2937) 13%, transparent);
    --store-border-strong: color-mix(in srgb, var(--theme-text, #1F2937) 24%, transparent);
    --store-text: var(--theme-text, #1F2937);
    --store-text-muted: color-mix(in srgb, var(--theme-text, #1F2937) 70%, var(--theme-block-background, #FFFFFF));
    --store-radius-sm: calc(var(--theme-radius, 12px) * .75);
    --store-radius: var(--theme-radius, 12px);
    --store-radius-lg: var(--theme-radius-surface, 16px);
    --store-heading-font: var(--theme-heading-font, inherit);
    /* Headings are the club's brand colour, as the headings in its pages' own text are. */
    --store-heading: var(--theme-primary, var(--theme-text, #1F2937));
    --store-shadow: var(--theme-card-shadow, 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .06));
    /* The club's header (6rem) stays at the top of the window: what sticks, sticks below it. */
    --store-sticky-top: 7rem;
}

[data-theme="dark"] .store-scope {
    --store-surface: #2D2D2D;
    --store-surface-sunken: #262626;
    --store-border: #3F3F3F;
    --store-border-strong: #4A4A4A;
    --store-text: #F5F5F5;
    --store-text-muted: #A6A6A6;
    --store-heading: #F5F5F5;
    /* Lighten the brand toward white so brand-coloured text/icons stay readable
       on dark backgrounds — generically, for Horsify green or any club hue. */
    --store-ink: color-mix(in srgb, var(--store-brand) 52%, #FFFFFF);
    --store-brand-tint: color-mix(in srgb, var(--store-brand) 22%, transparent);
    --store-brand-tint-strong: color-mix(in srgb, var(--store-brand) 32%, transparent);
    --store-shadow: 0 1px 3px rgba(0, 0, 0, .5);
    --store-shadow-lift: 0 20px 44px -18px rgba(0, 0, 0, .7);
}

/* --------------------------------------------------------------------------
   HERO
   -------------------------------------------------------------------------- */
.store-hero {
    position: relative;
    overflow: clip;
    isolation: isolate;
    background:
        radial-gradient(120% 140% at 15% 0%, color-mix(in srgb, var(--store-brand) 14%, transparent) 0%, transparent 55%),
        radial-gradient(120% 160% at 100% 100%, color-mix(in srgb, var(--store-accent) 16%, transparent) 0%, transparent 50%),
        linear-gradient(135deg, color-mix(in srgb, var(--store-brand) 6%, var(--store-surface)) 0%, var(--store-surface) 70%);
    border-bottom: 1px solid var(--store-border);
}

.store-hero__blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(64px);
    opacity: .35;
    z-index: -1;
    pointer-events: none;
}
.store-hero__blob--brand { background: var(--store-brand); }
.store-hero__blob--accent { background: var(--store-accent); }

.store-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .75rem;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--store-ink);
    background: var(--store-brand-tint);
    border: 1px solid var(--store-brand-soft-border);
}

/* A club's store opens under a band in the club's own colours: the site's brand section (the
   same surface its call-to-action bands use), its heading font and its corners, with the name
   centred as every hero on the site is. Compact, so the first row of products is on the first
   screen of a phone. */
.store-hero--club {
    background: var(--theme-section-brand-bg, var(--store-brand));
    color: var(--theme-section-brand-fg, var(--store-on-brand));
    border: 0;
    border-radius: var(--store-radius-lg);
    box-shadow: var(--store-shadow);
    padding: 1.75rem 1.25rem;
    text-align: center;
}
.store-hero--club .store-hero__title {
    margin: 0;
    color: inherit;
    font-family: var(--store-heading-font, inherit);
    font-size: clamp(1.625rem, 1.1rem + 2.4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
    text-wrap: balance;
}
.store-hero--club .store-hero__lead {
    margin: .625rem auto 0;
    max-width: 40rem;
    color: inherit;
    opacity: .88;
    font-size: .9375rem;
    line-height: 1.5;
    text-wrap: pretty;
}
@media (min-width: 768px) {
    .store-hero--club { padding: 2.75rem 2rem; }
    .store-hero--club .store-hero__lead { font-size: 1.0625rem; margin-top: .875rem; }
}
/* Holds the place of a club's own hero block while the circuit draws it again. */
.store-hero-placeholder { min-height: 14rem; }

/* --------------------------------------------------------------------------
   SURFACES
   -------------------------------------------------------------------------- */
.store-card,
.store-panel {
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    box-shadow: var(--store-shadow);
    color: var(--store-text);
}

.store-panel-sunken {
    background: var(--store-surface-sunken);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    color: var(--store-text);
}

/* Product card — premium hover lift + media zoom ---------------------------- */
.store-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    overflow: hidden;
    box-shadow: var(--store-shadow);
    transition: transform .28s var(--store-ease), box-shadow .28s var(--store-ease), border-color .28s var(--store-ease);
    color: var(--store-text);
}
@media (hover: hover) {
    .store-product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--store-shadow-lift);
        border-color: var(--store-brand-soft-border);
    }
}
.store-product-card:focus-within {
    border-color: var(--store-ink);
}

.store-media {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--store-surface-sunken);
}
.store-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--store-ease);
}
@media (hover: hover) {
    .store-product-card:hover .store-media img { transform: scale(1.06); }
}

/* The card's parts (StoreProductCardHtml draws them, for the storefront and the club page blocks
   alike). The name is the card's one link, stretched over the whole card, so anywhere on it opens
   the product and a keyboard meets one stop per product. */
.store-product-card { width: 100%; }
.store-product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .25rem;
    padding: .75rem;
}
.store-product-card__eyebrow {
    margin: 0;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--store-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Three classes: a club theme sizes and spaces every h3 on its pages (.club-site-page.heading-scale-… h3),
   and a product's name in a card is not one of the page's headings. */
.store-scope .store-product-card .store-product-card__title {
    margin: 0;
    font-family: var(--store-heading-font, inherit);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: normal;
    color: var(--store-heading, var(--store-text));
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}
.store-product-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s var(--store-ease);
}
.store-product-card__title a::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}
.store-product-card__title a:focus-visible { outline: none; }
.store-product-card:has(.store-product-card__title a:focus-visible) {
    outline: 2px solid var(--store-ink);
    outline-offset: 2px;
}
@media (hover: hover) {
    .store-product-card:hover .store-product-card__title a { color: var(--store-ink); }
}
.store-product-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .125rem .5rem;
    margin-top: auto;
    padding-top: .375rem;
}
.store-product-card__price .store-price { font-size: 1rem; }
.store-product-card__price .store-price__compare { font-size: .75rem; }
.store-product-card__options {
    margin-left: auto;
    font-size: .75rem;
    color: var(--store-text-muted);
    white-space: nowrap;
}
.store-product-card__member {
    flex-basis: 100%;
    font-size: .75rem;
    font-weight: 600;
    color: #166534;
}
[data-theme="dark"] .store-product-card__member { color: #86EFAC; }
.store-product-card--soldout .store-media img { filter: grayscale(.65); opacity: .7; }
@media (min-width: 768px) {
    .store-product-card__body { padding: 1rem; }
    .store-scope .store-product-card .store-product-card__title { font-size: 1rem; }
    .store-product-card__price .store-price { font-size: 1.125rem; }
}

.store-media__empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: color-mix(in srgb, var(--store-text-muted) 45%, transparent);
}
.store-badges {
    position: absolute;
    top: .5rem;
    left: .5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .25rem;
}

/* Quick-add — slides up on hover (desktop), always visible on touch --------- */
.store-quick-add {
    position: absolute;
    inset-inline: .625rem;
    bottom: .625rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .6rem .75rem;
    border-radius: var(--store-radius-sm);
    background: color-mix(in srgb, var(--store-brand) 92%, transparent);
    color: var(--store-on-brand);
    font-size: .8125rem;
    font-weight: 600;
    border: 0;
    cursor: pointer;
    backdrop-filter: blur(4px);
    box-shadow: 0 6px 18px -6px rgba(16, 24, 40, .5);
    transition: opacity .25s var(--store-ease), transform .25s var(--store-ease), background-color .2s var(--store-ease);
}
.store-quick-add:hover { background: var(--store-brand); filter: brightness(1.08); }
.store-quick-add:disabled { opacity: .6; cursor: not-allowed; }
/* It opens the product, as the rest of the card does; where nothing can hover (a phone) it would
   sit over half of every photo to say so, so it is not drawn there. */
@media (hover: none) {
    .store-quick-add { display: none; }
}
@media (hover: hover) {
    .store-quick-add {
        opacity: 0;
        transform: translateY(8px);
    }
    .store-product-card:hover .store-quick-add,
    .store-product-card:focus-within .store-quick-add {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --------------------------------------------------------------------------
   BADGES
   -------------------------------------------------------------------------- */
.store-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .2rem .5rem;
    border-radius: .5rem;
    font-size: .6875rem;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: .02em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px -2px rgba(16, 24, 40, .35);
    white-space: nowrap;
}
.store-badge--sale { background: #C0392B; color: #fff; }
.store-badge--featured { background: var(--store-accent); color: var(--store-on-accent); }
.store-badge--soldout { background: color-mix(in srgb, #23291F 78%, transparent); color: #fff; }
.store-badge--new { background: var(--store-brand); color: var(--store-on-brand); }

/* --------------------------------------------------------------------------
   PRICE
   -------------------------------------------------------------------------- */
.store-price {
    font-weight: 800;
    color: var(--store-ink);
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}
.store-price--lg { font-size: 1.875rem; line-height: 1.1; }
.store-price__compare {
    color: var(--store-text-muted);
    text-decoration: line-through;
    font-weight: 500;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.store-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .625rem 1.1rem;
    border-radius: var(--store-radius-sm);
    font-weight: 600;
    font-size: .9375rem;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color .2s var(--store-ease), color .2s var(--store-ease),
        border-color .2s var(--store-ease), filter .2s var(--store-ease), box-shadow .2s var(--store-ease), transform .05s var(--store-ease);
    -webkit-user-select: none;
    user-select: none;
}
.store-btn:focus-visible {
    outline: 2px solid var(--store-ink);
    outline-offset: 2px;
}
.store-btn:disabled,
.store-btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}
.store-btn--block { width: 100%; }
.store-btn--lg { padding: .9rem 1.4rem; font-size: 1rem; border-radius: var(--store-radius-sm); }

.store-btn--primary {
    background: var(--store-brand);
    color: var(--store-on-brand);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .12), 0 8px 20px -12px color-mix(in srgb, var(--store-brand) 70%, transparent);
}
.store-btn--primary:hover:not(:disabled) { filter: brightness(1.08); }
.store-btn--primary:active:not(:disabled) { filter: brightness(.94); transform: translateY(1px); }

.store-btn--outline {
    background: transparent;
    color: var(--store-ink);
    border-color: var(--store-ink);
}
.store-btn--outline:hover:not(:disabled) { background: var(--store-brand-tint); }

.store-btn--soft {
    background: var(--store-brand-tint-strong);
    color: var(--store-ink);
}
.store-btn--soft:hover:not(:disabled) { background: var(--store-brand-tint); }

.store-btn--ghost {
    background: var(--store-surface);
    color: var(--store-text);
    border-color: var(--store-border-strong);
}
.store-btn--ghost:hover:not(:disabled) { border-color: var(--store-ink); color: var(--store-ink); }

.store-btn--accent {
    background: var(--store-accent);
    color: var(--store-on-accent);
}
.store-btn--accent:hover:not(:disabled) { filter: brightness(1.06); }

/* --------------------------------------------------------------------------
   FILTERS / CATEGORIES
   -------------------------------------------------------------------------- */
.store-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    text-align: left;
    padding: .55rem .75rem;
    border-radius: var(--store-radius-sm);
    font-size: .875rem;
    color: var(--store-text-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color .15s var(--store-ease), color .15s var(--store-ease);
}
a.store-filter { text-decoration: none; }
.store-filter:hover {
    background: color-mix(in srgb, var(--store-text-muted) 8%, transparent);
    color: var(--store-text);
}
/* The open main category while one of its subcategories is the one chosen. */
.store-filter--open { color: var(--store-text); font-weight: 600; }
.store-filter--sub { padding-block: .4rem; font-size: .8125rem; }
.store-filter__count {
    flex-shrink: 0;
    font-size: .75rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    opacity: .8;
}
.store-filter--active {
    background: var(--store-brand-tint);
    color: var(--store-ink);
    font-weight: 600;
}
.store-filter:focus-visible {
    outline: 2px solid var(--store-ink);
    outline-offset: 1px;
}

/* Active-filter chips */
.store-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .35rem .3rem .7rem;
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--store-ink);
    background: var(--store-brand-tint);
    border: 1px solid var(--store-brand-soft-border);
}
a.store-chip { text-decoration: none; }
a.store-chip:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 2px; }
.store-chip__x {
    font-size: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--store-brand) 18%, transparent);
    transition: background-color .15s var(--store-ease);
}
.store-chip__x:hover { background: color-mix(in srgb, var(--store-brand) 32%, transparent); }

/* --------------------------------------------------------------------------
   VARIANT OPTIONS
   -------------------------------------------------------------------------- */
.store-option {
    padding: .5rem 1rem;
    border-radius: var(--store-radius-sm);
    border: 1px solid var(--store-border-strong);
    background: var(--store-surface);
    color: var(--store-text);
    font-weight: 600;
    font-size: .9375rem;
    cursor: pointer;
    transition: border-color .15s var(--store-ease), background-color .15s var(--store-ease), color .15s var(--store-ease), box-shadow .15s var(--store-ease);
}
.store-option:hover:not(:disabled) { border-color: var(--store-ink); }
.store-option:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 2px; }
.store-option--selected {
    background: var(--store-brand);
    border-color: var(--store-brand);
    color: var(--store-on-brand);
    box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--store-brand) 70%, transparent);
}
.store-option:disabled {
    opacity: .45;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* --------------------------------------------------------------------------
   QUANTITY STEPPER
   -------------------------------------------------------------------------- */
.store-qty {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    overflow: hidden;
    background: var(--store-surface);
}
.store-qty__btn {
    width: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--store-text);
    background: transparent;
    border: 0;
    cursor: pointer;
    transition: background-color .15s var(--store-ease), color .15s var(--store-ease);
}
.store-qty__btn:hover:not(:disabled) { background: var(--store-brand-tint); color: var(--store-ink); }
.store-qty__btn:disabled { opacity: .4; cursor: not-allowed; }
.store-qty__input {
    width: 3.25rem;
    text-align: center;
    border: 0;
    border-inline: 1px solid var(--store-border);
    background: transparent;
    color: var(--store-text);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.store-qty__input::-webkit-outer-spin-button,
.store-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.store-qty__input:focus { outline: none; }

/* --------------------------------------------------------------------------
   IMAGE THUMBNAILS
   -------------------------------------------------------------------------- */
.store-thumb {
    aspect-ratio: 1 / 1;
    border-radius: var(--store-radius-sm);
    overflow: hidden;
    border: 1px solid var(--store-border);
    background: var(--store-surface-sunken);
    cursor: pointer;
    transition: border-color .15s var(--store-ease), box-shadow .15s var(--store-ease);
}
.store-thumb img { width: 100%; height: 100%; object-fit: cover; }
.store-thumb:hover { border-color: var(--store-ink); }
.store-thumb--active {
    border-color: var(--store-ink);
    box-shadow: 0 0 0 2px var(--store-ink);
}

/* --------------------------------------------------------------------------
   FORM CONTROLS (themed focus)
   -------------------------------------------------------------------------- */
.store-input {
    width: 100%;
    padding: .6rem .9rem;
    border-radius: var(--store-radius-sm);
    border: 1px solid var(--store-border-strong);
    background: var(--store-surface);
    color: var(--store-text);
    font-size: .9375rem;
    transition: border-color .15s var(--store-ease), box-shadow .15s var(--store-ease);
}
.store-input::placeholder { color: color-mix(in srgb, var(--store-text-muted) 85%, transparent); }
.store-input:focus {
    outline: none;
    border-color: var(--store-ink);
    box-shadow: 0 0 0 3px var(--store-brand-ring);
}

/* --------------------------------------------------------------------------
   MISC
   -------------------------------------------------------------------------- */
.store-link {
    color: var(--store-ink);
    font-weight: 500;
    text-decoration: none;
    transition: color .15s var(--store-ease);
}
.store-link:hover { filter: brightness(1.1); text-decoration: underline; }
.store-link:focus-visible {
    outline: 2px solid var(--store-ink);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Icon button (e.g. search submit) — theme-neutral resting colour, brand
   hover, and a visible keyboard focus ring. */
.store-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--store-text-muted);
    background: transparent;
    border: 0;
    cursor: pointer;
    border-radius: var(--store-radius-sm);
    transition: color .15s var(--store-ease);
}
.store-icon-btn:hover { color: var(--store-ink); }
.store-icon-btn:focus-visible {
    outline: 2px solid var(--store-ink);
    outline-offset: 2px;
}

.store-section-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: var(--store-text);
}

/* Brand-coloured text/icon accent (legible in dark via --store-ink). Handy for
   theming existing brand-tinted markup — e.g. section-header icons — so it flows
   through to a club's palette. */
.store-ink-text { color: var(--store-ink) !important; }

/* Brand-tinted background wash — themes existing brand-tinted pills/badges so
   they inherit a club's palette instead of Horsify green. */
.store-tint-bg { background-color: var(--store-brand-tint) !important; }

/* Selectable card (radio-style option cards, e.g. shipping method) */
.store-selectable {
    border: 2px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    transition: border-color .15s var(--store-ease), background-color .15s var(--store-ease);
}
.store-selectable:hover { border-color: var(--store-ink); }
.store-selectable--on {
    border-color: var(--store-ink);
    background: var(--store-brand-tint);
}

/* Small brand-tinted pill (counts, labels) */
.store-soft-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    padding: .25rem .65rem;
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--store-ink);
    background: var(--store-brand-tint);
}

.store-divider { border-top: 1px solid var(--store-border); }

/* Skeleton shimmer (used by loading states) */
.store-skeleton {
    position: relative;
    overflow: hidden;
    background: var(--store-surface-sunken);
}
.store-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--store-text-muted) 12%, transparent), transparent);
    animation: store-shimmer 1.4s infinite;
}
@keyframes store-shimmer { 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) {
    .store-skeleton::after { animation: none; }
    .store-product-card, .store-media img, .store-quick-add, .store-btn, .store-grid, .store-pill { transition: none; }
}

/* Floating cart pill */
.store-cart-fab {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.1rem;
    border-radius: 9999px;
    background: var(--store-brand);
    color: var(--store-on-brand);
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 12px 30px -10px color-mix(in srgb, var(--store-brand) 65%, rgba(16, 24, 40, .5));
    transition: filter .2s var(--store-ease), transform .2s var(--store-ease);
}
.store-cart-fab:hover { filter: brightness(1.08); transform: translateY(-1px); }
.store-cart-fab:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 3px; }
.store-cart-fab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 .3rem;
    border-radius: 9999px;
    background: color-mix(in srgb, #ffffff 28%, transparent);
    font-size: .75rem;
    font-weight: 800;
}

/* --------------------------------------------------------------------------
   STOREFRONT LIST (/store): categories, search, order, grid, pages
   -------------------------------------------------------------------------- */
.store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
}
@media (min-width: 1024px) {
    .store-layout {
        grid-template-columns: 15rem minmax(0, 1fr);
        gap: 2rem;
        align-items: start;
    }
}

/* The category list beside the grid. It stays on screen as the grid scrolls, and scrolls within
   itself when a store has more categories than the window is tall. Below 1024px the row of pills
   over the grid stands in for it. */
.store-categories { display: none; }
@media (min-width: 1024px) {
    .store-categories {
        display: block;
        position: sticky;
        top: var(--store-sticky-top, 1rem);
        max-height: calc(100vh - var(--store-sticky-top, 1rem) - 1rem);
        max-height: calc(100dvh - var(--store-sticky-top, 1rem) - 1rem);
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding: 1rem .75rem;
        background: var(--store-surface);
        border: 1px solid var(--store-border);
        border-radius: var(--store-radius);
        box-shadow: var(--store-shadow);
    }
}
.store-categories__title {
    margin: 0 0 .5rem;
    padding: 0 .75rem;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--store-text-muted);
}
.store-categories__list,
.store-categories__sub {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}
.store-categories__sub {
    margin: 2px 0 .375rem .875rem;
    padding-left: .375rem;
    border-left: 2px solid var(--store-border);
}

/* Search and order, one row at every width. */
.store-toolbar {
    display: flex;
    align-items: center;
    gap: .625rem;
    margin-bottom: 1rem;
}
.store-search {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.store-search__icon {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: var(--store-text-muted);
    pointer-events: none;
}
/* 1rem: a smaller box makes iOS zoom the page when it is tapped. */
.store-input.store-search__input,
.store-input.store-sort__select {
    min-height: 2.875rem;
    font-size: 1rem;
}
.store-input.store-search__input { padding-left: 2.625rem; }
.store-sort {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}
.store-sort__label {
    font-size: .875rem;
    color: var(--store-text-muted);
    white-space: nowrap;
}
.store-input.store-sort__select {
    width: auto;
    max-width: 100%;
    text-overflow: ellipsis;
}
@media (max-width: 639px) {
    .store-sort__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    .store-input.store-sort__select { max-width: 9.25rem; }
}

/* Categories as a row to swipe (below 1024px). The row runs to the screen's edges, so a pill cut
   off at the right says there are more. */
.store-pill-nav {
    display: grid;
    gap: .5rem;
    margin-bottom: 1.125rem;
}
@media (min-width: 1024px) {
    .store-pill-nav { display: none; }
}
.store-pill-row {
    list-style: none;
    display: flex;
    gap: .5rem;
    margin: 0 -1rem;
    padding: 2px 1rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.store-pill-row::-webkit-scrollbar { display: none; }
.store-pill-row > li { flex: 0 0 auto; }
.store-pill {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: .4rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--store-border-strong);
    background: var(--store-surface);
    color: var(--store-text);
    font-size: .9375rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s var(--store-ease), border-color .15s var(--store-ease), color .15s var(--store-ease);
}
.store-pill:hover { border-color: var(--store-ink); }
.store-pill:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 2px; }
.store-pill--active {
    background: var(--store-brand);
    border-color: var(--store-brand);
    color: var(--store-on-brand);
    font-weight: 600;
}
.store-pill--sub {
    min-height: 2.25rem;
    padding-inline: .875rem;
    font-size: .875rem;
    background: var(--store-surface-sunken);
    border-color: transparent;
}
.store-pill--sub.store-pill--active {
    background: var(--store-brand-tint-strong);
    border-color: var(--store-brand-soft-border);
    color: var(--store-ink);
}

/* What is listed, and how many. */
.store-results-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: 1rem;
}
.store-results-head__title {
    margin: 0;
    font-family: var(--store-heading-font, inherit);
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--store-heading, var(--store-text));
    overflow-wrap: anywhere;
}
.store-results-head__count {
    margin: .2rem 0 0;
    font-size: .875rem;
    color: var(--store-text-muted);
    font-variant-numeric: tabular-nums;
}

.store-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    transition: opacity .15s var(--store-ease);
}
/* The next page, category or order is on its way: the list stays where it is, dimmed. */
.store-grid--busy {
    opacity: .5;
    pointer-events: none;
}

.store-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
}
.store-empty__icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--store-brand-tint);
    color: var(--store-ink);
    font-size: 2rem;
}
.store-empty__title {
    margin: 0 0 .5rem;
    font-family: var(--store-heading-font, inherit);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--store-heading, var(--store-text));
}
.store-empty__text {
    margin: 0 auto 1.25rem;
    max-width: 24rem;
    color: var(--store-text-muted);
}

/* Pages of the list: numbered links from 640px; on a phone Previous and Next either side of
   "Page 3 of 7", each a full-height tap target. */
.store-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: .375rem;
    margin-top: 2rem;
}
.store-pager__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 .75rem;
    border-radius: var(--store-radius-sm);
    border: 1px solid var(--store-border-strong);
    background: var(--store-surface);
    color: var(--store-text);
    font-size: .9375rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    transition: border-color .15s var(--store-ease), color .15s var(--store-ease);
}
.store-pager__link:hover { border-color: var(--store-ink); color: var(--store-ink); }
.store-pager__link:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 2px; }
.store-pager__link--current,
.store-pager__link--current:hover {
    background: var(--store-brand);
    border-color: var(--store-brand);
    color: var(--store-on-brand);
}
.store-pager__gap { padding: 0 .125rem; color: var(--store-text-muted); }
.store-pager__status {
    display: none;
    padding: 0 .5rem;
    font-size: .9375rem;
    color: var(--store-text-muted);
    font-variant-numeric: tabular-nums;
}
@media (max-width: 639px) {
    /* Three columns, so "Page 1 of 7" stays in the middle on the first and last pages, where one of
       the two links is not drawn. */
    .store-pager {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
    }
    .store-pager__link:not(.store-pager__link--step),
    .store-pager__gap { display: none; }
    .store-pager__link--step { padding: 0 1rem; }
    .store-pager__link--step[rel="prev"] { grid-column: 1; justify-self: start; }
    .store-pager__link--step[rel="next"] { grid-column: 3; justify-self: end; }
    .store-pager__status { display: block; grid-column: 2; grid-row: 1; text-align: center; }
}

/* --------------------------------------------------------------------------
   CLUB PAGE BLOCKS (Shop by category, Featured products, Products)
   Drawn on a club's own pages by the block renderers, in the storefront's
   cards, so a club's /shop page and its /store are one shop.
   -------------------------------------------------------------------------- */
/* The block's heading in the colour of the headings around it (the page's own text draws its
   headings in the brand colour), not the body ink. */
.club-site-page .store-scope > h2,
.riding-school-page .store-scope > h2 {
    color: var(--store-heading);
}
.store-card-grid,
.store-category-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.store-card-grid > li { display: flex; min-width: 0; }
@media (min-width: 768px) {
    .store-card-grid { gap: 1.25rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .store-card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .store-category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    .store-card-grid--4,
    .store-category-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.store-card-more {
    margin-top: 1.5rem;
    text-align: center;
}
.store-category-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    min-height: 4.25rem;
    height: 100%;
    padding: .75rem .875rem .75rem 1rem;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface-sunken);
    color: var(--store-text);
    text-decoration: none !important;
    transition: border-color .15s var(--store-ease), background-color .15s var(--store-ease);
}
.store-category-tile:hover { border-color: var(--store-ink); background: var(--store-surface); }
.store-category-tile:focus-visible { outline: 2px solid var(--store-ink); outline-offset: 2px; }
.store-category-tile__text { min-width: 0; display: grid; gap: .125rem; }
.store-category-tile__name {
    color: var(--store-heading, var(--store-text));
    font-family: var(--store-heading-font, inherit);
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: break-word;
}
.store-category-tile__count {
    font-size: .8125rem;
    color: var(--store-text-muted);
    font-variant-numeric: tabular-nums;
}
.store-category-tile__arrow {
    flex-shrink: 0;
    font-size: 1.125rem;
    color: var(--store-text-muted);
}
/* Two tiles across a phone leave a name about 125px: no arrow there, so "Accessories" and
   "merchandise" stay whole words. */
@media (max-width: 639px) {
    .store-category-tile { padding: .75rem; }
    .store-category-tile__name { font-size: .875rem; }
    .store-category-tile__arrow { display: none; }
}
@media (min-width: 768px) {
    .store-category-tile__name { font-size: 1rem; }
}
/* The category list as pills (the block's "list" layout). */
.store-category-pills {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
