/* ============================================================
   MATCHSPECS — Category Page Styles
   ============================================================ */

:root {
    --cat-bg: #FAF3E1;
    --cat-card: #FFFFFF;
    --cat-accent: #D9CFC7;
    --cat-text: #222;
}

/* ─── Page Base ─────────────────────────────────── */
.category-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #FAF3E1 0%, #F5E7C6 30%, #FAF3E1 100%);
    padding-top: 80px;
}

/* ─── Hero Section ──────────────────────────────── */
.cat-hero {
    position: relative;
    padding: 60px 20px 50px;
    text-align: center;
    overflow: hidden;
}

.cat-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cat-hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
}

.cat-shape-1 {
    width: 400px; height: 400px;
    background: #C9B59C;
    top: -100px; right: -100px;
    animation: floatShape 20s ease-in-out infinite;
}

.cat-shape-2 {
    width: 250px; height: 250px;
    background: #CBDCEB;
    bottom: -60px; left: -60px;
    animation: floatShape 25s ease-in-out infinite reverse;
}

@keyframes floatShape {
    0%,100% { transform: translate(0,0) rotate(0deg); }
    33% { transform: translate(30px,-30px) rotate(120deg); }
    66% { transform: translate(-20px,20px) rotate(240deg); }
}

.cat-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin: 0 auto;
}

.cat-icon-badge {
    width: 80px; height: 80px;
    border-radius: 24px;
    background: linear-gradient(135deg, #D9CFC7, #C9B59C);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    animation: badgePulse 3s ease-in-out infinite;
}

@keyframes badgePulse {
    0%,100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.cat-icon-badge svg {
    width: 40px; height: 40px;
    color: #222;
}

.cat-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: #222;
    margin: 0 0 12px;
}

.cat-subtitle {
    font-size: 1rem;
    color: #666;
    max-width: 500px;
    margin: 0 auto 28px;
    line-height: 1.7;
}

.cat-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cat-stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: #222;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ─── Quick Compare Strip ───────────────────────── */
.quick-compare-strip {
    background: rgba(255,255,255,0.6);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0,0,0,0.04);
    margin: 0 20px 40px;
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.quick-compare-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.quick-label {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    white-space: nowrap;
}

.quick-input-group {
    flex: 1;
    min-width: 160px;
    position: relative;
}

.quick-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #E0D8CC;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    background: #FFF;
    outline: none;
    transition: all 0.2s;
}

.quick-input:focus {
    border-color: #CBDCEB;
    box-shadow: 0 0 0 3px rgba(203,220,235,0.2);
}

.quick-vs {
    font-weight: 800;
    color: #999;
    font-size: 0.85rem;
}

.quick-compare-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 22px;
    background: linear-gradient(135deg, #D9CFC7, #C9B59C);
    border: none;
    border-radius: 50px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #222;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    white-space: nowrap;
}

.quick-compare-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

