/* tec-Style Specs Page - Light Theme */
:root {
    --specs-bg: #FFFFFF;
    --specs-text: #1d1d1f;
    --specs-text-secondary: #1d1d1f;
    --specs-border: #d2d2d7;
    --specs-accent: #0071e3;
    --specs-section-gap: 35px;
}

/* Force light body for specs page */
body.specs-page {
    background-color: var(--specs-bg) !important;
    color: var(--specs-text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    max-width: 100vw;
}


/* Hide default footer styling, override to light */
body.specs-page footer,
body.specs-page .site-footer {
    background: var(--specs-bg) !important;
    color: var(--specs-text) !important;
    border-top: 1px solid var(--specs-border);
}

/* ======================
   HERO / PRODUCT HEADER
   ====================== */
.specs-hero {
    text-align: center;
    padding: 20px 0 30px; /* Reduced top padding to tighten layout */
    background: var(--specs-bg);
    position: relative;
    z-index: 10; /* Ensure hero stays above main content if needed */
}

/* Rounded card styling for list pages (brand_detail, upcoming) */
body:not(.specs-page) .specs-hero {
    border-radius: 0.75rem;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

/* PC-only adjustments for list pages (not specs.php) to remove huge gaps and shift left */
@media (min-width: 992px) {
    body:not(.specs-page) .specs-hero {
        padding: 20px 0 10px;
        /* Drastically reduce vertical space between items */
    }

    body:not(.specs-page) .specs-hero-container {
        padding-left: 0;
        /* Shift content slightly further left */
    }
}

.specs-hero-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Rating & Score Badges */
.specs-hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.hero-badge {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: default;
}

.hero-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.hero-badge i {
    font-size: 14px;
    margin-right: 8px;
}

.badge-rating i {
    color: #ffbc00;
}

.badge-score i {
    color: #0071e3;
}

.badge-value {
    font-weight: 700;
    font-size: 16px;
    color: #1d1d1f;
}

.badge-label {
    font-size: 12px;
    color: #86868b;
    margin-left: 4px;
    font-weight: 500;
}

.badge-count {
    font-size: 12px;
    color: #86868b;
    margin-left: 6px;
}

.badge-score .badge-value {
    color: #0071e3;
    font-size: 18px;
    margin-left: 8px;
}



/* Mini Circular Score */
.score-circle-mini {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.circular-chart {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100%;
}

.circle-bg {
    fill: none;
    stroke: #eee;
    stroke-width: 3.8;
}

.circle {
    fill: none;
    stroke-width: 3.8;
    stroke-linecap: round;
    stroke: #0071e3;
}

@media (max-width: 768px) {
    .specs-hero-badges {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

.specs-hero-title {
    font-size: 32px;
    /* Reduced from 42px */
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.005em;
    margin-bottom: 12px;
    /* Reduced to sit closer to subtitle */
    color: var(--specs-text);
    text-align: center;
    width: 100%;
}

.specs-hero-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-bottom: 15px;
    margin-top: 5px;
    text-align: center;
    width: 100%;
}

.specs-hero-image {
    max-width: 380px;
    /* Reduced from 500px */
    width: 100%;
    max-height: 320px;
    /* Reduced from 400px */
    margin: 0 auto;
    display: block;
    object-fit: contain;
}

/* New Layout for Image + Specs */
.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Center align */
    gap: 40px;
    /* Increased gap slightly since it's on left now */
    width: 100%;
    margin: 0 auto 40px;
    text-align: left;
}

.hero-image-container {
    flex: 0 0 auto;
    /* Don't stretch to half screen */
    display: flex;
    justify-content: center;
    /* Align image to center */
    align-items: center;
    width: auto;
}

.hero-image-container a {
    display: block;
    text-align: center;
    /* Align center */
    max-height: 400px;
}

.hero-specs-container {
    flex: 1;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center the blocks horizontally */
    gap: 15px;
}

.hero-specs-container .tech-spec-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Left-align text next to icon */
    padding: 8px 0;
    border-bottom: 1px solid #f2f2f7;
    width: 100%;
    /* Take up the defined max-width */
    max-width: 380px;
    /* Constrain the max width so the text blocks don't stretch too far from center */
}

.highlights-title {
    font-size: 21px;
    font-weight: 600;
    color: var(--specs-text);
    margin-bottom: 25px;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 15px;
}

/* Professional Summary Box */
.specs-summary-container {
    max-width: 1410px; /* Synchronized with score section */
    margin: 40px 15px !important; /* Forced 15px side margins */
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f2f2f7;
    text-align: left;
}

@media (min-width: 1441px) {
    .specs-summary-container {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

.specs-summary-title {
    font-size: 24px;
    font-weight: 700;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.specs-summary-text {
    font-size: 17px;
    line-height: 1.6;
    color: #1d1d1f;
    font-weight: 400;
}

@media (max-width: 768px) {
    .specs-summary-container {
        padding: 25px;
        margin: 20px 15px !important;
        border-radius: 16px;
    }

    .specs-summary-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .specs-summary-text {
        font-size: 15px;
    }
}

/* Unified Highlights use .specs-list now */

.highlight-value {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1f;
    /* tec Black */
    line-height: 1.4;
    text-align: left;
    /* Restored left alignment so text aligns neatly next to icons */
}

@media (max-width: 991px) {
    .hero-content-wrapper {
        flex-direction: row;
        /* Force side-by-side */
        gap: 12px;
        /* Reduced from 20px to give more space to content */
        align-items: center;
        /* Keep centered alignment on smaller screens */
        flex-wrap: nowrap;
        max-width: 800px;
        /* Restrict width on larger tablets */
        margin: 0 auto 40px;
    }

    .hero-specs-container {
        flex: 1;
        width: 100%;
        max-width: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        /* Changed from space-between to prevent stretching */
        gap: 15px;
        /* Added gap to maintain spacing */
    }

    .hero-image-container {
        flex: 1;
        /* Equalized with specs container */
        display: flex;
        justify-content: center;
        align-items: stretch;
        /* Stretch to fill height */
    }

    .hero-image-container a {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100%;
        width: 100%;
        text-align: center;
        /* Centered image link content */
        max-height: 350px;
        /* Limit height on mobile to prevent squishing */
    }

    .specs-hero-image {
        max-height: 100% !important;
        max-width: 100% !important;
        height: auto;
        width: auto;
        object-fit: contain;
    }

    /* Target gallery page specifically to match summary height */
    .gallery-page .specs-hero-image {
        max-height: 240px !important;
    }

    .gallery-page .hero-image-container a {
        max-height: 240px !important;
    }

    .highlights-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .specs-highlight-row {
        padding: 10px 0;
    }

    .highlight-label {
        flex: 0 0 80px;
        font-size: 14px;
    }

    .highlight-value {
        font-size: 14px;
    }
}

/* ======================
   BUY BUTTONS (Side-by-Side)
   ====================== */
.specs-buy-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    margin: 20px auto;
    max-width: 500px;
}

.buy-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    height: 46px; /* Match standard button height */
    border-radius: 8px;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    transition: all 0.3s ease;
    text-decoration: none !important;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.buy-btn img {
    max-height: 28px; /* Increased size */
    width: auto;
    object-fit: contain;
}

.amazon-buy-btn:hover {
    border-color: #FF9900 !important;
    background: #fffcf5 !important;
}

.flipkart-buy-btn:hover {
    border-color: #2874F0 !important;
    background: #f5f9ff !important;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Improved Buy Now Dropdown Styles V2 */
.specs-buy-now-dropdown {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.specs-buy-now-btn {
    background-color: #ffffff !important;
    color: #1d1d1f !important;
    border: 1px solid #d2d2d7 !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important;
    height: 55px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    box-shadow: none !important;
}

.specs-buy-now-btn:hover, .specs-buy-now-btn:active, .specs-buy-now-btn[aria-expanded="true"] {
    background-color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: none !important;
    border-color: #c2c2c7 !important;
}

.specs-buy-now-btn i {
    transition: transform 0.3s ease;
}

.specs-buy-now-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.dropdown-menu.buy-now-menu {
    border-radius: 16px !important;
    padding: 8px !important;
    min-width: 100% !important;
    width: 100% !important;
    background-color: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important;
    overflow: hidden;
    margin-top: 10px !important;
}

.affiliate-dropdown-btn {
    background: #ffffff !important;
    border-radius: 10px !important;
    border: 1px solid #f0f0f0 !important;
    transition: all 0.2s ease !important;
    padding: 10px 15px !important;
    height: 54px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 6px !important;
}

.affiliate-dropdown-btn:last-child {
    margin-bottom: 0 !important;
}

.affiliate-dropdown-btn img {
    max-height: 28px !important;
    width: auto !important;
    object-fit: contain !important;
}

.affiliate-dropdown-btn.amazon-item:hover {
    background: #fffcf5 !important;
    border-color: #FF9900 !important;
}

.affiliate-dropdown-btn.flipkart-item:hover {
    background: #f5f9ff !important;
    border-color: #2874F0 !important;
}

/* List/Card Specific Buy Button */
.card-buy-container {
    flex: 1;
    max-width: 150px;
}

@media (max-width: 575px) {
    .card-buy-container {
        flex: 1 1 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        margin-top: 0 !important;
        min-width: 0 !important;
        box-shadow: none !important;
    }

    .specs-buy-now-dropdown {
        width: 100% !important;
        max-width: 100% !important;
    }

    .specs-buy-now-btn {
        width: 100% !important;
        height: 50px !important;
        font-size: 1rem !important;
        border-radius: 10px !important;
        padding: 0 !important;
        box-shadow: none !important;
    }

    .dropdown-menu.buy-now-menu {
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
        top: 100% !important;
        transform: none !important;
    }
}


/* Original Direct Buttons (keep legacy classes for now) */
.specs-buy-buttons {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    margin: 20px auto;
    max-width: 500px;
}

/* Ad Below Buy Buttons */
.specs-hero-ad {
    margin: 15px auto 0;
    max-width: 600px;
    text-align: center;
}

.specs-hero-ad-inner {
    padding: 10px;
}

@media (max-width: 575px) {
    .hero-content-wrapper {
        flex-direction: row;
        /* Force side-by-side */
        gap: 10px;
        /* Reduced gap */
        align-items: center;
        /* Center vertically */
    }

    .hero-image-container {
        flex: 0 0 40%;
        width: 40%;
        justify-content: center;
        /* Center image to prevent left-side cutoff */
    }

    body.specs-page .hero-specs-container .tech-spec-item {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 6px 0;
        border-bottom: 1px solid #f2f2f7;
        flex-direction: row;
        /* Match desktop layout */
        gap: 12px;
    }

    body.specs-page .hero-specs-container .tech-spec-item:last-child {
        border-bottom: none;
    }

    body.specs-page .hero-specs-container .tech-spec-item i {
        color: #8b8b93;
        font-size: 16px;
        width: 24px;
        text-align: center;
        margin-bottom: 0px;
        /* Reset bottom margin since we're side-by-side */
    }

    body.specs-page .hero-specs-container .tech-spec-item span {
        font-size: 14px;
        font-weight: 500;
        color: #1d1d1f;
        flex: 1;
        text-align: left;
        /* Make it consistent with desktop */
    }

    .hero-specs-container {
        flex: 0 0 60%;
        width: 60%;
        max-width: none;
    }

    .specs-hero-image {
        max-width: 100%;
        max-height: 250px;
        /* Constrain height to fit alongside list */
        object-fit: contain;
    }

    .specs-hero-title {
        font-size: 24px;
        margin-bottom: 15px;
    }

    .highlights-title {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }

    .specs-buy-buttons {
        gap: 8px;
        margin: 12px auto;
        max-width: 100%;
        padding: 0 10px;
    }

    .buy-btn {
        font-size: 13px;
        padding: 10px 12px;
        border-radius: 10px;
    }
}

.specs-hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 25px;
}

.specs-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px;
    height: 55px !important;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e5e5e5;
    background: #ffffff;
    color: #1d1d1f;
    box-shadow: none !important;
}

@media (max-width: 575px) {
    .specs-hero-actions {
        display: flex !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        justify-content: space-between !important;
    }

    .specs-hero-btn {
        flex: 1 1 50% !important;
        width: 50% !important;
        max-width: 50% !important;
        min-width: 0 !important;
        height: 50px !important;
        padding: 0 !important;
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 10px !important;
        white-space: nowrap !important;
        box-shadow: none !important;
    }
}


/* ======================
   CONTAINER
   ====================== */
.specs-main-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 0;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    z-index: 1;
    position: relative;
}

/* ======================
   SPEC SECTIONS - tec Style
   ====================== */
.tec-spec-section {
    padding: var(--specs-section-gap) 0;
    border-bottom: 1px solid var(--specs-border);
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tighten gap between score analysis and first spec section */
.specs-main-container .tech-spec-section:first-child {
    padding-top: 5px !important;
}
.tec-spec-section:last-child {
    border-bottom: none;
}

.tec-section-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 40px;
}

.tech-section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--specs-text);
    flex: 0 0 100%;
    border-bottom: 1px solid var(--specs-border);
    padding-bottom: 12px;
    width: 100%;
}

.tech-section-content {
    flex: 0 0 100%;
}

/* Spec Items */
.tech-spec-item {
    margin-bottom: 12px;
}

.tech-spec-item:last-child {
    margin-bottom: 0;
}

.tech-spec-label {
    font-size: 17px;
    font-weight: 600;
    color: var(--specs-text);
    margin-bottom: 4px;
    display: block;
}

.tech-spec-value {
    font-size: 17px;
    font-weight: 400;
    color: var(--specs-text);
    line-height: 1.47059;
}

/* Highlighted/Featured Specs */
.tech-spec-highlight {
    font-size: 21px;
    font-weight: 600;
    color: var(--specs-text);
    display: block;
    margin-bottom: 8px;
}

.tech-spec-desc {
    font-size: 14px;
    color: var(--specs-text);
    display: block;
    margin-top: 4px;
}

/* ======================
   CHIP/PROCESSOR BADGE
   ====================== */
.chip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    border-radius: 22px;
    background: linear-gradient(180deg, #f5f5f7 0%, #e8e8ed 100%);
    margin-bottom: 20px;
}

.chip-badge-text {
    font-size: 24px;
    font-weight: 700;
    color: var(--specs-text);
    text-align: center;
    line-height: 1.2;
}

.chip-badge-sub {
    font-size: 11px;
    font-weight: 600;
    color: var(--specs-accent);
    display: block;
}

/* ======================
   CAMERA SECTION SPECIAL
   ====================== */
.camera-spec-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.camera-spec-item {
    padding-bottom: 0;
    border-bottom: none;
    margin-bottom: 10px;
}

.camera-spec-item:last-child {
    margin-bottom: 0;
}

.camera-lens-name {
    font-size: 21px;
    font-weight: 600;
    color: var(--specs-text);
    margin-bottom: 8px;
}

.camera-details {
    font-size: 14px;
    color: var(--specs-text);
    line-height: 1.6;
}

/* ======================
   RELATED DEVICES SLIDER
   ====================== */
.related-section {
    padding: 60px 0;
    background: var(--specs-bg);
}

.relatedSwiper {
    padding: 20px 10px !important;
    margin: -20px -10px !important;
    overflow: visible !important;
}

.related-section .swiper-slide {
    background: transparent;
    height: auto;
    padding: 10px 0;
}

.related-device-card {
    background: transparent;
    border-radius: 18px;
    padding: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    position: relative;
    /* Ensure z-index works */
    z-index: 1;
    overflow: visible;
    border: 1px solid var(--border-light);
}

@media (hover: hover) and (pointer: fine) {
    .related-device-card:hover {
        transform: scale(1.02);
        background: #ffffff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
        z-index: 10;
        /* Border remains visible as requested */
    }
}

/* Removed duplicate specs-hero-image rule to avoid conflicts */

.related-device-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.related-device-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--specs-text);
    text-decoration: none;
    display: block;
    /* Changed from webkit-box to block to avoid potential flex/clamp oddities if not needed, or keep clamp but ensure padding */
    /* If keeping clamp: */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 3;
    padding: 0 4px;
    /* Safety padding */
}

