/**
 * Gigatek Shopping Assistant — Styles
 *
 * Covers: Guided Buying modal, homepage card, comparison bar/table,
 * condition transparency card, savings meter, CO₂ badge.
 *
 * Color palette: primary #0b2a48, accent #2e6194, surface #f8fafc
 */

/* ================================================================
 * CATEGORY NAV BAR FILL (all pages except homepage)
 * ================================================================ */

body:not(.is-front-page) .gigatek-mega-nav {
    background: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
}

/* Full-width background on the Row 3 wrapper */
body:not(.is-front-page) .gigatek-mega-nav-wrap {
    background: linear-gradient(135deg, #0b2a48 0%, #1a3f5f 100%);
    border-bottom-color: transparent;
}

body:not(.is-front-page) .gigatek-mega-link {
    color: rgba(255, 255, 255, 0.85);
    padding-top: 8px;
    padding-bottom: 8px;
}

body:not(.is-front-page) .gigatek-mega-link:hover,
body:not(.is-front-page) .gigatek-mega-item:hover > .gigatek-mega-link {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

body:not(.is-front-page) .gigatek-mega-item:hover > .gigatek-mega-link {
    border-bottom-color: #fff;
}

body:not(.is-front-page) .gigatek-mega-chevron {
    stroke: rgba(255, 255, 255, 0.6);
}

body:not(.is-front-page) .gigatek-mega-item:hover .gigatek-mega-chevron {
    stroke: #fff;
}

/* ================================================================
 * TRUST BADGES (Category Pages)
 * ================================================================ */

.gsa-trust-badges {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: -24px auto 4px;
    max-width: 900px;
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.gsa-trust-badge {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    position: relative;
    transition: background 0.2s;
}

.gsa-trust-badge:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(0, 0, 0, 0.08);
}

.gsa-trust-badge:hover {
    background: rgba(0, 0, 0, 0.02);
}

.gsa-trust-badge-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 8px;
}

/* Individual icon colors */
.gsa-trust-badge:nth-child(1) .gsa-trust-badge-icon svg { stroke: #2563eb; }
.gsa-trust-badge:nth-child(2) .gsa-trust-badge-icon svg { stroke: #16a34a; }
.gsa-trust-badge:nth-child(3) .gsa-trust-badge-icon svg { stroke: #f59e0b; }
.gsa-trust-badge:nth-child(4) .gsa-trust-badge-icon svg { stroke: #0d9488; }

.gsa-trust-badge-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.gsa-trust-badge-title {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    line-height: 1.2;
    white-space: nowrap;
}

.gsa-trust-badge-desc {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.2;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .gsa-trust-badges {
        display: none;
        flex-wrap: wrap;
        border-radius: 10px;
    }
    .gsa-trust-badge {
        flex: 1 1 45%;
        min-width: 0;
        padding: 10px 12px;
    }
    .gsa-trust-badge:not(:last-child)::after {
        display: none;
    }
    .gsa-trust-badge-title {
        font-size: 12px;
    }
    .gsa-trust-badge-desc {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .gsa-trust-badge {
        flex: 1 1 100%;
    }
}

/* ================================================================
 * HOMEPAGE CTA CARD
 * ================================================================ */

.gsa-homepage-card-section {
    padding: 0;
    margin-top: -1px;
}

.gsa-homepage-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #065f46 0%, #0d9488 50%, #14b8a6 100%);
    border: none;
    border-radius: 10px;
    padding: 10px 20px;
    margin: 20px auto 6px;
    max-width: 820px;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(6, 95, 70, 0.2);
}

.gsa-homepage-card:hover {
    box-shadow: 0 4px 20px rgba(6, 95, 70, 0.35);
    transform: translateY(-1px);
}

.gsa-homepage-card-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.gsa-homepage-card-content {
    flex: 1;
    min-width: 0;
}

.gsa-homepage-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff !important;
    margin: 0 0 2px;
    line-height: 1.2;
}

.gsa-homepage-card-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65) !important;
    margin: 0;
    line-height: 1.3;
}

.gsa-homepage-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, transform 0.15s ease;
}

.gsa-homepage-card-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.03);
}

