/* ==========================================================================
   v2-shared.css — Shared design system for v2 pages
   Reusable components extracted from v2-test.css.
   Prefix: v2- (generic) vs v2t- (test-page specific)
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
    --v2-teal: #1a5c5c;
    --v2-teal-light: #1e6b6b;
    --v2-green: #5bae02;
    --v2-green-dark: #4a9600;
    --v2-navy: #2a3440;
    --v2-text: #343434;
    --v2-text-muted: #666;
    --v2-border: #e5e5e5;
    --v2-bg: #efefef;
    --v2-radius: 8px;
}


/* ---------- Layout ---------- */

.v2-page {
    max-width: 100%;
    padding: 0;
    overflow-x: clip;
}

.v2-page .site-main {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
    box-sizing: border-box;
}

body.v2-page-active #right-sidebar { display: none; }
body.v2-page-active #primary { width: 100%; float: none; }

/* Breadcrumb */
#breadcrumb {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.v2-container {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1440px) {
    .v2-page .site-main,
    #breadcrumb {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 500px) {
    .v2-page .site-main,
    #breadcrumb {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* ---------- Box ---------- */

.v2-box {
    background: #fff;
    border-radius: var(--v2-radius);
    padding: 25px;
    margin-bottom: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

@media (max-width: 600px) {
    .v2-box { padding: 18px 16px; border-radius: 6px; }
}


/* ---------- Section heading ---------- */

.v2-section-heading {
    font-size: 1.3em;
    margin-bottom: 20px;
}


/* ---------- Score bars ---------- */

.v2-score-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.v2-score-bar-label {
    flex: 0 0 160px;
    font-size: .8em;
    line-height: 1em;
    color: var(--v2-text-muted);
}

.v2-score-bar {
    flex: 1;
    height: 14px;
    background: #d5dbe0;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    min-width: 80px;
}

.v2-score-bar-fill {
    height: 100%;
    border-radius: 7px;
    background: linear-gradient(180deg, #1c4766 0%, #1d3f67 100%);
    transition: width .3s;
}

.v2-score-bar-num {
    font-size: .85em;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 28px;
    text-align: right;
}

@media (max-width: 768px) {
    .v2-score-bar-label { min-width: 110px; font-size: .85em; }
}

@media (max-width: 600px) {
    .v2-score-bar-label { min-width: 90px; font-size: .82em; }
}


/* ---------- Total score circle ---------- */

.v2-total-score {
    text-align: center;
}

.v2-total-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #1c4766;
    color: #fff;
    font-size: 1.3em;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
}

.v2-total-label {
    font-size: .85em;
    font-weight: 700;
    color: var(--v2-text);
}

.v2-total-scale {
    font-size: .72em;
    color: var(--v2-text-muted);
}


/* ---------- Editorial box ---------- */

.v2-editorial-box {
    position: relative;
    background: #f4f5f6;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.v2-editorial-label {
    display: inline-block;
    background: var(--v2-navy);
    color: #fff;
    font-weight: 600;
    font-size: .68em;
    padding: 3px 10px;
    border-radius: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.v2-editorial-text {
    padding: 8px 14px 10px;
    font-size: .9em;
    line-height: 1.55;
    color: #444;
}


/* ---------- Specs table ---------- */

.v2-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92em;
}

.v2-specs-table th,
.v2-specs-table td {
    padding: 8px 14px;
    border: none;
    text-align: left;
    vertical-align: middle;
}

.v2-specs-table th {
    width: 35%;
    font-weight: 600;
}

.v2-specs-table tr:nth-child(odd) th,
.v2-specs-table tr:nth-child(odd) td {
    background: #f4f7f9;
}

.v2-specs-table tr:nth-child(even) th,
.v2-specs-table tr:nth-child(even) td {
    background: #e9eef0;
}


/* ---------- Pros & Cons ---------- */

.v2-proscons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.v2-pros,
.v2-cons {
    border-radius: 6px;
    padding: 20px 22px;
}

.v2-pros {
    background: #f0f9eb;
    border-left: 3px solid var(--v2-green);
}

.v2-cons {
    background: #fdf0ef;
    border-left: 3px solid #c0392b;
}

.v2-pros h3,
.v2-cons h3 {
    font-size: .88em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin: 0 0 10px;
}

.v2-pros h3 { color: var(--v2-green-dark); }
.v2-cons h3 { color: #a93226; }

.v2-pros ul,
.v2-cons ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-pros li,
.v2-cons li {
    padding: 5px 0 5px 22px;
    position: relative;
    font-size: .93em;
    line-height: 1.5;
}

.v2-pros li::before {
    content: "+";
    position: absolute;
    left: 2px;
    font-weight: 700;
    color: var(--v2-green);
}

.v2-cons li::before {
    content: "\2212";
    position: absolute;
    left: 2px;
    font-weight: 700;
    color: #c0392b;
}

@media (max-width: 600px) {
    .v2-proscons { grid-template-columns: 1fr; gap: 16px; }
}


/* ---------- Performance table ---------- */

.v2-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9em;
}

.v2-perf-table th,
.v2-perf-table td {
    padding: 10px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--v2-border);
}

