/* ============================================================
   valuveljed.com – Rim Finder
   CSS adapted from React/Tailwind reference design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600;700&display=swap');

/* --- CSS Variables (matches reference) --- */
:root {
    --bg:               hsl(0 0% 97%);
    --fg:               hsl(240 10% 10%);
    --card:             hsl(0 0% 100%);
    --card-fg:          hsl(240 10% 10%);
    --primary:          hsl(24 95% 48%);
    --primary-fg:       hsl(0 0% 100%);
    --secondary:        hsl(240 5% 92%);
    --secondary-fg:     hsl(240 10% 10%);
    --muted:            hsl(240 5% 90%);
    --muted-fg:         hsl(240 5% 40%);
    --border:           hsl(240 5% 84%);
    --input:            hsl(240 5% 88%);
    --ring:             hsl(24 95% 48%);
    --destructive:      hsl(0 84% 60%);

    --font-display:     'Geist Mono', monospace;
    --font-body:        'Space Grotesk', sans-serif;
    --radius:           0px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; font-size: 16px; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.5;
    min-height: 100vh;
    min-width: 320px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    outline: none;
}
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.03em;
}

/* --- Utility classes --- */
.container { max-width: 1280px; margin: 0 auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.hidden { display: none !important; }

/* --- Spec label (used everywhere) --- */
.spec-label {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-fg);
}

/* --- Machined border (card style) --- */
.machined-border {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0) 100%);
}

.rim-light {
    border-top: 1px solid rgba(0,0,0,0.06);
}

.tabular {
    font-variant-numeric: tabular-nums;
}

/* --- Header --- */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
}
.site-header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.site-header__logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
}
.site-header__logo-text {
    font-family: var(--font-display);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.site-header__nav {
    display: flex;
    gap: 2rem;
}
.site-header__nav a {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-fg);
    transition: color 0.2s;
}
.site-header__nav a:hover { color: var(--fg); }
.site-header__results {
    font-family: var(--font-display);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted-fg);
}

/* --- Footer --- */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    bottom: 0;
    z-index: 100;
    background: var(--bg);
}

/* --- Hero page (index) --- */
.hero {
    position: relative;
    min-height: calc(100vh - 65px - 54px);
    overflow: hidden;
}
.hero__bg {
    position: absolute;
    inset: 0;
}
.hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(247,247,247,0.8);
}
.hero__content {
    position: relative;
    z-index: 10;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 3rem;
    min-height: calc(100vh - 65px);
    max-width: 1280px;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .hero__content {
        flex-direction: row;
        padding: 5rem 4rem;
        gap: 4rem;
        align-items: flex-start;
    }
}

/* --- Search panel --- */
.search-panel {
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 1.5rem;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.search-panel__tab {
    display: inline-block;
    background: var(--primary);
    color: var(--primary-fg);
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    margin-bottom: 1.25rem;
}
.search-panel__label {
    display: block;
    margin-bottom: 0.5rem;
}
.search-panel__group {
    margin-bottom: 1rem;
}

/* --- Collapsible filter toggle (shared: home + catalog) --- */
.collapsible-filter__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.collapsible-filter__header .search-panel__label {
    margin-bottom: 0;
}
.collapsible-filter__status {
    font-family: var(--font-display);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted-fg);
}
.collapsible-toggle-btn {
    margin-left: auto;
    font-family: var(--font-display);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted-fg);
    transition: color 0.2s, border-color 0.2s;
}
.collapsible-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}
.collapsible-toggle-btn--collapse {
    color: var(--primary);
    border-color: var(--primary);
}
.collapsible-filter[data-collapsed="true"] .collapsible-toggle-btn--collapse,
.collapsible-filter[data-collapsed="true"] .collapsible-filter__body {
    display: none;
}
.collapsible-filter[data-collapsed="false"] .collapsible-toggle-btn--expand,
.collapsible-filter[data-collapsed="false"] .collapsible-filter__status {
    display: none;
}
.collapsible-filter__body {
    margin-top: 0.5rem;
}
.collapsible-filter .filter-section__title {
    margin-bottom: 0;
}

.search-panel__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* --- Form inputs --- */
.vv-input, .vv-select {
    width: 100%;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-family: var(--font-body);
    color: var(--fg);
    transition: border-color 0.2s;
}
.vv-input::placeholder { color: var(--muted-fg); }
.vv-input:focus, .vv-select:focus {
    border-color: var(--primary);
}
.vv-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

/* --- Diameter toggle buttons --- */
.diameter-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}
.diameter-btn {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--muted-fg);
    background: var(--card);
    transition: all 0.2s;
}
.diameter-btn:hover {
    color: var(--fg);
    border-color: var(--primary);
}
.diameter-btn.active {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}

