/* ============================================================
    KarsiLASTIR — Premium Design System 2026
    A modern, clean comparison platform UI
    ============================================================ */

:root {
    /* __ Brand Colors __ */
    --primary:        #6366f1;
    --primary-dark:   #4f46e5;
    --primary-darker: #4338ca;
    --primary-light:  rgba(99,102,241,.10);
    --primary-xlight: rgba(99,102,241,.05);
    --primary-border: rgba(99,102,241,.22);
    --primary-glow:   rgba(99,102,241,.15);

    /* __ Secondary / CTA __ */
    --cta:            #0ea5e9;
    --cta-dark:       #0284c7;
    --cta-light:      rgba(14,165,233,.10);
    --cta-border:     rgba(14,165,233,.22);

    /* __ Accent Colors __ */
    --emerald:        #10b981;
    --emerald-light:  rgba(16,185,129,.10);
    --amber:          #f59e0b;
    --amber-light:    rgba(245,158,11,.10);
    --rose:           #f43f5e;
    --rose-light:     rgba(244,63,94,.10);
    --violet:         #8b5cf6;
    --violet-light:   rgba(139,92,246,.10);
    --cyan:           #06b6d4;
    --cyan-light:     rgba(6,182,212,.10);

    /* __ Backgrounds __ */
    --bg:             #f8fafc;
    --bg-white:       #ffffff;
    --bg-elevated:    #f1f5f9;
    --bg-subtle:      #f8fafc;
    --bg-dark:        #0f172a;
    --bg-dark-2:      #1e293b;

    /* __ Text __ */
    --text:           #0f172a;
    --text-secondary: #475569;
    --text-muted:     #64748b;
    --text-light:     #94a3b8;
    --text-dim:       #cbd5e1;

    /* __ Borders __ */
    --border:         #e2e8f0;
    --border-strong:  #cbd5e1;
    --border-accent:  rgba(99,102,241,.18);

    /* __ State Colors __ */
    --success:        #10b981;
    --success-bg:     rgba(16,185,129,.10);
    --warning:        #f59e0b;
    --warning-bg:     rgba(245,158,11,.10);
    --danger:         #ef4444;
    --danger-bg:      rgba(239,68,68,.08);

    /* __ Shadows __ */
    --shadow-xs:  0 1px 2px rgba(0,0,0,.04);
    --shadow-sm:  0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:     0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
    --shadow-md:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
    --shadow-lg:  0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
    --shadow-xl:  0 25px 50px -12px rgba(0,0,0,.15);
    --shadow-glow: 0 0 0 3px var(--primary-glow);
    --shadow-accent: 0 4px 20px rgba(99,102,241,.28);

    /* __ Border Radii __ */
    --radius-xs:  4px;
    --radius-sm:  6px;
    --radius:     8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* __ Layout __ */
    --header-main-h: 64px;
    --header-nav-h:  48px;
    --header-h:      calc(var(--header-main-h) + var(--header-nav-h));
    --sidebar-w:  260px;
    --content-max: 100%;

    /* __ Transitions __ */
    --t:   .15s ease;
    --ts:  .25s cubic-bezier(.4,0,.2,1);
    --tl:  .35s cubic-bezier(.4,0,.2,1);

    /* __ Nav Dark __ */
    --sb-bg:      #0f172a;
    --sb-hover:   #1e293b;
    --sb-active:  rgba(99,102,241,.15);
    --sb-border:  rgba(255,255,255,.06);
    --sb-txt:     #94a3b8;
    --sb-muted:   #64748b;
    --sb-dim:     #1e293b;

    /* __ Compat aliases __ */
    --accent:         var(--primary);
    --accent-dark:    var(--primary-dark);
    --accent-hover:   var(--primary-darker);
    --accent-light:   var(--primary-light);
    --accent-xlight:  var(--primary-xlight);
    --accent-border:  var(--primary-border);
}

/* ============================================================ RESET & BASE */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ============================================================ LAYOUT */
.site-layout { min-height: 100vh; }

/* ============================================================ HEADER */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 220;
    display: flex; flex-direction: column;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(226,232,240,.5);
}

.site-header-main {
    height: var(--header-main-h);
    display: grid;
    grid-template-columns: auto minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    max-width: none;
    margin: 0;
    width: 100%;
}

.header-brand-wrap {
    display: flex; align-items: center; gap: 10px; min-width: 0;
    padding: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(248,250,252,.55));
    border: 1px solid rgba(226,232,240,.8);
}

.menu-mobile-toggle {
    width: 40px; height: 40px; border: none; border-radius: var(--radius);
    display: none; align-items: center; justify-content: center;
    background: var(--bg-elevated); color: var(--text);
    transition: all var(--t);
}
.menu-mobile-toggle:hover { background: var(--border); }

.menu-brand-link {
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0; min-width: 0;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: all var(--ts);
}

.menu-brand-link:hover {
    background: rgba(99,102,241,.08);
    border-color: rgba(99,102,241,.18);
}

.logo-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(99,102,241,.3));
}

.site-logo-text {
    font-weight: 800; font-size: 1.05rem; letter-spacing: -.03em;
    color: var(--text); white-space: nowrap; overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(135deg, var(--primary), var(--cta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- Search ---- */
.menu-search-form {
    width: 100%; max-width: none; justify-self: center;
    padding: 0 2px;
}

.menu-search-inner {
    display: flex; align-items: center; gap: 10px;
    min-height: 42px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1.5px solid #dbe5f2;
    border-radius: var(--radius-full);
    padding: 8px 16px;
    box-shadow: 0 1px 0 rgba(255,255,255,.9) inset;
    transition: all var(--ts);
}
.menu-search-inner:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow), 0 6px 18px rgba(99,102,241,.18);
    background: #fff;
}
.menu-search-inner svg { color: #64748b; flex-shrink: 0; }
.menu-search-inner input {
    background: none; border: none; outline: none;
    color: var(--text); font-size: .875rem; width: 100%;
}
.menu-search-inner input::placeholder { color: var(--text-light); }

/* ---- Header Actions ---- */
.header-actions {
    display: flex; align-items: center; gap: 8px; justify-self: end;
    padding: 4px;
    border-radius: var(--radius-full);
    background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(248,250,252,.55));
    border: 1px solid rgba(226,232,240,.8);
}

.compare-menu-btn,
.compare-topbar-btn {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: var(--radius-full);
    font-size: .8rem; font-weight: 600; cursor: pointer;
    transition: all var(--ts); white-space: nowrap; border: none;
}
.compare-topbar-btn {
    background: var(--primary-light);
    border: 1.5px solid var(--primary-border);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(99,102,241,.15);
}
.compare-topbar-btn:hover {
    background: rgba(99,102,241,.2);
    transform: translateY(-1px);
}

.compare-menu-btn {
    background: var(--cta-light);
    border: 1.5px solid var(--cta-border);
    color: var(--cta-dark);
    box-shadow: 0 2px 8px rgba(14,165,233,.15);
}
.compare-menu-btn:hover {
    background: rgba(14,165,233,.22);
    transform: translateY(-1px);
}

.compare-topbar-btn .badge-count,
.compare-menu-btn .count-badge {
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: var(--primary);
    font-size: .65rem; font-weight: 700;
}

/* ---- Navigation Panel ---- */
.site-nav-panel {
    height: var(--header-nav-h);
    display: flex; align-items: center;
    background: linear-gradient(90deg, #0b1220 0%, #0f172a 35%, #111c33 100%);
    border-top: 1px solid rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.06);
    padding: 0;
}

.site-nav-shell {
    width: 100%; max-width: none; margin: 0;
    display: flex; align-items: center; gap: 8px;
    padding: 5px 0;
}

.site-nav-kicker {
    display: inline-flex; align-items: center; justify-content: center;
    height: 34px; padding: 0 16px; border-radius: var(--radius-full);
    font-size: .64rem; font-weight: 800;
    letter-spacing: .08em; text-transform: uppercase;
    color: #c7d2fe;
    background: linear-gradient(135deg, rgba(99,102,241,.22), rgba(14,165,233,.18));
    border: 1px solid rgba(129,140,248,.35);
    box-shadow: 0 4px 14px rgba(99,102,241,.2);
    flex-shrink: 0;
}

.site-nav-scroll {
    display: flex; align-items: center; gap: 6px;
    overflow-x: auto; overflow-y: visible;
    padding: 0 6px; width: 100%;
    scrollbar-width: none;
}
.site-nav-scroll::-webkit-scrollbar { height: 0; display: none; }

.mega-item { position: relative; flex-shrink: 0; }

.pub-nav-link,
.mega-trigger {
    display: inline-flex; align-items: center; gap: 6px;
    height: 36px; padding: 0 15px; border-radius: var(--radius-full);
    border: 1px solid rgba(255,255,255,.04);
    color: rgba(226,232,240,.72);
    font-size: .8rem; font-weight: 600;
    background: rgba(255,255,255,.01);
    transition: all var(--ts); white-space: nowrap;
    position: relative;
}
.pub-nav-link svg { flex-shrink: 0; }
.pub-nav-link:hover,
.mega-trigger:hover {
    background: rgba(255,255,255,.08);
    color: #f8fafc;
    border-color: rgba(255,255,255,.13);
    transform: translateY(-1px);
}
.pub-nav-link.active,
.mega-trigger.active {
    background: linear-gradient(135deg, rgba(99,102,241,.32), rgba(14,165,233,.2));
    border-color: rgba(129,140,248,.45);
    color: #e0e7ff;
    box-shadow: 0 6px 20px rgba(99,102,241,.28);
}

.pub-nav-link::after,
.mega-trigger::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 5px;
    height: 2px;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, rgba(129,140,248,.95), rgba(56,189,248,.95));
    transform: scaleX(0);
    transform-origin: center;
    opacity: .8;
    transition: transform var(--ts);
}

.pub-nav-link:hover::after,
.mega-trigger:hover::after,
.pub-nav-link.active::after,
.mega-trigger.active::after {
    transform: scaleX(1);
}

.mega-trigger-count {
    min-width: 20px; height: 20px; padding: 0 6px;
    border-radius: var(--radius-full);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .6rem; font-weight: 700;
    color: #e0e7ff;
    background: rgba(79,70,229,.45);
    border: 1px solid rgba(129,140,248,.35);
}
.mega-trigger.active .mega-trigger-count {
    background: rgba(224,231,255,.18);
}