@media (max-width: 640px) {
    .gsa-homepage-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap: 12px;
    }
    .gsa-homepage-card-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ================================================================
 * GUIDED BUYING MODAL
 * ================================================================ */

.gsa-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(11, 42, 72, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: gsaFadeIn 0.2s ease;
}

@keyframes gsaFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.gsa-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(11, 42, 72, 0.25);
    position: relative;
    animation: gsaSlideUp 0.25s ease;
}

@keyframes gsaSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.gsa-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: color 0.15s;
}

.gsa-modal-close:hover {
    color: #0b2a48;
}

/* Progress */
.gsa-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
}

.gsa-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #2e6194, #0b2a48);
    transition: width 0.4s ease;
    border-radius: 0 4px 4px 0;
}

/* Steps */
.gsa-steps-wrap {
    padding: 32px 28px 28px;
}

.gsa-step {
    display: none;
    position: relative;
}

.gsa-step.active {
    display: block;
    animation: gsaFadeIn 0.2s ease;
}

.gsa-step-title {
    font-size: 20px;
    font-weight: 700;
    color: #0b2a48;
    margin: 0 0 20px;
    text-align: center;
    line-height: 1.3;
}

/* Options grid */
.gsa-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gsa-options-narrow {
    grid-template-columns: repeat(3, 1fr);
}

.gsa-options-center {
    grid-template-columns: repeat(2, 1fr);
    max-width: 320px;
    margin: 0 auto;
}

.gsa-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    transition: all 0.15s ease;
}

.gsa-option:hover {
    border-color: #2e6194;
    background: #f0f6fc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 97, 148, 0.12);
}

.gsa-option.selected {
    border-color: #0b2a48;
    background: #e8edf3;
    color: #0b2a48;
}

.gsa-option-icon {
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
}
.gsa-option-icon img {
    display: block;
    object-fit: contain;
}

/* Back button */
.gsa-back-btn {
    position: absolute;
    top: 2px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
    padding: 0;
}
.gsa-back-btn:hover {
    background: #e2e8f0;
    color: #0b2a48;
}

.gsa-option-icon--svg {
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}
.gsa-option-icon--svg svg {
    width: 36px;
    height: 36px;
}

/* Budget slider */
.gsa-budget-wrap {
    text-align: center;
    max-width: 440px;
    margin: 0 auto;
}

.gsa-budget-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    font-size: 26px;
    font-weight: 700;
    color: #0b2a48;
}

.gsa-budget-sep {
    color: #94a3b8;
}

.gsa-range-wrap {
    position: relative;
    height: 44px;
    margin: 0 12px 28px;
    display: flex;
    align-items: center;
}

.gsa-range-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    pointer-events: none;
}

.gsa-range-fill {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 8px;
    background: linear-gradient(90deg, #2e6194, #0b2a48);
    border-radius: 4px;
    pointer-events: none;
}

.gsa-range {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    margin: 0;
    padding: 0;
    height: 8px;
}

.gsa-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e6194, #0b2a48);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(11, 42, 72, 0.35), 0 0 0 1px rgba(46, 97, 148, 0.2);
    cursor: pointer;
    pointer-events: all;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gsa-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 12px rgba(11, 42, 72, 0.45), 0 0 0 2px rgba(46, 97, 148, 0.3);
}

.gsa-range::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.gsa-range::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e6194, #0b2a48);
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(11, 42, 72, 0.35);
    cursor: pointer;
    pointer-events: all;
}

.gsa-range::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
    border-radius: 4px;
}

.gsa-range::-moz-range-track {
    height: 8px;
    background: transparent;
    border-radius: 4px;
}

.gsa-next-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0b2a48;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.gsa-next-btn:hover {
    background: #2e6194;
    transform: scale(1.03);
}

/* Results */
.gsa-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.gsa-result-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.15s;
}

.gsa-result-card:hover {
    box-shadow: 0 4px 16px rgba(11, 42, 72, 0.1);
    transform: translateY(-2px);
}

.gsa-result-img {
    display: block;
    aspect-ratio: 1;
    background: #f8fafc;
    overflow: hidden;
}

