/*
 * Motorcycle Theme 01 — Category page presentation.
 *
 * Scoped to body.theme-motorcycle .mc-category-page. Product filtering,
 * sorting, pagination, inventory, product cards and tracking all come from the
 * shared controller/partials; this sheet only supplies the Motorcycle skin.
 */

body.theme-motorcycle .mc-category-page {
    --mcc-gutter: .75rem;
    --mcc-dark: #0f172a;
    --mcc-dark-2: #1e293b;
    --mcc-line: #e2e8f0;
    --mcc-ink: #0f172a;
    --mcc-muted: #64748b;

    background: var(--mc-bg);
    padding: 1.25rem 0 clamp(2.5rem, 5vw, 4rem);
}

@media (min-width: 640px) {
    body.theme-motorcycle .mc-category-page {
        --mcc-gutter: 1rem;
    }
}

body.theme-motorcycle.mc-category-filter-open {
    overflow: hidden;
}

/* Hero ------------------------------------------------------------------ */
body.theme-motorcycle .mc-category-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: linear-gradient(135deg, #0b1220 0%, #0f172a 55%, #1e293b 100%);
    color: #ffffff;
    box-shadow: 0 25px 50px -18px rgba(15, 23, 42, .45);
}

body.theme-motorcycle .mc-category-hero.has-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--mc-category-image);
    background-position: center;
    background-size: cover;
    opacity: .5;
}

body.theme-motorcycle .mc-category-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, .94) 0%, rgba(15, 23, 42, .72) 58%, rgba(15, 23, 42, .32) 100%),
        radial-gradient(90% 100% at 0% 0%, rgba(220, 38, 38, .25), transparent 55%);
}

body.theme-motorcycle .mc-category-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: clamp(.75rem, 2vw, 1.5rem);
}

body.theme-motorcycle .mc-category-breadcrumb {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .4rem;
    min-width: 0;
    overflow: hidden;
    color: #94a3b8;
    font-size: 10px;
    letter-spacing: .11em;
    line-height: 1.5;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-breadcrumb > a,
body.theme-motorcycle .mc-category-breadcrumb > [aria-hidden="true"] {
    flex: none;
}

body.theme-motorcycle .mc-category-breadcrumb a {
    color: #e2e8f0;
    text-decoration: none;
}

body.theme-motorcycle .mc-category-breadcrumb a:hover {
    color: #fca5a5;
}

body.theme-motorcycle .mc-category-breadcrumb__current {
    min-width: 0;
    overflow: hidden;
    color: #94a3b8;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-motorcycle .mc-category-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    min-width: 1.9rem;
    padding: .22rem .55rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    color: #e2e8f0;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    white-space: nowrap;
}

body.theme-motorcycle .mc-category-breadcrumb .mc-category-filter-toggle {
    flex: none;
    min-height: 1.55rem;
    margin-left: auto;
    padding: 0 .55rem;
    border-color: rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .07);
    color: #e2e8f0;
    font-size: 9px;
    letter-spacing: .08em;
}

body.theme-motorcycle .mc-category-breadcrumb .mc-category-filter-toggle:hover {
    border-color: #fca5a5;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

body.theme-motorcycle .mc-category-breadcrumb .mc-category-filter-toggle .mc-icon {
    width: 12px;
    height: 12px;
    color: #fca5a5;
}

body.theme-motorcycle .mc-category-kicker {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0;
    color: #fca5a5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
    line-height: 1.4;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-kicker::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    background: var(--mc-brand);
}

/* Toolbar --------------------------------------------------------------- */
body.theme-motorcycle .mc-category-body {
    margin-top: 1.25rem;
}

body.theme-motorcycle .mc-category-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 2.4rem;
    padding: 0 .8rem;
    border: 1px solid var(--mcc-line);
    border-radius: .45rem;
    background: #ffffff;
    color: var(--mcc-ink);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color .15s ease, color .15s ease;
}

body.theme-motorcycle .mc-category-filter-toggle:hover {
    border-color: var(--mc-brand);
    color: var(--mc-brand);
}

body.theme-motorcycle .mc-category-filter-toggle .mc-icon {
    color: var(--mc-brand);
}

body.theme-motorcycle .mc-category-sort {
    display: flex;
    align-items: center;
    gap: .45rem;
}

