/* ============================================
   THM Motorcycle - Brand catalogue page
   ============================================ */

.catalog-hero {
    min-height: clamp(420px, 56vh, 620px);
}

.catalog-hero .page-hero-content {
    max-width: 900px;
}

.catalog-hero h1 {
    font-size: clamp(2.3rem, 6vw, 4rem);
    line-height: 1.05;
}

.catalog-hero p {
    max-width: 680px;
}

.catalog-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
    margin-top: 2rem;
}

.catalog-hero-actions .btn-primary,
.catalog-hero-actions .btn-secondary {
    padding: 0.9rem 2rem;
}

.catalog-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 4vw, 2rem) clamp(4rem, 8vw, 6rem);
}

/* Intro ---------------------------------------------------------------- */

.catalog-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.catalog-intro-copy {
    max-width: 760px;
}

.catalog-eyebrow {
    display: block;
    color: var(--yamaha-red);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 0.65rem;
}

.catalog-intro h2 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    letter-spacing: 1px;
    line-height: 1.1;
    text-transform: uppercase;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.7);
}

.catalog-intro p {
    margin-top: 0.7rem;
    max-width: 680px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.catalog-total {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.9rem 1.15rem;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
}

.catalog-total strong {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
    color: var(--yamaha-red);
}

.catalog-total span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* Brand filter --------------------------------------------------------- */

.brand-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.6rem;
}

.brand-tab {
    --brand-color: var(--yamaha-red);
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.72rem 1rem;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.brand-tab::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--brand-color);
    box-shadow: 0 0 9px var(--brand-color);
    flex-shrink: 0;
}

.brand-tab:hover {
    color: #ffffff;
    border-color: var(--brand-color);
    transform: translateY(-2px);
}

.brand-tab.active {
    background: var(--brand-color);
    border-color: var(--brand-color);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.brand-tab.active::before {
    background: #ffffff;
    box-shadow: none;
}

.brand-tab:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.brand-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    padding: 0.1rem 0.38rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    font-size: 0.64rem;
    letter-spacing: 0.3px;
}

.brand-tab.active .brand-tab-count {
    background: rgba(0, 0, 0, 0.24);
}

/* Toolbar -------------------------------------------------------------- */

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.catalog-result {
    color: var(--text-secondary);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.catalog-result strong {
    color: #ffffff;
}

.catalog-search {
    position: relative;
    width: min(320px, 100%);
}

.catalog-search i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.82rem;
    pointer-events: none;
}

.catalog-search input {
    width: 100%;
    padding: 0.72rem 1rem 0.72rem 2.45rem;
    background: rgba(10, 10, 10, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 4px;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color 0.25s ease;
}

.catalog-search input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.catalog-search input:focus {
    outline: none;
    border-color: var(--yamaha-red);
}

/* Cards ---------------------------------------------------------------- */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr));
    gap: 1.35rem;
}

.catalog-card {
    --brand-color: var(--yamaha-red);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: rgba(10, 10, 10, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.catalog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-color);
    z-index: 3;
}

.catalog-card:hover {
    border-color: var(--brand-color);
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.catalog-card:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: 3px;
}

.catalog-card-image {
    position: relative;
    height: 260px;
    padding: 1.15rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 62%, rgba(230, 0, 18, 0.12), transparent 62%),
        rgba(0, 0, 0, 0.35);
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, 0.45));
    transition: transform 0.4s ease;
}

.catalog-card:hover .catalog-card-image img {
    transform: scale(1.06);
}

.catalog-brand-badge,
.catalog-new-badge {
    position: absolute;
    z-index: 2;
    top: 0.9rem;
    padding: 0.28rem 0.58rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    line-height: 1.4;
}

.catalog-brand-badge {
    left: 0.9rem;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 3px solid var(--brand-color);
}

.catalog-new-badge {
    right: 0.9rem;
    color: #ffffff;
    background: var(--yamaha-red);
}

.catalog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.2rem 1.25rem 1.35rem;
}

.catalog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.catalog-card-category {
    color: var(--yamaha-red);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.catalog-card-year {
    color: var(--text-secondary);
    font-size: 0.68rem;
    letter-spacing: 0.5px;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.catalog-card-variants {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.18rem 0.45rem;
    background: rgba(230, 0, 18, 0.16);
    border: 1px solid rgba(230, 0, 18, 0.35);
    color: #ffb3b8;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}

.catalog-card-variants i {
    color: var(--yamaha-red);
    font-size: 0.58rem;
}

.catalog-card h3 {
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: 0.4px;
    line-height: 1.25;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.catalog-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.84rem;
    line-height: 1.5;
    margin-bottom: 0.9rem;
}

.catalog-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.1rem;
}

.catalog-specs span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.5rem;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: #dedede;
    font-size: 0.68rem;
    letter-spacing: 0.25px;
    white-space: nowrap;
}

.catalog-specs i {
    color: var(--brand-color);
    font-size: 0.66rem;
}

.catalog-card .model-btn {
    margin-top: auto;
    font-size: 0.76rem;
}

/* Empty state ---------------------------------------------------------- */

.catalog-empty {
    padding: clamp(3rem, 8vw, 5rem) 1.5rem;
    text-align: center;
    background: rgba(10, 10, 10, 0.5);
    border: 1px dashed rgba(255, 255, 255, 0.18);
}

.catalog-empty i {
    display: block;
    color: var(--yamaha-red);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.catalog-empty h3 {
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.catalog-empty p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.4rem;
}

.catalog-empty button {
    padding: 0.8rem 1.7rem;
    background: var(--yamaha-red);
    border: 2px solid var(--yamaha-red);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.catalog-empty button:hover {
    background: #cc0010;
    border-color: #cc0010;
}

[hidden] {
    display: none !important;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 768px) {
    .catalog-hero {
        min-height: 400px;
    }

    .catalog-hero h1 {
        font-size: clamp(2rem, 9vw, 2.8rem);
    }

    .catalog-hero-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
    }

    .catalog-hero-actions .btn-primary,
    .catalog-hero-actions .btn-secondary {
        justify-content: center;
        width: 100%;
    }

    .catalog-intro {
        align-items: flex-start;
    }

    .catalog-total {
        padding: 0.7rem 0.9rem;
    }

    .catalog-total strong {
        font-size: 1.55rem;
    }

    .catalog-toolbar {
        align-items: stretch;
    }

    .catalog-search {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .brand-filter {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brand-tab {
        justify-content: center;
        padding: 0.65rem 0.6rem;
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .catalog-grid {
        grid-template-columns: 1fr;
    }

    .catalog-card-image {
        height: 240px;
    }
}