/* ─── Container ─────────────────────────────────── */
.cat-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── FILTER BAR ──────────────── */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(0,0,0,0.04);
}
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.filter-select { padding: 8px 32px 8px 12px; border: 1.5px solid #E0D8CC; border-radius: 10px; font-family: 'Inter', sans-serif; font-size: 0.82rem; background: #FFF; cursor: pointer; outline: none; min-width: 140px; }
.filter-select:focus { border-color: #CBDCEB; }
.filter-reset-btn { padding: 8px 16px; background: transparent; border: 1px solid #E0D8CC; border-radius: 10px; font-size: 0.8rem; cursor: pointer; color: var(--text-muted); transition: all 0.2s; }
.filter-reset-btn:hover { background: #F5E7C6; color: var(--text-primary); }
@media (max-width: 768px) {
    .filter-bar { gap: 8px; padding: 12px 14px; }
    .filter-select { min-width: 110px; font-size: 0.76rem; padding: 6px 24px 6px 8px; }
}

/* Fix dropdown appearing behind filter bar */
.quick-compare-strip { position: relative; z-index: 50; }
.quick-input-group { z-index: 50; }
.autocomplete-dropdown { z-index: 200 !important; }

/* ─── Section ───────────────────────────────────── */
.cat-section {
    margin-bottom: 56px;
}

/* ─── Top Compare Grid ──────────────────────────── */
.top-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.top-compare-card {
    background: #FFF;
    border-radius: 18px;
    padding: 20px;
    text-decoration: none;
    color: #222;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-compare-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    border-color: #CBDCEB;
}

.tc-images {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.tc-images img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    background: #FAF7F2;
    padding: 6px;
}

.tc-info {
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.4;
}

.tc-name {
    font-weight: 600;
    display: block;
}

.tc-vs {
    font-size: 0.65rem;
    color: #AAA;
    font-weight: 700;
    display: block;
    margin: 2px 0;
}

.tc-hits {
    text-align: center;
    font-size: 0.7rem;
    color: #999;
    background: #FAF7F2;
    padding: 4px 10px;
    border-radius: 50px;
}

/* ─── Brand Pills ───────────────────────────────── */
.brand-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.brand-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #FFF;
    border-radius: 50px;
    text-decoration: none;
    color: #222;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #E8E0D5;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}

.brand-pill:hover {
    background: #F5E7C6;
    border-color: #D9CFC7;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.brand-pill-img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* ─── Models Grid ───────────────────────────────── */
.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.model-card {
    background: #FFF;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.model-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.07);
}

.model-img-wrap {
    position: relative;
    height: 150px;
    background: #FAF7F2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.model-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #222;
    color: #FFF;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
}

.model-info {
    padding: 14px;
    text-align: center;
}

.model-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px;
}

.model-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    background: #F5E7C6;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    color: #222;
    transition: all 0.2s;
}

.model-compare-btn:hover {
    background: #D9CFC7;
}

/* ─── CTA Section ───────────────────────────────── */
.cat-cta {
    margin-bottom: 40px;
}

.cta-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(245,231,198,0.4));
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
}

.cta-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #222;
    margin: 0 0 10px;
}

.cta-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 28px;
    background: #222;
    color: #FFF;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.cta-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* ─── Footer ────────────────────────────────────── */
.cat-footer {
    position: relative;
    padding: 40px 20px 24px;
    text-align: center;
    overflow: hidden;
    background: transparent;
    border-top: 1px solid rgba(0,0,0,0.04);
}

.cat-footer .footer-watermark {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Playfair Display', serif;
    font-size: clamp(4rem, 10vw, 12rem);
    font-weight: 900;
    color: #222;
    opacity: 0.015;
    white-space: nowrap;
    pointer-events: none;
    width: 100%;
    z-index: 0;
}

.cat-footer-inner { position: relative; z-index: 1; }
.cat-footer .footer-logo-link { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 900; color: #222; text-decoration: none; letter-spacing: 2px; }
.cat-footer .footer-tagline { font-size: 0.78rem; color: #888; margin: 4px 0 12px; }
.cat-footer .footer-links-row { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.cat-footer .footer-links-row a { text-decoration: none; color: #555; font-size: 0.82rem; font-weight: 500; transition: color 0.2s; }
.cat-footer .footer-links-row a:hover { color: #222; }
.cat-footer .footer-dot { color: #CCC; font-size: 0.7rem; }
.cat-footer .footer-copy-text { font-size: 0.72rem; color: #AAA; margin: 0; }

/* ─── Responsive ────────────────────────────────── */
@media (max-width: 768px) {
    .cat-hero { padding: 40px 16px 30px; }
    .cat-stats { gap: 20px; }
    .stat-number { font-size: 1.3rem; }
    .quick-compare-strip { margin: 0 12px 30px; padding: 12px 14px; border-radius: 16px; }
    .quick-compare-inner { gap: 8px; }
    .quick-input-group { min-width: 120px; }
    .quick-input { font-size: 0.78rem; padding: 10px 12px; }
    .quick-compare-btn { font-size: 0.78rem; padding: 10px 16px; }
    .top-compare-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
    .models-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .model-img-wrap { height: 120px; }
    .model-name { font-size: 0.8rem; }
    .cta-card { padding: 24px 16px; }
    .cta-card h3 { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .cat-hero { padding: 30px 10px 20px; }
    .cat-icon-badge { width: 60px; height: 60px; border-radius: 16px; }
    .cat-icon-badge svg { width: 30px; height: 30px; }
    .cat-title { font-size: 1.5rem; }
    .quick-compare-strip { margin: 0 8px 24px; border-radius: 14px; }
    .quick-input-group { min-width: 100px; }
    .top-compare-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .models-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .brand-pill { font-size: 0.75rem; padding: 8px 14px; }
}