.gsa-result-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.gsa-result-info {
    padding: 10px 12px;
}

.gsa-result-title {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    line-height: 1.3;
    margin-bottom: 4px;
}

.gsa-result-title:hover {
    color: #2e6194;
}

.gsa-result-price {
    font-size: 15px;
    font-weight: 700;
    color: #0b2a48;
}

.gsa-results-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gsa-show-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0b2a48;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.gsa-show-all-btn:hover {
    background: #2e6194;
    color: #fff;
}

.gsa-restart-btn {
    background: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 13px;
    color: #64748b;
    cursor: pointer;
    transition: border-color 0.2s;
}

.gsa-restart-btn:hover {
    border-color: #0b2a48;
    color: #0b2a48;
}

.gsa-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
    font-size: 15px;
}

/* No exact match messaging */
.gsa-no-exact-match {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    padding: 24px 20px;
    margin-bottom: 16px;
}
.gsa-no-exact-title {
    color: #dc2626;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
    line-height: 1.4;
}
.gsa-closest-subtitle {
    color: #475569;
    font-size: 15px;
    margin: 0;
    font-weight: 500;
}

/* When showing no-exact-match, stack results in a single column */
.gsa-results-grid.gsa-results-relaxed {
    grid-template-columns: 1fr;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

/* Loading spinner */
.gsa-loading {
    text-align: center;
    padding: 40px;
    color: #64748b;
}

.gsa-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #0b2a48;
    border-radius: 50%;
    animation: gsaSpin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes gsaSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    .gsa-steps-wrap { padding: 24px 16px 20px; }
    .gsa-step-title { font-size: 17px; }
    .gsa-options-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gsa-options-narrow { grid-template-columns: repeat(3, 1fr); }
    .gsa-results-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gsa-option { padding: 12px 8px; font-size: 13px; }
    .gsa-option-icon { font-size: 22px; }
}

/* ================================================================
 * COMPARE BUTTON ON PRODUCT CARDS
 * ================================================================ */

.gsa-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: transparent;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.15s ease;
}

.gsa-compare-btn:hover {
    border-color: #2e6194;
    color: #2e6194;
    background: #f0f6fc;
}

.gsa-compare-btn.active {
    border-color: #0b2a48;
    background: #0b2a48;
    color: #fff;
}

.gsa-compare-btn.active .gsa-compare-label {
    content: '✓';
}

/* ================================================================
 * COMPARISON BAR (sticky bottom)
 * ================================================================ */

.gsa-comparison-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    background: #0b2a48;
    color: #fff;
    box-shadow: 0 -4px 20px rgba(11, 42, 72, 0.3);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gsa-comparison-bar.visible {
    transform: translateY(0);
}

.gsa-comparison-bar-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.gsa-comparison-bar-items {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.gsa-comparison-bar-items .gsa-bar-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
    position: relative;
}

.gsa-bar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 2px;
}

.gsa-bar-thumb-loading {
    width: 100%;
    height: 100%;
    background: #e2e8f0;
    animation: gsa-pulse 1.2s ease-in-out infinite;
}
@keyframes gsa-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.gsa-bar-thumb .gsa-bar-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    line-height: 16px;
    text-align: center;
    cursor: pointer;
    border: none;
    padding: 0;
}

.gsa-comparison-bar-info {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.gsa-comparison-bar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.gsa-bar-compare-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: #0b2a48;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
}

.gsa-bar-compare-btn:hover {
    background: #e8edf3;
    transform: scale(1.03);
    color: #0b2a48;
}

.gsa-bar-clear-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.15s;
}

.gsa-bar-clear-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 640px) {
    .gsa-comparison-bar { z-index: 99997; padding-bottom: env(safe-area-inset-bottom, 0px); }
    .gsa-comparison-bar-items { display: none; }
    .gsa-comparison-bar-inner { padding: 10px 16px; gap: 10px; }
    .gsa-comparison-bar-info { font-size: 13px; }
}

/* ================================================================
 * COMPARISON TABLE PAGE
 * ================================================================ */

.gsa-comparison-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
}

.gsa-compare-empty {
    text-align: center;
    padding: 60px 20px;
}