.mega-trigger svg:last-child { transition: transform var(--ts); }
.mega-item:hover .mega-trigger svg:last-child,
.mega-item:focus-within .mega-trigger svg:last-child,
.mega-trigger.active svg:last-child { transform: rotate(180deg); }

/* ---- Mega Dropdown ---- */
.mega-panel {
    position: absolute; top: calc(100% + 10px); left: 0;
    min-width: 520px; max-width: 680px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid #dbe5f4;
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 60px -22px rgba(15,23,42,.45), 0 8px 20px rgba(15,23,42,.12);
    padding: 18px;
    opacity: 0; visibility: hidden;
    transform: translateY(12px) scale(.98);
    transition: all var(--ts);
}
.mega-item:hover .mega-panel,
.mega-item:focus-within .mega-panel {
    opacity: 1; visibility: visible;
    transform: translateY(0) scale(1);
}

.mega-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 4px 4px 14px; margin-bottom: 14px;
    border-bottom: 1px dashed #d7e0ee;
}
.mega-panel-header strong {
    font-size: .95rem;
    color: #0f172a;
    letter-spacing: -.01em;
}
.mega-panel-header a {
    font-size: .76rem;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    transition: all var(--t);
}
.mega-panel-header a:hover { color: var(--primary-dark); transform: translateX(2px); }

.mega-panel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.mega-sub-card {
    display: flex; flex-direction: column; gap: 4px;
    background: #fff;
    border: 1.5px solid #e3ebf6;
    border-radius: var(--radius-md);
    padding: 13px;
    transition: all var(--ts);
    position: relative;
    overflow: hidden;
}
.mega-sub-card:hover {
    border-color: rgba(99,102,241,.35);
    background: linear-gradient(180deg, rgba(99,102,241,.06), rgba(14,165,233,.04));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.mega-sub-card.active {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(99,102,241,.12), rgba(14,165,233,.08));
}
.mega-sub-title { font-size: .81rem; font-weight: 700; color: #0f172a; letter-spacing: -.01em; }
.mega-sub-meta {
    font-size: .66rem; color: #64748b;
    letter-spacing: .08em; text-transform: uppercase;
}

.mega-sub-card::after {
    content: '→';
    position: absolute;
    right: 10px;
    bottom: 8px;
    font-size: .8rem;
    color: rgba(99,102,241,.4);
    transform: translateX(0);
    transition: transform var(--ts), color var(--ts);
}

.mega-sub-card:hover::after {
    color: rgba(99,102,241,.85);
    transform: translateX(2px);
}

.site-nav-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,23,42,.5);
    backdrop-filter: blur(4px);
    z-index: 200;
}

/* ============================================================ MAIN */
.site-main {
    margin-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
    min-width: 0; overflow-x: hidden;
}

.site-main-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    align-items: start;
    width: 100%;
}

.site-main-layout--single {
    grid-template-columns: 1fr;
}

.site-main-content {
    min-width: 0;
}

.global-right-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    align-self: start;
    padding: 14px 10px 40px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    width: 100%;
    min-width: 0;
}

.sidebar-widget {
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.sidebar-widget-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: .75rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--bg-subtle);
}

.sidebar-widget-body {
    padding: 10px;
}

.ad-media-link {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #fff;
}

.ad-media-link img {
    width: 100%;
    height: auto;
    display: block;
}

.ad-placeholder {
    min-height: 180px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #f8fafc, #eef2ff);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .84rem;
    font-weight: 600;
    padding: 16px;
}

.ad-html-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.recent-sidebar-widget .sidebar-widget-body {
    padding: 0;
}

.recent-sidebar-widget .recent-cmp-list {
   

}

.page-content {
    padding: 28px 20px 56px;
    max-width: var(--content-max);
    width: 100%; margin: 0 auto;
}

/* ============================================================ HERO */
.home-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #312e81 70%, #1e293b 100%);
    padding: 100px 0 80px;
    position: relative; overflow: hidden; text-align: center;
    border-bottom: none;
}

.hero-blob {
    position: absolute; border-radius: 50%; pointer-events: none;
    filter: blur(100px);
}
.hero-blob-1 {
    top: -200px; left: -100px; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(99,102,241,.3) 0%, transparent 70%);
}
.hero-blob-2 {
    bottom: -120px; right: -80px; width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(14,165,233,.18) 0%, transparent 70%);
}

.hero-content {
    position: relative; z-index: 1;
    max-width: 720px; margin: 0 auto;
}

.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(99,102,241,.15);
    border: 1.5px solid rgba(99,102,241,.3);
    border-radius: var(--radius-full);
    padding: 6px 20px;
    font-size: .72rem; font-weight: 700; color: #c7d2fe;
    margin-bottom: 28px;
    letter-spacing: .06em; text-transform: uppercase;
}
.hero-eyebrow-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #818cf8;
    animation: pulse-dot 2s ease-in-out infinite; flex-shrink: 0;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .4; transform: scale(.8); }
}

.hero-title {
    font-size: 3.5rem; font-weight: 800;
    color: #fff; line-height: 1.1; letter-spacing: -.04em;
    margin-bottom: 20px;
}
.hero-title-accent {
    background: linear-gradient(135deg, #818cf8 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-desc {
    color: #94a3b8; font-size: 1.05rem; margin-bottom: 40px;
    line-height: 1.8; max-width: 520px;
    margin-left: auto; margin-right: auto;
}

.hero-searchbar {
    display: flex; align-items: center;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
    max-width: 560px; margin: 0 auto 40px;
    padding: 6px 6px 6px 22px;
    backdrop-filter: blur(16px);
    transition: all var(--ts);
}
.hero-searchbar:focus-within {
    border-color: rgba(99,102,241,.5);
    box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 0 0 4px rgba(99,102,241,.15);
    background: rgba(255,255,255,.1);
}
.hero-searchbar > svg { flex-shrink: 0; color: #94a3b8; }
.hero-searchbar input {
    flex: 1; background: none; border: none; outline: none;
    padding: 13px 14px; color: #fff; font-size: .95rem; min-width: 0;
}
.hero-searchbar input::placeholder { color: #64748b; }
.hero-searchbar button {
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none; color: #fff;
    font-weight: 700; font-size: .88rem; cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--ts);
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(99,102,241,.4);
}
.hero-searchbar button:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 6px 24px rgba(99,102,241,.5);
    transform: translateY(-1px);
}

.hero-stats {
    display: flex; justify-content: center; align-items: center;
    margin-bottom: 36px; flex-wrap: wrap;
}
.hero-stat { padding: 0 32px; text-align: center; }
.hero-stat-div {
    width: 1px; height: 40px;
    background: rgba(255,255,255,.08); flex-shrink: 0;
}
.hero-stat-num {
    font-size: 2.4rem; font-weight: 800;
    background: linear-gradient(135deg, #818cf8, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block; line-height: 1.1; letter-spacing: -.04em;
}
.hero-stat-label {
    font-size: .7rem; color: #64748b; font-weight: 600;
    text-transform: uppercase; letter-spacing: .08em;
    margin-top: 4px; display: block;
}

.hero-badges {
    display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius-full);
    padding: 10px 18px;
    font-size: .78rem; font-weight: 500; color: #94a3b8;
    transition: all var(--ts);
}
.hero-badge:hover {
    border-color: rgba(99,102,241,.3);
    color: #c7d2fe;
    background: rgba(99,102,241,.1);
    transform: translateY(-1px);
}
.hero-badge > svg { opacity: .5; flex-shrink: 0; }

/* ============================================================ PAGE HEADER */
.page-header { margin-bottom: 24px; }
.page-header h1 {
    font-size: 1.5rem; font-weight: 800; color: var(--text);
    letter-spacing: -.03em; margin-bottom: 4px;
}
.page-header p { font-size: .875rem; color: var(--text-muted); }

/* ============================================================ CARD */
.card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden;
    box-shadow: var(--shadow-xs);
}

/* ============================================================ SECTION */
.section { padding: 0 0 40px; }
.section-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 2px solid var(--bg-elevated);
}
.section-title {
    font-size: 1.1rem; font-weight: 700; color: var(--text);
    letter-spacing: -.02em;
    display: flex; align-items: center; gap: 10px;
}
.section-title::before {
    content: ''; display: block; width: 4px; height: 20px;
    background: linear-gradient(180deg, var(--primary), var(--cta));
    border-radius: 2px;
}
.section-title span { color: var(--primary); }
.section-link {
    font-size: .82rem; font-weight: 600; color: var(--primary);
    display: flex; align-items: center; gap: 4px;
    transition: all var(--t);
}
.section-link:hover { gap: 8px; color: var(--primary-dark); }

/* ============================================================ CATEGORY GRID */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}
.category-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex; align-items: center; gap: 14px;
    transition: all var(--ts);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}
.category-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.category-card:hover .category-icon-box {
    border-color: var(--primary-border);
    background: var(--primary-light);
    color: var(--primary);
}
.category-icon-box {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: all var(--ts);
    background: var(--bg-elevated); color: var(--text-light);
}
.category-info h3 { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.category-info p { font-size: .75rem; color: var(--text-muted); }
.category-count {
    margin-left: auto;
    background: var(--primary-xlight);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    font-size: .7rem; font-weight: 600;
    padding: 3px 10px; border-radius: var(--radius-full); flex-shrink: 0;
}

/* ============================================================ PRODUCT GRID */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 0 10px;
}

.product-card {
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--ts);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-xs);
}
.product-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}
.product-card.in-compare {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light), var(--shadow);
}

.product-card-img {
    height: 180px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; border-bottom: 1px solid var(--border);
    position: relative;
}
.product-card-img img {
    max-height: 140px; max-width: 80%; object-fit: contain;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}
.product-card:hover .product-card-img img { transform: scale(1.08); }

.product-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--primary); color: #fff;
    font-size: .62rem; font-weight: 700;
    padding: 4px 10px; border-radius: var(--radius-full);
    text-transform: uppercase; letter-spacing: .04em;
}