.related-device-name:hover {
    color: var(--specs-text);
    /* Keep same color */
}

/* ======================
   PRICING SECTION - Light
   ====================== */
.pricing-section-dark {
    background: #f5f5f7;
    border-radius: 18px;
    padding: 30px;
    margin-top: 20px;
}

.pricing-store-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--specs-border);
}

.pricing-store-item:last-child {
    border-bottom: none;
}

.pricing-store-name {
    font-size: 17px;
    font-weight: 500;
    color: var(--specs-text);
}

.pricing-store-btn {
    background: var(--specs-accent);
    color: #000000 !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
}

.pricing-store-btn:hover {
    background: #0077ed;
    color: #000000 !important;
}

/* ======================
   STICKY NAV
   ====================== */
.specs-sticky-nav {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    z-index: 99;
    border-bottom: 1px solid var(--specs-border);
    padding: 12px 0;
}

.specs-sticky-inner {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.specs-sticky-title {
    font-size: 21px;
    font-weight: 600;
    color: var(--specs-text);
    margin: 0;
}

.specs-sticky-price {
    font-size: 17px;
    color: var(--specs-text);
}

/* ======================
   TECH SPEC ITEMS (GLOBAL)
   ====================== */
.tech-spec-section {
    padding: 30px 0;
    /* Border bottom is handled globally or per section base, 
       but for tec style we want strict dividers */
    border-bottom: 1px solid #d2d2d7;
}

/* Global Spec Item Layout (Stacked) */
.tech-spec-item {
    display: flex;
    flex-wrap: wrap;
    padding: 3px 0;
    align-items: baseline;
}

.tech-spec-label {
    flex: 0 0 100%;
    font-weight: 600;
    font-size: 15px;
    color: var(--specs-text);
    padding-bottom: 4px;
}

.tech-spec-value {
    flex: 0 0 100%;
    font-size: 15px;
    color: var(--specs-text);
    font-weight: 400;
    padding-bottom: 8px;
}


.tech-section-title {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--specs-text);
}

