/* ==========================================================================
   Midwest Relics LLC - Main Design System & Storefront Styling
   Shared by static shell in index.html and Blazor WASM routes
   Keep in sync with Pages/Home.razor, Pages/Inventory.razor,
   Layout/LandingLayout.razor, and Layout/SiteNav.razor
   ========================================================================== */

:root {
    /* Heritage Typography System */
    --font-serif-brand: 'Cinzel', 'Times New Roman', Georgia, serif;
    --font-serif-title: 'Playfair Display', Georgia, serif;
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    /* Brand Color Palette - Deep Historic Union Navy */
    --color-brand-blue: #132a5a;
    --color-brand-blue-hover: #0c1d42;
    --color-brand-blue-light: #f0f4fa;
    --color-brand-blue-border: #cfddec;
    --color-brand-navy-dark: #09152e;
    --color-brand-navy-card: #0e2046;

    /* Antique Brass & Patchbox Gold Accents */
    --color-brass: #b88628;
    --color-brass-hover: #9c6e1a;
    --color-brass-light: #fdfaf2;
    --color-brass-border: #eeddbb;
    --color-brass-dark: #7a5510;
    --color-gold-accent: #b88628;

    /* Warm Museum Archival Parchment & Surfaces */
    --color-bg: #faf7f2;
    --color-surface: #ffffff;
    --color-surface-subtle: #f4efe7;
    --color-surface-hover: #ebe4d8;
    --color-border: #e6ded3;
    --color-border-subtle: #d6ccbe;
    --color-border-accent: rgba(184, 134, 40, 0.35);

    /* Deep Warm Charcoal & Espresso for Superior Contrast & Senior Readability */
    --color-text-main: #1c1917;
    --color-text-muted: #443e39;
    --color-text-subtle: #6e655d;
    --color-text-on-blue: #ffffff;

    /* E-commerce & Accents */
    --color-price: #166534;
    --color-ebay: #c81e28;
    --color-gunbroker: #b45309;

    /* Warm Umber Elevation Shadows */
    --shadow-xs: 0 1px 2px rgba(35, 25, 18, 0.05);
    --shadow-sm: 0 1px 3px rgba(35, 25, 18, 0.08), 0 1px 2px rgba(35, 25, 18, 0.04);
    --shadow-md: 0 4px 14px rgba(35, 25, 18, 0.09), 0 2px 4px rgba(35, 25, 18, 0.04);
    --shadow-lg: 0 10px 28px rgba(35, 25, 18, 0.12), 0 4px 10px rgba(35, 25, 18, 0.06);
}

/* ==========================================================================
   Base Layout & Document Setup
   ========================================================================== */

.landing-root {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    text-align: left;
    overflow-x: clip;
}

.landing-root *,
.landing-root *::before,
.landing-root *::after {
    box-sizing: border-box;
}

.landing-root > main {
    width: 100%;
    max-width: 1200px;
    min-width: 0;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 3.5rem;
    flex: 1 0 auto;
}

/* Reusable Header & Footer content wrapper */
.header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.site-header {
    width: 100%;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Top Announcement / Contact & Employee Utility Bar */
.top-bar {
    background-color: var(--color-brand-navy-dark);
    color: #ffffff;
    font-size: 0.88rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(184, 134, 40, 0.35);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.top-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: opacity 0.15s ease;
}

.top-bar-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

.top-bar-divider {
    opacity: 0.4;
    user-select: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

/* Main Brand & Navigation Bar */
.main-navbar {
    background-color: var(--color-surface);
    padding: 0.85rem 0;
}

.main-navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.site-branding {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--color-text-main);
    flex-shrink: 0;
}

.site-branding:hover .brand-title {
    color: var(--color-brass-hover);
}

.header-logo {
    height: 44px;
    width: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: var(--font-serif-brand);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-brand-blue);
    line-height: 1.1;
    transition: color 0.15s ease;
}

.brand-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin-top: 3px;
}

/* Site Navigation Links */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.site-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.45rem 0.95rem;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-decoration: none;
    transition: all 0.15s ease;
}

.site-nav-link:hover {
    color: var(--color-brand-blue);
    background-color: var(--color-brand-blue-light);
}

.site-nav-link.active {
    color: #ffffff;
    background-color: var(--color-brand-blue);
    box-shadow: 0 2px 6px rgba(19, 42, 90, 0.28);
}