.gsa-compare-loader {
    text-align: center;
    padding: 80px 20px;
}

.gsa-compare-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.gsa-compare-empty h2 {
    font-size: 22px;
    font-weight: 700;
    color: #0b2a48;
    margin: 0 0 8px;
}

.gsa-compare-empty p {
    color: #64748b;
    font-size: 15px;
    margin: 0 0 20px;
}

.gsa-compare-shop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #0b2a48;
    color: #fff;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.gsa-compare-shop-btn:hover {
    background: #2e6194;
    color: #fff;
}

.gsa-compare-table-wrap {
    overflow: visible;
}

/* ── Skeleton loading indicator ─────────────────────── */
@keyframes gsa-pulse {
    0%, 100% { opacity: .15; }
    50%      { opacity: .35; }
}

.gsa-skeleton-pulse {
    background: #94a3b8;
    border-radius: 6px;
    animation: gsa-pulse 1.4s ease-in-out infinite;
}

.gsa-compare-skeleton-header {
    display: flex;
    gap: 24px;
    padding: 24px 0 20px 140px;
    border-bottom: 1px solid #e2e8f0;
}

.gsa-compare-skeleton-product {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.gsa-skeleton-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
}

.gsa-skeleton-text {
    height: 14px;
    width: 70%;
}

.gsa-skeleton-text--short {
    width: 40%;
    height: 18px;
}

.gsa-compare-skeleton-row {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.gsa-compare-skeleton-row:nth-child(odd) {
    background: #f1f5f9;
}

.gsa-skeleton-label {
    width: 108px;
    min-width: 108px;
    height: 14px;
}

.gsa-skeleton-value {
    flex: 1;
    height: 14px;
}

@media (max-width: 640px) {
    .gsa-compare-skeleton-header { padding-left: 0; flex-wrap: wrap; }
    .gsa-compare-skeleton-product { min-width: 100px; }
}

.gsa-compare-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.gsa-compare-table th,
.gsa-compare-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    font-size: 14px;
}

.gsa-compare-table thead th {
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.gsa-compare-table tbody tr:nth-child(odd) {
    background: #f1f5f9;
}

.gsa-compare-table tbody tr:nth-child(even) {
    background: #fff;
}

.gsa-compare-table tbody tr:nth-child(odd) td:first-child {
    background: #e8edf3;
}

.gsa-compare-table tbody tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.gsa-compare-label-col {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
    font-weight: 600;
    color: #0b2a48;
    background: #f8fafc;
    position: sticky;
    left: 0;
    z-index: 2;
}

.gsa-compare-table tbody td:first-child {
    font-weight: 600;
    color: #0b2a48;
    background: #f8fafc;
    position: sticky;
    left: 0;
}

/* Product header cell */
.gsa-compare-product-cell {
    text-align: center;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.gsa-compare-product-cell img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin: 0 auto 8px;
    display: block;
}

.gsa-compare-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #0b2a48;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 4px;
}

.gsa-compare-product-name:hover {
    color: #2e6194;
}

.gsa-compare-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #0b2a48;
    margin-bottom: 8px;
}

.gsa-compare-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #ef4444;
    font-size: 14px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
    padding: 0;
}

.gsa-compare-remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

.gsa-compare-cart-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #0b2a48;
    color: #fff !important;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
    line-height: 1.2;
    text-align: center;
    min-width: 90px;
}

.gsa-compare-cart-btn svg {
    flex-shrink: 0;
    stroke: #fff;
}

.gsa-compare-cart-btn span {
    display: block;
    white-space: nowrap;
    color: #fff;
}

.gsa-compare-cart-btn:hover {
    background: #2e6194;
    color: #fff !important;
    transform: translateY(-1px);
}

.gsa-compare-cart-btn:visited,
.gsa-compare-cart-btn:active {
    color: #fff !important;
}