.tech-spec-item {
    display: flex;
    flex-wrap: wrap;
    /* Allow wrapping on very small screens if needed */
    padding: 3px 0;
    align-items: baseline;
}

.tech-spec-item:last-child {
    border-bottom: none;
}

.tech-spec-label {
    flex: 0 0 30%;
    /* Fixed width for label */
    max-width: 30%;
    font-weight: 600;
    font-size: 15px;
    color: var(--specs-text);
    padding-right: 15px;
}

.tech-spec-value {
    flex: 0 0 70%;
    max-width: 70%;
    font-size: 15px;
    color: var(--specs-text);
    font-weight: 400;
}

.camera-details {
    display: block;
    width: 100%;
}

.camera-line {
    margin-bottom: 4px;
    /* Reduced vertical spacing */
    line-height: 1.4;
}

.camera-line:last-child {
    margin-bottom: 0;
}

.tech-spec-highlight {
    font-weight: 600;
    color: var(--specs-text);
}

/* ======================
   MOBILE RESPONSIVE
   ====================== */
@media (max-width: 991px) {
    .specs-hero-title {
        font-size: 32px;
        /* Reduced from 36px */
    }

    .specs-hero-subtitle {
        font-size: 19px;
    }

    .specs-hero-image {
        max-width: 350px;
        /* Reduced from 550px for tablet */
        max-height: 300px;
        /* Reduced from 650px for tablet */
    }

    .tech-section-title {
        font-size: 28px;
    }

    .specs-hero {
        padding: 85px 15px 25px; /* Increased top padding for tablet/small desktop */
    }

    .tech-spec-section {
        padding: 30px 0;
    }

    .specs-hero-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .chip-badge {
        width: 80px;
        height: 80px;
    }

    .chip-badge-text {
        font-size: 18px;
    }

    body.specs-page .spec-section-title {
        padding-left: 15px !important;
    }
}