.site-nav-link:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

/* ==========================================================================
   Home Hero & Storefront Channels Section
   ========================================================================== */

.hero-section {
    margin-bottom: 1rem;
    text-align: center;
}

.hero-title {
    font-family: var(--font-serif-title);
    font-size: clamp(1.6rem, 3.2vw, 2.15rem);
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.18;
    letter-spacing: -0.01em;
    margin: 0 0 0.45rem;
}

/* ==========================================================================
   Inventory Section & Controls
   ========================================================================== */

.inventory-section {
    width: 100%;
    margin: 0.75rem 0 2rem;
    text-align: left;
}

.inventory-header {
    margin-bottom: 0.85rem;
}

.inventory-header h2 {
    font-family: var(--font-serif-title);
    font-size: clamp(1.4rem, 2.8vw, 1.85rem);
    font-weight: 700;
    margin: 0 0 0.3rem;
    color: var(--color-text-main);
    letter-spacing: -0.01em;
}

.inventory-subtitle {
    font-size: 0.92rem;
    color: var(--color-text-subtle);
    margin: 0 0 0.85rem;
}

.inventory-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    background-color: var(--color-surface);
    padding: 0.65rem 1rem;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 40px;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border);
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    background-color: var(--color-surface-hover);
    color: var(--color-text-main);
    border-color: var(--color-border-subtle);
    transform: translateY(-1px);
}

.tab-btn.active {
    background-color: var(--color-brand-blue);
    color: #ffffff;
    border-color: var(--color-brand-blue);
    box-shadow: 0 2px 8px rgba(19, 42, 90, 0.28);
}

.tab-btn:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.tab-icon {
    height: 14px;
    width: auto;
    object-fit: contain;
}

/* Search Box with High Contrast for Older Eyes */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 220px;
    max-width: 320px;
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    color: var(--color-text-subtle);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    min-height: 40px;
    padding: 0.5rem 2.2rem 0.5rem 2.35rem;
    border-radius: 20px;
    border: 1px solid var(--color-border-subtle);
    background-color: var(--color-surface);
    color: var(--color-text-main);
    font-size: 0.92rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-box input::placeholder {
    color: var(--color-text-subtle);
}

.search-box input:focus {
    border-color: var(--color-brass);
    box-shadow: 0 0 0 3px rgba(184, 134, 40, 0.18);
}

.clear-search {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    border: none;
    color: var(--color-text-subtle);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
}

.clear-search:hover {
    color: var(--color-text-main);
}

/* ==========================================================================
   Horizontal Carousel Layout & Cards
   ========================================================================== */

.inventory-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0 2.75rem;
}

.inventory-grid {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    padding: 0.5rem 0.25rem 1.25rem;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* Custom Horizontal Scrollbar */
.inventory-grid::-webkit-scrollbar {
    height: 8px;
}

.inventory-grid::-webkit-scrollbar-track {
    background: var(--color-surface-hover);
    border-radius: 4px;
}

.inventory-grid::-webkit-scrollbar-thumb {
    background: var(--color-border-subtle);
    border-radius: 4px;
}

.inventory-grid::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-subtle);
}

/* Carousel Scroll Buttons - Crisp White Circles with Navy Icons */
.carousel-scroll-btn {
    position: absolute;
    top: calc(50% - 0.625rem);
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--color-surface);
    color: var(--color-brand-blue);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: background-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.carousel-scroll-btn:hover {
    background-color: var(--color-brand-blue);
    color: #ffffff;
    border-color: var(--color-brand-blue);
    transform: translateY(-50%) scale(1.08);
}

.carousel-scroll-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.carousel-scroll-btn:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.carousel-scroll-btn.prev {
    left: 0;
}

.carousel-scroll-btn.next {
    right: 0;
}

/* ==========================================================================
   Product Card Styles
   ========================================================================== */

.inventory-card {
    flex: 0 0 min(285px, 82vw);
    min-width: 0;
    background-color: var(--color-surface);
    color: var(--color-text-main);
    border-radius: 12px;
    border: 1px solid var(--color-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

@media (hover: hover) and (pointer: fine) {
    .inventory-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-md);
        border-color: var(--color-border-accent);
    }

    .inventory-card:hover .card-media > img,
    .inventory-card:hover .card-img {
        transform: scale(1.05);
    }
}