.v2-perf-table thead th {
    font-weight: 700;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--v2-text-muted);
    border-bottom: 2px solid var(--v2-border);
}


/* ---------- Reliability badge ---------- */

.v2-reliability { font-weight: 600; font-size: .88em; }
.v2-reliability-high { color: var(--v2-green-dark); }
.v2-reliability-medium { color: #d4a017; }
.v2-reliability-low { color: #c0392b; }


/* ---------- Score reasoning ---------- */

.v2-score-reasoning {
    display: block;
    font-weight: 400;
    font-size: .88em;
    color: var(--v2-text-muted);
}


/* ---------- Placeholder image ---------- */

.v2t-placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 6px;
}

.v2t-placeholder-img svg {
    width: 100%;
    height: auto;
    display: block;
}


/* ---------- Image gallery trigger ---------- */

.v2-image--gallery {
    cursor: pointer;
}

.v2-image--gallery:hover img,
.v2-image--gallery:hover picture {
    opacity: .85;
    transition: opacity .15s;
}

.v2-image-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: .75em;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    pointer-events: none;
}

.v2-image-badge svg { flex-shrink: 0; }


/* ---------- Gallery overlay ---------- */

.v2-gallery-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s;
}

.v2-gallery-overlay.v2-gallery-visible { opacity: 1; }

.v2-gallery-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2em;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 2;
}

.v2-gallery-close:hover { background: rgba(255,255,255,.15); }

.v2-gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    min-height: 0;
    padding: 60px 60px 0;
}

.v2-gallery-img-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 70vh;
}

.v2-gallery-img-container picture,
.v2-gallery-img-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    display: block;
}

.v2-gallery-prev,
.v2-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    font-size: 1.6em;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.v2-gallery-prev { left: 10px; }
.v2-gallery-next { right: 10px; }
.v2-gallery-prev:hover,
.v2-gallery-next:hover { background: rgba(255,255,255,.3); }

.v2-gallery-counter {
    color: rgba(255,255,255,.7);
    font-size: .9em;
    padding: 8px 0 4px;
    text-align: center;
}

.v2-gallery-thumbs {
    display: flex;
    gap: 8px;
    justify-content: center;
    padding: 8px 16px 16px;
    overflow-x: auto;
    max-width: 100%;
}

.v2-gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    opacity: .5;
    border: 2px solid transparent;
    transition: opacity .15s, border-color .15s;
    flex-shrink: 0;
}

.v2-gallery-thumb:hover { opacity: .8; }

.v2-gallery-thumb.v2-gallery-thumb-active {
    opacity: 1;
    border-color: #fff;
}

@media (max-width: 600px) {
    .v2-gallery-main { padding: 50px 10px 0; }
}


/* ==========================================================================
   SHARED PAGE COMPONENTS
   Reusable across category, search, and future v2 pages.
   Page-specific overrides live in v2-category.css, v2-search.css, etc.
   ========================================================================== */


/* ---------- Hero ---------- */

.v2-hero {
    background: linear-gradient(135deg, #013c4d 0%, #0c5c6d 40%, #1a5c5c 100%);
    padding: 40px 24px 36px;
    border-radius: 12px 12px 0 0;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.v2-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 60% 0%, rgba(255,255,255,.06) 0%, transparent 70%);
    pointer-events: none;
}

.v2-hero h1 {
    color: #fff;
    font-size: 1.6em;
    font-weight: 700;
    margin: 0 0 16px;
    position: relative;
    z-index: 1;
}

@media (max-width: 600px) {
    .v2-hero {
        padding: 28px 16px 24px;
        border-radius: 0;
    }
    .v2-hero h1 { font-size: 1.3em; }
}


/* ---------- Card base ---------- */

.v2-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--v2-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--v2-text);
    transition: transform .15s, box-shadow .15s;
}

.v2-card,
.v2-card:hover,
.v2-card:visited,
.v2-card:focus {
    text-decoration: none;
    color: var(--v2-text);
}

.v2-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.14);
}

.v2-card-img {
    position: relative;
    overflow: hidden;
    background: #e8edf0;
}

.v2-card-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    display: block;
}

.v2-card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.v2-card-title {
    font-size: 1em;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.35;
    color: var(--v2-text);
}

.v2-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    font-size: 0.8em;
    color: var(--v2-text-muted);
}


/* ---------- Section header ---------- */

.v2-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.v2-section-title {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0;
    color: var(--v2-text);
}

.v2-section-desc {
    color: var(--v2-text-muted);
    font-size: 0.9em;
    margin: 2px 0 0;
}

@media (max-width: 600px) {
    .v2-section-header { gap: 10px; }
}


/* ---------- Aside header ---------- */

.v2-aside-header {
    margin-bottom: 12px;
}

.v2-aside-title {
    font-size: 1.05em;
    font-weight: 600;
    margin: 0;
    color: var(--v2-text-muted);
}

