/*
 * Palette, type, and card rules come from docs/design/product-listing-design-notes.md,
 * grounded in Rhea's reference sites, not defaults. Do not add gradients,
 * shadows, or oversized rounded corners; the reference sites deliberately use none.
 */

:root {
    --color-bg: #FBF8F4;
    --color-text: #2E2A26;
    --color-accent: #8C6E4F;
    --color-muted: #D8CFC2;
    --color-unavailable: #8C8378;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: "Jost", -apple-system, "Segoe UI", sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, .product-name {
    font-weight: 500;
}

a {
    color: var(--color-accent);
}

.site-navbar {
    border-bottom: 1px solid var(--color-muted);
    background-color: var(--color-bg);
}

.site-navbar .navbar-brand {
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.site-footer {
    border-top: 1px solid var(--color-muted);
    color: var(--color-unavailable);
}

.site-footer__legal {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.site-footer__legal a {
    color: var(--color-unavailable);
}

.site-footer__legal a:hover {
    color: var(--color-accent);
}

/* Static legal pages (privacy, terms, cookies) — plain formal document
   look, deliberately distinct from the rest of the site: the page
   background stays the site's cream, but the document itself sits on a
   flat white "paper" panel with a hairline border, like Stripe's/GitHub's
   legal pages. No icons, no colour, no pills, just a left-hand section
   list and plain typography. */
.legal-doc {
    max-width: 980px;
    margin: 0 auto;
    padding: 3rem 1rem;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
}

.legal-doc__nav {
    position: sticky;
    top: 1.5rem;
}

.legal-doc__nav-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-unavailable);
    margin-bottom: 0.75rem;
}

.legal-doc__nav nav {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.legal-doc__nav nav a {
    color: #555;
    font-size: 0.85rem;
    text-decoration: none;
}

.legal-doc__nav nav a:hover {
    text-decoration: underline;
}

.legal-doc__paper {
    background: #fff;
    border: 1px solid var(--color-muted);
    padding: 3rem 3.5rem;
    max-width: 720px;
}

.legal-doc__paper h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.legal-doc__updated {
    font-weight: 600;
    color: #333;
    margin-bottom: 1.75rem;
}

.legal-doc__paper h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    scroll-margin-top: 1.5rem;
}

.legal-doc__paper p,
.legal-doc__paper li {
    color: #333;
    line-height: 1.75;
}

.legal-doc__table-wrap {
    overflow-x: auto;
}

.legal-doc__table-wrap table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.legal-doc__table-wrap th,
.legal-doc__table-wrap td {
    text-align: left;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid var(--color-muted);
    vertical-align: top;
}

.legal-doc__table-wrap th {
    font-weight: 600;
    color: #333;
}

@media (max-width: 860px) {
    .legal-doc {
        grid-template-columns: 1fr;
    }

    .legal-doc__nav {
        position: static;
    }

    .legal-doc__nav nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem 1.1rem;
        border-bottom: 1px solid var(--color-muted);
        padding-bottom: 1rem;
    }

    .legal-doc__paper {
        padding: 2rem 1.5rem;
    }
}

/* Scroll-to-top button, site-wide (public layout). */
.scroll-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--color-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 8px 18px rgba(140, 110, 79, 0.28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 40;
}

.scroll-to-top--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top:hover {
    filter: brightness(0.94);
}

@media (prefers-reduced-motion: reduce) {
    .scroll-to-top {
        transition: opacity 0.01s linear;
    }
}

/* Add-to-cart confirmation toast, dead-center of the viewport regardless of
   screen size, so it's seen whether the click came from the gallery grid or
   the product detail page. */
.cart-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 300;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    background: var(--color-bg);
    color: var(--color-text);
    padding: 1.1rem 1.75rem;
    border-radius: 18px;
    border: 1px solid var(--color-muted);
    font-family: "Jost", sans-serif;
    font-weight: 500;
    font-size: 1rem;
    box-shadow: 0 24px 60px rgba(46, 42, 38, 0.22);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.94) translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(.2,.8,.2,1);
}

.cart-toast--visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
}

.cart-toast__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #1F8A5C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex: 0 0 auto;
    box-shadow: 0 6px 16px rgba(31, 138, 92, 0.35);
}

.cart-toast__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    white-space: nowrap;
}

.cart-toast__title {
    font-weight: 600;
}

.cart-toast__subtitle {
    font-size: 0.78rem;
    color: var(--color-unavailable);
    font-weight: 400;
}

@media (max-width: 420px) {
    .cart-toast {
        max-width: calc(100vw - 2.5rem);
        padding: 1rem 1.25rem;
    }
    .cart-toast__text {
        white-space: normal;
    }
    .cart-toast__subtitle {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cart-toast {
        transition: opacity 0.01s linear;
    }
}

/* Product gallery: 2 columns on small screens, 3 from tablet width up.
   Rhea's reference sites (Hang Me U.P., Knotting Hillbilly, Lorna & Lila,
   Macrame SweetNess, Stardust Melbourne) all run 3+ columns on desktop. */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.product-card {
    display: block;
    border-radius: 4px;
    animation: card-in 0.6s cubic-bezier(.2, .8, .2, 1) both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 26px rgba(176, 138, 99, 0.25);
}

.product-card__cart-form {
    margin-top: 0.6rem;
}

.product-card__cart-btn {
    width: 100%;
}

/* Stagger the load-in for the first few cards; grids beyond this size just
   share the last delay rather than growing an unbounded rule list. */
.product-card:nth-child(2) { animation-delay: 0.08s; }
.product-card:nth-child(3) { animation-delay: 0.16s; }
.product-card:nth-child(4) { animation-delay: 0.24s; }
.product-card:nth-child(5) { animation-delay: 0.32s; }
.product-card:nth-child(n+6) { animation-delay: 0.4s; }

@keyframes card-in {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .product-card {
        animation: none;
        transition: none;
    }
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
    .product-card__image-hover {
        transition: none;
    }
}

.product-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--color-muted);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-unavailable);
    font-size: 0.85rem;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Second photo crossfades in on hover, on top of the first, the card's own
   lift/shadow hover animation above keeps running at the same time. */
.product-card__image-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-card__image-hover {
    opacity: 1;
}

.product-name {
    margin-top: 0.75rem;
    font-size: 1rem;
}

.product-price {
    color: var(--color-accent);
    font-weight: 500;
}

.product-unavailable {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--color-unavailable);
}

.product-stock-note {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-accent);
    background-color: rgba(140, 110, 79, 0.1);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.product-stock-note::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-accent);
    flex: 0 0 auto;
}

.product-card .product-stock-note {
    margin-top: 0.5rem;
}

/* Search (US1.2) / category filter (US1.3) controls; sort remains
   placeholder UI this iteration (US1.4) */
.browse-controls {
    border: 1px solid var(--color-muted);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 2rem;
    background-color: #fff;
}


.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-unavailable);
}

/* Product detail */
.product-detail__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--color-muted);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-unavailable);
}

.product-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--color-text);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(46, 42, 38, 0.2);
    transition: background-color 0.2s ease, transform 0.2s cubic-bezier(.32,.72,0,1);
}

.product-gallery-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
}

.product-gallery-nav--prev {
    left: 0.75rem;
}

.product-gallery-nav--next {
    right: 0.75rem;
}

.product-detail__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.product-gallery-thumb {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    background: var(--color-muted);
    transition: border-color 0.2s cubic-bezier(.32,.72,0,1);
}

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

.product-gallery-thumb:hover {
    border-color: var(--color-muted);
}

.product-gallery-thumb--active {
    border-color: var(--color-accent);
}

.product-info-block {
    border-top: 1px solid var(--color-muted);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
}