/* Tablet (iPad) specific alignment */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-content-wrapper {
        align-items: stretch !important;
    }

    /* Reduce gap on gallery page by shifting flex balance */
    .gallery-page .hero-content-wrapper {
        align-items: center !important;
        justify-content: center !important;
        gap: 20px !important;
    }

    .gallery-page .hero-image-container {
        flex: 0 0 35% !important;
        width: 35% !important;
        max-width: 300px !important;
    }

    .gallery-page .hero-specs-container {
        flex: 0 0 55% !important;
        width: 55% !important;
        max-width: 450px !important;
    }

    .hero-image-container {
        position: relative;
    }

    .hero-image-container a {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-image-container .specs-hero-image {
        max-height: 100% !important;
        height: auto;
        width: 100%;
        object-fit: contain;
    }

    /* Target gallery page specifically to match summary height */
    .gallery-page .hero-image-container .specs-hero-image {
        max-height: 240px !important;
        width: auto !important;
    }

    .gallery-page .hero-image-container a {
        max-height: 240px !important;
        position: relative !important;
        height: auto !important;
    }

    body.specs-page .spec-section-title {
        padding-left: 15px !important;
    }
}

/* ======================
   UTILITY CLASSES
   ====================== */
.specs-text-center {
    text-align: center;
}

.specs-mb-0 {
    margin-bottom: 0 !important;
}

.specs-mt-4 {
    margin-top: 40px;
}

/* Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar */
body.specs-page::-webkit-scrollbar {
    width: 10px;
}

body.specs-page::-webkit-scrollbar-track {
    background: #f5f5f7;
}

body.specs-page::-webkit-scrollbar-thumb {
    background: #c1c1c5;
    border-radius: 5px;
}

body.specs-page::-webkit-scrollbar-thumb:hover {
    background: #a1a1a6;
}

/* Hide default page sections that don't fit light theme */
body.specs-page .tec-specs-section {
    background: var(--specs-bg) !important;
}

body.specs-page .mobile-info-card,
body.specs-page .spec-section,
body.specs-page .spec-table {
    background: transparent !important;
    border: none !important;
}

body.specs-page .spec-section-title {
    color: var(--specs-text) !important;
    background: transparent !important;
    border: none !important;
    font-size: 40px !important;
    font-weight: 600 !important;
    padding: 0 0 20px 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 40px 0 20px 0 !important;
    border-bottom: 1px solid var(--specs-border) !important;
    display: block !important;
    width: 100% !important;
}

body.specs-page .spec-table tr {
    border-bottom: none !important;
}

body.specs-page .spec-label {
    color: var(--specs-text) !important;
    background: transparent !important;
    border-right: none !important;
}

body.specs-page .spec-value {
    color: var(--specs-text) !important;
    background: transparent !important;
}

/* Override swiper for light theme */
body.specs-page .swiper-scrollbar {
    background: #ffffff !important;
}

body.specs-page .swiper-scrollbar-drag {
    background: var(--specs-accent);
}