.gsa-compare-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gsa-compare-cart-row td {
    text-align: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.gsa-compare-out-of-stock {
    color: #94a3b8;
    font-style: italic;
}

/* Highlight best value in row */
.gsa-compare-best {
    background: #ecfdf5;
    font-weight: 600;
}

@media (max-width: 900px) {
    .gsa-compare-table {
        table-layout: auto;
        min-width: 600px;
    }
    .gsa-compare-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 640px) {
    .gsa-compare-table th,
    .gsa-compare-table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .gsa-compare-product-cell img {
        width: 60px;
        height: 60px;
    }
    .gsa-compare-label-col {
        width: 90px;
        min-width: 90px;
        max-width: 90px;
    }
}

/* ================================================================
 * CONDITION TRANSPARENCY CARD
 * ================================================================ */

.gsa-condition-wrap {
    margin: 16px 0 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gsa-condition-card {
    border: 1px solid;
    border-radius: 12px;
    padding: 16px 18px;
    transition: box-shadow 0.2s;
}

.gsa-condition-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.gsa-condition-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.gsa-condition-icon {
    font-size: 28px;
    line-height: 1;
}

.gsa-condition-grade {
    font-size: 20px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.gsa-condition-label {
    font-size: 14px;
    color: #475569;
    display: block;
    margin-top: 2px;
}

.gsa-condition-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gsa-condition-bullets li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #334155;
    padding: 4px 0;
    line-height: 1.4;
}

.gsa-check-icon {
    flex-shrink: 0;
}

/* ================================================================
 * SAVINGS METER
 * ================================================================ */

.gsa-savings-card {
    background: #f0f6fc;
    border: 1px solid #c5d3e2;
    border-radius: 12px;
    padding: 14px 18px;
}

.gsa-savings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.gsa-savings-tag {
    font-size: 14px;
    font-weight: 600;
    color: #0b2a48;
}

.gsa-savings-amount {
    font-size: 14px;
    font-weight: 700;
    color: #059669;
}

.gsa-savings-bar-wrap {
    width: 100%;
}

.gsa-savings-bar-bg {
    height: 28px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.gsa-savings-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    transition: width 0.6s ease;
}

.gsa-savings-bar-label {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gsa-savings-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 4px;
    font-size: 11px;
    color: #64748b;
}

/* ================================================================
 * CO₂ ECO BADGE
 * ================================================================ */

.gsa-eco-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 10px;
    padding: 12px 16px;
}

.gsa-eco-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.gsa-eco-text {
    font-size: 13px;
    color: #065f46;
    line-height: 1.4;
}

.gsa-eco-text strong {
    font-weight: 700;
}

/* ================================================================
 * TOAST NOTIFICATION
 * ================================================================ */

.gsa-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #0b2a48;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(11, 42, 72, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
}

.gsa-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ── Results Page Banner ───────────────────────────────── */

.gsa-results-banner {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #f0f7ff, #e8f1fc);
    border: 1px solid #c5ddf5;
    overflow: hidden;
}

.gsa-results-banner-inner {
    padding: 1.25rem 1.5rem;
}

.gsa-results-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0b2a48;
    margin: 0 0 0.5rem;
}

.gsa-results-banner-selections {
    font-size: 0.9rem;
    color: #374151;
    margin: 0 0 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    line-height: 1.8;
}

.gsa-banner-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.82rem;
    white-space: nowrap;
}

.gsa-banner-tag strong {
    color: #0b2a48;
    font-weight: 600;
}

.gsa-results-banner-notice {
    font-size: 0.9rem;
    margin: 0;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
}

.gsa-results-banner-notice--success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.gsa-results-banner-notice--warning {
    background: #fefce8;
    color: #854d0e;
    border: 1px solid #fde68a;
}

/* ── Category / Product CTA Card ───────────────────────── */

.gsa-category-cta {
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

/* Desktop: align CTA with product cards, span 3 of 4 columns */
@media (min-width: 1024px) {
    .gsa-category-cta .gsa-homepage-card {
        /* sidebar 280px + gap 1.5rem + archive-layout padding 1rem */
        margin-left: calc(280px + 2.5rem);
        margin-right: 0;
        max-width: none;
        /* products area = 100% - sidebar offset; span 3/4 of that */
        width: calc((100% - 280px - 2.5rem) * 0.745);
    }
}

.gsa-product-cta {
    margin-top: 2rem;
    margin-bottom: 1rem;
}