.card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: var(--color-surface-subtle);
    overflow: hidden;
}

.card-media > img,
.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.img-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--color-text-subtle);
    font-size: 0.85rem;
    background-color: var(--color-surface-subtle);
}

/* Historical Era Pill (Top-Left of Card Image) */
.era-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    background-color: rgba(9, 21, 46, 0.9);
    backdrop-filter: blur(4px);
    color: #fdfaf2;
    border: 1px solid rgba(238, 221, 187, 0.35);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.28);
}

.platform-logo-badge {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    border: none;
    line-height: 1;
    z-index: 2;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

.platform-logo-badge .badge-logo {
    display: block;
    width: auto;
    max-width: 65px;
    object-fit: contain;
    transition: none;
}

.platform-logo-badge .badge-logo.ebay {
    height: 18px;
}

.platform-logo-badge .badge-logo.gunbroker {
    height: 20px;
}

.card-content {
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-family: var(--font-serif-title);
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.38;
    margin: 0 0 0.4rem;
    color: var(--color-text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.8em;
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-price);
    margin-bottom: 0.95rem;
    letter-spacing: -0.01em;
}

.view-listing-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.6rem 1rem;
    background-color: var(--color-brand-blue);
    color: #ffffff;
    border: 1px solid var(--color-brand-blue);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-listing-btn:hover {
    background-color: var(--color-brass);
    border-color: var(--color-brass-hover);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(184, 134, 40, 0.32);
    transform: translateY(-1px);
    text-decoration: none;
}

.view-listing-btn:focus-visible {
    outline: 2px solid var(--color-brass);
    outline-offset: 2px;
}

/* ==========================================================================
   Pagination & Empty States
   ========================================================================== */

.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
}

.pagination-info {
    font-size: 0.9rem;
    color: var(--color-text-subtle);
    font-weight: 500;
}

.pagination-info strong {
    color: var(--color-text-main);
    font-weight: 600;
}

.pagination-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: var(--color-surface);
    padding: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: 30px;
    box-shadow: var(--shadow-sm);
}

.pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border: 1px solid transparent;
    border-radius: 20px;
    background-color: transparent;
    color: var(--color-text-main);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    user-select: none;
}

.pagination-btn:hover:not(:disabled):not(.active) {
    background-color: var(--color-brand-blue-light);
    color: var(--color-brand-blue);
    border-color: var(--color-brand-blue-border);
}

.pagination-btn.active {
    background-color: var(--color-brand-blue);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 44, 134, 0.3);
    cursor: default;
}

.pagination-nav-btn {
    gap: 0.35rem;
    padding: 0 0.85rem;
    color: var(--color-brand-blue);
    font-weight: 600;
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 38px;
    color: var(--color-text-subtle);
    font-weight: 700;
}

@media (max-width: 640px) {
    .pagination-controls {
        gap: 0.2rem;
        padding: 0.25rem;
    }

    .pagination-btn {
        min-width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }

    .pagination-nav-btn {
        padding: 0 0.5rem;
    }
}

.load-more-container {
    text-align: center;
    margin-top: 2.5rem;
}

.load-more-btn {
    background-color: var(--color-surface);
    color: var(--color-brand-blue);
    border: 2px solid var(--color-brand-blue);
    padding: 0.75rem 1.85rem;
    border-radius: 28px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.load-more-btn:hover {
    background-color: var(--color-brand-blue);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 44, 134, 0.2);
}

.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    margin-top: 1.5rem;
    color: var(--color-text-muted);
}

.empty-state p {
    font-size: 1.05rem;
    margin: 0 0 0.5rem;
}