.product-card-body {
    padding: 16px 18px; flex: 1;
    display: flex; flex-direction: column;
}
.product-brand {
    font-size: .68rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px;
}
.product-name {
    font-size: .88rem; font-weight: 600; color: var(--text);
    margin-bottom: 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.product-price {
    font-size: 1.1rem; font-weight: 700; color: var(--text);
    margin-top: auto; padding-top: 8px;
}

.product-card-footer {
    padding: 12px 16px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; background: var(--bg-subtle);
}
.product-card-footer .btn { flex: 1; text-align: center; font-size: .78rem; padding: 8px 10px; }

/* ============================================================ SUBCATEGORY CARDS */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.subcategory-card {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px; text-align: center;
    transition: all var(--ts); cursor: pointer;
    box-shadow: var(--shadow-xs);
}
.subcategory-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.subcategory-card h3 { font-size: .88rem; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.subcategory-card p { font-size: .75rem; color: var(--text-muted); }

/* ============================================================ BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px; border-radius: var(--radius);
    font-size: .85rem; font-weight: 600;
    border: 1.5px solid transparent; cursor: pointer;
    transition: all var(--ts);
    text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 4px 14px rgba(99,102,241,.35);
    transform: translateY(-1px);
}
.btn-outline {
    background: transparent; color: var(--primary);
    border-color: var(--primary-border);
}
.btn-outline:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}
.btn-outline-white {
    background: transparent; color: var(--text);
    border-color: var(--border-strong);
}
.btn-outline-white:hover { background: var(--bg-elevated); }
.btn-ghost {
    background: transparent; color: var(--text-muted);
    border-color: var(--border);
}
.btn-ghost:hover {
    background: var(--bg-elevated);
    color: var(--text); border-color: var(--border-strong);
}
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { padding: 7px 12px; font-size: .78rem; border-radius: var(--radius-sm); }
.btn-xs { padding: 5px 10px; font-size: .72rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 12px 28px; font-size: .9rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-compare {
    background: transparent; color: var(--primary);
    border: 1.5px solid var(--primary-border);
}
.btn-compare:hover { background: var(--primary-light); }
.btn-compare.active {
    background: var(--success-bg); color: var(--success);
    border-color: rgba(16,185,129,.3);
}

/* ============================================================ FILTER BAR */
.filter-bar {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 18px; margin-bottom: 20px;
    display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
    box-shadow: var(--shadow-xs);
}
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.filter-select {
    padding: 8px 12px; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-size: .82rem;
    color: var(--text); background: var(--bg-white);
    cursor: pointer; outline: none;
    transition: all var(--t);
}
.filter-select:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* ============================================================ PRODUCT DETAIL */
.product-detail-layout {
    display: grid; grid-template-columns: 380px 1fr;
    gap: 28px; margin-bottom: 40px; align-items: start;
}
.product-image-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 32px; display: flex; align-items: center; justify-content: center;
    min-height: 300px; position: sticky;
    top: calc(var(--header-h) + 16px);
    box-shadow: var(--shadow-sm);
}
.product-image-card img { max-height: 240px; object-fit: contain; }

.product-info-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); padding: 28px;
    box-shadow: var(--shadow-sm);
}

.product-detail-brand {
    font-size: .72rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px;
    display: flex; align-items: center; gap: 8px;
}
.product-detail-brand a { color: var(--primary); transition: color var(--t); }
.product-detail-brand a:hover { color: var(--primary-dark); }
.product-detail-brand-sep { opacity: .4; }

.product-detail-name {
    font-size: 1.6rem; font-weight: 800; color: var(--text);
    line-height: 1.25; margin-bottom: 16px; letter-spacing: -.03em;
}

.product-detail-price-row {
    display: flex; align-items: baseline; gap: 10px;
    margin-bottom: 20px; padding: 12px 0;
    border-bottom: 2px solid var(--bg-elevated);
}
.product-detail-price { font-size: 1.8rem; font-weight: 800; color: var(--text); letter-spacing: -.03em; }
.product-detail-price-tag { font-size: .75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.product-detail-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.product-detail-desc {
    font-size: .875rem; color: var(--text-secondary); line-height: 1.8;
    padding-top: 20px; border-top: 2px solid var(--bg-elevated);
}

.key-specs-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    margin-top: 16px; box-shadow: var(--shadow-sm);
}
.key-specs-header {
    padding: 14px 20px; border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
    display: flex; align-items: center; gap: 10px;
}
.key-specs-title { font-size: .85rem; font-weight: 700; color: var(--text); }
.key-specs-badge {
    background: var(--primary-light); color: var(--primary);
    font-size: .68rem; font-weight: 700; padding: 3px 10px;
    border-radius: var(--radius-full); border: 1px solid var(--primary-border);
}

/* ============================================================ SPEC TABLE */
.spec-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-md); overflow: hidden; margin-bottom: 12px;
}
.spec-group-title {
    background: var(--bg-elevated); border-bottom: 1px solid var(--border);
    padding: 10px 18px; font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--primary); display: flex; align-items: center; gap: 8px;
}
.spec-group-title::before {
    content: ''; width: 4px; height: 14px;
    background: linear-gradient(180deg, var(--primary), var(--cta));
    border-radius: 2px; flex-shrink: 0;
}

.spec-row {
    display: flex; align-items: center; padding: 12px 18px;
    border-bottom: 1px solid var(--border);
    font-size: .85rem; transition: background var(--t);
}
.spec-row:last-child { border-bottom: none; }
.spec-row:nth-child(even) { background: var(--bg-subtle); }
.spec-row:hover { background: var(--primary-xlight); }
.spec-row.important { background: rgba(99,102,241,.04); }
.spec-row.important:hover { background: rgba(99,102,241,.08); }

.spec-key {
    color: var(--text-muted); font-weight: 500;
    width: 180px; flex-shrink: 0; font-size: .82rem;
}
.spec-value { color: var(--text); font-weight: 600; }
.spec-unit { color: var(--text-light); font-size: .75rem; margin-left: 3px; }
.spec-yes { color: var(--success); font-weight: 700; }
.spec-no { color: var(--danger); font-weight: 700; }

/* ============================================================ COMPARE PAGE */
.cmp-page { max-width: 100%; }

.cmp-hero {
    display: flex; align-items: center; justify-content: space-between; gap: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #312e81 50%, #4f46e5 100%);
    border-radius: var(--radius-xl); padding: 32px 36px; margin-bottom: 20px;
    position: relative; overflow: hidden;
}
.cmp-hero::before {
    content: ''; position: absolute; top: -50%; right: -10%;
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    pointer-events: none;
}
.cmp-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .75rem; font-weight: 600; color: #c7d2fe;
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px;
}
.cmp-hero-title {
    font-size: 1.3rem; font-weight: 800; color: #fff;
    margin: 0 0 6px; letter-spacing: -.02em;
    line-height: 1.3; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
}
.cmp-pname { color: #fff; }
.cmp-vs {
    font-size: .9rem; font-weight: 600; color: rgba(255,255,255,.45);
    letter-spacing: .04em; flex-shrink: 0;
}
.cmp-hero-sub { font-size: .85rem; color: rgba(255,255,255,.45); margin: 0; }
.cmp-hero-right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }

.cmp-diff-toggle {
    display: flex; align-items: center; gap: 10px; cursor: pointer;
    font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.7);
    user-select: none; white-space: nowrap;
}
.cmp-toggle-track {
    width: 40px; height: 22px;
    background: rgba(255,255,255,.15); border-radius: var(--radius-full);
    position: relative; transition: background var(--t); flex-shrink: 0;
}
.cmp-toggle-track::after {
    content: ''; width: 16px; height: 16px;
    background: #fff; border-radius: 50%;
    position: absolute; top: 3px; left: 3px;
    transition: left var(--ts);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.cmp-toggle-track.on { background: var(--primary); }
.cmp-toggle-track.on::after { left: 21px; }

/* ---- Compare Product Cards ---- */
/* ── Comparison product cards ── */
.cmp-cards-wrap {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    margin-bottom: 20px; box-shadow: var(--shadow);
}
.cmp-cards-grid { display: grid; grid-template-columns: repeat(var(--col), 1fr); }

.cmp-card {
    padding: 20px 16px 16px; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; align-items: center;
    text-align: center; transition: background var(--t); position: relative;
    background: #fff;
}
.cmp-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: var(--card-color, var(--primary));
}
.cmp-card:last-child { border-right: none; }

/* Clickable image vote button */
.cmp-img-vote-btn {
    background: none; border: none; padding: 0; cursor: pointer;
    width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px;
    border-radius: var(--radius-md); transition: transform .15s;
}
.cmp-img-vote-btn:hover .cmp-card-img-wrap {
    border-color: var(--card-color, var(--primary));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--card-color, var(--primary)) 20%, transparent);
}
.cmp-img-vote-btn:active { transform: scale(.97); }
.cmp-img-hint {
    font-size: .68rem; font-weight: 700; color: var(--card-color, var(--primary));
    background: color-mix(in srgb, var(--card-color, var(--primary)) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--card-color, var(--primary)) 25%, transparent);
    border-radius: var(--radius-full); padding: 3px 10px;
    display: flex; align-items: center; gap: 4px;
    opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s;
}
.cmp-img-vote-btn:hover .cmp-img-hint { opacity: 1; transform: translateY(0); }
@media (hover: none) { .cmp-img-hint { opacity: 1; transform: none; } }

/* Image wrap */
.cmp-card-img-wrap {
    width: 110px; height: 110px; background: var(--bg-elevated);
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 6px; overflow: visible; flex-shrink: 0; position: relative;
    transition: border-color .15s, box-shadow .15s;
}
.cmp-card-img-wrap img { max-width: 86px; max-height: 86px; object-fit: contain; }
.cmp-card-img-wrap.img-is-mine {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 3px rgba(52,211,153,.2) !important;
}
.cmp-img-mine-badge {
    position: absolute; top: -6px; right: -6px;
    background: #059669; color: #fff;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: .65rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff;
}