/* --- CTA button --- */
.btn-primary {
    display: inline-block;
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: var(--primary-fg);
    font-family: var(--font-display);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-align: center;
    transition: background 0.2s;
    border: none;
    cursor: pointer;
}
.btn-primary:hover { background: hsl(24 95% 42%); }
.btn-primary:disabled {
    background: var(--muted-fg);
    cursor: not-allowed;
    opacity: 0.5;
}
.btn-primary:disabled:hover { background: var(--muted-fg); }

/* --- Tooltip --- */
.tooltip-wrap {
    position: relative;
    width: 100%;
}
.tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    color: var(--fg);
    border: 1px solid var(--border);
    padding: 0.625rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    text-align: center;
    pointer-events: none;
    z-index: 10;
}
.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--border);
}
.tooltip-wrap:hover .tooltip--visible { display: block; }

.btn-secondary {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    background: var(--secondary);
    color: var(--secondary-fg);
    transition: all 0.2s;
}
.btn-secondary:hover {
    background: var(--primary);
    color: var(--primary-fg);
}

/* --- Hero text --- */
.hero-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 2rem;
}
.hero-text h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    text-transform: uppercase;
    letter-spacing: -0.05em;
    line-height: 1;
}
.hero-text h1 span { color: var(--primary); }
.hero-text p {
    margin-top: 1.5rem;
    color: var(--muted-fg);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 36rem;
}

/* --- Stats grid --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 3rem;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-card {
    padding: 0.75rem;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.8);
}
.stat-card__label { display: block; margin-bottom: 0.25rem; }
.stat-card__value {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

/* --- Catalog layout --- */
.catalog-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
@media (min-width: 640px) { .catalog-nav { gap: 1.5rem; } }

.catalog {
    display: flex;
    min-height: calc(100vh - 65px);
    max-width: 1280px;
    margin: 0 auto;
}
.catalog__sidebar {
    width: 320px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
    padding: 1rem;
    display: none;
}
@media (min-width: 1024px) { .catalog__sidebar { display: block; } }
.catalog__sidebar.open { display: block; }
@media (max-width: 1023px) {
    .catalog__sidebar.open {
        width: 100%;
        position: fixed;
        top: 53px;
        left: 0;
        bottom: 0;
        z-index: 50;
        background: var(--bg);
        overflow-y: auto;
        border-right: none;
    }
}

.catalog__filters {
    padding: 1.25rem;
    position: sticky;
    top: calc(53px + 1rem);  /* header height + gap */
    max-height: calc(100vh - 53px - 2rem);
    overflow-y: auto;
}
.catalog__main {
    flex: 1;
    min-width: 0;
    padding: 0.75rem;
}
@media (min-width: 640px) { .catalog__main { padding: 1rem 1.5rem; } }

/* --- Filter sidebar --- */
.filter-section { margin-bottom: 1.5rem; }
.filter-section__title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.filter-section__dot {
    width: 4px;
    height: 4px;
    background: var(--primary);
}
.filter-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.filter-header__dot {
    width: 6px;
    height: 6px;
    background: var(--primary);
}
.filter-header__text {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Filter diameter grid (sidebar) */
.filter-diam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(2.5rem, 3.25rem));
    gap: 0.375rem;
}
.filter-diam-btn {
    padding: 0.375rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    text-align: center;
    border: 1px solid var(--border);
    color: var(--muted-fg);
    background: transparent;
    transition: all 0.2s;
}
.filter-diam-btn:hover {
    color: var(--fg);
    border-color: var(--primary);
}
.filter-diam-btn.active {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}

/* Bolt pattern grid (sidebar) */
.filter-bolt-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.375rem;
}
.filter-bolt-btn {
    padding: 0.375rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    text-align: center;
    border: 1px solid var(--border);
    color: var(--muted-fg);
    background: transparent;
    transition: all 0.2s;
}
.filter-bolt-btn:hover {
    color: var(--fg);
    border-color: var(--primary);
}
.filter-bolt-btn.active {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}