.product-detail__cart-form {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    margin-bottom: 0.75rem;
}

.product-detail__quantity {
    width: 5rem;
    flex: 0 0 auto;
}

.btn-macrame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    border-radius: 10px;
    background-color: var(--color-accent);
    border: 1px solid var(--color-accent);
    color: #fff;
    font-family: "Jost", sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(140, 110, 79, 0.22);
    transition: transform 0.2s cubic-bezier(.32,.72,0,1), filter 0.2s ease, box-shadow 0.2s ease;
}

.btn-macrame:hover:not(:disabled) {
    filter: brightness(0.94);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(140, 110, 79, 0.28);
}

/* Secondary action variant (e.g. "Clear filters"), same shape as the primary
   button so it reads as a real button, not a text link, just visually
   subordinate to it. */
.btn-macrame--outline {
    background-color: transparent;
    border-color: var(--a-border, var(--color-muted));
    color: var(--a-text, var(--color-text));
    box-shadow: none;
}

.btn-macrame--outline:hover:not(:disabled) {
    background-color: var(--a-bg, var(--color-bg));
    border-color: var(--color-accent);
    color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-macrame--sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* Outlined danger variant, e.g. "Archive" inline with a status badge, a
   full solid-red button would out-shout the surrounding form chrome. */
.btn-macrame--danger-outline {
    background-color: transparent;
    border-color: rgba(194, 74, 63, 0.4);
    color: #C24A3F;
    box-shadow: none;
}

.btn-macrame--danger-outline:hover:not(:disabled) {
    background-color: rgba(194, 74, 63, 0.08);
    border-color: #C24A3F;
    color: #C24A3F;
    transform: translateY(-2px);
    box-shadow: none;
}

.btn-macrame:active:not(:disabled) {
    transform: scale(0.98) translateY(0);
}

.btn-macrame:disabled {
    background-color: var(--color-muted);
    border-color: var(--color-muted);
    color: var(--color-unavailable);
    box-shadow: none;
    opacity: 1;
}

/* Public "back" pill chip, storefront equivalent of .admin-back-link, not
   a bare underlined text link. */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    text-decoration: none;
    padding: 0.5rem 0.9rem 0.5rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--color-muted);
    background: #fff;
    margin-bottom: 1.5rem;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1), background-color 0.2s ease;
}

.back-link:hover {
    background: var(--color-bg);
    color: var(--color-text);
    transform: translateX(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .back-link,
    .hero__cta {
        transition: none;
    }
    .back-link:hover,
    .hero__cta:hover {
        transform: none;
    }
}

/* ==========================================================================
   Homepage: hero + intro (US8.1)
   Append this block to the end of webroot/css/site.css.
   Uses the existing design tokens (see product-listing-design-notes.md):
   background #FBF8F4, text #2E2A26, accent var(--color-accent),
   muted #D8CFC2, secondary #8C8378, font: Jost
   ========================================================================== */

.hero {
    position: relative;
    min-height: calc(100vh - 56px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background-color: #2E2A26; /* fallback while the photo loads */
    background-image: url('../img/hero-macrame.png');
    background-size: cover;
    background-position: center;

    /* Breaks the hero out of default.php's <main class="py-4"><div class="container">
       wrapper so it runs full-bleed instead of sitting boxed-in with side padding.
       margin-top cancels Bootstrap's py-4 top spacer (1.5rem) so the hero sits
       flush against the navbar with no gap above it. */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-top: -1.5rem;
}

.hero__overlay {
    max-width: 32rem;
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: rgba(251, 248, 244, 0.88); /* #FBF8F4 tint */
    color: #2E2A26;
    animation: hero-rise 0.7s cubic-bezier(.2, .8, .2, 1) both;
}

.hero__eyebrow {
    margin: 0 0 0.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8C8378;
}

.hero__title {
    margin: 0 0 0.75rem;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: clamp(2rem, 5vw, 2.75rem);
    color: #2E2A26;
}

.hero__tagline {
    margin: 0 0 1.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: 1.05rem;
    color: #2E2A26;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #FBF8F4;
    background-color: var(--color-accent);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(140, 110, 79, 0.25);
    transition: background-color 0.2s ease, transform 0.2s cubic-bezier(.32,.72,0,1), box-shadow 0.2s ease;
    gap: 0.5rem;
}

.hero__cta:hover,
.hero__cta:focus-visible {
    background-color: #8C8378;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(140, 110, 79, 0.3);
}

.hero__cta:focus-visible {
    outline: 2px solid #2E2A26;
    outline-offset: 3px;
}

/* Intro section
   ========================================================================== */

.intro {
    background-color: #FBF8F4;
    padding: 3.5rem 1.25rem;
}

.intro__inner {
    max-width: 42rem;
    margin: 0 auto;
    text-align: center;
}

.intro__heading {
    margin: 0 0 1rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 1.5rem;
    color: #2E2A26;
}

.intro__text {
    margin: 0;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: #2E2A26;
}

/* Social links (US8.4)
   ========================================================================== */

.social {
    background-color: #FBF8F4;
    padding: 0 1.25rem 3.5rem;
    border-top: 1px solid #D8CFC2;
}

.social__inner {
    max-width: 42rem;
    margin: 0 auto;
    padding-top: 2rem;
    text-align: center;
}

.social__label {
    margin: 0 0 1rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8C8378;
}

.social__list {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social__link {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: #2E2A26;
    text-decoration: none;
    border-bottom: 1px solid var(--color-accent);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.social__link:hover,
.social__link:focus-visible {
    color: var(--color-accent);
    border-color: #2E2A26;
}

.social__link:focus-visible {
    outline: 2px solid #2E2A26;
    outline-offset: 3px;
}

/* Motion
   ========================================================================== */

@keyframes hero-rise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero__overlay {
        animation: none;
    }
}

/* Mobile
   ========================================================================== */

@media (max-width: 640px) {
    .hero {
        min-height: 60vh;
        padding: 1.5rem 1rem;
    }

    .hero__overlay {
        padding: 2rem 1.25rem;
    }

    .intro {
        padding: 2.5rem 1rem;
    }
}


/* Admin login (US3.1) */
.admin-login-shell {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card-shell {
    width: 100%;
    max-width: 380px;
    background: var(--color-bg);
    border-radius: 22px;
    padding: 0.5rem;
    animation: admin-rise 0.6s cubic-bezier(.2,.8,.2,1) both;
}

.login-card {
    width: 100%;
    background: #fff;
    border: 1px solid var(--color-muted);
    border-radius: 18px;
    padding: 2.25rem;
    box-shadow: 0 20px 40px rgba(46, 42, 38, 0.06);
}

.login-card h1 {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.login-card .sub {
    color: var(--color-unavailable);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.login-card .field {
    margin-bottom: 1.1rem;
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 2.6rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 0.6rem;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: var(--color-unavailable);
    padding: 0.25rem;
    line-height: 1;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--color-text);
}

.turnstile-placeholder {
    margin-bottom: 1.1rem;
    border: 1px dashed var(--color-muted);
    border-radius: 4px;
    padding: 0.9rem;
    background: var(--color-bg);
    font-size: 0.75rem;
    color: var(--color-unavailable);
    text-align: center;
}

/* Flash confirmation/error toast: dead-center of the viewport regardless
   of scroll position or screen size, same fixed-center pattern as
   .cart-toast (already approved), just themed per message type instead of
   a single green. */
.message {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: var(--color-bg);
    color: var(--color-text);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    border: 1px solid var(--color-muted);
    border-top: 3px solid var(--color-accent);
    font-family: "Jost", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    box-shadow: 0 30px 70px rgba(46, 42, 38, 0.28);
    animation: message-in 0.3s cubic-bezier(.2,.8,.2,1) both;

    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 1200;
    width: min(480px, calc(100vw - 2.5rem));
    transform: translate(-50%, -50%);
}

.message--hidden {
    display: none;
}

/* Stack multiple flash messages instead of overlapping them */
.message ~ .message {
    top: calc(50% + 6rem);
}

.message__icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    background: var(--color-accent);
    flex: 0 0 auto;
    box-shadow: 0 8px 20px rgba(140, 110, 79, 0.35);
}

.message__text {
    flex: 1;
    color: var(--color-text);
    line-height: 1.4;
}

.message__close {
    background: var(--color-bg);
    border: 1px solid var(--color-muted);
    color: var(--color-unavailable);
    font-size: 0.7rem;
    padding: 0.3rem;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
    transition: color 0.2s ease, border-color 0.2s ease;
    position: absolute;
    top: -0.65rem;
    right: -0.65rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(46, 42, 38, 0.2);
}

.message__close:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
}

.message--error {
    border-top-color: #C24A3F;
}

.message--error .message__icon {
    background: #C24A3F;
    box-shadow: 0 8px 20px rgba(194, 74, 63, 0.35);
}

.message--success {
    border-top-color: #1F8A5C;
}

.message--success .message__icon {
    background: #1F8A5C;
    box-shadow: 0 8px 20px rgba(31, 138, 92, 0.35);
}

.message--warning {
    border-top-color: #B5793A;
}

.message--warning .message__icon {
    background: #B5793A;
    box-shadow: 0 8px 20px rgba(181, 121, 58, 0.35);
}

@keyframes message-in {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.92) translateY(10px); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1) translateY(0); }
}