body.specs-page .card {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.specs-page .card-body,
body.specs-page .card-title {
    color: var(--specs-text) !important;
}

body.specs-page .bg-light {
    background: #f5f5f7 !important;
}

body.specs-page .text-dark {
    color: var(--specs-text) !important;
}

/* Remove background from compare selected item */
body.specs-page .selected-item {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* ======================
   LAYOUT CONTAINER
   ====================== */
.specs-layout-container {
    background: var(--specs-bg);
    padding: 40px 0;
    position: relative;
    z-index: 5;
}

.specs-layout-container .container-fluid,
.gallery-layout-container .container-fluid {
    max-width: 1400px;
    margin: 30px auto;
}

.specs-layout-container .row {
    align-items: flex-start;
    justify-content: center;
}

/* ===========================
   MOBILE RESPONSIVE STYLES
   =========================== */

/* Tablet and below */
@media (max-width: 1399px) {
    .specs-layout-container .container-fluid,
    .gallery-layout-container .container-fluid {
        max-width: 100%;
        margin: 20px auto;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Fix specification header alignment */
    body.specs-page .spec-section-title {
        padding-left: 15px !important;
        width: auto !important;
        box-sizing: border-box !important;
    }
}

/* Mobile View - Match tec Style */
@media (max-width: 767px) {

    /* Force viewport width on body, allow containers to grow naturally */
    body.specs-page {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.specs-page .main-content,
    body.specs-page .specs-layout-container,
    body.specs-page .container-fluid:not(.header-pill-container),
    body.specs-page .row,
    body.specs-page .col-12 {
        max-width: 100% !important; /* Changed from 100vw to 100% */
        overflow-x: visible !important; /* Allow natural flow, parent body handles clipping */
        padding: 0 !important;
    }

    .specs-layout-container {
        padding: 15px 0 !important;
        width: 100% !important;
    }

    .specs-layout-container .container-fluid {
        padding: 0 !important;
        /* Removed 15px horizontal padding */
        width: 100% !important;
    }

    .specs-layout-container .row {
        width: 100% !important;
    }

    .specs-main-container {
        padding: 0 !important;
        /* Removed 15px horizontal padding */
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Hero section mobile */
    .specs-hero {
        padding: 80px 0px 20px !important;
        /* Increased padding for header overlap while maintaining full width */
        width: 100% !important;
        box-sizing: border-box !important;
    }


    .specs-hero-container {
        padding: 0 !important;
    }

    .hero-content-wrapper {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow: hidden !important;
    }

    .hero-image-container {
        flex: 0 0 150px !important;
        width: 150px !important;
        min-width: 140px !important;
        max-width: 160px !important;
        justify-content: flex-start !important;
        padding-left: 0 !important;
        position: relative;
    }


    .hero-image-container a {
        text-align: left !important;
        width: 100% !important;
        display: block !important;
    }

    .hero-specs-container {
        flex: 1 1 auto !important;
        width: calc(100% - 165px) !important;
        max-width: calc(100% - 160px) !important;
        align-items: flex-start !important;
        padding-right: 5px !important;
        position: relative;
    }


    .specs-hero-title {
        font-size: 24px !important;
        margin-bottom: 10px;
        word-wrap: break-word;
    }

    .specs-hero-subtitle {
        font-size: 15px !important;
        margin-bottom: 15px;
    }

    .specs-hero-image {
        width: 100% !important;
        max-width: 150px !important;
        height: auto !important;
        max-height: 280px !important;
        margin: 0 !important;
        display: block !important;
        object-fit: contain !important;
        object-position: left center !important;
    }


    /* Reduce font size for highlights on mobile */
    .hero-specs-container .spec-item {
        font-size: 13px !important;
        gap: 10px !important;
        width: 100% !important;
        word-wrap: break-word;
        white-space: normal !important;
    }

    .hero-specs-container .spec-item i {
        font-size: 14px !important;
        width: 20px !important;
        height: auto !important;
        text-align: center !important;
    }

    .specs-hero-actions {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .specs-hero-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        flex: 1 1 auto;
        /* Allow growth/shrink */
        min-width: 100px;
        /* Minimum width for touch targets */
        max-width: 150px;
        /* Prevent them from getting too wide alone */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Sticky nav mobile */
    .specs-sticky-nav {
        padding: 8px 15px;
    }

    .specs-sticky-nav-title {
        font-size: 13px;
    }

    /* Section styling mobile - CORRECT CLASS NAMES */
    .tech-spec-section {
        padding: 30px 0 !important;
        /* Removed 15px horizontal padding */
        margin-bottom: 0;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
        border-bottom: none !important;
    }

    .tech-section-header {
        margin-bottom: 20px;
        padding-bottom: 15px !important;
        border-bottom: none !important;
        /* FIXED: Removed border */
        max-width: 100%;
        min-width: 0 !important;
    }

    .tech-section-title {
        font-size: 24px !important;
        margin-bottom: 10px;
        line-height: 1.2;
    }

    .tech-section-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* Spec items mobile - REVERTED TO STACKED */
    .tech-spec-item {
        display: block !important;
        margin-bottom: 15px !important;
        padding: 0 !important;
        border-bottom: none !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .tech-spec-label {
        font-size: 15px !important;
        font-weight: 600;
        margin-bottom: 3px;
        color: var(--specs-text);
        display: block;
        max-width: 100% !important;
        padding-right: 0 !important;
    }

    .tech-spec-value {
        font-size: 15px !important;
        line-height: 1.6;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
        display: block;
        box-sizing: border-box !important;
        color: var(--specs-text) !important;
    }

    .tech-spec-highlight {
        font-size: 13px !important;
        line-height: 1.4;
        font-weight: 600;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        max-width: 100% !important;
        display: block;
        box-sizing: border-box !important;
    }

    /* Chip badge mobile */
    .chip-badge {
        width: 80px;
        height: 80px;
        margin: 20px auto;
    }

    .chip-badge-text {
        font-size: 20px;
    }

    .chip-badge-sub {
        font-size: 9px;
    }

    /* Camera specs mobile */
    .camera-spec-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .camera-spec-item h4 {
        font-size: 16px;
    }

    .camera-spec-item p {
        font-size: 14px;
    }

    /* Pricing section mobile */
    .tech-pricing-section {
        padding: 30px 20px;
    }

    .tech-pricing-title {
        font-size: 24px;
    }

    .tech-pricing-value {
        font-size: 36px;
    }

    /* Related section mobile */
    .tech-related-section {
        padding: 30px 20px;
    }

    .related-device-card {
        min-width: 150px;
    }

    .related-device-image {
        height: 150px;
    }

    .related-device-name {
        font-size: 13px;
    }
}

/* Small mobile (480px and below) */
/* Small mobile (480px and below) */
@media (max-width: 480px) {
    .specs-layout-container .container-fluid {
        padding: 0 !important;
        /* Removed 15px */
    }

    .specs-hero {
        padding: 80px 5px 15px !important;
        /* Maintained minimal padding, increased top for header */
    }

    .specs-hero-title {
        font-size: 28px !important;
    }

    .tech-spec-section {
        padding: 20px 0 !important;
        /* Removed 15px */
    }

    /* Ensure label/value font sizes remain legible */
    .tech-spec-label,
    .tech-spec-value {
        font-size: 15px !important;
    }
}

/* FORCE GLOBAL STYLES - tec-style Stacked Headers */
.tech-spec-section {
    border-bottom: none !important;
    padding: 10px 15px !important;
}

.tech-section-header {
    padding-bottom: 0 !important;
    border-bottom: none !important;
    margin-bottom: 10px !important;
}

.tech-section-title {
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--specs-border) !important;
    width: 100%;
    display: block;
}

/* Custom Rule: Show 6 items on mobile/tablet, but only 5 on PC */
@media (min-width: 1024px) {
    .related-section .swiper-slide:nth-child(6) {
        display: none !important;
    }
}

/* Swiper Scrollbar Customization */
.related-section .swiper-scrollbar {
    position: relative !important;
    /* Force it into flow so margin works */
    bottom: auto !important;
    left: auto !important;
    margin-top: 50px !important;
    /* Move it down from the mobile names */
    height: 4px !important;
    background: #e0e0e0;
    /* Light gray track */
    width: 100% !important;
}

.related-section .swiper-scrollbar-drag {
    background: #000000 !important;
    /* Black scrollbar/drag handle */
}

/* Compare Page Image Sizing */
.compare-device-img {
    max-height: 350px;
    /* Increased from 220px for PC */
    object-fit: contain;
    width: 100%;
}

@media (max-width: 767px) {
    .compare-device-img {
        max-height: 400px;
        width: 100%;
        max-width: 100%;
        padding: 0 5px;
        box-sizing: border-box;
        margin-bottom: 5px !important;
        /* Decrease bottom margin */
    }
}

.compare-device-name {
    min-height: 60px;
    /* Reduced from 80px */
    font-size: 14px;
    /* Reduce font size to prevent blowout */
    word-break: break-word;
    /* Ensure long names wrap */
    overflow-wrap: break-word;
    line-height: 1.3;
    display: flex;
    align-items: center;
    /* Center align vertically for better look or flex-start if top preferred */
    justify-content: center;
    text-align: center;
    width: 100%;
    margin-bottom: 5px !important;
    /* Reduce excessive space */
    padding-top: 5px !important;
    /* Reduce excessive space */
}

/* Compare Table Column Widths */
.compare-results .spec-table {
    table-layout: fixed;
    width: 100%;
}

.compare-results .spec-label {
    width: 22%;
}

.compare-results .spec-value {
    width: 26%;
}

@media (max-width: 991px) {

    /* Mobile/Tablet: 2 devices + label */
    .compare-results .spec-label {
        width: 20%;
    }

    .compare-results .spec-value {
        width: 35%;
        /* Reduced to safe zone (Total 90%) to fix overflow */
    }
}

/* Fix Input Overflow */
/* Fix Input Overflow - Strict */
.compare-search-input {
    width: 95% !important;
    /* Reduced from 100% to create gap */
    max-width: 95% !important;
    min-width: 0 !important;
    /* Override any browser defaults */
    box-sizing: border-box !important;
    margin: 0 auto !important;
    /* Center the input with gap */
    padding: 4px 5px !important;
    /* Minimal padding */
    font-size: 13px !important;
    display: block;
    /* Ensure centering works */
}

/* Compare Search Section Overflow Fix */
.compare-search-section {
    width: 100% !important;
    overflow-x: hidden !important;
}

.compare-search-section .spec-table {
    width: 100% !important;
    table-layout: fixed !important;
}

.compare-search-section td {
    overflow: hidden;
    /* Clip any remaining overflow */
}

/* Maximize Image Width in Compare */
.compare-search-section .spec-value {
    padding: 0 !important;
}

.compare-search-section .selected-mobile,
.compare-search-section .selected-item {
    padding: 0 !important;
}

.compare-search-section .selected-item a {
    padding: 5px 0 !important;
}

/* Remove borders and shadows for plain look - RETRY */
.compare-results .spec-table tr,
.compare-results .spec-table td,
.compare-results .spec-table th {
    border: none !important;
    box-shadow: none !important;
}

.compare-results .card {
    box-shadow: none !important;
    border: none !important;
}

.compare-select-box {
    box-shadow: none !important;
    border: none !important;
}

/* Specifically target borders in table rows */
.compare-results tr {
    border-bottom: none !important;
}

.compare-results td {
    border-bottom: none !important;
}

/* Remove section title border */
.compare-results .spec-section-title {
    border-bottom: none !important;
    margin-bottom: 10px !important;
}

/* SUPER STRICT NO BORDERS */
body.specs-page .compare-results .spec-section-title,
body.specs-page .compare-results table,
body.specs-page .compare-results tr,
body.specs-page .compare-results td,
body.specs-page .compare-results th,
body.specs-page .compare-results .spec-expand-header {
    border: none !important;
    border-bottom: none !important;
    border-top: none !important;
    box-shadow: none !important;
}


/* NUCLEAR BORDER REMOVAL */
.compare-results table,
.compare-results tbody,
.compare-results tr,
.compare-results td,
.compare-results th {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-style: none !important;
    border-width: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    background-image: none !important;
}

/* Remove any potential pseudo-elements creating borders */
.compare-results tr::after,
.compare-results tr::before,
.compare-results td::after,
.compare-results td::before {
    display: none !important;
    content: none !important;
    border: none !important;
}


/* ULTRA SPECIFIC BORDER REMOVAL */
html body.specs-page .compare-results table tbody tr td,
html body.specs-page .compare-results table tbody tr th,
html body.specs-page .compare-results table tbody tr,
html body.specs-page .compare-results .spec-section-title {
    border: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    box-shadow: none !important;
}

/* Target the specific expansion rows if any */
html body.specs-page .spec-expand-header {
    border-bottom: none !important;
}

/* MOBILE SPECIFIC BORDER KILLER */
@media (max-width: 991px) {

    html body.specs-page .compare-results .spec-section-title,
    html body.specs-page .tech-section-header,
    html body.specs-page .compare-results table,
    html body.specs-page .compare-results tr,
    html body.specs-page .compare-results td {
        border: none !important;
        border-bottom: none !important;
        border-top: none !important;
        box-shadow: none !important;
    }
}

/* NUCLEAR OPTION FOR MOBILE BORDERS */
@media (max-width: 991px) {
    body.specs-page .compare-results * {
        border: none !important;
        border-bottom: none !important;
        border-top: none !important;
        box-shadow: none !important;
    }

    /* Exception for the search input to keep it visible if needed, or maybe not since design is flat */
    body.specs-page .compare-search-input {
        border: 1px solid #eee !important;
        /* Optional: keep search input visible */
    }
}

/* RESTORE SECTION HEADER BORDER - tec STYLE (ALL SCREENS) */
html body.specs-page .compare-results .spec-section-title {
    border-bottom: 1px solid #e5e5e5 !important;
    /* tec-like thin divider */
    padding-bottom: 15px !important;
    margin-bottom: 20px !important;
    display: block !important;
    font-weight: 600 !important;
    color: #1d1d1f !important;
    /* tec Text Color */
}

/* Mobile Only: Expand Search Dropdowns & Round Corners */
@media (max-width: 768px) {

    /* Override responsive.css constraints */
    .compare-search-results {
        max-width: none !important;
        /* Force overly wide to cover screen */
        max-width: 90vw !important;
        /* Constrain to screen width */
        left: 0 !important;
        z-index: 999 !important;
    }

    /* Slot 2 Dropdown */
    input[data-position="2"]~.compare-search-results {
        width: 200vw !important;
        max-width: 90vw !important;
        left: auto !important;
        right: 0px !important;
        /* Align to right edge */
        z-index: 999 !important;
    }
}

/* FIX DROPDOWN CLIPPING & WIDTH */
@media (max-width: 768px) {

    /* Ensure NO overflow hiding traps the dropdown */
    .spec-section,
    .spec-table,
    tr,
    td,
    .compare-select-box,
    .position-relative {
        overflow: visible !important;
    }

    /* Dropdown Expansion */
    input[data-position="1"]~.compare-search-results {
        width: 195% !important;
        /* Reduced from 220% to fix overflow */
        left: 0 !important;
        max-width: 90vw !important;
        border-radius: 15px !important;
    }

    input[data-position="2"]~.compare-search-results {
        width: 195% !important;
        /* Reduced from 220% to fix overflow */
        right: 0 !important;
        left: auto !important;
        max-width: 90vw !important;
        border-radius: 15px !important;
    }
}


/* SEARCH RESULT IMAGE BACKGROUND FIX */
.compare-search-results .img-thumbnail,
.compare-search-results img,
.search-result-image {
    background-color: transparent !important;
    /* Changed from background to background-color to avoid unsetting background-image */
    border: none !important;
}

/* Compact Search Result Items */
.compare-search-results .search-result-item {
    padding: 5px 10px !important;
    /* Reduced padding from likely 10px 15px */
    margin-bottom: 0 !important;
    /* Remove gap between items if any */
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
}


/* PC/Tablet Only: Limit Dropdown Height & Custom Scrollbar */
@media (min-width: 769px) {
    .compare-search-results {
        max-height: 290px !important;
        /* Show ~4 items */
        overflow-y: auto !important;
    }

    /* Custom Scrollbar for Dropdown */
    .compare-search-results::-webkit-scrollbar {
        width: 6px;
    }

    .compare-search-results::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .compare-search-results::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .compare-search-results::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }
}

/* REMOVE GAP BETWEEN MOBILE IMAGES AND SPECS */
/* REMOVE GAP BETWEEN MOBILE IMAGES AND SPECS */
@media (max-width: 768px) {
    .compare-search-section {
        margin-bottom: 20px !important;
        /* Increased spacing */
        padding-bottom: 10px !important;
        border-bottom: none !important;
    }

    /* Target the very first spec section specifically */
    .compare-search-section+.spec-section {
        padding-top: 10px !important;
        margin-top: 0 !important;
        /* Reset margin */
    }

    /* Target the title inside the first spec section specifically */
    .compare-search-section+.spec-section .spec-section-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    /* Reduce image container height if it has extra space */
    .compare-device-img {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        max-height: 180px;
        /* Force smaller height on mobile if needed */
    }

    .compare-device-name {
        margin-bottom: 5px !important;
        padding-top: 0 !important;
        min-height: auto !important;
    }

    /* Ensure no random paragraphs are taking space */
    .compare-search-section p {
        margin-bottom: 0 !important;
        display: none !important;
    }
}

/* FORCE ALIGNMENT OF MOBILE NAMES AND IMAGES */
@media (max-width: 768px) {
    .compare-device-name {
        height: 55px !important;
        /* Fixed height forcing alignment */
        min-height: 55px !important;
        display: flex !important;
        align-items: flex-start !important;
        /* Top align text so first lines match */
        justify-content: center !important;
        line-height: 1.2 !important;
        overflow: hidden !important;
        padding-top: 5px !important;
        /* Small top padding */
    }

    .compare-device-img {
        /* Ensure images start at same point below the fixed name box */
        margin-top: 0 !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
        object-fit: contain !important;
    }
}

/* ======================
   DISCUSSION / COMMENTS
   ====================== */
.specs-discussion-section {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 30px 20px;
}

.discussion-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--specs-text);
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--specs-border);
}

.discussion-count {
    font-size: 15px;
    font-weight: 400;
    color: var(--specs-text);
}

/* Comment Form */
.comment-form-container {
    margin-bottom: 30px;
}

.comment-form {
    background: #f5f5f7;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e5e5ea;
}

.comment-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0071e3, #40a0ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000 !important;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-form-username {
    font-weight: 600;
    font-size: 14px;
    color: var(--specs-text);
}

.comment-textarea,
.reply-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    background: #fff;
    color: var(--specs-text);
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.comment-textarea:focus,
.reply-textarea:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.comment-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.comment-char-count {
    font-size: 12px;
    color: var(--specs-text-secondary);
}

.comment-submit-btn,
.reply-submit-btn {
    background: linear-gradient(135deg, #0071e3, #40a0ff);
    color: #000000 !important;
    border: 1px solid #e5e5e5 !important;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-submit-btn:hover,
.reply-submit-btn:hover {
    background: linear-gradient(135deg, #005bb5, #0071e3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

.comment-submit-btn:disabled,
.reply-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login Prompt */
.comment-login-prompt {
    background: #f5f5f7;
    border: 1px dashed #d2d2d7;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--specs-text-secondary);
}

.comment-login-prompt a {
    color: #0071e3;
    font-weight: 600;
    text-decoration: none;
}

.comment-login-prompt a:hover {
    text-decoration: underline;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.comment-card {
    padding: 18px 0;
    border-bottom: 1px solid #f0f0f5;
}

.comment-card:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.comment-meta {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--specs-text);
}

.comment-date {
    font-size: 12px;
    color: var(--specs-text-secondary);
}

.comment-body {
    font-size: 14px;
    line-height: 1.6;
    color: #1d1d1f;
    padding-left: 46px;
}

.comment-actions {
    padding-left: 46px;
    margin-top: 6px;
}

.reply-toggle-btn {
    background: none;
    border: 1px solid #e5e5e5 !important;
    color: var(--specs-text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.reply-toggle-btn:hover {
    background: #f0f0f5;
    color: #0071e3;
}

/* Reply Form */
.reply-form-container {
    margin-left: 46px;
    margin-top: 10px;
}

.reply-textarea {
    min-height: 60px;
    font-size: 13px;
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.reply-cancel-btn {
    background: none;
    border: 1px solid #d2d2d7;
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--specs-text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.reply-cancel-btn:hover {
    background: #f0f0f5;
    color: var(--specs-text);
}

.reply-submit-btn {
    padding: 6px 16px;
    font-size: 12px;
}

/* Replies */
.replies-container {
    margin-left: 46px;
    border-left: 2px solid #e5e5ea;
    padding-left: 16px;
    margin-top: 5px;
}

.reply-card {
    padding: 12px 0;
}

.reply-avatar {
    width: 28px;
    height: 28px;
    font-size: 11px;
    background: linear-gradient(135deg, #34c759, #30d158);
}

.reply-card .comment-body {
    padding-left: 38px;
    font-size: 13px;
}

/* No Comments */
.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--specs-text-secondary);
}

.no-comments i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
    opacity: 0.4;
}

.no-comments p {
    font-size: 14px;
    margin: 0;
}

/* Fade In Animation */
.fade-in-comment {
    animation: fadeInComment 0.4s ease;
}

@keyframes fadeInComment {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 575px) {
    .specs-discussion-section {
        padding: 20px 15px;
    }

    .discussion-title {
        font-size: 18px;
    }

    .comment-form {
        padding: 15px;
        border-radius: 12px;
    }

    .comment-body {
        padding-left: 0;
        margin-top: 4px;
    }

    .comment-actions {
        padding-left: 0;
    }

    .reply-form-container {
        margin-left: 20px;
    }

    .replies-container {
        margin-left: 20px;
        padding-left: 12px;
    }

    .reply-card .comment-body {
        padding-left: 0;
    }
}

/* ======================
   VIEW ALL BUTTON & COMMENTS PAGE
   ====================== */

/* Reply count badge on preview */
.comment-reply-count {
    padding-left: 46px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--specs-text-secondary);
}

/* View All Comments Button */
.discussion-view-all {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f5;
}

.view-all-comments-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #0071e3, #40a0ff);
    color: #000000 !important;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 113, 227, 0.2);
}

.view-all-comments-btn:hover {
    background: linear-gradient(135deg, #005bb5, #0071e3);
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.35);
    text-decoration: none;
}

/* Comments Full Page Styles */
.comments-page-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.comments-back-link {
    display: inline-flex;
    align-items: center;
    color: #0071e3;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}

.comments-back-link:hover {
    color: #005bb5;
    text-decoration: none;
}

.comments-full-page {
    padding-top: 15px;
}

.comments-device-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 5px;
}

.comments-device-img {
    width: 60px;
    height: 75px;
    object-fit: contain;
    border-radius: 8px;
}

.comments-device-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--specs-text);
    margin: 0;
}

.comments-device-subtitle {
    font-size: 14px;
    color: var(--specs-text-secondary);
    margin: 4px 0 0;
}

.comments-divider {
    border: 1px solid #e5e5e5 !important;
    border-top: 2px solid var(--specs-border);
    margin: 15px 0 20px;
}

/* Mobile Responsive for Comments Page */
@media (max-width: 575px) {
    .comments-device-header {
        gap: 12px;
    }

    .comments-device-img {
        width: 45px;
        height: 55px;
    }

    .comments-device-name {
        font-size: 18px;
    }

    .view-all-comments-btn {
        padding: 10px 24px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .comment-reply-count {
        padding-left: 0;
    }
}

/* ======================
   COMPACT STYLE OVERRIDES
   ====================== */
.tech-spec-item {
    margin-bottom: 8px !important;
}

.tech-spec-item:last-child {
    margin-bottom: 0 !important;
}

.tech-spec-label {
    padding-bottom: 2px !important;
}

.tech-spec-value {
    padding-bottom: 4px !important;
    line-height: 1.4 !important;
}

/* Hide empty labels on mobile to save space, but keep their width on desktop for grid alignment */
@media (max-width: 767px) {
    .tech-spec-label.empty-label {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .tech-spec-label.empty-label {
        visibility: hidden !important;
    }
}

/* Ensure unlabeled items have even less margin to look collective */
.tech-spec-item:has(.empty-label) {
    margin-top: -4px !important;
    margin-bottom: 4px !important;
}

@media (max-width: 767px) {
    .tech-spec-section {
        padding: 15px !important;
    }

    .tech-section-title {
        font-size: 22px !important;
        margin-bottom: 15px !important;
        padding-bottom: 8px !important;
    }

    .tech-spec-item {
        margin-bottom: 12px !important;
    }

    /* Make unlabeled items on mobile feel like part of the previous group */
    .tech-spec-item:has(.empty-label) {
        margin-top: -6px !important;
        margin-bottom: 2px !important;
    }
}
/* ============================================================
   GALLERY PAGE DEFINITIVE FIXES (Image Size & Top Spacer)
   ============================================================ */
.gallery-page .header-banner-ad {
    display: none !important;
}

@media (max-width: 991px) {
    body.gallery-page .hero-content-wrapper .hero-image-container .specs-hero-image {
        max-height: 240px !important;
        width: auto !important;
    }
    
    body.gallery-page .hero-content-wrapper .hero-image-container a {
        max-height: 240px !important;
        position: relative !important;
        height: auto !important;
        width: auto !important;
        display: inline-flex !important;
    }
    
    body.gallery-page .hero-content-wrapper {
        align-items: flex-start !important;
    }
}

/* ============================================================
   BRAND DETAIL BUTTONS FIX (Side-by-Side & Flat)
   ============================================================ */

/* ============================================================
   UNIVERSAL BUTTONS FIX (Side-by-Side & Balanced)
   ============================================================ */
/* Side-by-Side Flex Logic for Actions (Standardized) */
.specs-hero-actions {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    justify-content: center !important;
    margin-top: 20px !important;
}

.specs-hero-btn, 
.card-buy-container,
.specs-buy-now-dropdown,
.specs-hero-actions > a,
.specs-hero-actions > .dropdown {
    flex: 1 1 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    min-width: 0 !important;
    height: 50px !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

@media (max-width: 991px) {
    .specs-hero-btn {
        padding: 0 5px !important;
        font-size: 0.95rem !important;
        color: #1d1d1f !important;
        border: 1px solid #e5e5e5 !important;
        background: #ffffff !important;
        text-decoration: none !important;
        white-space: nowrap !important;
    }

    .specs-buy-now-btn {
        width: 100% !important;
        height: 50px !important;
        border: 1px solid #d2d2d7 !important;
        background: #ffffff !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 10px !important;
    }

    .specs-buy-now-btn:hover, 
    .specs-hero-btn:hover {
        box-shadow: none !important;
        transform: none !important;
    }

    /* Force Dropup (Open Above) on Mobile */
    .dropdown-menu.buy-now-menu {
        top: auto !important;
        bottom: 100% !important;
        margin-bottom: 10px !important;
        margin-top: 0 !important;
        transform: none !important;
    }

    /* List Card Specific Adjustments (Search/Upcoming) */
    .specs-hero .specs-hero-actions,
    .finder-result-card .specs-hero-actions {
        padding: 0 15px 15px 15px !important;
        margin-top: 10px !important;
    }

    .specs-hero-actions:empty {
        display: none !important;
    }

    /* Ensure Dropup is consistent in list cards too */
    .specs-hero .buy-now-menu,
    .finder-result-card .buy-now-menu {
        bottom: 100% !important;
        top: auto !important;
        margin-bottom: 8px !important;
    }
}