.reset-btn {
    margin-top: 0.75rem;
    background-color: var(--color-brand-blue);
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.reset-btn:hover {
    background-color: var(--color-brand-blue-hover);
}

/* ==========================================================================
   Skeleton Loading Animation
   ========================================================================== */

.skeleton-card {
    background-color: var(--color-surface);
    pointer-events: none;
}

.skeleton-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-text {
    height: 1rem;
    margin: 0.75rem 1rem 0;
    border-radius: 4px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-title {
    width: 80%;
}

.skeleton-btn {
    width: 50%;
    height: 2.2rem;
    margin-bottom: 1rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Dedicated Inventory Grid Mode (Pages/Inventory.razor)
   ========================================================================== */

.inventory-grid.grid-mode {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    overflow: visible;
    padding: 0.5rem 0;
}

.inventory-grid.grid-mode .inventory-card {
    flex: initial;
}

/* ==========================================================================
   Storefront Layout: Sidebar Filters + Results (Pages/Inventory.razor)
   ========================================================================== */

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: var(--color-text-subtle);
    margin-bottom: 0.4rem;
}

.breadcrumbs a {
    color: var(--color-text-subtle);
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
    color: var(--color-text-main);
    font-weight: 600;
}

.shop-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.shop-sidebar {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    padding: 0.35rem 1rem 1rem;
}

.shop-sidebar-head,
.shop-sidebar-foot,
.shop-backdrop,
.filters-toggle {
    display: none;
}

.filter-group {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--color-border);
}

.filter-group:last-of-type {
    border-bottom: none;
}

.filter-group-title {
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-subtle);
    margin: 0 0 0.6rem;
}

.category-list,
.facet-list,
.price-buckets,
.active-filters {
    list-style: none;
    margin: 0;
    padding: 0;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 36px;
    padding: 0.35rem 0.6rem;
    margin: 0 -0.6rem;
    border-radius: 6px;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    text-decoration: none;
}

.category-link:hover {
    background-color: var(--color-brand-blue-light);
    color: var(--color-brand-blue);
}

.category-link.active {
    background-color: var(--color-brand-blue);
    color: #ffffff;
    font-weight: 600;
}

.category-link.active .facet-count {
    color: rgba(255, 255, 255, 0.8);
}

.facet-count {
    font-size: 0.8rem;
    color: var(--color-text-subtle);
    font-variant-numeric: tabular-nums;
}

.facet-option {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 34px;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.facet-option input {
    width: 17px;
    height: 17px;
    accent-color: var(--color-brand-blue);
    flex-shrink: 0;
}

.facet-label {
    flex: 1;
}

.price-bucket {
    display: block;
    width: 100%;
    min-height: 34px;
    padding: 0.3rem 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.92rem;
    color: var(--color-text-muted);
    cursor: pointer;
}

.price-bucket:hover {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

.price-bucket.active {
    color: var(--color-brand-blue);
    font-weight: 700;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.price-range input {
    width: 100%;
    min-width: 0;
    min-height: 36px;
    padding: 0.35rem 0.5rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: 6px;
    font-size: 0.88rem;
    background-color: var(--color-surface);
    color: var(--color-text-main);
}

.price-range input:focus {
    outline: none;
    border-color: var(--color-brass);
    box-shadow: 0 0 0 3px rgba(184, 134, 40, 0.18);
}

.price-go {
    min-height: 36px;
    padding: 0 0.75rem;
    border: 1px solid var(--color-brand-blue);
    border-radius: 6px;
    background-color: var(--color-surface);
    color: var(--color-brand-blue);
    font-weight: 600;
    cursor: pointer;
}

.price-go:hover {
    background-color: var(--color-brand-blue);
    color: #ffffff;
}

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

.shop-toolbar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.shop-select {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-subtle);
}

.shop-select select {
    min-height: 40px;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--color-border-subtle);
    border-radius: 8px;
    background-color: var(--color-surface);
    color: var(--color-text-main);
    font-size: 0.9rem;
    cursor: pointer;
}

.shop-select select:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.shop-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 1rem;
    margin: 0.9rem 0 0.25rem;
    font-size: 0.92rem;
    color: var(--color-text-muted);
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 32px;
    padding: 0.2rem 0.7rem;
    border: 1px solid var(--color-brass-border);
    border-radius: 16px;
    background-color: var(--color-brass-light);
    color: var(--color-brass-dark);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.filter-chip:hover {
    border-color: var(--color-brass);
}

.clear-filters {
    background: none;
    border: none;
    padding: 0.2rem 0.3rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-brand-blue);
    text-decoration: underline;
    cursor: pointer;
}

.shop .inventory-grid.grid-mode {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.25rem;
}