/* --- Brand multi-select --- */
.brand-multi {
    position: relative;
}
.brand-multi__control {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 4px 2rem 4px 6px;
    border: 1px solid var(--border);
    background: var(--card);
    cursor: pointer;
    flex-wrap: wrap;
    gap: 4px;
    position: relative;
    transition: border-color 0.2s;
}
.brand-multi.open .brand-multi__control {
    border-color: var(--primary);
}
.brand-multi__chevron {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
}
.brand-multi__placeholder {
    font-size: 0.875rem;
    color: var(--muted-fg);
    pointer-events: none;
    padding: 2px 0;
}
.brand-multi__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.brand-multi__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-family: var(--font-display);
    background: hsla(24, 95%, 48%, 0.1);
    color: var(--primary);
    border: 1px solid hsla(24, 95%, 48%, 0.3);
    white-space: nowrap;
}
.brand-multi__tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    padding: 0;
}
.brand-multi__tag-remove:hover {
    color: var(--fg);
}
.brand-multi__dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    background: var(--card);
    border: 1px solid var(--border);
    border-top: none;
    max-height: 240px;
    overflow-y: auto;
}
.brand-multi.open .brand-multi__dropdown {
    display: block;
}
.brand-multi__group {
    padding: 6px 10px 4px;
    font-size: 0.65rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-fg);
    background: hsla(240, 5%, 92%, 0.5);
}
.brand-multi__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: background 0.15s;
}
.brand-multi__option:hover {
    background: hsla(240, 5%, 92%, 0.5);
}
.brand-multi__option.selected {
    font-weight: 500;
}
.brand-multi__option.disabled {
    opacity: 0.35;
    cursor: default;
}
.brand-multi__check {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}
.brand-multi__option.selected .brand-multi__check::before {
    content: '\2713';
    color: var(--muted-fg);
    font-size: 0.75rem;
}

.filter-show-all {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
}
.filter-show-all:hover { text-decoration: underline; }

.filter-section__title {
    position: relative;
}
.filter-section__clear {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-fg);
    cursor: pointer;
    padding: 2px;
    background: none;
    border: none;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.filter-section__clear:hover {
    opacity: 1;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

/* --- Range slider (dual thumb) --- */
.range-slider {
    position: relative;
    height: 28px;
    margin-top: 0.5rem;
}
.range-slider__track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    transform: translateY(-50%);
    background: var(--border);
    border-radius: 2px;
    pointer-events: none;
}
.range-slider__fill {
    position: absolute;
    height: 100%;
    background: var(--muted-fg);
    border-radius: 2px;
    left: 0;
    right: 0;
}
.range-slider__input {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    outline: none;
}
.range-slider__input--min { z-index: 2; }
.range-slider__input--max { z-index: 3; }
.range-slider__input::-webkit-slider-runnable-track {
    height: 3px;
    background: transparent;
    border: none;
}
.range-slider__input::-moz-range-track {
    height: 3px;
    background: transparent;
    border: none;
}
.range-slider__input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    pointer-events: auto;
    cursor: pointer;
    margin-top: -7.5px;
    transition: border-color 0.2s;
}
.range-slider__input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--card);
    border: 2px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    pointer-events: auto;
    cursor: pointer;
    transition: border-color 0.2s;
}
.range-slider__input::-webkit-slider-thumb:hover {
    border-color: var(--primary);
}
.range-slider__input::-moz-range-thumb:hover {
    border-color: var(--primary);
}

/* --- Active filter pills --- */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    background: hsla(24, 95%, 48%, 0.1);
    color: var(--primary);
    border: 1px solid hsla(24, 95%, 48%, 0.3);
}
.filter-pill__remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}
.filter-pill__remove:hover { color: var(--fg); }

/* --- View mode toggle --- */
.view-toggle {
    display: inline-flex;
    border: 1px solid var(--border);
}
.view-toggle__btn {
    padding: 0.5rem;
    color: var(--muted-fg);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.view-toggle__btn:hover {
    color: var(--fg);
    background: var(--secondary);
}
.view-toggle__btn.active {
    background: var(--primary);
    color: var(--primary-fg);
}
.view-toggle__btn svg { width: 16px; height: 16px; }

/* --- Product card (list view) --- */
.product-card {
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0,0,0,0.01) 0%, rgba(0,0,0,0) 100%);
    transition: all 0.2s;
    display: flex;
}
.product-card:hover {
    border-color: hsla(24, 95%, 48%, 0.5);
    transform: scale(1.01);
}
.product-card__img {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: hsla(240, 5%, 92%, 0.5);
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
@media (min-width: 480px) { .product-card__img { width: 112px; height: 112px; } }
.product-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s;
}
.product-card:hover .product-card__img img { filter: grayscale(0); }
.product-card__img-placeholder {
    font-size: 0.75rem;
    color: var(--muted-fg);
    font-family: var(--font-display);
}
.product-card__body {
    flex: 1;
    padding: 1rem;
    min-width: 0;
}
.product-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}
.product-card__name {
    font-family: var(--font-display);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card__sku {
    display: block;
    margin-top: 0.125rem;
}
.product-card__specs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.75rem;
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    color: var(--muted-fg);
    border-top: 1px solid var(--border);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    gap: 0;
}
.product-card__spec {
    flex: 1;
    min-width: 40%;
}
.product-card__spec-divider {
    color: var(--border);
    padding: 0 0.5rem;
    display: none;
}
@media (min-width: 480px) {
    .product-card__spec { min-width: 0; }
    .product-card__spec-divider { display: inline; }
}
.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.product-card__price {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.product-card__price-unit {
    font-size: 0.75rem;
    color: var(--muted-fg);
    margin-left: 0.25rem;
}
.product-card__actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* --- Product grid (cards view) --- */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 1024px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }

/* --- Product columns view --- */
.products-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 640px) { .products-columns { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .products-columns { grid-template-columns: repeat(4, 1fr); } }

.product-col {
    border: 1px solid var(--border);
    background: var(--card);
    transition: all 0.2s;
}
.product-col:hover {
    border-color: hsla(24, 95%, 48%, 0.5);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.product-col__img {
    aspect-ratio: 1;
    background: hsla(240, 5%, 92%, 0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-col__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s;
}
.product-col:hover .product-col__img img { filter: grayscale(0); }
.product-col__body { padding: 0.75rem; }
.product-col__name {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-col__specs {
    font-size: 0.625rem;
    color: var(--muted-fg);
    font-variant-numeric: tabular-nums;
    margin-top: 0.125rem;
}
.product-col__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.product-col__price {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}
.product-col__stock {
    font-size: 0.625rem;
    color: var(--muted-fg);
}

/* --- Product table view --- */
.product-table-wrap {
    border: 1px solid var(--border);
    overflow-x: auto;
}
.product-table {
    width: 100%;
    border-collapse: collapse;
}
.product-table th {
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: left;
    padding: 0.75rem;
    background: hsla(240, 5%, 92%, 0.5);
    white-space: nowrap;
}
.product-table th.text-right { text-align: right; }
.product-table td {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}
.product-table tr:hover { background: hsla(240, 5%, 92%, 0.3); }
.product-table__img {
    width: 48px;
    height: 48px;
    background: hsla(240, 5%, 92%, 0.5);
    overflow: hidden;
}
.product-table__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s;
}
.product-table tr:hover .product-table__img img { filter: grayscale(0); }
.product-table__name {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: -0.02em;
}
.product-table__sku { color: var(--muted-fg); }
.product-table__price {
    font-family: var(--font-display);
    font-size: 0.875rem;
    color: var(--primary);
    text-align: right;
}

/* --- Detail page --- */
.detail {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}
.detail__breadcrumbs {
    margin-bottom: 1.5rem;
}
.detail__breadcrumbs a { color: var(--muted-fg); }
.detail__breadcrumbs a:hover { color: var(--primary); }
.detail__breadcrumbs span { color: var(--muted-fg); margin: 0 0.5rem; }
.detail__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) { .detail__grid { grid-template-columns: 1fr 1fr; } }
.detail__image {
    aspect-ratio: 1;
    background: var(--secondary);
    border: 1px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.detail__info { }
.detail__name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}
.detail__sku {
    margin-bottom: 1.5rem;
}
.detail__price {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    margin-bottom: 0.5rem;
}
.detail__stock {
    margin-bottom: 1.5rem;
}
.detail__specs {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}
.detail__specs-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
}
.detail__specs-label { color: var(--muted-fg); }
.detail__specs-value {
    font-family: var(--font-display);
    font-variant-numeric: tabular-nums;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin: 2rem 0;
}
.pagination__btn {
    display: inline-block;
    padding: 0.5rem 0.875rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    border: 1px solid var(--border);
    color: var(--muted-fg);
    background: var(--card);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}
.pagination__btn:hover { border-color: var(--primary); color: var(--fg); }
.pagination__btn.active {
    background: var(--primary);
    color: var(--primary-fg);
    border-color: var(--primary);
}

/* --- No results --- */
.no-results {
    text-align: center;
    padding: 5rem 1rem;
}
.no-results__title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    text-transform: uppercase;
    color: var(--muted-fg);
}
.no-results__sub {
    font-size: 0.875rem;
    color: var(--muted-fg);
    margin-top: 0.5rem;
}

/* --- SEO index page --- */
.seo-page { padding: 2rem 1.5rem; max-width: 1280px; margin: 0 auto; }
.seo-page h1 {
    font-size: 1.5rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.seo-page p { color: var(--muted-fg); margin-bottom: 2rem; line-height: 1.6; }
.seo-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.seo-links a {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    border: 1px solid var(--border);
    color: var(--muted-fg);
    transition: all 0.2s;
}
.seo-links a:hover, .seo-links a.active {
    border-color: var(--primary);
    color: var(--primary);
}

/* --- Mobile filter toggle --- */
.filter-toggle-mobile {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-family: var(--font-display);
    text-transform: uppercase;
    border: 1px solid var(--border);
    color: var(--fg);
}
@media (min-width: 1024px) { .filter-toggle-mobile { display: none; } }

/* --- Loading spinner --- */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 404 page --- */
.page-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}
.page-404 h1 {
    font-size: 4rem;
    color: var(--primary);
}
.page-404 p {
    color: var(--muted-fg);
    margin-top: 0.5rem;
}
.page-404 a {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--primary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.page-404 a:hover { text-decoration: underline; }

.nw {
    white-space: nowrap;
}