body.theme-motorcycle .mc-category-sort label {
    color: var(--mcc-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-sort select {
    min-height: 2.4rem;
    padding: .35rem 2rem .35rem .6rem;
    border: 1px solid var(--mcc-line);
    border-radius: .45rem;
    background: #f8fafc;
    color: var(--mcc-ink);
    font-size: 12px;
    font-weight: 600;
}

body.theme-motorcycle .mc-category-sort-group {
    padding-bottom: .9rem;
    border-bottom: 1px solid var(--mcc-line);
}

body.theme-motorcycle .mc-category-sort--sidebar select {
    width: 100%;
    background: #ffffff;
}

body.theme-motorcycle .mc-category-sort__apply {
    min-height: 2.4rem;
    padding: 0 .7rem;
    border: 1px solid var(--mc-brand);
    border-radius: .45rem;
    background: var(--mc-brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

/* Layout ---------------------------------------------------------------- */
body.theme-motorcycle .mc-category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
    align-items: start;
}

/* Filters --------------------------------------------------------------- */
body.theme-motorcycle .mc-category-filters {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--mcc-line);
    border-radius: .9rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

body.theme-motorcycle .mc-category-filters__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--mcc-line);
}

body.theme-motorcycle .mc-category-filters__head h2 {
    margin: .2rem 0 0;
    color: var(--mcc-ink);
    font-family: var(--mc-display);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-filters__close {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border: 1px solid var(--mcc-line);
    border-radius: .4rem;
    background: #fff;
    color: var(--mcc-ink);
    cursor: pointer;
}

body.theme-motorcycle .mc-category-filter-group {
    padding-top: .9rem;
}

body.theme-motorcycle .mc-category-filter-group h3,
body.theme-motorcycle .mc-category-nav h3 {
    margin: 0 0 .6rem;
    color: var(--mcc-ink);
    font-family: var(--mc-display);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-price {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .4rem;
}

body.theme-motorcycle .mc-category-price input {
    width: 100%;
    min-width: 0;
    padding: .5rem .55rem;
    border: 1px solid var(--mcc-line);
    border-radius: .4rem;
    background: #f8fafc;
    color: var(--mcc-ink);
    font-size: 12px;
}

body.theme-motorcycle .mc-category-price input:focus {
    border-color: var(--mc-brand);
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, .12);
}

body.theme-motorcycle .mc-category-price > span {
    color: var(--mcc-muted);
    font-size: 12px;
}

body.theme-motorcycle .mc-category-price__hint {
    margin: .45rem 0 0;
    color: var(--mcc-muted);
    font-size: 10px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-page .currency-symbol {
    font-size: 1.08em;
    font-weight: 700;
}

body.theme-motorcycle .mc-category-apply {
    width: 100%;
    margin-top: .6rem;
}

body.theme-motorcycle .mc-category-apply.mc-btn {
    min-height: 2.6rem;
    font-size: 11px;
}

body.theme-motorcycle .mc-category-clear {
    display: inline-block;
    margin-top: .55rem;
    color: var(--mc-brand);
    font-size: 11px;
    font-weight: 700;
    text-decoration: underline;
}

body.theme-motorcycle .mc-category-nav {
    margin-top: 1.1rem;
    padding-top: .9rem;
    border-top: 1px solid var(--mcc-line);
}

body.theme-motorcycle .mc-category-nav ul {
    max-height: 21rem;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

body.theme-motorcycle .mc-category-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .55rem;
    border-radius: .35rem;
    color: var(--mcc-ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

body.theme-motorcycle .mc-category-nav a span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.theme-motorcycle .mc-category-nav a span:last-child {
    flex: none;
    color: #cbd5e1;
    font-size: 11px;
}

body.theme-motorcycle .mc-category-nav a:hover {
    background: #fef2f2;
    color: var(--mc-brand);
}

body.theme-motorcycle .mc-category-nav a.is-active {
    background: var(--mc-brand);
    color: #ffffff;
}

body.theme-motorcycle .mc-category-nav a.is-active span:last-child {
    color: #ffffff;
}

/* Results + product grid ------------------------------------------------ */
body.theme-motorcycle .mc-category-results {
    min-width: 0;
}

body.theme-motorcycle .mc-category-product-grid {
    gap: .75rem;
}

body.theme-motorcycle .mc-category-product-item {
    min-width: 0;
}

body.theme-motorcycle .mc-category-product-slider .product-slider__nav {
    border-color: var(--mcc-line);
    background: #ffffff;
    color: var(--mcc-ink);
    box-shadow: 0 10px 24px -12px rgba(15, 23, 42, .35);
}

body.theme-motorcycle .mc-category-product-slider .product-slider__nav:hover {
    border-color: #fecaca;
    color: var(--mc-brand);
    opacity: 1;
}

/* Product cards --------------------------------------------------------- */
body.theme-motorcycle .mc-category-page .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--mc-line-soft);
    border-radius: .75rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

body.theme-motorcycle .mc-category-page .product-card:hover,
body.theme-motorcycle .mc-category-page .product-card:active {
    border-color: #fecaca !important;
    box-shadow: 0 18px 40px -18px rgba(220, 38, 38, .45) !important;
    transform: translateY(-4px);
}

body.theme-motorcycle .mc-category-page .product-card > a:first-child {
    background: #f1f5f9;
}

body.theme-motorcycle .mc-category-page .product-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

body.theme-motorcycle .mc-category-page .product-card__actions {
    display: flex;
    align-items: stretch;
    margin-top: auto;
}

body.theme-motorcycle .mc-category-page .product-card__actions button,
body.theme-motorcycle .mc-category-page .product-card__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    line-height: 1.15;
    white-space: nowrap;
}

body.theme-motorcycle .mc-category-page .product-card h3 {
    color: var(--mc-ink-soft);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

body.theme-motorcycle .mc-category-page .product-card .text-sm.font-semibold {
    color: var(--mc-brand) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

body.theme-motorcycle .mc-category-page .product-card .bg-red-500 {
    border-radius: .35rem !important;
    background-color: var(--mc-brand) !important;
    font-size: 10px !important;
    letter-spacing: .02em;
}

body.theme-motorcycle .mc-category-page .product-card button,
body.theme-motorcycle .mc-category-page .product-card a[style] {
    border-radius: .5rem !important;
    font-size: 11px !important;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Empty state + pagination --------------------------------------------- */
body.theme-motorcycle .mc-category-page .ft-category-empty {
    max-width: 48rem;
    margin-inline: auto;
    padding: clamp(2rem, 5vw, 3.5rem) 1.5rem;
    border: 1px solid var(--mcc-line);
    border-radius: 1rem;
    background: #ffffff;
    text-align: center;
}

body.theme-motorcycle .mc-category-page .ft-category-empty__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto .75rem;
    color: #cbd5e1;
}

body.theme-motorcycle .mc-category-page .ft-category-empty__title {
    margin: 0;
    color: var(--mcc-ink);
    font-family: var(--mc-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: .01em;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-page .ft-category-empty__text {
    margin: .5rem auto 0;
    max-width: 32rem;
    color: var(--mcc-muted);
    font-size: 13px;
    line-height: 1.6;
}

body.theme-motorcycle .mc-category-page .ft-category-empty .ft-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.7rem;
    margin-top: 1rem;
    padding: 0 1.1rem;
    border-radius: .5rem;
    background: var(--mc-brand);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-decoration: none;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-page .ft-category-pagination {
    margin-top: 1.5rem;
}

body.theme-motorcycle .mc-category-page .ft-category-pagination nav {
    display: flex;
    justify-content: center;
}

body.theme-motorcycle .mc-category-page .ft-category-pagination a,
body.theme-motorcycle .mc-category-page .ft-category-pagination span[aria-current="page"] {
    margin: 0 .15rem;
    padding: .45rem .7rem;
    border: 1px solid var(--mcc-line) !important;
    border-radius: .35rem !important;
    background: #ffffff !important;
    color: var(--mcc-ink-soft) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
}

body.theme-motorcycle .mc-category-page .ft-category-pagination span[aria-current="page"] {
    border-color: var(--mc-brand) !important;
    background: var(--mc-brand) !important;
    color: #ffffff !important;
}

/* Mobile filter drawer -------------------------------------------------- */
body.theme-motorcycle .mc-category-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 960;
    background: rgba(2, 6, 23, .55);
}

@media (max-width: 1023.98px) {
    body.theme-motorcycle .mc-category-filter-toggle {
        display: inline-flex;
    }

    body.theme-motorcycle .mc-category-filters {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 961;
        width: min(20rem, 88vw);
        max-height: 100vh;
        overflow-y: auto;
        border-radius: 0 1rem 1rem 0;
        box-shadow: 24px 0 60px -30px rgba(15, 23, 42, .55);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s ease;
    }

    body.theme-motorcycle .mc-category-filters.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    body.theme-motorcycle .mc-category-filters__close {
        display: inline-flex;
    }

    body.theme-motorcycle .mc-category-nav ul {
        max-height: none;
    }
}

@media (min-width: 1024px) {
    body.theme-motorcycle .mc-category-layout {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 1.5rem;
    }

    body.theme-motorcycle .mc-category-filters {
        position: sticky;
        top: 8rem;
    }

    body.theme-motorcycle .mc-category-filter-toggle,
    body.theme-motorcycle .mc-category-filters__close {
        display: none;
    }

    body.theme-motorcycle .mc-category-filter-overlay {
        display: none !important;
    }
}

@media (min-width: 640px) {
    body.theme-motorcycle .mc-category-product-grid {
        gap: 1.25rem;
    }
}

@media (min-width: 1024px) {
    body.theme-motorcycle .mc-category-layout {
        --mcc-gap: 1.25rem;
        grid-template-columns:
            calc((100% - (var(--mcc-cols, 4) - 1) * var(--mcc-gap)) / var(--mcc-cols, 4))
            minmax(0, 1fr);
        gap: var(--mcc-gap);
    }

    body.theme-motorcycle .mc-category-product-grid {
        grid-template-columns: repeat(var(--mcc-grid-cols, 3), minmax(0, 1fr));
    }

    /* Slider mode keeps the previous desktop sidebar/gap treatment. */
    body.theme-motorcycle .mc-category-layout.mc-category-layout--slider {
        grid-template-columns: 250px minmax(0, 1fr);
        gap: 1.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-motorcycle .mc-category-page .product-card,
    body.theme-motorcycle .mc-category-filters {
        transition: none;
    }
}