/* Brand & name */
.cmp-card-body { width: 100%; margin-top: 10px; }
.cmp-card-brand {
    font-size: .62rem; font-weight: 700; color: var(--card-color, var(--primary));
    text-transform: uppercase; letter-spacing: .07em; margin-bottom: 3px;
}
.cmp-card-name {
    font-size: .82rem; font-weight: 700; color: var(--text);
    line-height: 1.35; margin-bottom: 0;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cmp-card-price { display: none; }

/* Key specs summary */
.cmp-card-keyspecs {
    width: 100%; margin-top: 12px; margin-bottom: 4px;
    border-top: 1px solid var(--border);
    padding-top: 10px; display: flex; flex-direction: column; gap: 5px;
}
.cmp-ks-row {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 4px; font-size: .71rem;
}
.cmp-ks-label { color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%; }
.cmp-ks-val { font-weight: 700; color: var(--text); white-space: nowrap; }
.cmp-ks-val small { font-weight: 400; color: var(--text-muted); font-size: .68rem; }

/* Vote section */
.cmp-card-vote { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; margin-top: 12px; margin-bottom: 6px; }
.cmp-card-vote-bar-wrap { width: 100%; height: 5px; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.cmp-card-vote-bar { height: 100%; border-radius: var(--radius-full); transition: width .6s ease; }
.cmp-card-vote-stat { font-size: .72rem; color: var(--text-muted); font-weight: 500; }
.cmp-card.vote-mine { background: color-mix(in srgb, var(--card-color, var(--primary)) 6%, #fff) !important; }
.cmp-card-voted-badge {
    font-size: .7rem; font-weight: 700; color: #059669;
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: var(--radius-full); padding: 3px 12px;
}

/* Footer links */
.cmp-card-footer { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: auto; padding-top: 10px; width: 100%; }
.cmp-remove-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--danger-bg); border: 1px solid rgba(239,68,68,.15);
    border-radius: var(--radius-sm); padding: 5px 10px;
    font-size: .72rem; font-weight: 600; color: var(--danger);
    cursor: pointer; transition: all var(--t);
}
.cmp-remove-btn:hover { background: rgba(239,68,68,.15); }

/* ---- Compare Spec Table ---- */
.cmp-table {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow);
}
/* ---- Group separator header ---- */
.pd2-specs-head {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    background: var(--bg-elevated);
    border-top: 2px solid var(--primary-border);
    border-bottom: 1px solid var(--border);
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--primary);
}
.pd2-specs-head::before {
    content: ''; display: inline-block;
    width: 3px; height: 14px; border-radius: 2px;
    background: var(--primary); flex-shrink: 0;
}
.cmp-group-count {
    background: var(--primary-light); color: var(--primary);
    border-radius: var(--radius-full); padding: 2px 9px;
    font-size: .65rem; font-weight: 700;
}

.cmp-spec-row {
    display: grid; grid-template-columns: 200px 1fr;
    border-top: 1px solid var(--border);
    transition: background var(--t);
}
.cmp-spec-row:nth-child(even) { background: var(--bg-subtle); }
.cmp-spec-row:hover { background: var(--primary-xlight); }
.cmp-spec-row.is-important .cmp-spec-label { color: var(--text); font-weight: 600; }
.cmp-spec-row.hidden-same { display: none !important; }

.cmp-spec-label {
    padding: 12px 20px; display: flex; align-items: center; gap: 7px;
    flex-wrap: wrap; font-size: .82rem; font-weight: 500;
    color: var(--text-muted); border-right: 1px solid var(--border);
}
.cmp-imp-dot { width: 6px; height: 6px; background: var(--primary); border-radius: 50%; flex-shrink: 0; }
.cmp-spec-unit {
    font-size: .7rem; color: var(--text-dim);
    background: var(--bg-elevated); border-radius: var(--radius-xs);
    padding: 1px 6px; border: 1px solid var(--border);
}
.cmp-spec-values { display: grid; grid-template-columns: repeat(var(--col), 1fr); }

.cmp-spec-val {
    padding: 12px 14px; display: flex; align-items: center; justify-content: center;
    font-size: .84rem; font-weight: 600; color: var(--text);
    text-align: center; border-right: 1px solid var(--border); gap: 6px; flex-wrap: wrap;
}
.cmp-spec-val:last-child { border-right: none; }
.cmp-spec-val.v-best { background: rgba(16,185,129,.06); }
.cmp-spec-val.v-worst { background: rgba(239,68,68,.04); }

.v-yes {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--emerald-light); color: #059669;
    border-radius: var(--radius-full); padding: 4px 12px;
    font-size: .78rem; font-weight: 600;
}
.v-no {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--rose-light); color: #e11d48;
    border-radius: var(--radius-full); padding: 4px 12px;
    font-size: .78rem; font-weight: 600;
}
.v-na { color: var(--text-dim); font-weight: 400; }
.v-text { color: var(--text); font-weight: 600; }
.best-badge {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--emerald-light); color: #059669;
    border-radius: var(--radius-full); padding: 3px 9px;
    font-size: .68rem; font-weight: 700; white-space: nowrap;
}

.cmp-add-more {
    display: flex; align-items: center; gap: 18px;
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); padding: 22px 26px;
    margin-top: 12px; box-shadow: var(--shadow-sm);
}
.cmp-add-icon {
    width: 42px; height: 42px; border-radius: var(--radius);
    background: var(--primary-light); color: var(--primary);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.compare-controls { display: none; }
.toggle-diff, .toggle-switch { display: none; }

/* ============================================================ COMPARE BAR */
.compare-bar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    border-top: 2px solid var(--primary);
    box-shadow: 0 -8px 32px rgba(0,0,0,.08);
    transform: translateY(100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    display: flex; flex-direction: column;
}
.compare-bar.show { transform: translateY(0); }

.compare-bar-inner { padding: 14px 24px; display: flex; align-items: center; gap: 14px; }
.compare-slots { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; }
.compare-slot {
    background: var(--bg-subtle);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-md); padding: 8px 14px; min-width: 140px;
    display: flex; align-items: center; gap: 8px;
    color: var(--text-dim); font-size: .78rem;
}
.compare-slot.filled {
    border-style: solid; border-color: var(--primary-border);
    background: var(--primary-xlight); color: var(--primary);
}
.compare-slot-name {
    font-weight: 600; font-size: .78rem; flex: 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.compare-slot-remove {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; padding: 3px; display: flex;
    border-radius: 50%; transition: all var(--t);
}
.compare-slot-remove:hover { color: var(--danger); background: var(--danger-bg); }
.compare-slot-add {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    color: var(--text-dim); font-size: .78rem; width: 100%;
    padding: 0; transition: color var(--t);
}
.compare-slot-add:hover { color: var(--primary); }
.compare-slot-add svg { flex-shrink: 0; }

.compare-bar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.compare-bar-cat-label {
    font-size: .72rem; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
    padding-right: 14px; border-right: 1px solid var(--border);
    flex-shrink: 0;
}

.compare-cat-tabs {
    display: none; gap: 0; padding: 0 24px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto; flex-shrink: 0; scrollbar-width: none;
}
.compare-cat-tabs::-webkit-scrollbar { display: none; }
.compare-cat-tab {
    padding: 8px 16px 6px; border: none;
    border-bottom: 2px solid transparent;
    background: none; color: var(--text-muted);
    font-size: .78rem; font-weight: 600; cursor: pointer;
    transition: all var(--t); white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px;
}
.compare-cat-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.compare-cat-tab:hover:not(.active) { color: var(--text); background: var(--bg-subtle); }
.compare-cat-tab-count {
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 1px 7px;
    font-size: .7rem; font-weight: 700;
}
.compare-cat-tab.active .compare-cat-tab-count {
    background: var(--primary-light); border-color: var(--primary-border);
    color: var(--primary);
}

/* ============================================================ PAGINATION */
.pagination {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-top: 40px; flex-wrap: wrap;
}
.page-btn {
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--border); border-radius: var(--radius);
    font-size: .82rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-white); text-decoration: none;
    transition: all var(--ts);
}
.page-btn:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-xlight);
}
.page-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary); color: #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.3);
}
.page-btn.disabled { opacity: .3; pointer-events: none; }

/* ============================================================ BADGES & ALERTS */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: var(--radius-full);
    font-size: .65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .04em;
}
.badge-primary { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary-border); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-gray { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.badge-indigo { background: rgba(99,102,241,.08); color: #4f46e5; }

.alert {
    padding: 14px 18px; border-radius: var(--radius-md);
    font-size: .85rem; margin-bottom: 16px;
    display: flex; align-items: flex-start; gap: 10px;
    border-left: 4px solid currentColor;
}
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-danger { background: var(--danger-bg); color: var(--danger); }
.alert-info { background: var(--primary-light); color: var(--primary); }

/* ============================================================ EMPTY STATE */
.empty-state { text-align: center; padding: 80px 24px; color: var(--text-muted); }
.empty-state svg { opacity: .1; margin-bottom: 18px; }
.empty-state h3 { font-size: 1.1rem; color: var(--text); font-weight: 700; margin-bottom: 8px; }
.empty-state p { font-size: .88rem; }

/* ============================================================ HOW IT WORKS */
.how-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-step {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 28px 24px; text-align: center;
    transition: all var(--ts); box-shadow: var(--shadow-xs);
}
.how-step:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md); transform: translateY(-3px);
}
.how-step-num {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; font-weight: 700; margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(99,102,241,.25);
}
.how-step h3 { font-size: .9rem; color: var(--text); font-weight: 700; margin-bottom: 6px; }
.how-step p { font-size: .82rem; color: var(--text-muted); line-height: 1.7; }

/* ============================================================ FOOTER */
.site-footer { display: none !important; }

/* ============================================================ PRODUCT DETAIL EXTENDED */
.product-image-col { display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--header-h) + 16px); }
.product-info-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.product-quick-actions { display: flex; flex-direction: column; gap: 8px; }
.pqa-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 16px;
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md); cursor: pointer;
    font-size: .85rem; font-weight: 600;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; transition: all var(--ts); text-decoration: none;
    box-shadow: 0 2px 8px rgba(99,102,241,.2);
}
.pqa-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 4px 14px rgba(99,102,241,.3); transform: translateY(-1px);
}
.pqa-ghost {
    background: var(--bg-white); color: var(--text-secondary);
    border-color: var(--border-strong); box-shadow: none;
}
.pqa-ghost:hover { background: var(--bg-elevated); color: var(--text); box-shadow: none; transform: none; }

