/* ==========================================================================
   5. AI Katalógus & Kategória Szűrők (Frontend)
   ========================================================================== */
/* Katalógus-keresősáv — a stat-sáv helyén, a kategória-tabok fölött.
   A tabokkal azonos 3D-s chip-nyelv: világos felület, benyomott felső él. */
.catalog-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    max-width: 420px;
    padding: 0 14px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border: 1px solid var(--steel-200);
    border-bottom: 2px solid var(--steel-300);
    border-radius: var(--radius-sharp);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Fókuszban pezsgő keret + halvány gyűrű (a .calc-input:focus mintájára) */
.catalog-search-bar:focus-within {
    border-color: rgba(191, 176, 138, 0.65);
    border-bottom-color: #bfb08a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 0 0 3px rgba(163, 147, 108, 0.15);
}

.catalog-search-icon {
    color: var(--steel-400);
    flex-shrink: 0;
}

.catalog-search-bar:focus-within .catalog-search-icon {
    color: #a3936c;
}

.catalog-search-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 14px;
    color: var(--steel-900);
    outline: none;
}

.catalog-search-input::placeholder {
    color: var(--steel-400);
}

/* Élő találatszámláló a sáv jobb szélén */
.catalog-search-count {
    flex-shrink: 0;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--steel-500);
    white-space: nowrap;
}

/* Élő szűrésnél a JS hidden attribútummal rejt — a .catalog-card display:flex
   szabálya különben felülírná a böngésző alapértelmezett [hidden] rejtését. */
.catalog-card[hidden],
.catalog-empty-state[hidden] {
    display: none;
}

.catalog-clear-link {
    font-size: 13px;
    color: var(--steel-600);
    font-weight: 600;
    white-space: nowrap;
}

.catalog-clear-link:hover {
    text-decoration: underline;
    color: var(--steel-900);
}

/* Kategória Tabok */
.catalog-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Kategória-tab: 3D benyomott hatású szürke chip */
.catalog-tab {
    padding: 8px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--steel-500);
    background: var(--bg-card);
    border: 1px solid var(--steel-200);
    border-bottom: 2px solid var(--steel-300);
    border-radius: var(--radius-sharp);
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.15s ease;
    text-transform: none;
    letter-spacing: normal;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Összehasonlító gomb a tab-sor jobb szélén — pezsgő accent-tab */
.catalog-tab--compare {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6e6148;
    border-color: rgba(191, 176, 138, 0.55);
    background: rgba(191, 176, 138, 0.12);
}

.catalog-tab--compare:hover {
    color: #161513;
    border-color: #bfb08a;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 3px 8px rgba(191, 176, 138, 0.25);
}

.catalog-tab:hover {
    color: var(--steel-900);
    border-color: var(--steel-300);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 3px 8px rgba(0, 0, 0, 0.08);
}

/* Aktív tab: sötét szénfekete 3D benyomott hatással */
.catalog-tab.active {
    color: #ffffff;
    background: #161616;
    border-color: #1b1917;
    border-bottom: 2px solid #0d0c0b;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 2px rgba(0, 0, 0, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Kártya Belső Elrendezés */
.catalog-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: auto;
    background: linear-gradient(150deg, var(--bg-card) 0%, var(--bg-card-alt) 100%);
    border: 1.5px solid var(--steel-100);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease;
}
.catalog-card::before {
    display: none;
}

.catalog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.catalog-card-logo-badge-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.catalog-card-logo-badge-wrap .ai-price-badge--compact {
    margin-top: 0;
}

.catalog-card-badge-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.catalog-card-badge-sublabel {
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-left: 2px;
}
.catalog-card-badge-sublabel.sublabel--version { color: #bfb08a; }
.catalog-card-badge-sublabel.sublabel--drop { color: #15803d; }
.catalog-card-badge-sublabel.sublabel--up { color: #b45309; }
.catalog-card-badge-sublabel.sublabel--refreshed { color: #bfb08a; }

.catalog-card-logo {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--radius-sharp, 4px);
    border: 1px solid var(--steel-100);
    background: var(--bg-card);
}

.catalog-card-initials {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sharp, 4px);
    background-color: var(--steel-100);
    color: var(--steel-800);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--steel-200);
}

.catalog-card-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--steel-400);
    font-size: 12px;
    font-weight: 600;
}

.catalog-card-rating svg {
    width: 12px;
    height: 12px;
    color: var(--steel-400);
}

.catalog-card-name {
    font-size: 18px;
    font-weight: 750;
    color: var(--steel-900);
    margin-bottom: 12px;
    text-transform: none;
}

/* Külső rangsor-helyezés (Artificial Analysis). Csak akkor renderelődik, ha az
   admin bekapcsolta a publikus megjelenítést — l. includes/ai_ranking_lib.php. */
.catalog-card-rank {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 4px 9px;
    background: rgba(191, 176, 138, 0.14);
    border: 1px solid rgba(191, 176, 138, 0.55);
    border-radius: var(--radius-sharp, 4px);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #6e6148;
}
.catalog-card-rank .icon-12 {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}
.catalog-card-rank strong { font-weight: 800; }
.catalog-card-rank em {
    margin-left: 2px;
    padding-left: 6px;
    border-left: 1px solid rgba(191, 176, 138, 0.6);
    font-style: normal;
    color: var(--steel-500);
}