@media (max-width: 480px) {
    .message {
        padding: 1.2rem 1.4rem;
        font-size: 0.95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .message {
        animation: none;
    }
}

/* Nav icons (Shop / Admin login), with Bootstrap tooltips revealing the
   destination on hover so icon-only nav items stay understandable. */
.nav-icon-link {
    color: var(--color-text);
    font-size: 1.2rem;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.nav-icon-link:hover,
.nav-icon-link:focus-visible {
    color: var(--color-accent);
}

.nav-icon-link--cart {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -6px;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    border-radius: 999px;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    line-height: 1.1rem;
    text-align: center;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1);
}

.cart-badge--hidden {
    display: none;
}

.social__list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.social__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #D8CFC2;
    border-radius: 999px;
    background-color: #fff;
    color: #2E2A26;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.social__link i {
    font-size: 1.25rem;
    line-height: 1;
}

.social__link:hover,
.social__link:focus-visible {
    color: #FBF8F4;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.social__link:focus-visible {
    outline: 2px solid #2E2A26;
    outline-offset: 3px;
}

/* ==========================================================================
   Admin dashboard shell (US3.1 dashboard). Separate visual surface from the
   public storefront. Admin supports light + dark (toggle in the topbar,
   persisted in localStorage); the public storefront stays light-only by
   design (see product-listing-design-notes.md), this only affects the
   admin surface via [data-theme] scoped to .admin-body.
   Chart data marks use a separate validated palette per mode, see
   docs/design/dashboard-chart-palette.md.
   ========================================================================== */

:root {
    --a-bg: var(--color-bg);
    --a-surface: #fff;
    --a-text: var(--color-text);
    --a-muted: var(--color-muted);
    --a-unavailable: var(--color-unavailable);
    --a-accent: var(--color-accent);
    --a-shadow: rgba(46, 42, 38, 0.09);
}

html[data-theme="dark"] {
    --a-bg: #17140f;
    --a-surface: #211c15;
    --a-text: #f2ede4;
    --a-muted: #3a3226;
    --a-unavailable: #a89c86;
    --a-accent: #d19b63;
    --a-shadow: rgba(0, 0, 0, 0.35);
}

.admin-body {
    background-color: var(--a-bg);
    font-family: "Jost", -apple-system, "Segoe UI", sans-serif;
    color: var(--a-text);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 232px;
    flex-shrink: 0;
    background: var(--a-surface);
    border-right: 1px solid var(--a-muted);
    display: flex;
    flex-direction: column;
    padding: 1.75rem 1.1rem;
}

.admin-sidebar__brand {
    display: block;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 2rem;
    padding: 0 0.5rem;
    color: var(--a-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.admin-sidebar__brand:hover {
    color: var(--a-accent);
}

.admin-sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.admin-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.8rem;
    border-radius: 10px;
    color: var(--a-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s cubic-bezier(.32,.72,0,1), transform 0.3s cubic-bezier(.32,.72,0,1);
}

.admin-sidebar__link:hover:not(.admin-sidebar__link--disabled):not(.admin-sidebar__link--active) {
    background-color: var(--a-bg);
    transform: translateX(3px);
}

.admin-sidebar__link--active {
    background-color: var(--a-accent);
    color: #fff;
}

.admin-sidebar__link--disabled {
    color: var(--a-unavailable);
    cursor: default;
    justify-content: space-between;
}

.admin-sidebar__link--disabled small {
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--a-bg);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.admin-sidebar__logout {
    margin-top: auto;
    border-top: 1px solid var(--a-muted);
    padding-top: 1rem;
}

.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.35rem 2.25rem;
    border-bottom: 1px solid var(--a-muted);
    background: var(--a-surface);
}

.admin-topbar__title {
    font-weight: 500;
    font-size: 1.15rem;
}

.admin-topbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--a-muted);
    background: var(--a-bg);
    color: var(--a-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s cubic-bezier(.2,.8,.2,1);
}

.admin-theme-toggle:hover {
    background: var(--a-muted);
    transform: rotate(-12deg);
}