.product-detail-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.pd-chip {
    display: inline-flex; align-items: center;
    padding: 4px 12px; border-radius: var(--radius-full);
    font-size: .68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .06em;
    background: var(--bg-elevated); border: 1px solid var(--border);
    color: var(--text-muted); text-decoration: none;
    transition: all var(--t);
}
.pd-chip:hover { background: var(--primary-xlight); color: var(--primary); border-color: var(--primary-border); }
.pd-chip--brand { background: var(--primary-xlight); color: var(--primary); border-color: var(--primary-border); }
.pd-chip--brand:hover { background: var(--primary); color: #fff; }

.specs-full-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.specs-flat-table {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.specs-flat-table .spec-row {
    padding: 14px 22px; display: flex; align-items: center;
    justify-content: space-between; gap: 18px;
    border-bottom: 1px solid var(--border);
}
.specs-flat-table .spec-row:last-child { border-bottom: none; }
.specs-flat-table .spec-row:nth-child(even) { background: var(--bg-subtle); }
.specs-flat-table .spec-row.important { background: rgba(99,102,241,.04); }
.specs-flat-table .spec-key { font-size: .84rem; font-weight: 500; color: var(--text-muted); flex: 1; }
.specs-flat-table .spec-value { font-size: .88rem; font-weight: 600; color: var(--text); text-align: right; }

/* ============================================================ COMPARE VISUALS */
.cmp-visual-section {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); padding: 26px 28px;
    margin-top: 12px; box-shadow: var(--shadow-sm); overflow: hidden;
}
.cmp-score-cards {
    display: grid; grid-template-columns: repeat(var(--col), 1fr);
    gap: 14px; margin-top: 18px; margin-bottom: 24px;
}
.cmp-score-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-subtle); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); padding: 18px 20px;
    transition: all var(--ts);
}
.cmp-score-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow); }
.cmp-score-ring { position: relative; width: 68px; height: 68px; flex-shrink: 0; }
.cmp-score-ring svg { width: 100%; height: 100%; }
.cmp-ring-progress {
    stroke-dashoffset: 0;
    animation: ringDraw 1.2s cubic-bezier(.4,0,.2,1) both;
}
@keyframes ringDraw { from { stroke-dasharray: 0 213.6; } }
.cmp-score-num {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; font-weight: 800; color: var(--text); letter-spacing: -.02em;
}
.cmp-score-info { flex: 1; min-width: 0; }
.cmp-score-pname { font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: 4px; line-height: 1.3; }
.cmp-score-detail { font-size: .75rem; color: var(--text-muted); font-weight: 500; }

/* ---- Bar Charts ---- */
.cmp-bar-charts { margin-bottom: 28px; }
.cmp-bar-charts-title, .cmp-radar-title {
    font-size: .78rem; font-weight: 700; color: var(--text);
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 12px; margin-bottom: 16px;
    border-bottom: 2px solid var(--bg-elevated);
    text-transform: uppercase; letter-spacing: .06em;
}
.cmp-bar-charts-title svg, .cmp-radar-title svg { color: var(--primary); flex-shrink: 0; }
.cmp-bar-legend, .cmp-radar-legend {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px;
}
.cmp-bar-legend-item, .cmp-radar-legend-item {
    display: flex; align-items: center; gap: 6px;
    font-size: .75rem; font-weight: 600; color: var(--text-muted);
}
.cmp-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.cmp-bar-row {
    display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cmp-bar-row:last-child { border-bottom: none; }
.cmp-bar-label { font-size: .78rem; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.cmp-bar-unit { font-size: .68rem; color: var(--text-dim); font-weight: 400; }
.cmp-bar-tracks { display: flex; flex-direction: column; gap: 5px; }
.cmp-bar-track { display: flex; align-items: center; gap: 10px; height: 20px; }
.cmp-bar-fill {
    height: 100%; border-radius: var(--radius-full);
    background: var(--bar-color, var(--primary));
    width: 0; transition: width .8s cubic-bezier(.4,0,.2,1);
    position: relative; min-width: 4px;
}
.cmp-bar-fill.is-best { opacity: 1; }
.cmp-bar-fill:not(.is-best) { opacity: .45; }
.cmp-bar-fill.animated { width: var(--bar-w); }
.cmp-bar-value {
    font-size: .72rem; font-weight: 700; color: var(--text-muted);
    white-space: nowrap; min-width: 44px;
}
.cmp-bar-value.is-best { color: var(--text); font-weight: 800; }

/* ---- Radar Chart ---- */
.cmp-radar-wrap { margin-top: 8px; }
.cmp-radar-container { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; justify-content: center; }
.cmp-radar-svg { width: 300px; height: 300px; flex-shrink: 0; }
.cmp-radar-poly { opacity: 0; animation: radarReveal .6s .3s ease both; }
@keyframes radarReveal { to { opacity: 1; } }
.cmp-radar-legend { display: flex; flex-direction: column; gap: 10px; }

/* ============================================================ COMPARE VOTE */
.cmp-vote-section, .cmp-comments-section {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); padding: 26px 28px;
    margin-top: 12px; box-shadow: var(--shadow-sm);
}
.cmp-vote-total {
    font-size: .78rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 3px 12px;
}
.cmp-vote-grid { display: grid; grid-template-columns: repeat(var(--col), 1fr); gap: 14px; margin-top: 18px; }
.cmp-vote-card {
    border: 2px solid var(--border); border-radius: var(--radius-lg);
    padding: 18px 16px; display: flex; flex-direction: column;
    gap: 10px; align-items: center; text-align: center;
    transition: all var(--ts);
}
.cmp-vote-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.cmp-vote-card.vote-mine { border-color: var(--primary); background: var(--primary-xlight); }
.cmp-vote-img { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; }
.cmp-vote-img img { max-width: 72px; max-height: 72px; object-fit: contain; }
.cmp-vote-pname { font-size: .78rem; font-weight: 600; color: var(--text); line-height: 1.4; }
.cmp-vote-bar-wrap { width: 100%; height: 8px; background: var(--bg-elevated); border-radius: var(--radius-full); overflow: hidden; }
.cmp-vote-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--cta)); border-radius: var(--radius-full); transition: width .6s ease; }
.cmp-vote-stat { font-size: .75rem; color: var(--text-muted); font-weight: 500; }
.cmp-vote-btn { width: 100% !important; }
.cmp-voted-badge {
    font-size: .76rem; font-weight: 700; color: var(--primary);
    background: var(--primary-light); border: 1px solid var(--primary-border);
    border-radius: var(--radius-full); padding: 5px 14px;
}

/* ============================================================ COMPARE COMMENTS */
.cmp-comment-form { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; margin-bottom: 24px; }
.cmp-comment-form-row { width: 100%; }
.cmp-comment-name, .cmp-comment-area {
    width: 100%; padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: .875rem; color: var(--text);
    background: var(--bg-white); outline: none;
    transition: all var(--t); font-family: inherit;
    box-sizing: border-box;
}
.cmp-comment-name:focus, .cmp-comment-area:focus {
    border-color: var(--primary); box-shadow: var(--shadow-glow);
}
.cmp-comment-area { resize: vertical; min-height: 90px; }
.cmp-comment-item { border-top: 1px solid var(--border); padding: 16px 0; }
.cmp-comment-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.cmp-comment-author { font-size: .85rem; font-weight: 700; color: var(--text); }
.cmp-comment-date { font-size: .75rem; color: var(--text-dim); }
.cmp-comment-body { font-size: .875rem; color: var(--text-secondary); line-height: 1.7; }

/* ============================================================ HOME TWO-COLUMN LAYOUT */
.home-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 320px); gap: 18px; align-items: start; }
.home-main { min-width: 0; }
.home-right-col { position: sticky; top: calc(var(--header-h) + 16px); }

.home-content-grid > .global-right-sidebar {
    padding: 0 10px 40px 0;
}

/* ============================================================ HOME RECENT COMPARISONS GRID */
.recent-cmp-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.recent-cmp-empty-card {
    background: var(--bg-white);
    border: 1.5px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    padding: 18px;
    text-align: center;
}

.recent-cmp-card {
    display: block;
    background: var(--bg-white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-xs);
    transition: all var(--ts);
}

.recent-cmp-card:hover {
    border-color: var(--primary-border);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.recent-cmp-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.recent-cmp-card-cat {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: var(--primary-xlight);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    font-size: .66rem;
    font-weight: 700;
    white-space: nowrap;
}

.recent-cmp-card-views {
    font-size: .68rem;
    color: var(--text-dim);
    font-weight: 600;
    white-space: nowrap;
}

.recent-cmp-card-thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.recent-cmp-card-thumb {
    aspect-ratio: 1 / 1;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.recent-cmp-card-thumb img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

.recent-cmp-card-title {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-view-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 10px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 700;
    width: fit-content;
}

.section-subline {
    margin: -6px 10px 12px;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 500;
}

.section-subline a {
    color: var(--primary);
    font-weight: 700;
}

.section-subline a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.product-subcategory-chip {
    display: inline-flex;
    align-items: center;
    margin-top: 4px;
    padding: 3px 9px;
    border-radius: var(--radius-full);
    background: rgba(14,165,233,.08);
    border: 1px solid rgba(14,165,233,.2);
    color: #0369a1;
    font-size: .67rem;
    font-weight: 700;
    width: fit-content;
    transition: all var(--t);
}

.product-subcategory-chip:hover {
    background: rgba(14,165,233,.14);
    border-color: rgba(14,165,233,.32);
}

/* ============================================================ RECENT COMPARISONS WIDGET */
.recent-cmp-widget {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.recent-cmp-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    font-size: .78rem; font-weight: 700; color: var(--text);
    background: var(--bg-subtle);
    text-transform: uppercase; letter-spacing: .06em;
}
.recent-cmp-header svg { color: var(--primary); flex-shrink: 0; }
.recent-cmp-empty { padding: 20px 18px; font-size: .82rem; color: var(--text-dim); text-align: center; }
.recent-cmp-list { margin: 0; padding: 0; list-style: none; }
.recent-cmp-item { border-bottom: 1px solid var(--border); }
.recent-cmp-item:last-child { border-bottom: none; }
.recent-cmp-link {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; text-decoration: none;
    transition: background var(--t);
}
.recent-cmp-link:hover { background: var(--primary-xlight); }
.recent-cmp-thumbs { display: flex; flex-shrink: 0; }
.recent-cmp-thumb {
    width: 36px; height: 36px;
    border: 2px solid var(--bg-white); border-radius: var(--radius);
    background: #fff; display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-left: -8px;
}
.recent-cmp-thumb:first-child { margin-left: 0; }
.recent-cmp-thumb img { max-width: 30px; max-height: 30px; object-fit: contain; }
.recent-cmp-info { flex: 1; min-width: 0; }
.recent-cmp-names {
    font-size: .78rem; font-weight: 600; color: var(--text);
    line-height: 1.35; overflow: hidden; text-overflow: ellipsis;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
}
.recent-cmp-meta {
    display: flex; align-items: center; gap: 8px;
    margin-top: 4px; font-size: .7rem; color: var(--text-dim);
}
.recent-cmp-cat {
    background: var(--primary-xlight); color: var(--primary);
    border-radius: var(--radius-full); padding: 2px 8px;
    font-weight: 600; white-space: nowrap;
}
.recent-cmp-arrow { color: var(--text-dim); flex-shrink: 0; }

/* ============================================================ ADMIN LAYOUT */
.admin-body { background: var(--bg); }
.admin-layout { display: flex; min-height: 100vh; overflow-x: hidden; }

.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--sb-bg);
    border-right: 1px solid var(--sb-border);
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
    overflow-y: auto; display: flex; flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.06) transparent;
}