/* Below this width the sidebar becomes a slide-in drawer opened from the toolbar. */
@media (max-width: 900px) {
    .shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .filters-toggle {
        display: inline-flex;
    }

    .shop-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 1001;
        width: min(320px, 88vw);
        max-height: none;
        border-radius: 0;
        padding: 0 1.1rem;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.2s ease, visibility 0.2s;
    }

    .shop-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .shop-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 1;
        padding: 0.9rem 0;
        background-color: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        font-weight: 700;
        font-size: 1.05rem;
    }

    .shop-sidebar-close {
        background: none;
        border: none;
        font-size: 1.6rem;
        line-height: 1;
        padding: 0.25rem 0.5rem;
        color: var(--color-text-muted);
        cursor: pointer;
    }

    .shop-sidebar-foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        position: sticky;
        bottom: 0;
        padding: 0.85rem 0;
        background-color: var(--color-surface);
        border-top: 1px solid var(--color-border);
    }

    .shop-sidebar-foot .reset-btn {
        margin: 0;
        background-color: transparent;
        color: var(--color-brand-blue);
        border: 1px solid var(--color-brand-blue);
    }

    .shop-sidebar-foot .view-listing-btn {
        flex: 1;
        border: none;
        cursor: pointer;
    }

    .shop-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1000;
        border: none;
        padding: 0;
        background-color: rgba(9, 21, 46, 0.45);
        cursor: pointer;
    }
}

@media (max-width: 640px) {
    .shop-toolbar-right {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .shop-select select {
        width: 100%;
    }

    .shop-select span {
        display: none;
    }

    /* 16px minimum stops iOS Safari from auto-zooming on focus */
    .shop-select select,
    .price-range input {
        font-size: 16px;
    }

}

/* ==========================================================================
   Privacy Policy (Pages/Privacy.razor)
   ========================================================================== */

.privacy-policy {
    max-width: 46rem;
    margin: 1rem auto 0;
    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

.privacy-policy h1 {
    font-family: var(--font-serif-title);
    font-size: clamp(1.6rem, 3.2vw, 2.1rem);
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--color-text-main);
    letter-spacing: -0.01em;
}

.privacy-policy h2 {
    font-family: var(--font-serif-title);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 2rem 0 0.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-main);
}

.privacy-policy p {
    margin: 0 0 0.85rem;
}

.privacy-policy a {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

.privacy-policy a:hover {
    color: var(--color-brass-dark);
}

.privacy-policy .privacy-updated {
    color: var(--color-text-subtle);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Site Footer
   ========================================================================== */

.site-footer {
    width: 100%;
    background-color: var(--color-brand-navy-dark);
    color: #cbd5e1;
    padding: 3.5rem 0 2rem;
    border-top: 1px solid rgba(184, 134, 40, 0.35);
    font-size: 0.92rem;
    margin-top: auto;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.2fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand h3 {
    font-family: var(--font-serif-brand);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin: 0 0 0.75rem;
}

.footer-brand p {
    color: #94a3b8;
    line-height: 1.6;
    margin: 0;
    max-width: 440px;
}

.footer-col h4 {
    font-family: var(--font-serif-brand);
    color: var(--color-brass-border);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin: 0 0 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 2rem;
    font-size: 0.82rem;
    color: #94a3b8;
    line-height: 1.5;
}

.footer-legal {
    margin: 0;
}

.footer-copyright {
    margin: 0;
    color: #64748b;
}

.footer-legal-link {
    margin-left: 0.75rem;
    color: #94a3b8;
    text-decoration: underline;
}

.footer-legal-link:hover {
    color: #ffffff;
}

/* ==========================================================================
   Auth Widget (Layout/AuthWidget.razor)
   Lives inside .top-bar-right, with preserved rules for GIS
   ========================================================================== */

.auth-widget {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.employee-login-btn {
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0.65rem;
    transition: background-color 0.15s ease;
}

.employee-login-btn:hover,
.employee-login-btn:focus-visible {
    background-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.auth-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99;
}

/* Critical Google Sign-In element styles - keep content-box for logo wrapper */
#google-signin-button {
    display: flex;
}

#google-signin-button *,
#google-signin-button *::before,
#google-signin-button *::after {
    box-sizing: content-box;
}

#google-signin-button [role="button"] {
    box-sizing: border-box;
}

.auth-login-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 0.75rem;
    z-index: 101;
    min-width: 0;
}

.auth-dropdown-error {
    margin-top: 0.5rem;
    max-width: 15rem;
    color: #b3261e;
    font-size: 0.75rem;
    font-weight: 600;
}

.auth-avatar-btn {
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    line-height: 0;
    transition: border-color 0.2s ease;
}