.admin-topbar__user {
    font-size: 0.85rem;
    color: var(--a-unavailable);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-content {
    padding: 2.25rem;
    flex: 1;
    max-width: 1400px;
}

/* Tabler (https://tabler.io, MIT) re-themed to our brand tokens instead of
   overriding it component-by-component. Tabler's own CSS is built on
   Bootstrap 5.3 custom properties (--tblr-*), so swapping these at :root
   re-colors every stock Tabler component (cards, navbar, buttons) for free. */
:root {
    --tblr-primary: var(--color-accent);
    --tblr-primary-rgb: 140, 110, 79;
    --tblr-body-bg: var(--color-bg);
    --tblr-body-color: var(--color-text);
    --tblr-border-color: var(--color-muted);
    --tblr-secondary-color: var(--color-unavailable);
    --tblr-body-font-family: "Jost", -apple-system, "Segoe UI", sans-serif;
    --tblr-border-radius: 12px;
    --tblr-border-radius-sm: 10px;
    --tblr-border-radius-lg: 14px;
}

html[data-bs-theme="dark"] {
    --tblr-primary: #d19b63;
    --tblr-primary-rgb: 209, 155, 99;
    --tblr-body-bg: #17140f;
    --tblr-body-color: #f2ede4;
    --tblr-border-color: #3a3226;
    --tblr-secondary-color: #a89c86;
    --tblr-bg-surface: #211c15;
    --tblr-card-bg: #211c15;
}

.admin-content .card {
    box-shadow: 0 14px 30px var(--a-shadow);
    animation: admin-rise 0.5s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes admin-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.kpi-tile {
    border: none;
    color: #fff;
    /* Entrance handled by Motion One (staggered), not the shared admin-rise
       keyframe, opacity starts at 0 here so there's no flash-then-reset. */
    animation: none;
    opacity: 0;
}

.kpi-tile--link {
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-tile--link:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.kpi-tile .h1 {
    color: #fff;
}

.kpi-tile__label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.kpi-tile__delta {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.admin-sparkline {
    display: block;
    width: 100%;
    height: 28px;
    margin-top: 0.75rem;
}

/* Charts: Chart.js (canvas), not hand-rolled SVG, real anti-aliased
   rendering, gradients, and tooltips. Categorical palette is validated
   separately, see docs/design/dashboard-chart-palette.md. Chart chrome
   (page, cards) stays on brand tokens; only chart.js series colors use the
   validated palette. */
.chart-wrap {
    position: relative;
    height: 240px;
}


.chart-wrap--zoomable {
    cursor: zoom-in;
}

.admin-chart-subtitle {
    font-size: 0.72rem;
    opacity: 0.65;
}

@media (max-width: 1100px) {
    .admin-chart-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        padding: 0.75rem 1rem;
    }
    .admin-sidebar__brand { margin: 0 1rem 0 0; }
    .admin-sidebar__nav { flex-direction: row; flex: none; }
    .admin-sidebar__logout { margin: 0 0 0 auto; border-top: none; padding-top: 0; }
    .admin-content { padding: 1.25rem; }
    .admin-stat-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .admin-stat-card,
    .admin-panel,
    .admin-sidebar__link {
        transition: none;
        animation: none;
    }
    .admin-stat-card:hover {
        transform: none;
    }
}

/* Chart zoom modal */
.chart-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.chart-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(46, 42, 38, 0.45);
    animation: chart-modal-fade 0.2s ease both;
}

.chart-modal__panel {
    position: relative;
    background: var(--a-surface);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 900px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
    animation: chart-modal-rise 0.3s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes chart-modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes chart-modal-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chart-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--a-bg);
    color: var(--a-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    line-height: 1;
    font-size: 1rem;
    padding: 0;
    /* .chart-modal__body (the ApexCharts SVG) is a later sibling in the DOM
       and its top edge overlaps this button's bottom-left corner, without an
       explicit stacking order the later sibling paints on top there and
       swallows clicks in that sliver, this button must always win. */
    z-index: 5;
}

.chart-modal__close i {
    line-height: 1;
    display: block;
}

.chart-modal__close:hover {
    background: var(--a-muted);
}

.chart-modal__body {
    padding-top: 0.5rem;
    height: 60vh;
    position: relative;
}

@media (prefers-reduced-motion: reduce) {
    .chart-modal__backdrop,
    .chart-modal__panel {
        animation: none;
    }
}

/* Shared admin confirm modal, replaces window.confirm() everywhere in the
   admin centre (category/product archive, and anywhere else that reaches
   for [data-confirm-title] going forward). */
.admin-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.admin-confirm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(46, 42, 38, 0.5);
    animation: chart-modal-fade 0.2s ease both;
}

.admin-confirm-modal__panel {
    position: relative;
    background: var(--a-surface);
    color: var(--a-text);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
    animation: chart-modal-rise 0.3s cubic-bezier(.2,.8,.2,1) both;
}

.admin-confirm-modal__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: rgba(140, 110, 79, 0.12);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.admin-confirm-modal__icon--danger {
    background: rgba(194, 74, 63, 0.12);
    color: #C24A3F;
}

.admin-confirm-modal__title {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.admin-confirm-modal__body {
    color: var(--a-text);
    opacity: 0.75;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.admin-confirm-modal__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.admin-confirm-modal__actions .btn-macrame {
    flex: 1;
}

.btn-macrame--danger {
    background-color: #C24A3F;
    border-color: #C24A3F;
}

.btn-macrame--danger:hover:not(:disabled) {
    filter: brightness(0.92);
}

@media (prefers-reduced-motion: reduce) {
    .admin-confirm-modal__backdrop,
    .admin-confirm-modal__panel {
        animation: none;
    }
}

/* Admin product management (US3.2, US3.3) */
.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.admin-page-header .admin-welcome {
    margin-bottom: 0;
}

/* Table sits in the same double-bezel shell as the rest of the dashboard,
   not a bare <table> dropped on the page. */
.admin-table-shell {
    background: var(--a-bg);
    border-radius: 18px;
    padding: 0.4rem;
}

.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.admin-filter-bar .input {
    margin-bottom: 0;
}

.admin-filter-bar__search {
    position: relative;
    flex: 1 1 240px;
    min-width: 200px;
}

.admin-filter-bar__search i {
    position: absolute;
    top: 50%;
    left: 0.75rem;
    transform: translateY(-50%);
    color: var(--a-unavailable);
    pointer-events: none;
}

.admin-filter-bar__search .form-control {
    padding-left: 2.2rem;
}

.admin-filter-bar .form-select {
    width: auto;
    flex: 0 0 auto;
}

.admin-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0.5rem 0.5rem;
}

.admin-pagination__summary {
    font-size: 0.85rem;
    color: var(--a-unavailable);
}

.admin-table-shell .admin-panel {
    margin-bottom: 0;
    padding: 0.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table th {
    text-align: left;
    font-weight: 500;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--a-unavailable);
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--a-muted);
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--a-bg);
    vertical-align: middle;
}

.admin-table tbody tr {
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.admin-table tbody tr:hover {
    background-color: var(--a-bg);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table__thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.admin-table__thumb--empty {
    background: var(--a-muted);
}

.admin-sort-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--a-unavailable);
    margin-bottom: 0.75rem;
}

.admin-sort-bar a {
    color: var(--a-accent);
    text-decoration: none;
}

.admin-sort-bar a:hover {
    text-decoration: underline;
}

.admin-sort-bar a.asc::after {
    content: ' \2191';
}

.admin-sort-bar a.desc::after {
    content: ' \2193';
}

/* Product cards: a big square photo is the whole point, Rhea should be
   able to recognize a product on sight, not read its name in an 11px cell. */
.admin-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.admin-product-card {
    background: var(--a-surface);
    border: 1px solid var(--a-muted);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(.32,.72,0,1), box-shadow 0.25s cubic-bezier(.32,.72,0,1);
}

.admin-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px var(--a-shadow);
}

.admin-product-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--a-bg);
}

.admin-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-product-card__image--empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--a-unavailable);
    font-size: 2rem;
}

.admin-product-card__badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
}

.admin-product-card__body {
    padding: 0.9rem 1rem 1rem;
}

.admin-product-card__name {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
    color: var(--a-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-product-card__meta {
    font-size: 0.78rem;
    color: var(--a-unavailable);
    margin: 0 0 0.4rem;
}

.admin-product-card__dot {
    margin: 0 0.3rem;
}

.admin-product-card__price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--a-accent);
    margin: 0 0 0.75rem;
}

.admin-product-card__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 0.5rem;
    column-gap: 1rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--a-muted);
}

.admin-table__edit {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--a-accent);
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1);
}

.admin-table__edit:hover {
    transform: translateX(2px);
    color: var(--a-accent);
}

.admin-table__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.admin-table__archive,
.admin-table__restore {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1);
    /* Both render as <button> now (fancy confirm modal needs a real
       element to attach form= to), reset the browser's default button
       chrome so they still read as the same understated text-link as
       .admin-table__edit, not a boxed 90s-era button. */
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

.admin-table__archive {
    color: var(--a-unavailable);
}

.admin-table__archive:hover {
    color: #C24A3F;
    transform: translateX(2px);
}

.admin-table__restore {
    color: #1F8A5C;
}