.sidebar-logo {
    padding: 20px 18px; border-bottom: 1px solid var(--sb-border);
    display: flex; align-items: center; gap: 12px;
    color: #f1f5f9; font-weight: 800; font-size: .95rem;
    letter-spacing: -.01em;
}
.sidebar-label {
    padding: 18px 16px 6px; font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .12em; color: var(--sb-muted);
}
.sidebar-nav { padding: 6px 10px; flex: 1; }
.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: var(--radius);
    color: var(--sb-txt); font-size: .85rem; font-weight: 500;
    text-decoration: none; transition: all var(--t); margin-bottom: 2px;
}
.sidebar-link svg { flex-shrink: 0; }
.sidebar-link:hover { background: var(--sb-hover); color: #e2e8f0; }
.sidebar-link.active {
    background: var(--sb-active); color: #a5b4fc; font-weight: 600;
}

.sidebar-footer {
    padding: 16px; border-top: 1px solid var(--sb-border);
    display: flex; align-items: center; gap: 12px;
}
.sidebar-user { flex: 1; }
.sidebar-user-name { font-size: .85rem; font-weight: 600; color: #e2e8f0; }
.sidebar-user-role { font-size: .72rem; color: var(--sb-muted); }
.sidebar-logout {
    padding: 8px; background: none; border: none; color: var(--sb-muted);
    cursor: pointer; border-radius: var(--radius); transition: all var(--t);
}
.sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); }

.admin-main {
    margin-left: var(--sidebar-w); flex: 1;
    display: flex; flex-direction: column; min-width: 0; overflow-x: hidden;
}
.admin-topbar {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px; height: var(--header-main-h);
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}
.admin-page-title { font-size: 1rem; font-weight: 800; color: var(--text); letter-spacing: -.02em; }
.admin-content { padding: 28px 0; flex: 1; max-width: 100%; overflow-x: hidden; }

.admin-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-lg); overflow: hidden;
    box-shadow: var(--shadow-xs);
}
.admin-card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    background: var(--bg-subtle);
}
.admin-card-title { font-size: .95rem; font-weight: 700; color: var(--text); }
.admin-card-body { padding: 22px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
    background: var(--bg-white); border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px; display: flex; align-items: center; gap: 16px;
    transition: all var(--ts); box-shadow: var(--shadow-xs);
}
.stat-card:hover { border-color: var(--primary-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-icon {
    width: 52px; height: 52px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-info { flex: 1; min-width: 0; }
.stat-num {
    font-size: 1.7rem; font-weight: 800; color: var(--text);
    line-height: 1; letter-spacing: -.03em;
}
.stat-label { font-size: .78rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.admin-table th {
    text-align: left; padding: 14px 18px;
    font-size: .68rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--text-muted); background: var(--bg-subtle);
    border-bottom: 2px solid var(--border); white-space: nowrap;
}
.admin-table td {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    color: var(--text); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--primary-xlight); }
.admin-table .actions { display: flex; gap: 6px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: .78rem; font-weight: 600; color: var(--text-secondary); }
.form-label span { color: var(--danger); }
.form-control {
    padding: 10px 14px; border: 1.5px solid var(--border);
    border-radius: var(--radius); font-size: .85rem;
    color: var(--text); background: var(--bg-white); outline: none;
    transition: all var(--t); width: 100%;
}
.form-control:focus { border-color: var(--primary); box-shadow: var(--shadow-glow); }
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 90px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .72rem; color: var(--text-light); }
.form-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.form-check input { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }
.form-check-label { font-size: .85rem; color: var(--text); }

.spec-group-block {
    background: var(--bg-elevated); border: 1.5px solid var(--border);
    border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden;
}
.spec-group-header-admin {
    background: var(--primary-xlight); border-bottom: 1px solid var(--primary-border);
    padding: 12px 18px; color: var(--primary);
    font-size: .85rem; font-weight: 700;
    display: flex; align-items: center; justify-content: space-between;
}
.spec-inputs {
    padding: 16px; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}

.img-upload-box {
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius-lg); padding: 36px;
    text-align: center; cursor: pointer;
    transition: all var(--ts); background: var(--bg-elevated);
}
.img-upload-box:hover { border-color: var(--primary); background: var(--primary-xlight); }
.img-upload-box input { display: none; }

/* ============================================================ ADMIN LOGIN */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex; align-items: center; justify-content: center;
    padding: 24px; position: relative;
}
.login-page::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(99,102,241,.15) 0%, transparent 60%),
                radial-gradient(circle at 70% 30%, rgba(14,165,233,.08) 0%, transparent 60%);
    pointer-events: none;
}
.login-card {
    background: var(--bg-white); border: 1px solid var(--border);
    border-radius: var(--radius-2xl);
    padding: 44px; width: 100%; max-width: 400px;
    box-shadow: var(--shadow-xl); position: relative;
}
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo .site-logo {
    display: inline-flex; align-items: center; gap: 10px;
    justify-content: center; margin-bottom: 8px;
}
.login-logo .site-logo span { font-weight: 800; font-size: 1.2rem; color: var(--text); letter-spacing: -.02em; }

/* ============================================================ PRODUCT DETAIL v2 (pd2) */

/* ---- Hero layout ---- */
.pd2-hero {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    align-items: start;
    margin-bottom: 28px;
}

/* ---- Gallery (left column) ---- */
.pd2-gallery {
    position: sticky;
    top: calc(var(--header-h) + 14px);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd2-gallery-stage {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    position: relative;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.pd2-gallery-stage::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 60% 30%, rgba(99,102,241,.06) 0%, transparent 65%);
    pointer-events: none;
}

.pd2-cat-badge {
    position: absolute; top: 14px; left: 14px;
    display: inline-flex; align-items: center; gap: 5px;
    background: var(--primary-xlight);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    font-size: .65rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.pd2-main-img {
    max-height: 260px; max-width: 100%;
    object-fit: contain;
    position: relative; z-index: 1;
    transition: transform .4s cubic-bezier(.4,0,.2,1);
}

.pd2-gallery-stage:hover .pd2-main-img { transform: scale(1.04); }

.pd2-gallery-actions {
    display: flex; flex-direction: column; gap: 8px;
}

.pd2-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    font-size: .85rem; font-weight: 600;
    cursor: pointer; text-decoration: none;
    transition: all var(--ts); border: none;
}

.pd2-action-compare {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 3px 12px rgba(99,102,241,.28);
}

.pd2-action-compare:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 6px 20px rgba(99,102,241,.38);
    transform: translateY(-1px);
}

.pd2-action-ghost {
    background: var(--bg-white); color: var(--text-secondary);
    border: 1.5px solid var(--border-strong) !important;
}

.pd2-action-ghost:hover { background: var(--bg-elevated); color: var(--text); }

/* ---- Info (right column) ---- */
.pd2-info {
    display: flex; flex-direction: column; gap: 20px;
    min-width: 0; padding-top: 4px;
}

.pd2-bread {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}

.pd2-bread-item {
    font-size: .72rem; font-weight: 600; color: var(--text-muted);
    text-decoration: none; transition: color var(--t);
}

.pd2-bread-item:hover { color: var(--primary); }
.pd2-bread-brand { color: var(--primary); font-weight: 700; }
.pd2-bread-brand:hover { color: var(--primary-dark); }
.pd2-bread-sep { color: var(--text-dim); font-size: .8rem; }

.pd2-title {
    font-size: 1.95rem; font-weight: 800;
    line-height: 1.2; letter-spacing: -.04em;
    color: var(--text); margin: 0;
}

.pd2-title-brand {
    display: block; font-size: .72rem; font-weight: 800;
    letter-spacing: .1em; text-transform: uppercase;
    color: var(--primary); margin-bottom: 4px;
}

.pd2-desc {
    font-size: .88rem; color: var(--text-secondary);
    line-height: 1.85;
    padding: 16px 20px;
    background: var(--bg-subtle);
    border-left: 3px solid var(--primary-border);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 0;
}

/* ---- Key Specs grid ---- */
.pd2-keyspecs {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.pd2-keyspecs-label {
    display: flex; align-items: center; gap: 7px;
    padding: 11px 18px;
    background: var(--bg-subtle); border-bottom: 1px solid var(--border);
    font-size: .72rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .07em; color: var(--primary);
}

.pd2-keyspecs-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
}

.pd2-ks-item {
    padding: 12px 18px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 4px;
    transition: background var(--t);
}

.pd2-ks-item:nth-child(even) { border-right: none; }
.pd2-ks-item:nth-last-child(-n+2) { border-bottom: none; }
.pd2-ks-item:hover { background: var(--primary-xlight); }

.pd2-ks-name {
    font-size: .7rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .05em;
}

.pd2-ks-val { font-size: .92rem; font-weight: 700; color: var(--text); }
.pd2-ks-unit { font-size: .75rem; color: var(--text-light); font-weight: 500; }
.pd2-bool-yes { color: var(--success); font-weight: 700; }
.pd2-bool-no  { color: var(--danger);  font-weight: 700; }

/* ---- CTA strip ---- */
.pd2-cta-strip {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.pd2-cta-primary {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border: none; border-radius: var(--radius-md);
    font-size: .88rem; font-weight: 700; cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(99,102,241,.3);
    transition: all var(--ts);
}

.pd2-cta-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,.4);
}

.pd2-cta-secondary {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 12px 18px;
    background: var(--cta-light); color: var(--cta-dark);
    border: 1.5px solid var(--cta-border);
    border-radius: var(--radius-md);
    font-size: .85rem; font-weight: 600; text-decoration: none;
    transition: all var(--ts);
}

.pd2-cta-secondary:hover { background: rgba(14,165,233,.18); transform: translateY(-1px); }

.pd2-cta-ghost {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 12px 16px;
    background: var(--bg-white); color: var(--text-muted);
    border: 1.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    font-size: .82rem; font-weight: 600; text-decoration: none;
    transition: all var(--t);
}

.pd2-cta-ghost:hover { background: var(--bg-elevated); color: var(--text); }

/* ---- Specs section (tabbed) ---- */
.pd2-specs-section {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm); margin-bottom: 28px;
}

