/* ===================================================================
   MOBILE COMPARISON 
   =================================================================== */

/* Base Styles */
.compare-page {
    background: #f5f5f5;
    padding: 15px 0 40px;
    min-height: 100vh;
}

.compare-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
}

.compare-page h1 {
    color: #004d99;
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 700;
}

.compare-page .subtitle {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ===================================================================
   PHONE SELECTOR SECTION
   =================================================================== */
.phone-selector-section {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.phone-selectors-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.phone-selector-box {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.phone-selector-box label {
    font-weight: 600;
    color: #333;
    font-size: 0.85rem;
}

.phone-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.phone-select:focus {
    outline: none;
    border-color: #004d99;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
}

.vs-divider span {
    background: #004d99;
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 6px 18px;
    border-radius: 15px;
}

/* ===================================================================
   PHONE HEADERS - 
   =================================================================== */
.phones-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.phone-header-card {
    background: white;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.phone-image {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 12px;
}

.phone-name {
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.phone-price {
    margin: 10px 0;
}

.price-value {
    display: block;
    font-size: 1.1rem;
    font-weight: bold;
    color: #c8102e;
    margin-bottom: 4px;
}

.price-stores {
    display: block;
    font-size: 0.75rem;
    color: #666;
}

.btn-view-details {
    display: inline-block;
    background: #004d99;
    color: white;
    padding: 8px 20px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-view-details:hover {
    background: #a00d25;
}

/* ===================================================================
   SPECIFICATIONS TABLE 
   =================================================================== */
.specs-comparison {
    background: white;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Category Header - Red Background */
.spec-category-header {
    background: #004d99;
    padding: 10px 12px;
    border-bottom: 1px solid #a00d25;
}

.spec-category-header h3 {
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* MOBILE LAYOUT - 3 Column Table (Spec Name | Phone 1 | Phone 2) */
.spec-comparison-row {
    display: grid;
    grid-template-columns: 110px 1fr 1fr;
    border-bottom: 1px solid #e0e0e0;
    min-height: 40px;
}

/* Spec Name Column - Left, Gray Background */
.spec-name {
    background: #f5f5f5;
    padding: 10px 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    border-right: 1px solid #e0e0e0;
    line-height: 1.3;
}

/* Spec Values Container */
.spec-values {
    display: contents;
}

/* Individual Spec Value Cells - White Background */
.spec-value {
    padding: 10px 8px;
    font-size: 0.8rem;
    color: #333;
    display: flex;
    align-items: center;
    background: white;
    border-right: 1px solid #e0e0e0;
    line-height: 1.4;
}

.spec-value:last-child {
    border-right: none;
}

.spec-value .na {
    color: #999;
    font-style: italic;
}

/* Alternating Row Colors  */
.spec-comparison-row:nth-child(even) .spec-value {
    background: #fafafa;
}

/* ===================================================================
   MESSAGE BOXES
   =================================================================== */
.no-selection,
.partial-selection {
    background: white;
    border-radius: 4px;
    padding: 50px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.message-box {
    max-width: 400px;
    margin: 0 auto;
}

.message-box i {
    font-size: 3rem;
    color: #c8102e;
    margin-bottom: 15px;
}

.message-box h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.message-box p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ===================================================================
   TABLET LAYOUT (600px - 1024px)
   =================================================================== */
@media (min-width: 600px) {
    .compare-page h1 {
        font-size: 1.8rem;
    }

    .phone-selector-section {
        padding: 20px;
    }

    .phone-selectors-grid {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .phone-selector-box {
        flex: 1;
    }

    .vs-divider {
        flex: 0 0 auto;
    }

    .phone-image {
        width: 140px;
        height: 140px;
    }

    .phone-name {
        font-size: 1.05rem;
    }

    /* Wider spec name column on tablet */
    .spec-comparison-row {
        grid-template-columns: 150px 1fr 1fr;
    }

    .spec-name {
        font-size: 0.85rem;
        padding: 12px 10px;
    }

    .spec-value {
        font-size: 0.85rem;
        padding: 12px 10px;
    }
}

/* ===================================================================
   DESKTOP LAYOUT (1024px+)
   =================================================================== */
@media (min-width: 1024px) {
    .compare-page .container {
        padding: 0 20px;
    }

    .compare-page h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    .phone-selector-section {
        padding: 25px;
    }

    .phone-select {
        font-size: 1rem;
        padding: 12px 15px;
    }

    .phones-header {
        gap: 15px;
    }

    .phone-header-card {
        padding: 20px;
    }

    .phone-image {
        width: 160px;
        height: 160px;
    }

    .phone-name {
        font-size: 1.15rem;
        margin-bottom: 12px;
    }

    .price-value {
        font-size: 1.3rem;
    }

    .spec-category-header {
        padding: 12px 15px;
    }

    .spec-category-header h3 {
        font-size: 1rem;
    }

    /* Desktop - Wider spec name column */
    .spec-comparison-row {
        grid-template-columns: 200px 1fr 1fr;
    }

    .spec-name {
        font-size: 0.9rem;
        padding: 14px 15px;
    }

    .spec-value {
        font-size: 0.9rem;
        padding: 14px 15px;
    }
}

/* ===================================================================
   EXTRA SMALL MOBILE (< 400px)
   =================================================================== */
@media (max-width: 399px) {
    .compare-page h1 {
        font-size: 1.3rem;
    }

    .phone-image {
        width: 100px;
        height: 100px;
    }

    .phone-name {
        font-size: 0.85rem;
    }

    .price-value {
        font-size: 1rem;
    }

    /* Even narrower spec column for very small screens */
    .spec-comparison-row {
        grid-template-columns: 95px 1fr 1fr;
    }

    .spec-name {
        font-size: 0.75rem;
        padding: 8px 6px;
    }

    .spec-value {
        font-size: 0.75rem;
        padding: 8px 6px;
    }
}

/* ===================================================================
   PRINT STYLES
   =================================================================== */
@media print {
    .phone-selector-section {
        display: none;
    }

    .compare-page {
        background: white;
    }

    .btn-view-details {
        display: none;
    }

    .spec-category-header {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}