.admin-table__restore:hover {
    transform: translateX(2px);
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.admin-badge--active {
    background: #EEF3EA;
    color: #3B5A2E;
}

.admin-badge--inactive {
    background: var(--a-muted);
    color: var(--a-unavailable);
}

.admin-badge--special {
    background: #FCEFD1;
    color: #8A6416;
}

/* Active/Inactive sits top-right (admin-product-card__badge default),
   Special/Seasonal share the top-left slot. A product can only be one or
   the other (AdminProductsController enforces this), so both badges use
   the same top offset - whichever renders takes the slot, no reserved
   gap left behind by the one that isn't showing. If a product is ever
   allowed to hold both again, give the second one `top: 2.5rem` there. */
.admin-product-card__badge--special,
.admin-product-card__badge--seasonal {
    left: 0.6rem;
    right: auto;
}

.admin-badge--seasonal {
    background: #D9E8F2;
    color: #1F5A80;
}

.admin-table__special {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 500;
    font-size: 0.85rem;
    text-decoration: none;
    color: var(--a-unavailable);
    transition: transform 0.2s cubic-bezier(.32,.72,0,1);
}

.admin-table__special:hover {
    color: #8A6416;
    transform: translateX(2px);
}

.admin-table__special--on {
    color: #8A6416;
}

/* Back-to-list link, styled as a proper pill chip, not a bare underlined
   text link floating above the panel. */
.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--a-text);
    text-decoration: none;
    padding: 0.5rem 0.9rem 0.5rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--a-muted);
    background: var(--a-surface);
    margin-bottom: 1.5rem;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1), background-color 0.2s ease;
}

.admin-back-link:hover {
    background: var(--a-bg);
    color: var(--a-text);
    transform: translateX(-2px);
}

.error-message {
    color: #C24A3F;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

/* Photo dropzone: click-anywhere-in-the-box upload with a live preview,
   replaces the old bare <input type="file">. The real file input is
   visually hidden but still focusable/keyboard-operable via the label's
   `for` association, not display:none. */
.admin-dropzone {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 2px dashed var(--a-muted);
    border-radius: 14px;
    background: var(--a-bg);
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admin-dropzone:hover {
    border-color: var(--a-accent);
    background: var(--a-surface);
}

.admin-dropzone--small {
    aspect-ratio: 16 / 9;
}

.admin-dropzone__preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.admin-dropzone__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--a-unavailable);
    font-size: 0.85rem;
    text-align: center;
}

.admin-dropzone__empty i {
    font-size: 1.8rem;
}

.admin-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Two-column grid where each row pairs a left/right card (details+main
   photo, colours+hover photo, gallery+save), grid-auto-rows sizes each row
   to its tallest cell so both columns' edges land on the same lines,
   forming one aligned rectangle instead of two independently-stacked
   columns of mismatched heights. Any card added later just slots in as
   another paired row. */
.admin-form-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 1.5rem;
    align-items: stretch;
}

.admin-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-form-grid__cell {
    display: flex;
}

.admin-form-grid__cell > .card {
    width: 100%;
}

.admin-form-grid__cell--actions {
    align-items: flex-end;
}

.admin-form-actions-sticky {
    position: sticky;
    top: 1.5rem;
    width: 100%;
}

@media (max-width: 991px) {
    .admin-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .admin-page-header { flex-direction: column; align-items: flex-start; }
    .admin-table { display: block; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-macrame,
    .admin-table__edit,
    .admin-back-link,
    .admin-table tbody tr {
        transition: none;
    }
    .btn-macrame:hover:not(:disabled) {
        transform: none;
    }
}

/* Product colour swatches (product detail page) */
.product-colours {
    margin: 1rem 0 1.25rem;
}

.product-colours__label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.product-colours__swatches {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.product-colour-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--color-muted);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s cubic-bezier(.32,.72,0,1), box-shadow 0.2s ease;
}

.product-colour-swatch:hover {
    transform: scale(1.1);
}

.product-colour-swatch--active {
    box-shadow: 0 0 0 2px var(--color-accent);
}

.product-colours__current {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-unavailable);
}

@media (prefers-reduced-motion: reduce) {
    .product-colour-swatch {
        transition: none;
    }
    .product-colour-swatch:hover {
        transform: none;
    }
}

/* Admin colour variant rows (product add/edit form) */
.admin-colours-field {
    margin-top: 0.5rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--a-muted);
}

.admin-colours-hint {
    font-size: 0.8rem;
    color: var(--a-unavailable);
    margin-bottom: 0.9rem;
}

.admin-colour-row {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.85rem;
    border: 1px solid var(--a-muted);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    position: relative;
}

.admin-colour-swatches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 0.4rem;
}

.admin-colour-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--a-muted);
    padding: 0;
    cursor: pointer;
    transition: transform 0.15s cubic-bezier(.32,.72,0,1), border-color 0.15s ease;
}

.admin-colour-swatch:hover {
    transform: scale(1.12);
}

.admin-colour-swatch--active {
    border-color: var(--a-accent);
    box-shadow: 0 0 0 2px var(--a-bg), 0 0 0 3px var(--a-accent);
}

.admin-colour-swatch--other {
    background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red);
    font-size: 0;
    overflow: hidden;
    text-indent: -999px;
}

.admin-colour-native-picker {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.admin-colour-name {
    width: 100%;
}

.admin-colour-photo {
    width: 100%;
    font-size: 0.8rem;
}

.admin-colour-preview {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--a-muted);
}

.admin-colour-remove {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: none;
    background: var(--a-bg);
    color: var(--a-unavailable);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.admin-colour-remove:hover {
    background: #FCEEEA;
    color: #C24A3F;
}

.admin-add-colour-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    border: 1px dashed var(--a-muted);
    background: none;
    color: var(--a-accent);
    font-family: "Jost", sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admin-add-colour-btn:hover {
    border-color: var(--a-accent);
    background: var(--a-bg);
}

@media (max-width: 600px) {
    .admin-colour-row { flex-wrap: wrap; }
}

.admin-gallery-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}

.admin-gallery-photo {
    flex: 1;
    min-width: 0;
    font-size: 0.8rem;
}

.admin-gallery-preview {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--a-muted);
}

/* Public error page (404, etc), real customers can land here */
.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    padding: 2rem 1.25rem;
}

.error-page__inner {
    max-width: 480px;
    text-align: center;
}