.pd2-specs-head {
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 16px 22px 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.pd2-specs-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--text); white-space: nowrap;
    padding-bottom: 14px; margin: 0;
}

.pd2-specs-title svg { color: var(--primary); flex-shrink: 0; }

.pd2-tab-nav {
    display: flex; align-items: flex-end; gap: 2px;
    overflow-x: auto; scrollbar-width: none;
}

.pd2-tab-nav::-webkit-scrollbar { display: none; }

.pd2-tab-btn {
    padding: 9px 16px 11px;
    border: none; background: none; cursor: pointer;
    font-size: .78rem; font-weight: 600; color: var(--text-muted);
    border-bottom: 2px solid transparent;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--t); white-space: nowrap;
    margin-bottom: -1px;
}

.pd2-tab-btn:hover { color: var(--text); background: rgba(99,102,241,.05); }

.pd2-tab-btn.active {
    color: var(--primary); font-weight: 700;
    border-bottom-color: var(--primary);
    background: #fff;
}

.pd2-tab-panel { display: none; }
.pd2-tab-panel.active { display: block; }

.pd2-spec-row {
    display: flex; align-items: center;
    padding: 13px 22px; gap: 12px;
    border-bottom: 1px solid var(--border);
    font-size: .845rem; transition: background var(--t);
}

.pd2-spec-row:last-child { border-bottom: none; }
.pd2-spec-row:nth-child(even) { background: var(--bg-subtle); }
.pd2-spec-row:hover { background: var(--primary-xlight); }
.pd2-spec-row.is-key { background: rgba(99,102,241,.04); }
.pd2-spec-row.is-key:hover { background: rgba(99,102,241,.09); }

.pd2-spec-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary); flex-shrink: 0;
}

.pd2-spec-key {
    flex: 1; color: var(--text-muted); font-weight: 500;
    display: flex; align-items: center; gap: 6px;
}

.pd2-spec-unit {
    font-style: normal; font-size: .7rem;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-xs); padding: 1px 6px; color: var(--text-dim);
}

.pd2-spec-val { font-weight: 700; color: var(--text); text-align: right; flex-shrink: 0; }

/* ---- Quick Compare section ---- */
.pd2-compare-section {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm); margin-bottom: 28px;
}

.pd2-compare-hd {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 60%, #312e81 100%);
}

.pd2-compare-hd-left { display: flex; align-items: center; gap: 14px; }

.pd2-compare-hd-icon {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: rgba(255,255,255,.12); color: #c7d2fe;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.pd2-compare-title { font-size: 1rem; font-weight: 800; color: #fff; margin: 0 0 3px; }
.pd2-compare-sub { font-size: .78rem; color: rgba(255,255,255,.5); margin: 0; }

.pd2-compare-all-link {
    font-size: .78rem; font-weight: 600;
    color: rgba(255,255,255,.6); text-decoration: none;
    white-space: nowrap; transition: color var(--t);
}

.pd2-compare-all-link:hover { color: #a5f3fc; }

.pd2-compare-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

.pd2-cc {
    display: flex; flex-direction: column;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transition: background var(--t);
}

.pd2-cc:last-child { border-right: none; }
.pd2-cc:hover { background: var(--primary-xlight); }

.pd2-cc-img-wrap {
    display: flex; align-items: center; justify-content: center;
    padding: 20px 16px 12px;
    min-height: 130px;
    background: var(--bg-subtle);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.pd2-cc-img-wrap img {
    max-height: 100px; max-width: 120px; object-fit: contain;
    transition: transform .3s ease;
}

.pd2-cc:hover .pd2-cc-img-wrap img { transform: scale(1.06); }

.pd2-cc-body {
    padding: 12px 14px 8px; flex: 1;
    display: flex; flex-direction: column; gap: 3px;
}

.pd2-cc-brand {
    font-size: .62rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--primary);
}

.pd2-cc-name {
    font-size: .8rem; font-weight: 600; color: var(--text);
    line-height: 1.4; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.pd2-cc-name:hover { color: var(--primary); }

.pd2-cc-foot {
    padding: 10px 14px 14px;
    display: flex; flex-direction: column; gap: 6px;
}

.pd2-cc-cmp-btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: var(--radius-sm);
    font-size: .75rem; font-weight: 700; text-decoration: none;
    transition: all var(--ts); text-align: center;
    box-shadow: 0 2px 8px rgba(99,102,241,.25);
}

.pd2-cc-cmp-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 4px 14px rgba(99,102,241,.4);
    transform: translateY(-1px);
}

.pd2-cc-detail-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 7px 10px;
    background: var(--bg-elevated); color: var(--text-muted);
    border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600;
    text-decoration: none; transition: all var(--t);
    border: 1px solid var(--border);
}

.pd2-cc-detail-btn:hover { background: var(--bg-white); color: var(--text); border-color: var(--border-strong); }

/* ---- Specs grouped table ---- */
.pd2-specs-section {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm); margin-bottom: 28px;
}

.pd2-specs-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.pd2-specs-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em; color: var(--text); margin: 0;
}

.pd2-specs-title svg { color: var(--primary); flex-shrink: 0; }

.pd2-specs-count {
    font-size: .7rem; font-weight: 700; color: var(--text-muted);
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 3px 10px;
}

/* ── Spec group block ── */
.pd2-spec-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    margin-bottom: 14px;
}
.pd2-spec-group:last-of-type { margin-bottom: 0; }

.pd2-spec-group-hd {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 20px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    border-top: 2px solid var(--primary-border);
}
.pd2-spec-group-name {
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em; color: var(--primary);
    flex: 1;
}
.pd2-spec-group-name::before {
    content: ''; display: inline-block;
    width: 3px; height: 13px; border-radius: 2px;
    background: var(--primary); margin-right: 9px;
    vertical-align: middle;
}
.pd2-spec-group-cnt {
    background: var(--primary-light); color: var(--primary);
    border-radius: var(--radius-full); padding: 2px 9px;
    font-size: .65rem; font-weight: 700;
}

/* ── Spec table (2 columns: name | value) ── */
.pd2-spec-tbl {
    width: 100%; border-collapse: collapse; table-layout: fixed;
}

.pd2-spec-tbl tr {
    border-bottom: 1px solid var(--border);
    transition: background var(--t);
}
.pd2-spec-tbl tr:last-child { border-bottom: none; }
.pd2-spec-tbl tr:nth-child(even) { background: var(--bg-subtle); }
.pd2-spec-tbl tr:hover { background: var(--primary-xlight); }
.pd2-spec-tbl tr.pd2-tr-key { background: rgba(99,102,241,.04); }
.pd2-spec-tbl tr.pd2-tr-key:hover { background: rgba(99,102,241,.09); }

.pd2-td-name {
    padding: 11px 16px 11px 20px;
    font-size: .84rem; color: var(--text-muted); font-weight: 500;
    width: 55%; vertical-align: middle;
}
.pd2-td-name .pd2-spec-dot {
    display: inline-block; width: 6px; height: 6px;
    background: var(--primary); border-radius: 50%;
    margin-right: 7px; vertical-align: middle;
}

.pd2-td-val {
    padding: 11px 20px 11px 16px;
    font-size: .88rem; font-weight: 700; color: var(--text);
    text-align: right; vertical-align: middle;
    border-left: 1px solid var(--border);
    width: 45%;
}

/* ---- Rating card ---- */
.pd2-rating-card {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 18px 20px;
    box-shadow: var(--shadow-xs);
    display: flex; align-items: center; gap: 20px;
}

.pd2-rating-left {
    display: flex; align-items: center; gap: 12px;
    flex-shrink: 0;
}

.pd2-rating-score-wrap {
    position: relative; width: 68px; height: 68px; flex-shrink: 0;
}

.pd2-rating-ring {
    display: block; transform: rotate(-90deg);
}

.pd2-ring-progress {
    transition: stroke-dashoffset .8s cubic-bezier(.4,0,.2,1);
}

.pd2-rating-num {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 800; color: var(--text);
    letter-spacing: -.03em;
}

.pd2-rating-meta {
    display: flex; flex-direction: column; gap: 2px;
}

.pd2-rating-label {
    font-size: .7rem; font-weight: 700; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: .06em;
}

.pd2-rating-count {
    font-size: .78rem; font-weight: 600; color: var(--primary);
}

.pd2-rating-right {
    flex: 1; display: flex; flex-direction: column; gap: 8px;
}

.pd2-rating-voted {
    display: flex; align-items: center; gap: 7px;
    font-size: .84rem; font-weight: 600; color: var(--text);
    background: var(--success-bg);
    border: 1px solid rgba(16,185,129,.2);
    border-radius: var(--radius-md);
    padding: 10px 14px;
}

.pd2-rating-voted svg { color: var(--success); flex-shrink: 0; }

.pd2-rating-change-btn {
    margin-left: auto; font-size: .72rem; font-weight: 600;
    background: none; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); padding: 3px 10px;
    color: var(--text-muted); cursor: pointer; transition: all var(--t);
}

.pd2-rating-change-btn:hover { background: var(--bg-elevated); color: var(--text); }

.pd2-rating-slider-row {
    display: flex; align-items: center; gap: 12px;
}

.pd2-slider {
    -webkit-appearance: none; appearance: none;
    flex: 1; height: 6px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary) var(--pct, 70%), var(--bg-elevated) var(--pct, 70%));
    border-radius: var(--radius-full); outline: none; cursor: pointer;
    transition: box-shadow var(--t);
}

.pd2-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary); border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35); cursor: pointer;
    transition: transform var(--t), box-shadow var(--t);
}

.pd2-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(99,102,241,.5);
}

.pd2-slider::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--primary); border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(99,102,241,.35); cursor: pointer;
}

.pd2-slider-val {
    min-width: 36px; text-align: center;
    font-size: 1.15rem; font-weight: 800; color: var(--primary);
    letter-spacing: -.03em;
}

.pd2-slider-labels {
    display: flex; justify-content: space-between;
    font-size: .66rem; color: var(--text-dim); font-weight: 500;
    padding: 0 2px;
}

.pd2-rating-submit {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border: none; border-radius: var(--radius-md);
    font-size: .83rem; font-weight: 700; cursor: pointer;
    box-shadow: 0 3px 10px rgba(99,102,241,.28);
    transition: all var(--ts); align-self: flex-start;
}

.pd2-rating-submit:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-darker));
    box-shadow: 0 5px 16px rgba(99,102,241,.4);
    transform: translateY(-1px);
}