.v2-aside-desc {
    font-size: 0.85em;
    color: #999;
    margin: 2px 0 0;
}


/* ---------- View toggle ---------- */

.v2-view-toggle {
    display: inline-flex;
    gap: 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--v2-border);
    flex-shrink: 0;
}

.v2-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 32px;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--v2-text-muted);
    transition: background .12s, color .12s;
    padding: 0;
}

.v2-view-btn + .v2-view-btn {
    border-left: 1px solid var(--v2-border);
}

.v2-view-btn:hover {
    background: #f3f6f8;
}

.v2-view-btn.v2-view-active {
    background: var(--v2-teal);
    color: #fff;
}

.v2-view-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* ---------- Pagination ---------- */

.v2-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 32px 0 40px;
}

.v2-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    color: var(--v2-text);
    background: #fff;
    border: 1px solid var(--v2-border);
    transition: background .12s, color .12s, border-color .12s;
}

.v2-pagination .page-numbers:hover {
    background: #f3f6f8;
    border-color: var(--v2-teal);
    color: var(--v2-teal);
}

.v2-pagination .page-numbers.current {
    background: var(--v2-teal);
    color: #fff;
    border-color: var(--v2-teal);
}

.v2-pagination .page-numbers.dots {
    border: none;
    background: none;
    color: var(--v2-text-muted);
}


/* ---------- Search form (hero-embedded) ---------- */

.v2-search-ac-wrap {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
    z-index: 10;
}

.v2-search-wrap {
    display: flex;
    max-width: 520px;
    margin: 0 auto 12px;
    border-radius: var(--v2-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    position: relative;
    z-index: 1;
}

.v2-search-input {
    flex: 1;
    border: none;
    padding: 14px 18px;
    font-size: 1em;
    font-family: inherit;
    outline: none;
    background: #fff;
    color: var(--v2-text);
}

.v2-search-input::placeholder {
    color: #aaa;
}

.v2-search-btn {
    border: none;
    padding: 14px 22px;
    background: linear-gradient(var(--v2-green), var(--v2-green-dark));
    color: #fff;
    font-weight: 700;
    font-size: 0.95em;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity .12s;
}

.v2-search-btn:hover {
    opacity: .9;
}


/* ---------- Hero count ---------- */

.v2-hero-count {
    position: relative;
    z-index: 1;
    font-size: 0.88em;
    color: rgba(255,255,255,.65);
}


/* ---------- No results ---------- */

.v2-no-results {
    text-align: center;
    padding: 48px 24px;
    color: var(--v2-text-muted);
}

.v2-no-results-icon {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: .4;
}

.v2-no-results h2 {
    font-size: 1.3em;
    color: var(--v2-text);
    margin: 0 0 8px;
}

.v2-no-results p {
    font-size: 0.95em;
    max-width: 440px;
    margin: 0 auto 20px;
}

/* ---------- Author Box ---------- */

.v2-authorbox {
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    padding: 25px;
    margin-top: 32px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.v2-authorbox-heading {
    margin: 0 0 14px;
    font-size: .85em;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #888;
    font-weight: 600;
}

.v2-authorbox-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.v2-authorbox-pic {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.v2-authorbox-name { margin: 0 0 2px; font-size: 1.05em; font-weight: 700; }
.v2-authorbox-name a { color: inherit; text-decoration: none; }
.v2-authorbox-title { color: #888; font-size: .88em; display: block; margin-bottom: 6px; }
.v2-authorbox-text p { margin: 0; color: #555; line-height: 1.6; font-size: .93em; }

/* Error report CTA */
.v2-errorreport {
    margin-top: 28px;
    padding: 22px 25px;
    background: #fff;
    border-radius: var(--v2-radius, 8px);
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    display: flex;
    align-items: center;
    gap: 18px;
}
.v2-errorreport-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: #eef6f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--v2-teal, #1a5c5c);
}
.v2-errorreport-icon svg {
    width: 20px;
    height: 20px;
}
.v2-errorreport-body {
    flex: 1;
    min-width: 0;
}
.v2-errorreport-title {
    font-size: .95em;
    font-weight: 700;
    color: var(--v2-text, #343434);
    margin: 0 0 3px;
}
.v2-errorreport-text {
    margin: 0;
    font-size: .88em;
    color: var(--v2-text-muted, #666);
    line-height: 1.5;
}
.v2-errorreport-btn {
    flex-shrink: 0;
    padding: 9px 22px;
    font-size: .88em;
    font-weight: 600;
    color: #fff;
    background: var(--v2-teal, #1a5c5c);
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.v2-errorreport-btn:visited { color: #fff; }
.v2-errorreport-btn:hover {
    background: var(--v2-teal-light, #1e6b6b);
    color: #fff;
    text-decoration: none;
}
@media (max-width: 600px) {
    .v2-errorreport { flex-wrap: wrap; }
    .v2-errorreport-body { flex-basis: calc(100% - 58px); }
    .v2-errorreport-btn { width: 100%; text-align: center; }
}