.error-page__inner h2 {
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.error-page__inner p.error {
    color: var(--color-unavailable);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.error-page__inner .back-link {
    margin: 0 auto;
}
/* Enquiry form: red border on the actual input when it has an error. */
.enquiry-card .form-error,
.enquiry-card .is-invalid,
.enquiry-card .mb-3:has(.error-message) .form-control,
.enquiry-card .mb-3:has(.error-message) .form-select {
    border: 1px solid #C24A3F;
}

.enquiry-card .form-error:focus,
.enquiry-card .is-invalid:focus,
.enquiry-card .mb-3:has(.error-message) .form-control:focus,
.enquiry-card .mb-3:has(.error-message) .form-select:focus {
    border-color: #C24A3F;
    box-shadow: 0 0 0 0.2rem rgba(194, 74, 63, 0.2);
}

/* Admin add/edit forms: same red-border-on-error treatment as the public
   enquiry form, plus a required-field asterisk. */
.card .mb-3:has(.error-message) .form-control,
.card .mb-3:has(.error-message) .form-select {
    border: 1px solid #C24A3F;
    background-color: rgba(194, 74, 63, 0.06);
}

.card .mb-3:has(.error-message) .form-control:focus,
.card .mb-3:has(.error-message) .form-select:focus {
    border-color: #C24A3F;
    box-shadow: 0 0 0 0.2rem rgba(194, 74, 63, 0.2);
}

/* Checkout form: same red-border treatment, but the field wrappers here
   are Bootstrap grid columns (.col-12/.col-md-6 etc), not .mb-3, so the
   :has() selector needs to key off those instead, catches both the
   client-side inline JS validation and any server-rendered error. */
.checkout-form-fields [class*="col-"]:has(.error-message) .form-control,
.checkout-form-fields [class*="col-"]:has(.error-message) .form-select {
    border: 1px solid #C24A3F;
    background-color: rgba(194, 74, 63, 0.06);
}

.checkout-form-fields [class*="col-"]:has(.error-message) .form-control:focus,
.checkout-form-fields [class*="col-"]:has(.error-message) .form-select:focus {
    border-color: #C24A3F;
    box-shadow: 0 0 0 0.2rem rgba(194, 74, 63, 0.2);
}

.required-mark {
    color: #C24A3F;
    margin-left: 0.15rem;
}

.admin-form-error-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(194, 74, 63, 0.08);
    border: 1px solid #C24A3F;
    color: #C24A3F;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ── Pattern icon picker ─────────────────────────────────────────────── */
.pattern-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pattern-option__input {
    /* Visually hidden but still focusable/keyboard-operable, matching the
       admin dropzone technique already used elsewhere in site.css. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pattern-option__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 92px;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--color-muted, #D8CFC2);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.pattern-option__card:hover {
    border-color: var(--color-accent, #8C6E4F);
    transform: translateY(-1px);
}

.pattern-option__input:checked + .pattern-option__card {
    border-color: var(--color-accent, #8C6E4F);
    box-shadow: 0 0 0 2px rgba(140, 110, 79, 0.18);
    background: #FBF8F4;
}

.pattern-option__input:focus-visible + .pattern-option__card {
    outline: 2px solid var(--color-accent, #8C6E4F);
    outline-offset: 2px;
}

.pattern-option__label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--color-text, #2E2A26);
}

/* Pattern icon shapes — pure CSS, no image assets */
.pattern-icon {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid var(--color-muted, #D8CFC2);
}

.pattern-icon--solid {
    background-color: var(--color-accent, #8C6E4F);
}

.pattern-icon--checkers {
    background-image:
        repeating-conic-gradient(
            var(--color-accent, #8C6E4F) 0% 25%,
            #fff 0% 50%
        );
    background-size: 16px 16px;
}

.pattern-icon--stripe {
    background-image: repeating-linear-gradient(
        45deg,
        var(--color-accent, #8C6E4F) 0px,
        var(--color-accent, #8C6E4F) 6px,
        #fff 6px,
        #fff 12px
    );
}

.pattern-icon--other {
    display: flex;
    align-items: center;
    justify-content: center;
    border-style: dashed;
    color: var(--color-unavailable, #8C8378);
    font-size: 1.1rem;
    font-weight: 600;
    background: #fff;
}
.pattern-icon--other::after {
    content: "?";
}

@media (prefers-reduced-motion: reduce) {
    .pattern-option__card {
        transition: none;
    }
    .pattern-option__card:hover {
        transform: none;
    }
}

/* ── Colour swatch picker ────────────────────────────────────────────── */
.colour-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.colour-option {
    position: relative;
}

.colour-option__input {
    /* Visually hidden but focusable, same technique as the pattern picker
       and the admin dropzone in site.css. */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.colour-option__swatch {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--color-muted, #D8CFC2);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.colour-option__swatch:hover {
    transform: scale(1.08);
}

.colour-option__input:checked + .colour-option__swatch {
    box-shadow: 0 0 0 3px var(--color-accent, #8C6E4F);
    transform: scale(1.05);
}

.colour-option__input:focus-visible + .colour-option__swatch {
    outline: 2px solid var(--color-accent, #8C6E4F);
    outline-offset: 3px;
}

.colour-option__input:disabled + .colour-option__swatch {
    cursor: not-allowed;
    opacity: 0.35;
}

/* Actual swatch colours — earthy/muted tones to suit macramé rope,
   still clearly identifiable as each named colour. */
.colour-option__swatch--red      { background-color: #B5453A; }
.colour-option__swatch--orange   { background-color: #C97A3D; }
.colour-option__swatch--pink     { background-color: #D896A0; }
.colour-option__swatch--blue     { background-color: #4C6E8C; }
.colour-option__swatch--green    { background-color: #6B8557; }
.colour-option__swatch--purple   { background-color: #7C6690; }
.colour-option__swatch--yellow   { background-color: #D3B24C; }
.colour-option__swatch--brown    { background-color: #7A5B3F; }
.colour-option__swatch--beige    { background-color: #D9C8A9; }

@media (prefers-reduced-motion: reduce) {
    .colour-option__swatch {
        transition: none;
    }
    .colour-option__swatch:hover {
        transform: none;
    }
    .colour-option__input:checked + .colour-option__swatch {
        transform: none;
    }
}

.by-category__tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.by-category__tab {
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.9rem;
    color: #2E2A26;
    background-color: transparent;
    border: 1px solid #D8CFC2;
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.by-category__tab:hover,
.by-category__tab:focus-visible {
    border-color: #B08A63;
}

.by-category__tab.is-active {
    background-color: #B08A63;
    border-color: #B08A63;
    color: #FBF8F4;
}

.by-category__tab:focus-visible {
    outline: 2px solid #2E2A26;
    outline-offset: 2px;
}

.by-category__panel {
    animation: card-fade-in 0.25s ease;
}

@keyframes card-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .by-category__panel {
        animation: none;
    }
}

/* About Rhea (homepage)
   ========================================================================== */

.about {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(3rem, 7vw, 8rem);
    background-color: var(--color-bg);
    padding: clamp(5rem, 9vw, 9rem) 6vw;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

/* Visual
   ========================================================================== */

.about__visual {
    position: relative;
    min-width: 0;
}

.about__image-wrap {
    position: relative;
    width: 60%;
    max-width: 650px;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--color-muted);
    margin-left: auto;
}

.about__image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(.2, .8, .2, 1);
}

.about__visual:hover .about__image {
    transform: scale(1.025);
}

.about__caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 60%;
    max-width: 650px;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-muted);
    font-family: 'Jost', sans-serif;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-unavailable);
    margin-left: auto;
}

.about__caption span:first-child {
    color: var(--color-accent);
}

/* Content
   ========================================================================== */

.about__content {
    position: relative;
    width: 100%;
    max-width: 580px;
}

.about__heading {
    position: relative;
    margin: 0 0 1.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: clamp(3.5rem, 6vw, 6rem);
    line-height: 0.9;
    letter-spacing: -0.055em;
    color: var(--color-text);
}

.about__intro {
    max-width: 460px;
    margin: 0 0 1.5rem;
    font-family: 'Jost', sans-serif;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.4;
    color: var(--color-text);
}

.about__text {
    max-width: 500px;
    margin: 0;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-unavailable);
}

/* Decorative knot detail
   ========================================================================== */

.about::before {
    content: "";
    position: absolute;
    width: 280px;
    height: 280px;
    right: -170px;
    top: -160px;
    border: 1px solid var(--color-muted);
    border-radius: 50%;
    pointer-events: none;
}

.about::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    left: -110px;
    bottom: -110px;
    border: 1px solid var(--color-muted);
    border-radius: 50%;
    pointer-events: none;
}

/* Keep the section visually calm on reduced-motion devices */
@media (prefers-reduced-motion: reduce) {
    .about__image {
        transition: none;
    }

    .about__visual:hover .about__image {
        transform: none;
    }
}

/* Tablet
   ========================================================================== */

@media (max-width: 900px) {
    .about {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        padding: 5rem 5vw;
    }

    .about__heading {
        font-size: clamp(3rem, 7vw, 4.5rem);
    }

    .about__details {
        grid-template-columns: 1fr;
        gap: 0.9rem;
    }
}

/* Mobile
   ========================================================================== */

@media (max-width: 640px) {
    .about {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 4.5rem 1.25rem;
    }

    .about__visual {
        width: 100%;
    }

    .about__image-wrap {
        max-width: none;
        aspect-ratio: 1 / 1;
    }

    .about__caption {
        font-size: 0.65rem;
    }

    .about__content {
        max-width: none;
    }

    .about__heading {
        font-size: clamp(3.5rem, 18vw, 5rem);
        margin-bottom: 1.25rem;
    }

    .about__intro {
        font-size: 1.2rem;
    }

    .about__details {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        margin-top: 2.5rem;
    }

    .about__details div {
        font-size: 0.62rem;
    }

    .about::before {
        width: 220px;
        height: 220px;
        right: -130px;
        top: -110px;
    }

    .about::after {
        width: 140px;
        height: 140px;
        left: -90px;
        bottom: -80px;
    }
}

.contact {
    position: relative;
    background-color: var(--color-accent);
    color: #FBF8F4;
    padding: clamp(5rem, 9vw, 8rem) 1.25rem;
    text-align: center;
    border-top: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

.contact::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    left: -110px;
    top: -110px;
    border: 1px solid rgba(251, 248, 244, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.contact::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -110px;
    bottom: -110px;
    border: 1px solid rgba(251, 248, 244, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

.contact__inner {
    position: relative;
    max-width: 34rem;
    margin: 0 auto;
}

.contact .section-eyebrow {
    color: rgba(251, 248, 244, 0.75);
}

.contact__heading {
    margin: 0 0 0.75rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    letter-spacing: -0.02em;
    color: #FBF8F4;
}

.contact__text {
    margin: 0 0 1.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(251, 248, 244, 0.85);
}

.contact__cta {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 10px;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text);
    background-color: #FBF8F4;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact__cta:hover,
.contact__cta:focus-visible {
    background-color: #fff;
    transform: translateY(-2px);
}

.contact__cta:focus-visible {
    outline: 2px solid #FBF8F4;
    outline-offset: 3px;
}

/* Scroll-reveal (homepage)
   ========================================================================== */

[data-reveal] {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(.2, .8, .2, 1), transform 0.7s cubic-bezier(.2, .8, .2, 1);
}

[data-reveal="left"] {
    transform: translateX(-30px);
}

[data-reveal="right"] {
    transform: translateX(30px);
}

[data-reveal="up"] {
    transform: translateY(24px);
}

[data-reveal].is-visible {
    opacity: 1;
    transform: translateX(0) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Section eyebrow
   override existed)
   ========================================================================== */

.section-eyebrow {
    margin: 0 0 0.75rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-unavailable);
}

/* Shop by category
   ========================================================================== */

.by-category {
    position: relative;
    background-color: var(--color-bg);
    padding: clamp(5rem, 9vw, 8rem) 1.25rem;
    text-align: center;
    border-top: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    overflow: hidden;
}

.by-category__inner {
    max-width: 72rem;
    margin: 0 auto;
}

.by-category__heading {
    margin: 0 0 2rem;
    font-family: 'Jost', sans-serif;
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 3rem);
    letter-spacing: -0.02em;
    color: var(--color-text);
    text-align: center;
}

.by-category .section-eyebrow {
    text-align: center;
}

    .statement__knot {
        width: 3rem;
        height: 3rem;
        color: #B08A63;
        margin-bottom: 1.5rem;
    }

    .statement__text {
        margin: 0;
        font-family: 'Jost', sans-serif;
        font-weight: 600;
        font-size: clamp(2.5rem, 7vw, 5rem);
        line-height: 1.05;
        color: #2E2A26;
        letter-spacing: -0.01em;
    }

    .about {
        clip-path: polygon(0 4%, 100% 0, 100% 96%, 0 100%);
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .section-dots {
        position: fixed;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        z-index: 40;
    }

    .section-dots__dot {
        width: 0.6rem;
        height: 0.6rem;
        border-radius: 50%;
        background-color: #D8CFC2;
        transition: background-color 0.2s ease, transform 0.2s ease;
    }

    .section-dots__dot:hover,
    .section-dots__dot:focus-visible {
        background-color: #B08A63;
    }

    .section-dots__dot.is-active {
        background-color: #B08A63;
        transform: scale(1.4);
    }

    @media (max-width: 768px) {
        .section-dots {
            display: none;
        }
    }

/* Admin enquiries list (US3.6) — card rows, not a bare data table. Reuses
   the same --a-* theme tokens and .colour-option__swatch-- colour classes
   as the rest of the admin portal and the public enquiry form, so nothing
   here introduces a second palette to keep in sync. */
.enquiry-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-enquiry-card {
    position: relative;
    display: flex;
    gap: 1rem;
    background: var(--a-bg);
    border: 1px solid var(--a-muted);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.admin-enquiry-card:hover {
    border-color: var(--a-accent);
    box-shadow: 0 8px 20px rgba(140, 110, 79, 0.12);
}

/* The stretched-link (Tabler/Bootstrap utility) makes the whole card
   clickable to the enquiry detail page. Real inner links/controls (email,
   phone, photo, message toggle) need their own stacking context above it
   so they stay independently clickable instead of the card link eating
   every click. */
.enquiry-card__contact a,
.enquiry-thumb,
.enquiry-card__message summary {
    position: relative;
    z-index: 2;
}

.enquiry-card__avatar {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
    background: hsl(var(--avatar-hue, 30), 38%, 45%);
}

.enquiry-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.enquiry-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.enquiry-card__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.enquiry-card__name {
    font-weight: 600;
    color: var(--a-text);
}

.enquiry-card__item {
    font-size: 0.78rem;
    color: var(--a-unavailable);
}

.enquiry-card__time {
    font-size: 0.78rem;
    color: var(--a-unavailable);
    white-space: nowrap;
}

.enquiry-card__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin-top: 0.35rem;
    font-size: 0.82rem;
}

.enquiry-card__contact a {
    color: var(--a-text);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.enquiry-card__contact a:hover {
    color: var(--a-accent);
}

.enquiry-card__contact i {
    color: var(--a-unavailable);
}

.admin-badge--custom {
    background: #F3E7D8;
    color: #8C6E4F;
}

:root[data-theme="dark"] .admin-badge--custom {
    background: #3a3226;
    color: #d19b63;
}

.admin-badge--general {
    background: var(--a-muted);
    color: var(--a-unavailable);
}

.enquiry-card__specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.65rem;
}

.enquiry-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--a-text);
    background: var(--a-muted);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
}

.enquiry-chip i {
    color: var(--a-unavailable);
}

.enquiry-chip--colours {
    gap: 0.3rem;
    padding: 0.3rem 0.55rem;
}

.enquiry-chip--colours .colour-option__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.enquiry-thumb {
    display: block;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--a-muted);
}

.enquiry-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.enquiry-card__message {
    margin-top: 0.65rem;
}

.enquiry-card__message summary {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--a-accent);
    list-style: none;
}

.enquiry-card__message summary::-webkit-details-marker {
    display: none;
}

.enquiry-card__message summary::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 0.35rem;
    transition: transform 0.15s ease;
}

.enquiry-card__message[open] summary::before {
    transform: rotate(90deg);
}

.enquiry-card__message p {
    margin: 0.5rem 0 0;
    font-size: 0.85rem;
    color: var(--a-text);
    white-space: pre-line;
}

@media (max-width: 640px) {
    .admin-enquiry-card {
        flex-direction: column;
    }

    .enquiry-card__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Enquiry detail page (US3.6): facts panel, previous-enquiries list,
   conversation thread + reply box. */
.enquiry-detail__stack {
    flex-direction: column;
}

.enquiry-detail__facts dt {
    color: var(--a-unavailable);
    font-size: 0.82rem;
}

.enquiry-detail__facts dd {
    font-size: 0.9rem;
}

.enquiry-history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.enquiry-history-list a {
    color: var(--a-text);
    text-decoration: none;
    font-size: 0.88rem;
}

.enquiry-history-list a:hover {
    color: var(--a-accent);
}

.enquiry-thread {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    max-height: 480px;
    overflow-y: auto;
}

.enquiry-thread__message {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    max-width: 85%;
}

.enquiry-thread__message--customer {
    background: var(--a-muted);
    align-self: flex-start;
}

.enquiry-thread__message--admin {
    background: #F3E7D8;
    align-self: flex-end;
}

:root[data-theme="dark"] .enquiry-thread__message--admin {
    background: #3a3226;
}

.enquiry-thread__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    color: var(--a-unavailable);
    margin-bottom: 0.3rem;
}

.enquiry-thread__meta span:first-child {
    font-weight: 600;
    color: var(--a-text);
}

.enquiry-thread__message p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--a-text);
}

.enquiry-thread__unsent {
    color: #B5453A;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Global underline kill. Tabler's own base styles underline links on
   hover/focus by default (a:hover/a:focus, which outweighs a single class
   selector on specificity) — every card/nav-link hover state in this app
   already communicates "interactive" via background/color/transform, an
   underline on top of that reads as broken, not as a link. This rule's
   specificity matches the offending one and site.css loads last, so it
   wins on source order. Kept last in the file so nothing after it re-wins. */

/* Admin categories list — card rows, same language as the admin enquiries
   list (icon circle, chips, stretched-link, colour-coded per name). */
.admin-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.admin-category-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--a-bg);
    border: 1px solid var(--a-muted);
    border-radius: 14px;
    padding: 1rem 1.15rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.admin-category-card:hover {
    border-color: var(--a-accent);
    box-shadow: 0 8px 20px rgba(140, 110, 79, 0.12);
}

.admin-category-card--archived {
    opacity: 0.6;
}

.admin-category-card__icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #fff;
    background: hsl(var(--icon-hue, 30), 38%, 45%);
}

.admin-category-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-category-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
}

.admin-category-card__name {
    font-weight: 600;
    color: var(--a-text);
}

.admin-category-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.admin-category-card__actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: var(--a-text);
    background: var(--a-muted);
    border-radius: 999px;
    padding: 0.3rem 0.7rem;
}

.admin-chip i {
    color: var(--a-unavailable);
}

.admin-chip--code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.admin-chip--muted {
    color: var(--a-unavailable);
    background: transparent;
    border: 1px dashed var(--a-muted);
}

@media (max-width: 640px) {
    .admin-category-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-category-card__actions {
        width: 100%;
        justify-content: flex-start;
    }
}

a:hover,
a:focus {
    text-decoration: none;
}

.by-category::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -110px;
    top: -110px;
    border: 1px solid var(--color-muted);
    border-radius: 50%;
    pointer-events: none;
}

.required-asterisk {
    color: #C24A3F;
    margin-left: 0.2rem;
}
.required-note {
    font-size: 0.8rem;
    color: var(--color-unavailable, #8C8378);
    margin-bottom: 1rem;
}

/* Cart (US4.2) */
.cart-page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.cart-page-header__count {
    font-size: 0.85rem;
    color: var(--color-unavailable);
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: grid;
    grid-template-columns: 72px 1fr auto auto auto;
    align-items: center;
    gap: 1.1rem;
    background: #fff;
    border: 1px solid var(--color-muted);
    border-radius: 16px;
    padding: 1rem;
    transition: box-shadow 0.25s ease, transform 0.25s cubic-bezier(.2,.8,.2,1);
}

.cart-item:hover {
    box-shadow: 0 10px 28px rgba(140, 110, 79, 0.12);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .cart-item {
        grid-template-columns: 64px 1fr auto;
        grid-template-areas:
            "thumb name remove"
            "thumb qty subtotal";
        row-gap: 0.6rem;
    }
    .cart-item__thumb { grid-area: thumb; }
    .cart-item__body { grid-area: name; }
    .cart-item__remove-form { grid-area: remove; justify-self: end; }
    .cart-item__quantity-form { grid-area: qty; }
    .cart-item__subtotal { grid-area: subtotal; justify-self: end; }
}

.cart-item__thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    flex: 0 0 auto;
}

.cart-item__thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-muted);
    color: var(--color-unavailable);
    font-size: 1.3rem;
}

.cart-item__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.cart-item__name {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item__name:hover {
    color: var(--color-accent);
}

.cart-item__unit-price {
    font-size: 0.8rem;
    color: var(--color-unavailable);
}

.cart-item__quantity-form {
    margin: 0;
}

.cart-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-muted);
    border-radius: 10px;
    overflow: hidden;
}

.cart-stepper__btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cart-stepper__btn:hover {
    background: var(--color-muted);
}

.cart-stepper__input {
    width: 2.4rem;
    border: none;
    border-left: 1px solid var(--color-muted);
    border-right: 1px solid var(--color-muted);
    text-align: center;
    font-size: 0.9rem;
    -moz-appearance: textfield;
}

.cart-stepper__input::-webkit-outer-spin-button,
.cart-stepper__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item__subtotal {
    font-weight: 600;
    color: var(--color-accent);
    min-width: 4.5rem;
    text-align: right;
}

.cart-item__remove-form {
    margin: 0;
}

.cart-item__remove {
    background: none;
    border: none;
    color: var(--color-unavailable);
    font-size: 1rem;
    padding: 0.4rem;
    border-radius: 8px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.cart-item__remove:hover {
    color: #C24A3F;
    background: rgba(194, 74, 63, 0.08);
}

.cart-summary-card {
    position: sticky;
    top: 1.5rem;
    background: #fff;
    border: 1px solid var(--color-muted);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 16px 40px rgba(46, 42, 38, 0.08);
}

.cart-summary-card__title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}

.cart-summary-card__line {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text);
    margin-bottom: 0.6rem;
}

.cart-summary-card__note {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--color-unavailable);
    margin-bottom: 1rem;
}

.cart-summary-card__total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-top: 1rem;
    border-top: 1px solid var(--color-muted);
    margin-bottom: 1.25rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--color-accent);
}