@media (max-width: 480px) {
    .catalog-card-rank {
        font-size: 11px;
        flex-wrap: wrap;
    }
}

/* Kategória badge: szürke admin stílusú */
.catalog-card-category-badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    background-color: rgba(180, 174, 164, 0.15);
    color: var(--steel-600);
    border: none;
    border-radius: 4px;
}

.catalog-card-body {
    margin-bottom: 24px;
}

.catalog-card-desc-fallback {
    font-size: 14px;
    color: var(--steel-500);
    line-height: 1.5;
}

.catalog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--steel-100);
    margin-top: auto;
}

.catalog-card-date {
    font-size: 12px;
    color: var(--steel-400);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.catalog-card-date .icon-12 { width: 12px; height: 12px; color: #bfb08a; }

.catalog-card-actions {
    display: flex;
    gap: 8px;
}

/* Adatlap + Weboldal: KÉT EGYFORMA MÉRETŰ gomb, 3D benyomott hatással */
.catalog-card-actions .catalog-card-detail-btn,
.catalog-card-actions .catalog-card-website-btn {
    flex: 1;
    min-width: 0;
    height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-sharp);
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

/* Adatlap = tömör sötét szürke, 3D benyomott hatással */
.catalog-card-actions .catalog-card-detail-btn {
    background: #161616;
    color: #ffffff;
    border: 1px solid var(--steel-900);
    border-bottom: 2px solid #0d0c0b;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.12);
}
.catalog-card-actions .catalog-card-detail-btn:hover {
    background: #2e2e2e;
    color: #ffffff;
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.15),
        0 0 2px rgba(0, 0, 0, 0.08);
}

/* Weboldal = szürke kontúr, 3D benyomott hatással */
.catalog-card-actions .catalog-card-website-btn {
    background: #ffffff;
    color: var(--steel-700);
    border: 1px solid var(--steel-300);
    border-bottom: 2px solid var(--steel-400);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 1px 3px rgba(0, 0, 0, 0.06);
}
.catalog-card-actions .catalog-card-website-btn:hover {
    background: var(--bg-card-alt);
    color: var(--steel-900);
    border-color: var(--steel-400);
    transform: translateY(1px);
    border-bottom-width: 1px;
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.06),
        0 0 2px rgba(0, 0, 0, 0.04);
}

.catalog-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 32px;
    background: var(--bg-card);
    border: 1px solid var(--steel-100);
    border-radius: var(--radius-sharp);
}

.catalog-empty-icon-wrap {
    color: var(--steel-300);
    margin-bottom: 16px;
}

.catalog-empty-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--steel-800);
    margin-bottom: 8px;
}

.catalog-empty-desc {
    font-size: 14px;
    color: var(--steel-500);
}

/* ==========================================================================
   6. AI Adatlap & Specifikációk (Frontend)
   ========================================================================== */
.model-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

@media (max-width: 900px) {
    .model-detail-grid {
        grid-template-columns: 1fr;
    }
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.spec-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--steel-100);
    font-size: 14px;
}

.spec-table tr:last-child td {
    border-bottom: none;
}

.spec-label {
    font-weight: 700;
    color: var(--steel-600);
    width: 40%;
}

.spec-value {
    color: var(--steel-900);
}

/* Hozzászólások: az egységes prémium komment-stílusok a fájl későbbi,
   "Hozzászólások" szekciójában találhatók (comment-form, comment-item stb.) —
   a korábbi legacy .comment-card blokk törölve, semmi nem használta. */



/* ==========================================================================
   Kategória-ikonok — egységes megjelenés MINDENHOL
   ========================================================================== */
.cat-icons { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cat-icon {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sharp, 4px);
    background: var(--bg-card-alt);
    border: 1px solid var(--steel-100);
    color: var(--steel-500);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.cat-icon:hover {
    background: rgba(255, 255, 255, 0.85);
    border-color: #bfb08a;
    color: #000000;
}
.cat-icon i, .cat-icon svg { width: 15px; height: 15px; }

/* CSS-tooltip a pontos magyar névvel */
.cat-icon-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    background: var(--steel-900);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 4px 9px;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 30;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.cat-icon:hover .cat-icon-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.model-aside-card,
.card.catalog-card { overflow: visible; }

.model-aside-namelink { text-decoration: none; color: inherit; }
.model-aside-namelink::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Adatlap-fejléc: az ikonsor kicsit nagyobb, levegősebb */
.model-hero-cat-icons .cat-icon { width: 34px; height: 34px; }
.model-hero-cat-icons .cat-icon i, .model-hero-cat-icons .cat-icon svg { width: 17px; height: 17px; }
.new-badge-svg {
    overflow: visible;
    display: block;
}

.new-badge-svg .running-light-border {
    stroke-dasharray: 25 147;
    animation: running-light-animation 3s infinite linear;
}

.catalog-card-badge-wrap .new-badge-svg .running-light-border {
    stroke-dasharray: 20 140;
    animation: running-light-animation-card 3s infinite linear;
}

@keyframes running-light-animation {
    0% { stroke-dashoffset: 0px; }
    100% { stroke-dashoffset: -172px; }
}

@keyframes running-light-animation-card {
    0% { stroke-dashoffset: 0px; }
    100% { stroke-dashoffset: -160px; }
}
