/* ===========================================================================
   LQ Ranch — Equine Apothecary site theme
   Earthy, small-batch apothecary palette: cream paper, deep botanical green,
   aubergine accent. Serif display headings over a clean sans body.
   =========================================================================== */
:root {
    --ink: #23302a;
    --ink-soft: #3c4a42;
    --muted: #6f7a70;
    --brand: #1f5135;        /* botanical green (Shoo Fly & Show label) */
    --brand-dark: #163d28;
    --accent: #3c2a57;       /* aubergine (Shoo Fly & Relax label) */
    --bg: #faf6ee;           /* warm cream paper */
    --bg-soft: #f1eadd;
    --bg-deep: #20302a;      /* deep forest for footer / cta */
    --border: #e3dac8;
    --radius: 14px;
    --shadow: 0 12px 34px rgba(35, 48, 42, 0.10);
    --maxw: 1120px;
    --serif: 'Georgia', 'Iowan Old Style', 'Times New Roman', serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--ink); line-height: 1.18; margin-top: 0; font-family: var(--serif); letter-spacing: .2px; }

/* Blazor's <FocusOnNavigate Selector="h1"> moves focus to the page heading on every load/
   navigation (helps screen-reader users). A heading isn't a keyboard tab stop, so hide the
   resulting focus outline — interactive controls (links, buttons, inputs) keep their focus rings. */
h1:focus, h1[tabindex]:focus { outline: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---- Buttons ---------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 18px rgba(31, 81, 53, .30); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }

/* ---- Header ----------------------------------------------------------- */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250, 246, 238, .88);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); font-size: 1.2rem; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--serif); letter-spacing: .5px; }
.brand-mark {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #fff; font-weight: 800; font-size: 1rem; letter-spacing: -1px; font-family: var(--serif);
}
.brand-mark.small { width: 30px; height: 30px; font-size: .85rem; }
/* Wordmark image used in the header (transparent PNG, trimmed to the artwork). */
.brand-logo { display: block; height: 48px; width: auto; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a { color: var(--ink-soft); font-weight: 500; }
.site-nav a:hover { color: var(--brand); text-decoration: none; }

/* Account / log-in pill button in the header */
.nav-account {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
    color: var(--ink-soft); font-weight: 600; font-size: .95rem;
}
.nav-account:hover { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.nav-account__icon { font-size: 1rem; line-height: 1; }

/* Cart badge (interactive island in the header) */
.cart-badge { position: relative; display: inline-flex; align-items: center; font-size: 1.25rem; line-height: 1; }
.cart-badge:hover { text-decoration: none; }
.cart-badge__count {
    position: absolute; top: -8px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 700;
    display: grid; place-items: center; font-family: 'Segoe UI', sans-serif;
}

/* ---- Main / sections -------------------------------------------------- */
.site-main { flex: 1; }
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head h1, .section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow {
    display: inline-block; text-transform: uppercase; letter-spacing: .18em;
    font-size: .78rem; font-weight: 700; color: var(--brand); margin-bottom: .6rem;
}

/* ---- Hero ------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1100px 480px at 75% -10%, rgba(60, 42, 87, .14), transparent 60%),
                radial-gradient(900px 420px at 8% 0%, rgba(31, 81, 53, .16), transparent 55%),
                var(--bg);
    padding: 96px 0 88px;
}
.hero .eyebrow { color: var(--brand); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); letter-spacing: -.5px; max-width: 16ch; }
.hero p.lead { font-size: 1.25rem; color: var(--ink-soft); max-width: 56ch; margin: 1.2rem 0 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ---- Cards / grid ----------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px; box-shadow: var(--shadow);
}
.card .ico {
    display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
    background: linear-gradient(135deg, rgba(31,81,53,.14), rgba(60,42,87,.12));
    color: var(--brand); font-size: 1.4rem; margin-bottom: 14px;
}
.card h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.card p { color: var(--muted); margin: 0; }

/* ---- Steps ------------------------------------------------------------ */
.step { display: flex; gap: 16px; }
.step .num {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; font-weight: 700; color: #fff; font-family: var(--serif);
    background: linear-gradient(135deg, var(--brand), var(--accent));
}
.step h3 { font-size: 1.1rem; margin-bottom: .2rem; }
.step p { color: var(--muted); margin: 0; }

/* ---- CTA band --------------------------------------------------------- */
.cta-band { background: var(--bg-deep); color: #fff; border-radius: 20px; padding: 56px; text-align: center; }
.cta-band h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-band p { color: #d6e0d6; font-size: 1.1rem; max-width: 52ch; margin: .8rem auto 1.6rem; }

/* ===========================================================================
   Storefront — catalog, product detail, cart
   =========================================================================== */

/* Product grid + card */
.product-grid {
    display: grid; gap: 28px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-card {
    display: flex; flex-direction: column; overflow: hidden;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease;
    border-top: 4px solid var(--accent, var(--brand));
}
.product-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(35,48,42,.16); }
.product-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; }
.product-card__media img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.product-card__flag {
    position: absolute; top: 12px; left: 12px; background: var(--ink); color: #fff;
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
    padding: 4px 10px; border-radius: 999px;
}
.product-card__body { display: flex; flex-direction: column; gap: 8px; padding: 20px; flex: 1; }
.product-card__body h3 { font-size: 1.2rem; margin: 0; }
.product-card__body h3 a { color: var(--ink); }
.product-card__body h3 a:hover { color: var(--brand); text-decoration: none; }
.product-card__notes { color: var(--accent); font-size: .82rem; font-weight: 600; letter-spacing: .02em; margin: 0; }
.product-card__desc { color: var(--muted); font-size: .95rem; margin: 0; flex: 1; }
.product-card__sizes { color: var(--muted); font-size: .82rem; margin: 0; letter-spacing: .02em; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.price { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; color: var(--ink); }

/* Product detail */
.product-detail .crumbs { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.product-detail .crumbs span { margin: 0 6px; }
.crumbs { color: var(--muted); }
.product-detail__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
.gallery__main {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden;
}
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.gallery__thumbs { display: flex; gap: 12px; margin-top: 14px; }
.thumb {
    width: 76px; height: 76px; padding: 4px; border-radius: 10px; cursor: pointer;
    background: #fff; border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.is-active { border-color: var(--accent, var(--brand)); box-shadow: 0 0 0 2px rgba(31,81,53,.18); }

.product-info h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .3rem; }
.product-info__tagline { color: var(--accent); font-size: 1.1rem; margin: 0 0 18px; }
.product-info__price { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.product-info__price .price { font-size: 1.7rem; }
.product-info__desc { color: var(--ink-soft); font-size: 1.05rem; }
.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.badge {
    background: rgba(31,81,53,.08); color: var(--brand); border: 1px solid rgba(31,81,53,.18);
    font-size: .8rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
}

.buy-row { display: flex; align-items: center; gap: 16px; margin: 26px 0 10px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: #fff; }
.qty button {
    width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; font-size: 1.2rem;
    color: var(--ink); border-radius: 999px;
}
.qty button:hover { color: var(--brand); }
.qty span { min-width: 34px; text-align: center; font-weight: 600; }
.added-note { color: var(--brand); font-weight: 600; }
.added-note--error { color: #b42318; }

/* Size picker — one button per purchasable variant on the product detail page. */
.size-picker { margin: 22px 0 4px; }
.size-picker__label {
    display: block; font-weight: 700; font-size: .8rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--muted); margin-bottom: 10px;
}
.size-picker__options { display: flex; flex-wrap: wrap; gap: 10px; }
.size-option {
    display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
    min-width: 132px; padding: 10px 16px; cursor: pointer;
    background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
    font: inherit; color: var(--ink); text-align: left;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.size-option:hover:not(:disabled) { border-color: var(--brand); }
.size-option.is-selected {
    border-color: var(--brand); background: rgba(31, 81, 53, .06);
    box-shadow: 0 0 0 3px rgba(31, 81, 53, .12);
}
.size-option:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.size-option.is-soldout { cursor: not-allowed; opacity: .5; }
.size-option.is-soldout .size-option__price { text-decoration: none; }
.size-option__size { font-weight: 600; font-size: .95rem; }
.size-option__price { font-family: var(--serif); font-weight: 700; color: var(--muted); font-size: .95rem; }
.size-option.is-selected .size-option__price { color: var(--brand); }

.label-info { margin-top: 28px; border-top: 1px solid var(--border); }
.label-info details { border-bottom: 1px solid var(--border); padding: 14px 0; }
.label-info summary { cursor: pointer; font-weight: 700; font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.label-info summary::marker { color: var(--brand); }
.label-info p { color: var(--ink-soft); margin: 12px 0 0; }

/* Cart */
.cart { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.cart__items { display: flex; flex-direction: column; gap: 14px; }
.cart-line {
    display: grid; grid-template-columns: 72px 1fr auto auto auto; gap: 16px; align-items: center;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px;
}
.cart-line__media { width: 72px; height: 72px; background: #fff; border-radius: 10px; display: grid; place-items: center; }
.cart-line__media img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.cart-line__main { display: flex; flex-direction: column; gap: 2px; }
.cart-line__name { font-weight: 600; color: var(--ink); }
.cart-line__size { color: var(--accent); font-size: .85rem; font-weight: 600; }
.cart-line__total { font-family: var(--serif); font-weight: 700; min-width: 70px; text-align: right; }
.cart-line__remove { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 1rem; }
.cart-line__remove:hover { color: #b42318; }

.cart__summary { background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: sticky; top: 92px; }
.cart__summary h2 { font-size: 1.3rem; margin-bottom: 16px; }
.cart__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; margin-bottom: 6px; }
.cart__row strong { font-family: var(--serif); font-size: 1.3rem; }
/* Itemised summary on the offline checkout: quieter than the subtotal it sits above. */
.cart__row--item { font-size: .95rem; color: var(--ink-soft); gap: 12px; }
.cart__row--subtotal { border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.cart__checkout { width: 100%; margin-top: 14px; }
.cart__continue { width: 100%; margin-top: 10px; }
.cart-empty { text-align: center; padding: 40px 0; }
.cart-empty p { color: var(--muted); font-size: 1.15rem; margin-bottom: 18px; }

/* Toast (added-to-cart confirmation) */
.toast {
    position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 100;
    background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: .95rem;
}
.toast a { color: #cfe6d6; font-weight: 600; }
.toast--error { background: #b42318; }

/* Order confirmation */
.success-mark {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center;
    background: var(--brand); color: #fff; font-size: 2rem;
}
.order-card { text-align: left; max-width: 460px; margin: 24px auto 0; }
.order-card__line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); }
.order-card__total { border-bottom: 0; padding-top: 14px; font-size: 1.15rem; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--bg-deep); color: #b9c6bb; padding: 40px 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: .75rem; color: #fff; font-weight: 700; font-family: var(--serif); }
/* Same wordmark as the header, tinted to cream so it reads on the deep-forest footer. */
.footer-logo { display: block; height: 44px; width: auto; filter: brightness(0) invert(1); opacity: .92; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #b9c6bb; }
.footer-links a:hover { color: #fff; }
/* Legal links sit on their own full-width row below the brand/nav row, set a shade quieter —
   they must be present on every page, but they aren't what we're pointing people at. */
.footer-links--legal { flex-basis: 100%; font-size: .9rem; }
.footer-links--legal a { color: #8aa090; }
.footer-disclaimer { flex-basis: 100%; margin: 0; color: #8aa090; font-size: .8rem; line-height: 1.5; max-width: 70ch; }
.footer-copy { flex-basis: 100%; color: #8aa090; font-size: .9rem; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }

/* Contact block shared by the legal pages. <address> is italic by default in every browser. */
.legal-contact { font-style: normal; line-height: 1.8; color: var(--ink-soft); }

/* ---- Forms ------------------------------------------------------------ */
.form-card { max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.field .req { color: var(--brand); }
.input, .textarea {
    width: 100%; padding: .8rem 1rem; border: 1px solid var(--border); border-radius: 10px;
    font: inherit; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(31,81,53,.15); }
.textarea { resize: vertical; min-height: 140px; }
.input[readonly] { background: var(--bg-soft); color: var(--ink-soft); cursor: default; }
.input[readonly]:focus { box-shadow: none; border-color: var(--border); }
.help { color: var(--muted); font-size: .9rem; }

/* Two fields side by side (checkout address), stacking on narrow screens. */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

.alert { border-radius: 10px; padding: 14px 16px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #e7f6ec; color: #16683f; border: 1px solid #b9e3c8; }
.alert-error { background: #fdecec; color: #b42318; border: 1px solid #f6cdcd; }
.alert-info { background: #fdf6e7; color: #7a5a12; border: 1px solid #eddfba; }

/* Validation (Blazor / Bootstrap-compatible) */
.valid.modified:not([type=checkbox]) { outline: none; }
.invalid { border-color: #e50000 !important; }
.validation-message { color: #e50000; font-size: .88rem; margin-top: 4px; }

/* ---- Prose (privacy page) -------------------------------------------- */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; }
.prose .muted { color: var(--muted); font-size: .95rem; }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 860px) {
    .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
    .product-detail__grid { grid-template-columns: 1fr; gap: 28px; }
    .cart { grid-template-columns: 1fr; }
    .cart__summary { position: static; }
    .site-nav { gap: .8rem; font-size: .95rem; }
    /* Keep the account button and cart visible on mobile; hide the secondary text links. */
    .site-nav a:not(.cart-badge):not(.nav-account) { display: none; }
    .cta-band { padding: 40px 24px; }
    .section { padding: 60px 0; }
}
@media (max-width: 520px) {
    .brand-logo { height: 40px; }
    .nav-account__label { display: none; }
    .nav-account { padding: 7px; }
    .cart-line { grid-template-columns: 56px 1fr auto; row-gap: 10px; }
    .cart-line__media { width: 56px; height: 56px; }
    .cart-line__total { grid-column: 2 / 3; text-align: left; }
    .cart-line__remove { grid-column: 3 / 4; }
}

/* ===========================================================================
   Accounts & admin
   =========================================================================== */

/* Small button variants */
.btn-sm { padding: .45rem 1rem; font-size: .9rem; }
.btn-danger { background: #b42318; color: #fff; }
.btn-danger:hover { background: #8f1b12; color: #fff; }

/* Wishlist toggle on product detail */
.wishlist-btn.is-saved { color: var(--accent); border-color: var(--accent); }

/* Account sub-navigation */
.account-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 28px; border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.account-nav__link {
    padding: 8px 14px; border-radius: 999px 999px 0 0; color: var(--ink-soft); font-weight: 600; font-size: .95rem;
    border: 0; background: transparent; cursor: pointer;
}
.account-nav__link:hover { color: var(--brand); text-decoration: none; }
.account-nav__link.active { color: var(--brand); border-bottom: 2px solid var(--brand); }
.account-nav__logout { margin-left: auto; }
.account-nav__link--button { font: inherit; font-weight: 600; }

/* Order history */
.order-list { display: flex; flex-direction: column; gap: 16px; }
.order-history__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.order-history__items { border-top: 1px solid var(--border); padding-top: 8px; }
.status-badge {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: 3px 10px; border-radius: 999px; background: rgba(31,81,53,.1); color: var(--brand);
}
.status-badge.status-paid { background: #e7f6ec; color: #16683f; }
.status-badge.status-pending { background: #fff4e0; color: #8a5a00; }
.status-badge.status-cancelled { background: #fdecec; color: #b42318; }
.status-badge.status-processing { background: #eaf1fb; color: #1d4eb8; }
.status-badge.status-shipped { background: #e9f0fd; color: #1746a2; }
.status-badge.status-delivered { background: #e7f6ec; color: #0f5a36; }
.status-badge.status-refunded { background: #f1ecfb; color: #5b3aa6; }
.status-badge.status-awaitingpayment { background: #fdf6e7; color: #7a5a12; }

/* Admin */
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.admin-table { display: flex; flex-direction: column; gap: 2px; }
.admin-row {
    display: grid; grid-template-columns: 64px 2fr 1fr .8fr 1.4fr auto; gap: 14px; align-items: center;
    background: #fffdf8; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
}
.admin-row--head { background: transparent; border: 0; font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.admin-thumb { width: 56px; height: 56px; background: #fff; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); }
.admin-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* Sizes & prices editor on the product form */
.variant-editor { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin: 18px 0 24px; background: #fffdf8; }
.variant-editor__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.variant-editor__head label { display: block; font-weight: 700; margin-bottom: 2px; }
.variant-editor .help { display: block; color: var(--muted); font-size: .85rem; font-weight: 400; }
.variant-editor > .help { margin-top: 12px; }
.variant-row {
    display: grid; grid-template-columns: 2fr 1fr .8fr 1.2fr .5fr auto;
    gap: 10px; align-items: center; margin-bottom: 8px;
}
.variant-row--head {
    font-weight: 700; font-size: .78rem; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px;
}
.variant-row .input { width: 100%; }
.variant-row__check { display: grid; place-items: center; }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.admin-img-preview { display: block; max-width: 140px; max-height: 160px; object-fit: contain; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 6px; margin-bottom: 8px; }

/* Admin · orders */
.oadmin-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.oadmin-filters .form-control { min-width: 160px; }
.oadmin-row {
    display: grid; grid-template-columns: 1.3fr 1.6fr .9fr 2.4fr; gap: 14px; align-items: center;
    background: #fffdf8; border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px;
}
.oadmin-row--head { background: transparent; border: 0; font-weight: 700; font-size: .85rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding-bottom: 2px; }
.oadmin-address { display: block; margin-top: 6px; line-height: 1.35; }
.oadmin-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.oadmin-controls .form-control { width: auto; }
.oadmin-email-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: .85rem; white-space: nowrap; cursor: pointer; }
.oadmin-msg { flex-basis: 100%; }
.oadmin-msg--ok { color: #16683f; }
.oadmin-msg--err { color: #b42318; }
/* Payment that didn't reconcile. Loud on purpose: this row looks packable in every other
   respect, so the only thing stopping it going out of the door is noticing this. */
.oadmin-review {
    display: inline-block; margin-top: 6px; padding: 3px 8px; border-radius: 6px;
    background: #fdecea; border: 1px solid #f0b4ae; color: #b42318;
    font-size: .78rem; font-weight: 700; line-height: 1.3; cursor: help;
}

@media (max-width: 820px) {
    .oadmin-row { grid-template-columns: 1fr; gap: 6px; }
    .oadmin-row--head { display: none; }
}

@media (max-width: 720px) {
    .admin-row { grid-template-columns: 48px 1fr auto; }
    .admin-row span:nth-child(3), .admin-row span:nth-child(4), .admin-row span:nth-child(5) { display: none; }
    .admin-row--head { display: none; }
    .admin-form-grid { grid-template-columns: 1fr; }
    .variant-row { grid-template-columns: 1fr 1fr; }
    .variant-row--head { display: none; }
}

/* ===========================================================================
   The Reining Room — western-performance content hub (/reining)
   Adapts the reference tech-recruiting layout to LQ Ranch's apothecary palette:
   cream cards, botanical green + aubergine accents, serif display headings.
   Namespaced .hr-* / .horse-* so nothing collides with the storefront or Bootstrap.
   =========================================================================== */

/* ---- Hub hero --------------------------------------------------------- */
.hr-hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1000px 460px at 80% -12%, rgba(60, 42, 87, .14), transparent 60%),
                radial-gradient(820px 400px at 6% 4%, rgba(31, 81, 53, .16), transparent 55%),
                var(--bg);
    padding: 72px 0 64px;
    border-bottom: 1px solid var(--border);
}
.hr-hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hr-hero-copy h1 { font-size: clamp(2.1rem, 4.4vw, 3.2rem); letter-spacing: -.5px; max-width: 15ch; }
.hr-hero-copy p.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 52ch; margin: 1.1rem 0 1.8rem; }
.hr-grad-text {
    background: linear-gradient(120deg, var(--brand), var(--accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hr-pulse {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px;
    background: var(--brand); box-shadow: 0 0 0 0 rgba(31, 81, 53, .5); animation: hr-pulse 2s infinite;
    vertical-align: middle;
}
@keyframes hr-pulse {
    0% { box-shadow: 0 0 0 0 rgba(31, 81, 53, .45); }
    70% { box-shadow: 0 0 0 9px rgba(31, 81, 53, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 81, 53, 0); }
}
.hr-stats { display: flex; gap: 32px; margin-top: 26px; }
.hr-stat { display: flex; flex-direction: column; }
.hr-stat-num { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--brand); line-height: 1.1; }
.hr-stat-lbl { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* ---- Featured card (hub side + home) ---------------------------------- */
.hr-featured {
    display: flex; flex-direction: column; overflow: hidden;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease;
    border-top: 4px solid var(--accent);
}
.hr-featured:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(35,48,42,.16); text-decoration: none; }
.hr-featured-media { aspect-ratio: 16 / 9; background: #fff; }
.hr-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.hr-featured-body { padding: 22px 24px 26px; }
.hr-featured-tag { display: inline-block; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 8px; }
.hr-featured-body h2, .hr-featured-body h3 { font-size: 1.4rem; margin: 0 0 8px; color: var(--ink); }
.hr-featured-body p { color: var(--ink-soft); margin: 0 0 12px; }
.hr-featured-more { color: var(--brand); font-weight: 600; }

/* ---- Hub bucket cards ------------------------------------------------- */
.hr-cards { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.hr-card {
    display: flex; flex-direction: column;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 24px; transition: transform .12s ease, box-shadow .2s ease;
}
.hr-card:hover { transform: translateY(-3px); box-shadow: 0 18px 42px rgba(35,48,42,.16); }
.hr-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.hr-card-ico {
    display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; font-size: 1.4rem;
    background: linear-gradient(135deg, rgba(31,81,53,.14), rgba(60,42,87,.12));
}
.hr-card-headtext h3 { font-size: 1.2rem; margin: 0; }
.hr-card-count { font-size: .82rem; color: var(--muted); }
.hr-card-desc { color: var(--muted); margin: 0 0 18px; flex: 1; }
.hr-card-latest {
    display: block; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px 16px; margin-bottom: 14px;
}
.hr-card-latest:hover { text-decoration: none; border-color: var(--brand); }
.hr-card-latest-meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.hr-card-latest-lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.hr-card-latest-date { font-size: .82rem; color: var(--muted); }
.hr-card-latest-head { display: block; color: var(--ink); font-weight: 600; font-family: var(--serif); }
.hr-card-latest-go { display: inline-block; margin-top: 6px; color: var(--brand); font-size: .9rem; font-weight: 600; }
.hr-card-explore { color: var(--ink-soft); font-weight: 600; margin-top: auto; }
.hr-card-explore:hover { color: var(--brand); text-decoration: none; }
.hr-card-arrow { transition: transform .12s ease; display: inline-block; }
.hr-card-explore:hover .hr-card-arrow { transform: translateX(3px); }

/* ---- Bucket list + article intro ------------------------------------- */
.hr-intro { background: var(--bg-soft); padding: 48px 0; border-bottom: 1px solid var(--border); }
.hr-intro h1 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.hr-intro p.lead { color: var(--ink-soft); font-size: 1.15rem; max-width: 60ch; }
.hr-back { display: inline-block; color: var(--muted); font-weight: 600; font-size: .9rem; margin-bottom: 14px; }
.hr-back:hover { color: var(--brand); text-decoration: none; }

.hr-list { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.hr-row { display: flex; flex-direction: column; gap: 10px; }
.hr-row.is-hidden .hr-item { opacity: .62; }
.hr-item {
    display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: stretch;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease;
}
.hr-item:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(35,48,42,.14); text-decoration: none; }
.hr-item-media { background: #fff; }
.hr-item-media img { width: 100%; height: 100%; object-fit: cover; min-height: 150px; }
.hr-item-body { padding: 18px 20px 20px; display: flex; flex-direction: column; }
.hr-item-body h3 { font-size: 1.3rem; margin: 4px 0 6px; color: var(--ink); }
.hr-item-body p { color: var(--ink-soft); margin: 0 0 10px; }
.hr-meta { color: var(--muted); font-size: .85rem; }
.hr-readmore { color: var(--brand); font-weight: 600; margin-top: auto; }

/* ---- Article --------------------------------------------------------- */
.hr-article { padding: 48px 0 72px; }
.hr-article .container { max-width: 780px; }
.hr-arthead { margin-bottom: 24px; }
.hr-arthead h1 { font-size: clamp(2rem, 4vw, 2.9rem); margin: 8px 0 10px; }
.hr-figure { margin: 0 0 28px; }
.hr-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.hr-figure figcaption { color: var(--muted); font-size: .85rem; margin-top: 8px; text-align: center; }
.hr-panel {
    background: var(--bg-soft); border: 1px solid var(--border); border-left: 4px solid var(--brand);
    border-radius: 12px; padding: 20px 24px; margin: 0 0 28px;
}
.hr-panel h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin: 0 0 10px; }
.hr-panel ul { margin: 0; padding-left: 1.1rem; }
.hr-panel li { color: var(--ink-soft); margin-bottom: 4px; }
.hr-prose { font-size: 1.1rem; color: var(--ink-soft); }
.hr-prose p { margin: 0 0 1.1rem; }
.hr-prose h2, .hr-prose h3 { color: var(--ink); margin: 1.8rem 0 .6rem; }
.hr-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.hr-prose a { color: var(--brand); font-weight: 600; }
.hr-sources { margin-top: 40px; border-top: 1px solid var(--border); padding-top: 22px; }
.hr-sources h2 { font-size: 1.2rem; margin-bottom: 12px; }
.hr-sources ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hr-sources li { color: var(--ink-soft); }
.hr-src-tag {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
    background: rgba(31,81,53,.08); color: var(--brand); border: 1px solid rgba(31,81,53,.18);
    padding: 2px 8px; border-radius: 999px; margin-right: 8px;
}

/* ---- Admin note + status pills (shared by bucket page + admin queue) --- */
.hr-admin-note { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; color: var(--ink-soft); font-size: .95rem; }
.hr-admin-note--ok { background: #e7f6ec; color: #16683f; border-color: #b9e3c8; }
.hr-admin-note--err { background: #fdecec; color: #b42318; border-color: #f6cdcd; }
.hr-admin-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hr-status {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
    padding: 3px 10px; border-radius: 999px;
}
.hr-status--published { background: #e7f6ec; color: #16683f; }
.hr-status--hidden { background: #fff4e0; color: #8a5a00; }
.hr-status--deleted { background: #fdecec; color: #b42318; }

/* ---- Admin queue ------------------------------------------------------ */
.hr-filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 20px; }
.admin-row--horse { grid-template-columns: 2.2fr 1fr 1.1fr .8fr auto; }
.hr-group-head { display: flex; align-items: center; gap: 10px; margin: 22px 0 8px; }
.hr-group-head h3 { font-size: 1.1rem; margin: 0; }
.hr-group-count { font-size: .8rem; color: var(--muted); background: var(--bg-soft); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }

/* ---- Admin review queue (unpublished — needs review) ------------------ */
.hr-review {
    background: #fff8ec; border: 1px solid #f0d9a8; border-left: 4px solid #d99a2b;
    border-radius: var(--radius); padding: 18px 20px; margin: 0 0 22px;
}
.hr-review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.hr-review-head h2 { font-size: 1.15rem; margin: 0; color: #8a5a00; }
.hr-review-list { display: flex; flex-direction: column; gap: 8px; }
.hr-review-row {
    display: flex; align-items: center; gap: 14px;
    background: #fffdf8; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px;
}
.hr-review-ico { font-size: 1.3rem; flex: 0 0 auto; }
.hr-review-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hr-review-title { font-weight: 600; color: var(--ink); }
.hr-review-meta { font-size: .82rem; color: var(--muted); }
.hr-review-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) {
    .hr-review-row { flex-wrap: wrap; }
    .hr-review-actions { width: 100%; justify-content: flex-start; }
}

/* ---- Caption modal ---------------------------------------------------- */
.hr-modal-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(35, 48, 42, .5);
    display: grid; place-items: center; padding: 24px;
}
.hr-modal {
    width: 100%; max-width: 560px; max-height: 86vh; overflow: auto;
    background: var(--bg); border-radius: var(--radius); box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.hr-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px; border-bottom: 1px solid var(--border); }
.hr-modal-head h3 { margin: 0 0 2px; font-size: 1.2rem; }
.hr-modal-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.hr-copyblock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hr-copyblock-label { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hr-copytext { font-family: 'Segoe UI', sans-serif; font-size: .9rem; line-height: 1.5; }

/* ---- Home hub teaser -------------------------------------------------- */
.hr-home { display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: start; }
.hr-featured--home { border-top-color: var(--brand); }
.hr-home-list { display: flex; flex-direction: column; gap: 10px; }
.hr-home-link {
    display: flex; align-items: center; gap: 14px;
    background: #fffdf8; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px;
    transition: border-color .12s ease, transform .12s ease;
}
.hr-home-link:hover { border-color: var(--brand); transform: translateX(2px); text-decoration: none; }
.hr-home-link-ico { font-size: 1.3rem; }
.hr-home-link-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hr-home-link-disc { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); }
.hr-home-link-head { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hr-home-link-go { color: var(--brand); font-weight: 700; }

/* ---- Reining Room responsive ------------------------------------------ */
@media (max-width: 860px) {
    .hr-hero-inner { grid-template-columns: 1fr; gap: 28px; }
    .hr-home { grid-template-columns: 1fr; }
    .hr-item { grid-template-columns: 1fr; }
    .hr-item-media img { min-height: 180px; max-height: 220px; }
    .admin-row--horse { grid-template-columns: 1fr; gap: 6px; }
    .admin-row--horse.admin-row--head { display: none; }
    .hr-stats { gap: 22px; }
}

/* ---- Blazor error UI -------------------------------------------------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box; display: none; left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem; }

/* ---- Product reviews -------------------------------------------------- */
.reviews { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.reviews__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 22px; }
.reviews__head h2 { margin: 0; }
.reviews__score { display: flex; align-items: baseline; gap: 8px; }
.reviews__score strong { font-size: 1.25rem; }

.stars { color: #c99a2e; letter-spacing: .08em; white-space: nowrap; }

.reviews__dist { display: flex; flex-direction: column; gap: 5px; max-width: 320px; margin-bottom: 30px; }
.dist-row { display: grid; grid-template-columns: 58px 1fr 28px; align-items: center; gap: 10px; font-size: .85rem; }
.dist-row__label { color: var(--muted); }
.dist-row__bar { background: var(--bg-soft); border-radius: 999px; height: 8px; overflow: hidden; }
.dist-row__bar > span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.dist-row__count { color: var(--muted); text-align: right; }

.reviews__body { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: start; }
.reviews__list { display: flex; flex-direction: column; gap: 20px; }

.review { background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.review__title { margin: 0; font-size: 1.02rem; }
/* pre-line renders the customer's own line breaks without ever injecting <br> markup, so the
   body stays a plain HTML-encoded text node. */
.review__body { white-space: pre-line; overflow-wrap: anywhere; margin: 0 0 10px; }
.review__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: .85rem; color: var(--muted); margin: 0; }
.review__author { font-weight: 600; color: var(--ink-soft); }

/* Latest-reviews panel above the shop grid. Each card is an <a> to the reviewed product. */
.recent-reviews { margin-bottom: 44px; }
.recent-reviews__head { text-align: center; margin-bottom: 22px; }
.recent-reviews__head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.recent-reviews__head p { margin: 0; }
.recent-reviews__grid {
    display: grid; gap: 20px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.recent-review {
    display: flex; flex-direction: column; gap: 8px;
    background: #fffdf8; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 18px 20px; color: inherit; text-decoration: none;
    transition: transform .12s ease, box-shadow .2s ease, border-color .12s ease;
}
.recent-review:hover, .recent-review:focus-visible {
    transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand);
}
.recent-review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.recent-review__product { font-weight: 700; color: var(--brand); }
.recent-review__title { font-weight: 600; font-size: 1.02rem; }
.recent-review__body { overflow-wrap: anywhere; }
.recent-review__meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
    font-size: .85rem; color: var(--muted); margin-top: auto;
}

.review-form h3 { margin-top: 0; }
.star-picker { display: flex; gap: 4px; }
.star-picker__star {
    background: none; border: 0; cursor: pointer; padding: 0 2px; line-height: 1;
    font-size: 1.9rem; color: var(--border); transition: color .12s ease, transform .12s ease;
}
.star-picker__star:hover { transform: scale(1.08); }
.star-picker__star.is-on { color: #c99a2e; }

/* Admin moderation queue */
.review-queue { display: flex; flex-direction: column; gap: 12px; }
.review-queue__item {
    display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start;
    background: #fffdf8; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px;
}
.review-queue__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-queue__actions { align-self: center; }

@media (max-width: 860px) {
    .reviews__body { grid-template-columns: 1fr; gap: 28px; }
    .review-queue__item { grid-template-columns: 1fr; }
    .review-queue__actions { justify-content: flex-start; }
}