.cart-summary-card__checkout {
    width: 100%;
    justify-content: center;
    margin-bottom: 1rem;
}

.cart-summary-card__reassurance {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--color-unavailable);
    margin: 0;
    text-align: center;
}

.cart-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.cart-empty__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: var(--color-muted);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

/* Checkout (US4.3) */
.checkout-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }
}

.checkout-address-wrap {
    position: relative;
}

.checkout-address-suggestions {
    position: absolute;
    z-index: 20;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0.25rem 0 0;
    padding: 0.25rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid var(--color-muted);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(46, 42, 38, 0.15);
    max-height: 240px;
    overflow-y: auto;
}

.checkout-address-suggestions li {
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
    cursor: pointer;
}

.checkout-address-suggestions li:hover {
    background: var(--color-bg);
    color: var(--color-accent);
}

.checkout-summary {
    border: 1px solid var(--color-muted);
    border-radius: 8px;
    padding: 1.25rem;
    background-color: #fff;
}

.checkout-summary__line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    padding: 0.4rem 0;
}

.checkout-summary__total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-muted);
    font-weight: 600;
    font-size: 1.1rem;
}

.checkout-section-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-unavailable);
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

.checkout-section-title:first-child {
    margin-top: 0;
}

.checkout-region-toggle {
    display: flex;
    gap: 0.5rem;
}

.checkout-region-btn {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--color-muted);
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.checkout-region-btn:hover {
    border-color: var(--color-accent);
}

.checkout-region-btn--active {
    border-color: var(--color-accent);
    background: var(--color-accent);
    color: #fff;
}

/* Order summary shown once, right after checkout (US4.4) */
.order-confirmation {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.order-confirmation__icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.order-confirmation__summary {
    text-align: left;
    border: 1px solid var(--color-muted);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
    background-color: #fff;
}
