/* Modern Comparison Page Styles */
.comparison-container {
    padding: 30px 0 100px;
    background-color: #f8fafc;
}

/* Header Styles */
.page-header {
    margin-bottom: 40px;
}
.display-4

{
    font-size:2rem !important;
}
.display-5
{
      font-size:2rem !important;
}
.page-header h1 {
    font-weight: 700;
    color: #2c3e50;
}

.header-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px auto;
    width: 200px;
}

.header-divider span {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, #dee2e6, transparent);
}

.header-divider i {
    margin: 0 15px;
    color: #df4e4e;
    font-size: 1.2rem;
}

/* Search Section */
.search-section {
    border: 1px solid #e0e6ed;
}

.search-bar .form-control {
    height: 50px;
    border-color: #e0e6ed;
}

.search-bar .form-control:focus {
    box-shadow: none;
    border-color: #df4e4e;
}

.search-bar .btn {
    height: 50px;
    font-weight: 600;
}

#brand-filter {
    height: 50px;
    border-color: #e0e6ed;
}

/* Quick Filters */
.quick-filters {
    gap: 8px;
}

.filter-chip {
    padding: 6px 12px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-chip:hover {
    background: #e2e8f0;
}

.filter-chip.active {
    background: #df4e4e;
    color: white;
}

/* Product Cards */
.product-grid .card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.product-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-grid .card-img-top {
    height: 180px;
    object-fit: contain;
    padding: 20px;
    background: #f8fafc;
}

.product-grid .card-body {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
}

.product-grid .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    height: 50px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-specs {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 15px;
}

.spec-item {
    margin-bottom: 5px;
}

.spec-item i {
    width: 20px;
    color: #94a3b8;
}

.price {
    font-weight: 700;
    color: #df4e4e;
    font-size: 1.25rem;
    margin-bottom: 15px;
}

/* Compare Checkbox */
.compare-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.compare-checkbox input[type="checkbox"] {
    display: none;
}

.compare-checkbox label {
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    display: block;
    cursor: pointer;
    transition: all 0.3s;
}

.compare-checkbox input[type="checkbox"]:checked + label {
    background: #df4e4e;
    border-color: #df4e4e;
}

.compare-checkbox input[type="checkbox"]:checked + label:after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: white;
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 12px;
}

/* Compare Actions Bar */
#compare-actions-bar {
    transition: all 0.3s;
    border-top: 1px solid #e2e8f0;
    z-index: 1000;
}

.selected-count {
    font-weight: 600;
    color: #1e293b;
}

.selected-count span {
    color: #df4e4e;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Comparison Table */
.comparison-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.comparison-table {
    margin-bottom: 0;
}

.sticky-col {
    position: sticky;
    left: 0;
    background-color: white;
    z-index: 2;
    min-width: 220px;
    font-weight: 600;
}

.feature-col {
    color: #334155;
    border-right: 1px solid #e2e8f0 !important;
    padding: 15px 20px;
}

.product-col {
    min-width: 280px;
    vertical-align: top !important;
    border-left: 1px solid #e2e8f0 !important;
    background: #f8fafc;
}

.product-header {
    position: relative;
    padding: 20px;
    text-align: center;
}

.product-image {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #1e293b;
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #df4e4e;
    margin-bottom: 15px;
}

.feature-value {
    color: #475569;
    border-left: 1px solid #e2e8f0 !important;
    padding: 15px 20px;
}

.difference-highlight {
    background-color: #f0f7ff !important;
}

.difference-highlight .difference-cell {
    font-weight: bold;
    color: #1d4ed8;
    background-color: #dbeafe !important;
}

/* Recommendation Section */
.section-title {
    position: relative;
    padding-bottom: 10px;
    color: #1e293b;
}

.section-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #df4e4e;
    border-radius: 3px;
}

.recommendation-card {
    position: relative;
    overflow: hidden;
}

.badge-best-value {
    position: absolute;
    top: 15px;
    right: -30px;
    background: #df4e4e;
    color: white;
    padding: 5px 30px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: 600;
}

.product-thumb {
    width: 120px;
    flex-shrink: 0;
}

.recommendation-reasons {
    list-style: none;
    padding-left: 0;
}

.recommendation-reasons li {
    margin-bottom: 8px;
}

.stars {
    color: #f59e0b;
}

/* Responsive styles */
@media (max-width: 992px) {
    .product-col {
        min-width: 220px;
    }
}

@media (max-width: 768px) {
    .search-section .row > div {
        margin-bottom: 15px;
    }
    
    .product-grid .card {
        margin-bottom: 15px;
    }
    
    .product-col {
        min-width: 180px;
    }
    
    .feature-col {
        min-width: 160px;
    }
    
    .recommendation-card .d-flex {
        flex-direction: column;
    }
    
    .product-thumb {
        margin-bottom: 15px;
        margin-right: 0;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .search-bar .input-group-append {
        display: none;
    }
    
    #compare-actions-bar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    #compare-button {
        width: 100%;
    }
}


/* Key Features - Dynamic Width */
.key-features-dynamic {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.feature-card {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0 !important;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature-item {
    display: flex;
    align-items: center;
}

.feature-icon {
    font-size: 1.1rem;
    min-width: 25px;
    text-align: center;
}

.feature-content {
    flex: 1;
}

.feature-label {
    font-size: 0.8rem;
    line-height: 1.2;
    margin-bottom: 2px;
}

.feature-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .key-features-dynamic .col {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Special full-width for 2 products */
@media (min-width: 769px) {
    .key-features-dynamic .col-12 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}