.auth-avatar-btn:hover,
.auth-avatar-btn:focus-visible {
    border-color: #ffffff;
}

.auth-avatar {
    display: block;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
}

.auth-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    background-color: #ffffff;
    color: #1a1a1a;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    padding: 0.75rem;
    text-align: left;
    z-index: 101;
}

.auth-dropdown-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #111827;
}

.auth-dropdown-email {
    font-size: 0.8rem;
    color: #6b6b6b;
    margin-bottom: 0.6rem;
    word-break: break-all;
}

.auth-dropdown-logout {
    width: 100%;
    padding: 0.45rem 0.6rem;
    background-color: #f1f5f9;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.auth-dropdown-logout:hover {
    background-color: #e2e8f0;
}

.auth-error {
    position: absolute;
    top: calc(100% + 0.4rem);
    right: 0;
    width: max-content;
    max-width: 16rem;
    background-color: #ffffff;
    color: #b3261e;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    z-index: 101;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */

@media (max-width: 860px) {
    .main-navbar-content {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .site-branding {
        justify-content: center;
    }

    .site-nav {
        justify-content: center;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-scroll-btn {
        display: none;
    }

    .inventory-carousel-wrapper {
        padding: 0;
    }
}

@media (max-width: 640px) {
    .top-bar-content {
        justify-content: center;
    }

    .top-bar-contact {
        justify-content: center;
    }

    .inventory-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-tabs {
        justify-content: center;
    }

    .tab-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.82rem;
    }

    .search-box {
        max-width: none;
    }

    /* 16px minimum stops iOS Safari from auto-zooming on focus */
    .search-box input {
        font-size: 16px;
    }

    .store-channels {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Admin category review (Pages/Admin.razor) — the employee-only review
   queue at /admin.
   ========================================================================== */

#admin-signin-button {
    display: flex;
    justify-content: center;
}

#admin-signin-button *,
#admin-signin-button *::before,
#admin-signin-button *::after {
    box-sizing: content-box;
}

#admin-signin-button [role="button"] {
    box-sizing: border-box;
}

.admin-gate {
    max-width: 28rem;
    margin: 2rem auto 0;
    padding: 2rem 1.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 14px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.admin-gate h3 {
    margin: 0 0 0.5rem;
    color: var(--color-text-main, #1a202c);
}

.admin-gate p {
    margin: 0 0 1.25rem;
    color: var(--color-text-muted, #64748b);
}

.admin-toolbar {
    align-items: center;
    margin-bottom: 1.5rem;
}

.admin-bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-review {
    display: flex;
    flex-direction: column;
}

.admin-review .inventory-card {
    flex: initial;
}

.admin-review-orphan {
    background: #ffffff;
    color: #1a1a1a;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e2e8f0);
}

.admin-review-orphan .card-title {
    -webkit-line-clamp: 3;
    min-height: auto;
}

.admin-review-orphan p {
    color: #6b6b6b;
    font-size: 0.85rem;
    margin: 0;
}

.admin-review-footer {
    background: #ffffff;
    color: #1a1a1a;
    padding: 1rem;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color, #e2e8f0);
    border-top: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-review-ai-pick {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-confidence {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #dcfce7;
    color: #166534;
}

.admin-confidence.low {
    background: #fef3c7;
    color: #92400e;
}

.admin-reason {
    margin: 0;
    font-size: 0.82rem;
    color: #4b5563;
    font-style: italic;
}

.admin-published {
    margin: 0;
    font-size: 0.8rem;
    color: #1d4ed8;
}

.admin-era {
    width: 100%;
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 6px;
    background: #ffffff;
    color: #1a1a1a;
}

.admin-publish-bar {
    position: sticky;
    bottom: 0;
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #1a202c;
    border-radius: 14px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    color: #ffffff;
    font-weight: 600;
    z-index: 50;
}

.admin-publish-bar .load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-banner {
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-weight: 600;
}

.admin-banner-success {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.5);
    color: #166534;
}

.admin-banner-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #991b1b;
}

.admin-categorize-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1rem 0;
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    font-weight: 600;
}

.admin-categorize-bar .reset-btn {
    margin-top: 0;
}

.admin-categorize-bar .reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

    .admin-bulk-actions {
        justify-content: stretch;
    }

    .admin-bulk-actions .reset-btn {
        flex: 1;
    }

    .admin-publish-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}