.pd2-rating-submit:disabled { opacity: .5; cursor: not-allowed; }

.pd2-rating-hint {
    font-size: .7rem; color: var(--text-dim); margin: 0;
}

/* ---- Past comparisons ---- */
.pd2-past-section--inline {
    margin-top: 20px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.pd2-past-section--inline .pd2-past-hd {
    margin-bottom: 8px;
}
.pd2-past-section--inline .pd2-past-row {
    padding: 8px 10px;
    font-size: .78rem;
}
.pd2-past-section--inline .pd2-past-prod {
    max-width: 160px;
    font-size: .75rem;
}
.pd2-past-section--inline .pd2-past-prod img {
    width: 22px;
    height: 22px;
}

.pd2-past-section {
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-xl); overflow: hidden;
    box-shadow: var(--shadow-sm); margin-bottom: 28px;
}

.pd2-past-hd {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-subtle);
}

.pd2-past-hd-left {
    display: flex; align-items: center; gap: 10px;
    color: var(--primary);
}

.pd2-past-hd-left svg { flex-shrink: 0; }

.pd2-past-title {
    font-size: .82rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--text); margin: 0 0 2px;
}

.pd2-past-sub { font-size: .72rem; color: var(--text-muted); margin: 0; font-weight: 500; }

.pd2-past-list { display: flex; flex-direction: column; }

.pd2-past-row {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none; color: inherit;
    transition: background var(--t);
}

.pd2-past-row:last-child { border-bottom: none; }
.pd2-past-row:hover { background: var(--primary-xlight); }

.pd2-past-num {
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--bg-elevated); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: .68rem; font-weight: 800; color: var(--text-muted);
    flex-shrink: 0;
}

.pd2-past-products {
    flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    min-width: 0;
}

.pd2-past-vs {
    font-size: .65rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-dim);
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: var(--radius-full); padding: 2px 7px;
    flex-shrink: 0;
}

.pd2-past-prod {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 600; color: var(--text-secondary);
    padding: 3px 8px 3px 3px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: all var(--t);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px;
}

.pd2-past-prod img {
    width: 28px; height: 28px; object-fit: contain;
    border-radius: 50%; border: 1.5px solid var(--border);
    background: var(--bg-subtle); flex-shrink: 0;
}

.pd2-past-prod.is-current {
    color: var(--primary); font-weight: 700;
    background: var(--primary-xlight);
    border-color: var(--primary-border);
}

.pd2-past-meta {
    display: flex; align-items: center; gap: 4px;
    font-size: .72rem; color: var(--text-dim); font-weight: 500;
    flex-shrink: 0;
    margin-left: auto;
}

.pd2-past-row:hover .pd2-past-meta { color: var(--primary); }

/* ============================================================ COMPARE INLINE AD ZONES */
.cmp-ad-zone {
    margin: 0;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.cmp-ad-zone--top {
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}
.cmp-ad-zone--mid {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 4px 0;
    background: var(--bg-page, #f8f9fa);
    border-radius: 8px;
}
.cmp-ad-zone img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}
.cmp-ad-zone a {
    display: block;
    line-height: 0;
}
@media (max-width: 768px) {
    .cmp-ad-zone { padding: 14px 0; }
}

/* ---- pd2 Responsive ---- */
@media (max-width: 900px) {
    .pd2-hero { grid-template-columns: 1fr; }
    .pd2-gallery { position: static; }
    .pd2-gallery-stage { min-height: 240px; padding: 24px; }
    .pd2-main-img { max-height: 200px; }
    .pd2-title { font-size: 1.55rem; }
    .pd2-compare-cards { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .pd2-td-name { width: 50%; }
    .pd2-td-val  { width: 50%; }
}

@media (max-width: 600px) {
    .pd2-keyspecs-grid { grid-template-columns: 1fr; }
    .pd2-ks-item:nth-child(even) { border-right: none; }
    .pd2-cta-strip { flex-direction: column; }
    .pd2-cta-primary, .pd2-cta-secondary, .pd2-cta-ghost { width: 100%; justify-content: center; }
    .pd2-compare-cards { grid-template-columns: repeat(2, 1fr); }
    .pd2-cc:nth-child(even) { border-right: none; }
    .pd2-rating-card { flex-direction: column; align-items: flex-start; }
    .pd2-td-name { padding-left: 16px; width: 48%; }
    .pd2-td-val  { width: 52%; }
    .pd2-past-prod { max-width: 130px; }
}
.login-logo p { color: var(--text-muted); font-size: .88rem; }

/* ============================================================ UTILITIES */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.p-4 { padding: 16px; } .p-6 { padding: 24px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold { font-weight: 700; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.divider { height: 2px; background: var(--bg-elevated); margin: 20px 0; }

.spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 2.5px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeInUp .4s ease both; }

/* ============================================================ RESPONSIVE */
@media (max-width: 1280px) {
    :root { --header-main-h: 62px; --header-nav-h: 46px; }
    .page-content { padding: 24px 0 48px; }
    .home-hero { padding: 80px 0 64px; }
    .recent-cmp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .site-header-main { padding: 0 10px; }
    .site-main-layout { grid-template-columns: minmax(0, 1fr) 340px; }
    .home-content-grid { grid-template-columns: minmax(0, 1fr) 300px; }
}

@media (max-width: 1024px) {
    :root { --header-main-h: 60px; --header-nav-h: 44px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .product-detail-layout { grid-template-columns: 1fr; }
    .product-image-col { position: relative; top: auto; }
    .product-image-card { min-height: 220px; }
    .how-steps { grid-template-columns: 1fr 1fr; }
    .hero-title { font-size: 2.8rem; }
    .home-content-grid { display: block; }
    .home-right-col { position: relative; top: 0; }
    .recent-cmp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-main-layout { grid-template-columns: 1fr; gap: 0; }
    .global-right-sidebar {
        position: relative;
        top: 0;
        max-height: none;
        overflow: visible;
        padding: 0 10px 30px;
    }
    .site-header-main { grid-template-columns: auto minmax(200px, 1fr) auto; gap: 10px; padding: 0 10px; }
    .site-nav-panel { padding: 0; }
    .site-nav-shell { padding: 4px 0; gap: 6px; }
    .compare-topbar-btn { display: none !important; }
}

@media (max-width: 768px) {
    :root { --header-main-h: 58px; --header-nav-h: 0px; }
    .specs-full-grid { grid-template-columns: 1fr; }
    .cmp-vote-grid { grid-template-columns: repeat(2, 1fr); }
    .cmp-score-cards { grid-template-columns: 1fr 1fr; }
    .cmp-bar-row { grid-template-columns: 120px 1fr; }
    .cmp-radar-svg { width: 240px; height: 240px; }
    .product-quick-actions { flex-direction: row; }

    .site-header-main { grid-template-columns: auto 1fr auto; padding: 0 8px; gap: 8px; }
    .menu-mobile-toggle { display: inline-flex; }
    .site-logo-text { max-width: 130px; }
    .menu-search-form { max-width: none; }
    .menu-search-inner { padding: 9px 12px; }
    .menu-search-inner input { font-size: .82rem; }
    .header-actions .compare-topbar-btn { display: none !important; }
    .header-actions .compare-menu-btn { padding: 7px 12px; font-size: .75rem; }

    .site-nav-panel {
        position: fixed;
        top: var(--header-main-h); left: 0; bottom: 0;
        width: min(88vw, 360px); height: auto;
        border-top: none;
        border-right: 1px solid rgba(129,140,248,.22);
        background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
        transform: translateX(-100%);
        transition: transform var(--ts);
        z-index: 230; display: block; padding: 12px;
    }
    .site-nav-shell {
        display: block; border-radius: var(--radius-lg);
        border: 1px solid rgba(129,140,248,.2);
        background: rgba(255,255,255,.02);
        padding: 12px 10px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    }
    .site-nav-kicker { display: none; }
    .site-nav-panel.open { transform: translateX(0); }
    .site-nav-scroll {
        display: flex; flex-direction: column; align-items: stretch; gap: 6px;
        padding: 0 2px 8px;
        overflow-y: auto; max-height: calc(100vh - var(--header-main-h) - 20px);
    }
    .pub-nav-link, .mega-trigger {
        width: 100%; justify-content: space-between;
        height: 42px; padding: 0 14px;
        border-color: rgba(255,255,255,.07);
        background: rgba(255,255,255,.02);
    }
    .mega-item { width: 100%; }
    .mega-panel {
        position: static; min-width: 0; max-width: none;
        opacity: 1; visibility: visible; transform: none;
        margin-top: 8px; display: none;
        border-radius: var(--radius-lg);
        padding: 14px;
    }
    .mega-item:hover .mega-panel,
    .mega-item:focus-within .mega-panel,
    .mega-item .mega-trigger.active + .mega-panel { display: block; }
    .mega-panel-grid { grid-template-columns: 1fr 1fr; }

    .product-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
    .category-grid { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .admin-sidebar { transform: translateX(-260px); }
    .admin-main { margin-left: 0; }
    .page-content { padding: 18px 0 48px; }
    .how-steps { grid-template-columns: 1fr; }
    .home-hero { padding: 64px 0 52px; }
    .hero-title { font-size: 2.2rem; }
    .hero-stat { padding: 0 20px; }
    .hero-searchbar { max-width: none; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    :root { --header-main-h: 56px; }
    .site-header-main { padding: 0 6px; }
    .site-logo-text { max-width: 110px; font-size: .95rem; }
    .menu-search-inner { padding: 8px 10px; }
    .menu-search-inner input { font-size: .78rem; }
    .header-actions .compare-menu-btn { padding: 6px 10px; font-size: .72rem; }
    .mega-trigger { font-size: .78rem; }
    .mega-trigger-count { min-width: 18px; height: 18px; font-size: .6rem; }
    .mega-panel-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 1.9rem; }
    .hero-stat { padding: 0 16px; }
    .hero-stat-num { font-size: 1.8rem; }
    .hero-badges { gap: 8px; }
    .hero-badge { font-size: .74rem; padding: 8px 14px; }
    .category-grid { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: 1fr 1fr; }
    .recent-cmp-grid { grid-template-columns: 1fr; }
    .section-subline { margin: -4px 10px 10px; }
    .global-right-sidebar { padding: 0 8px 28px; }
    .compare-bar-inner { flex-direction: column; align-items: stretch; padding: 12px 14px; }
    .compare-slots { justify-content: center; }
}
