/* Compare Page Styles - 3-Column Grid Match for compare update.png */

.compare-page-bg {
    background-color: #fafafa;
    min-height: 100vh;
}

/* Breadcrumb */
.compare-breadcrumb {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.compare-breadcrumb a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.compare-breadcrumb a:hover {
    color: #0f172a;
}

/* Dashed Add Product Button */
.btn-add-product-dashed {
    width: 100%;
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-align: center;
    margin-top: 1rem;
}

.btn-add-product-dashed:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Sidebar Compare Card Box */
.sidebar-compare-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.sidebar-compare-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 1rem;
}

.sidebar-compare-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px dashed #e2e8f0;
}

.sidebar-compare-item:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.sidebar-compare-thumb {
    width: 48px;
    height: 48px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 3px;
}

.sidebar-compare-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.sidebar-compare-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.sidebar-compare-name {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

.sidebar-compare-remove {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sidebar-compare-remove:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

.btn-compare-action:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Clear All Button */
.btn-clear-all {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-clear-all:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

/* Spec Section Headers & Label Rows (Left Column) */
.compare-spec-labels-sidebar {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.spec-section-hdr {
    background-color: #F9FAFB;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--color-dark);
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    box-sizing: border-box;
}

.spec-label-row {
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    text-align: right;
    box-sizing: border-box;
}

/* Matrix Values Alignments (Center Column) */
.spec-val-header-spacer {
    height: 42px;
    background-color: #F9FAFB;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.spec-val-row {
    height: 52px;
    border-bottom: 1px solid #e2e8f0;
    box-sizing: border-box;
}

.spec-val-row>div,
.spec-val-row>.col {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Close Button on Product Cards */
.prod-close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 15px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.prod-close-btn:hover {
    color: #0f172a;
}


.compare-star-icon {
    color: #f59e0b;
}

/* Expert Advice Banner Box */
.expert-advice-banner {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .expert-advice-banner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.expert-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary-bg);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.btn-advice-action {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 14px;
    font-weight: 700;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn-advice-action:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Trust Features Grid */
.trust-feature-item {
    text-align: center;
    padding: 0.5rem 1rem;
}

.trust-feature-icon {
    font-size: 32px;
    color: #94a3b8;
    display: block;
    margin-bottom: 0.75rem;
}

.trust-feature-title {
    font-size: 12px !important;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.trust-feature-desc {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 0;
    line-height: 1.4;
}

.compare-spec-labels-sidebar {
    border: 1px solid #ddd;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .compare-spec-labels-sidebar {
        display: none;
    }
}

/* Product Top Card in Compare */
.compare-top-card {
    background-color: #ffffff;
    transition: background-color 0.2s ease;
    height: 100%;
}

.compare-top-card:hover {
    background-color: #fbfcfe;
}

.prod-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.prod-close-btn:hover {
    background: #fee2e2;
    border-color: #fecaca;
    color: #ef4444;
}

.compare-prod-img-box {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.compare-prod-img {
    max-height: 100%;
    max-width: 100%;
    /* object-fit: contain; */
    transition: transform 0.3s ease;
}

.compare-top-card:hover .compare-prod-img {
    transform: scale(1.04);
}

h2.compare-prod-title,
.compare-prod-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 4px;
    line-height: 1.25;
    height: 2.5em;
    min-height: 2.5em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.compare-prod-tag {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    height: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.compare-prod-rating {
    font-size: 12px;
    margin-bottom: 8px;
    height: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.compare-prod-price {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    height: 26px;
    display: flex;
    align-items: center;
}

.btn-compare-buy {
    font-size: 13px !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    letter-spacing: 0.02em;
}

/* =============================================================
   MOBILE RESPONSIVE FONT SIZES & SPACING FOR COMPARE PAGE
   ============================================================= */

@media (max-width: 1199.98px) {

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 13.5px;
    }
}

@media (max-width: 991.98px) {

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 12.5px;
    }

    .compare-center-top-section h1.title-2 {
        font-size: 22px !important;
    }

    .compare-center-top-section p.fs-14 {
        font-size: 13px !important;
    }
}

@media (max-width: 767.98px) {

    /* Header Section */
    .compare-center-top-section h1.title-2 {
        font-size: 18px !important;
        margin-bottom: 2px !important;
    }

    .compare-center-top-section p.fs-14 {
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    .btn-clear-all {
        font-size: 11px !important;
        padding: 4px 8px !important;
        gap: 4px !important;
        border-radius: 6px;
    }

    .btn-clear-all i {
        font-size: 11px;
    }

    /* Top Product Cards */
    .compare-top-card {
        padding: 8px 6px !important;
    }

    .compare-prod-img-box {
        height: 100px;
        margin-bottom: 8px;
        padding: 4px;
        border-radius: 6px;
    }

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 11.5px !important;
        line-height: 1.25 !important;
        height: 2.5em !important;
        min-height: 2.5em !important;
        margin-bottom: 2px !important;
    }

    .compare-prod-tag {
        font-size: 10px;
        height: 15px;
        margin-bottom: 3px;
    }

    .compare-prod-rating {
        font-size: 10px;
        height: 16px;
        gap: 3px;
        margin-bottom: 6px;
    }

    .compare-prod-rating .compare-star-icon {
        font-size: 9.5px;
    }

    .compare-prod-price {
        font-size: 15px;
        font-weight: 800;
        height: 20px;
        margin-bottom: 6px;
    }

    .btn-compare-buy {
        font-size: 11px !important;
        padding: 6px 4px !important;
        border-radius: 6px !important;
        gap: 4px !important;
    }

    .btn-compare-buy i {
        font-size: 11px;
    }

    .prod-close-btn {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: 4px;
        right: 4px;
    }

    /* Spec Matrix Values */
    .compare-spec-matrix-card .spec-val-header-spacer {
        height: 32px;
    }

    .compare-spec-matrix-card .spec-val-row {
        height: auto;
        min-height: 42px;
        padding: 4px 0;
    }

    .compare-spec-matrix-card .spec-val-row>.col,
    .compare-spec-matrix-card .spec-val-row>div {
        font-size: 11.5px !important;
        padding-left: 4px !important;
        padding-right: 4px !important;
        line-height: 1.25;
        word-break: break-word;
    }

    .compare-spec-matrix-card .spec-val-row .fw-bold {
        font-size: 12.5px !important;
    }

    .compare-spec-matrix-card .badge {
        font-size: 9.5px !important;
        padding: 2px 5px !important;
        white-space: nowrap;
    }

    /* Left Sidebar Items (when on tablet/mobile) */
    .compare-sidebar-top-section .breadcrumb {
        font-size: 12px !important;
    }

    .sidebar-compare-title {
        font-size: 10px;
        margin-bottom: 0.5rem;
    }

    .sidebar-compare-name {
        font-size: 12px;
    }

    .sidebar-compare-remove {
        font-size: 11px;
    }

    .btn-add-product-dashed {
        font-size: 12px;
        padding: 0.5rem;
    }

    /* Expert Advice Banner */
    .expert-advice-banner {
        padding: 1rem;
        gap: 0.75rem;
    }

    .expert-advice-banner h4 {
        font-size: 14px !important;
        margin-bottom: 2px;
    }

    .expert-advice-banner p {
        font-size: 12px !important;
    }

    .btn-advice-action {
        font-size: 12px;
        padding: 6px 14px;
    }

    .expert-icon-circle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    /* Trust Features Grid */
    .trust-feature-item {
        padding: 0.35rem 0.5rem;
    }

    .trust-feature-icon {
        font-size: 24px;
        margin-bottom: 0.4rem;
    }

    .trust-feature-title {
        font-size: 11px;
        margin-bottom: 0.2rem;
    }

    .trust-feature-desc {
        font-size: 11px;
        line-height: 1.3;
    }
}

@media (max-width: 575.98px) {

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 11px !important;
    }
}

@media (max-width: 480px) {

    /* Extra Small Phones (iPhone SE, Galaxy A, etc.) */
    .compare-center-top-section h1.title-2 {
        font-size: 16px !important;
    }

    .compare-center-top-section p.fs-14 {
        font-size: 11px !important;
    }

    .btn-clear-all {
        font-size: 10px !important;
        padding: 3px 6px !important;
    }

    .compare-top-card {
        padding: 6px 4px !important;
    }

    .compare-prod-img-box {
        height: 80px;
        margin-bottom: 6px;
        padding: 2px;
    }

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 10px !important;
        line-height: 1.2 !important;
        height: 2.4em !important;
        min-height: 2.4em !important;
    }

    .compare-prod-tag {
        font-size: 9px;
        height: 13px;
    }

    .compare-prod-rating {
        font-size: 9px;
        height: 14px;
    }

    .compare-prod-rating .text-muted {
        display: none;
        /* Hide extra text to keep clean layout on small phones */
    }

    .compare-prod-price {
        font-size: 13px;
        height: 18px;
    }

    .btn-compare-buy {
        font-size: 9.5px !important;
        padding: 5px 2px !important;
        letter-spacing: 0;
    }

    .btn-compare-buy i {
        font-size: 9.5px;
    }

    .compare-spec-matrix-card .spec-val-row>.col,
    .compare-spec-matrix-card .spec-val-row>div {
        font-size: 10px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    .compare-spec-matrix-card .spec-val-row .fw-bold {
        font-size: 11px !important;
    }

    .compare-spec-matrix-card .badge {
        font-size: 8.5px !important;
        padding: 1px 3px !important;
    }
}

@media (max-width: 360px) {

    h2.compare-prod-title,
    .compare-prod-title {
        font-size: 9.5px !important;
    }
}