/*
Theme Name: TechHub Core
Template: blocksy
Description: TechHub Core Theme
Version: 1.1
Author: TechNexa
*/

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --accent: #f59e0b;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- GLOBAL RESETS --- */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 0.75em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-dark);
}

/* --- LAYOUT UTILS --- */
.ct-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    /* Reduced side padding */
}

/* Fix for Vertical White Gaps */
main#primary,
.site-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.pl-home-container section,
.pl-home-container>div {
    margin-bottom: 15px !important;
    /* Reduced by 50% as requested */
}

/* Remove default entry-content margins if they exist */
.entry-content {
    margin: 0 !important;
}

.pl-grid {
    display: grid;
    gap: 15px;
    /* Reduced gap */
}

.pl-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

/* --- SINGLE PHONE GRID LAYOUT (AdSense Optimized) --- */
.pl-content-grid-3col {
    display: grid;
    /* Nav: 180px | Content: Flex | Sidebar: 300px (Min for Ads) */
    grid-template-columns: 180px 1fr 300px;
    gap: 25px;
    align-items: start;
}

.pl-left-sticky-nav {
    position: sticky;
    top: 80px;
}

.pl-left-sticky-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pl-left-sticky-nav a {
    display: block;
    padding: 8px 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    border-right: 2px solid transparent;
    transition: all 0.2s;
}

.pl-left-sticky-nav a.active,
.pl-left-sticky-nav a:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Sidebar Sticky Ad Logic */
.pl-sidebar-widget.pl-sticky-sidebar {
    position: sticky;
    top: 90px;
    /* Space for Header */
    z-index: 99;
}

/* Mobile & Tablet Resp. */
@media (max-width: 1024px) {
    .pl-content-grid-3col {
        grid-template-columns: 1fr 300px;
        /* Stack Nav, keep Sidebar width */
    }

    .pl-left-nav-col {
        display: none;
        /* Hide sticky nav on smaller screens */
    }
}

@media (max-width: 768px) {
    .pl-content-grid-3col {
        grid-template-columns: 100%;
        /* Full width stack */
    }

    .pl-sidebar-widget.pl-sticky-sidebar {
        position: static !important;
    }

    /* AdSense Mobile Optimization */
    .ct-container {
        padding-left: 10px;
        padding-right: 10px;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    /* Allow Ads to break out if needed */
    .pl-ad-container {
        margin-left: -10px;
        margin-right: -10px;
        display: flex;
        justify-content: center;
        background: #f8f9fa;
    }
}

/* --- AD SLOT CONTAINERS --- */
.pl-ad-slot {
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    margin: 0 auto 20px;
    border-radius: 4px;
    overflow: hidden;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pl-ad-header {
    width: 100%;
    max-width: 728px;
    height: 90px;
    min-height: 90px; /* CLS Protection */
}

.pl-ad-sidebar {
    width: 300px;
    height: 600px;
    min-height: 600px; /* CLS Protection */
}

/* Half Page */
.pl-ad-content {
    width: 300px;
    height: 250px;
    min-height: 250px; /* CLS Protection */
}

/* Medium Rect */
.pl-ad-mobile-anchor {
    height: 50px;
    min-height: 50px; /* CLS Protection */
    width: 320px;
}

.pl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* --- BUTTONS --- */
.pl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.pl-btn-primary {
    background: var(--primary);
    color: white;
}

.pl-btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

.pl-btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.pl-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #eff6ff;
}

.pl-btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* --- BADGES & CHIPS --- */
.pl-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pl-badge-new {
    background: #dcfce7;
    color: #166534;
}

.pl-badge-hot {
    background: #fee2e2;
    color: #991b1b;
}

/* --- HEADER / NAV --- */
.pl-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.pl-nav-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative; /* For absolute menu positioning */
}

/* Mobile Toggle - Hidden on Desktop */
#pl-mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    padding: 10px;
}

.pl-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -1px;
}

.pl-main-menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.pl-main-menu a {
    color: var(--text-main);
    font-weight: 500;
}

.pl-main-menu a:hover {
    color: var(--primary);
}

/* --- HERO SECTION (Front Page) --- */
.pl-hero-section {
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.pl-hero-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(to right, #2563eb, #4f46e5);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pl-hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
}

/* --- SEARCH BAR --- */
.pl-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.pl-search-input {
    width: 100%;
    padding: 16px 24px;
    padding-left: 50px;
    border-radius: 50px;
    border: 2px solid var(--border);
    font-size: 1.1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.pl-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.pl-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* --- MARKET CARDS --- */
.pl-market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 0;
}

.pl-market-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pl-market-img {
    height: 180px;
    background: #f1f5f9;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.pl-market-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.pl-market-card:hover .pl-market-img img {
    transform: scale(1.05);
}

.pl-market-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.pl-market-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.pl-market-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- PHONE CARDS --- */
.pl-phone-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.pl-phone-card {
    text-align: center;
    padding: 20px;
    position: relative;
}

.pl-phone-thumb {
    height: 200px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pl-phone-thumb img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.pl-phone-title {
    font-size: 1.1rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.pl-phone-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.pl-phone-specs {
    display: flex;
    justify-content: center;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.pl-spec-item {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4b5563; /* Fixed: Was using default which had low contrast */
}

/* Fix for icons */
.pl-spec-item svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0;
    color: #6b7280 !important; /* Fixed: Was #999, now meets contrast ratio */
}

/* --- FOOTER --- */
.pl-footer {
    background: white;
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 60px;
    text-align: center;
    color: var(--text-muted);
}

/* --- ACCESSIBILITY CONTRAST OVERRIDES --- */

/* Pagination */
.page-numbers {
    color: #1d4ed8 !important; /* Blue 700 */
}
.page-numbers.current {
    background: #1d4ed8 !important;
    color: white !important;
    border-color: #1d4ed8 !important;
}

/* Sidebar Contrast Fix (Targeting Inline Styles) */
aside.pl-sidebar div[style*="color: #94a3b8"],
aside.pl-sidebar p[style*="color: #94a3b8"],
aside.pl-sidebar span[style*="color: #94a3b8"],
.pl-calculator-card div[style*="color: #94a3b8"] {
    color: #475569 !important; /* Slate 600 */
}
@media (max-width: 768px) {
    .pl-hero-title {
        font-size: 2rem;
    }

    /* Mobile Menu Logic */
    #pl-mobile-menu-toggle {
        display: flex !important; /* Show hamburger */
        align-items: center;
        justify-content: center;
    }

    .pl-main-menu {
        display: none; /* Hide default menu */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 20px;
        z-index: 1000;
    }

    .pl-main-menu.toggled {
        display: block !important; /* Show when toggled */
    }

    .pl-main-menu ul {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Mobile Filters Drawer */
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 85%; /* Don't cover 100% */
        max-width: 320px;
        background: white;
        z-index: 2000;
        padding: 20px;
        box-shadow: 10px 0 25px rgba(0,0,0,0.2);
        overflow-y: auto;
        transform: translateX(-100%); /* Slide out logic */
        transition: transform 0.3s ease;
        display: block !important; /* Override display:none from layout */
    }

    .filter-sidebar.active {
        transform: translateX(0) !important; /* Slide in */
        display: block !important;
    }
    
    /* Overlay for filters */
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1999;
        display: none;
    }
    .filter-overlay.active {
        display: block !important;
    }
    
    /* Show Close Button on Mobile */
    .filter-close {
        display: block !important;
    }

    .pl-nav-flex {
        flex-direction: row !important; /* Keep horizontal for logo + hamburger */
        justify-content: space-between;
        align-items: center;
    }

    .pl-hero-inner {
        grid-template-columns: 1fr !important;
    }
}

/* --- SINGLE PHONE PAGE ENHANCEMENTS --- */

.pl-card-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

/* Hero */
.pl-hero-inner {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .pl-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.pl-qs-item {
    background: #f9fafb;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f3f4f6;
    transition: transform 0.2s;
}

.pl-qs-item:hover {
    transform: translateY(-3px);
    border-color: #e5e7eb;
}

/* Spec Sections */
.pl-spec-section {
    margin-bottom: 15px;
}

.pl-spec-section h3 {
    font-size: 1rem;
    margin: 0;
    padding: 10px 15px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.pl-spec-section table {
    width: 100%;
    border-collapse: collapse;
}

.pl-spec-section th,
.pl-spec-section td {
    padding: 6px 12px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
}

.pl-spec-section th {
    background: #fff;
    color: #6b7280;
    font-weight: 500;
    width: 130px;
    /* Fixed width for labels */
    text-align: left;
    vertical-align: top;
}

.pl-spec-section td {
    color: #111827;
    font-weight: 500;
    line-height: 1.4;
}

.pl-spec-section tr:last-child th,
.pl-spec-section tr:last-child td {
    border-bottom: none;
}

/* Review & Opinions */
.pl-review-section,
.pl-pros-cons,
#opinions {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #e5e7eb;
}

.pl-post-content h2,
.pl-post-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}

.pl-post-content p {
    margin-bottom: 1.5em;
    line-height: 1.8;
    color: #374151;
}

/* Sidebar */
.pl-sticky-sidebar {
    position: sticky;
    top: 20px;
}

.pl-shop-list a:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* =========================================
   Redesigned Phone Card (GSMArena Style)
   ========================================= */

/* Grid Layout for Archive */
.pl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

/* Card Container */
.pl-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.pl-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail Area */
.pl-thumb {
    position: relative;
    padding-top: 60%;
    /* 16:9 Aspect Ratio */
    background: #f9fafb;
    overflow: hidden;
    border-bottom: 1px solid #f3f4f6;
}

.pl-thumb img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.pl-card:hover .pl-thumb img {
    transform: translate(-50%, -50%) scale(1.08);
}

/* Content Area */
.pl-card-content {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Title */
.pl-card-content h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px 0;
    line-height: 1.3;
    line-height: 1.3;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Release Info */
.pl-release-info {
    font-size: 0.75rem;
    color: #6b7280; /* Fixed: Was #9ca3af, improved contrast */
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Specs Grid (Mini Icons) */
.pl-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
    margin-top: auto;
    /* Pushes to bottom if content is short */
}

.pl-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #4b5563;
    background: #f3f4f6;
    padding: 6px 8px;
    border-radius: 6px;
}

.pl-spec-item svg {
    width: 14px;
    height: 14px;
    color: #6b7280;
    flex-shrink: 0;
}

.pl-spec-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.pl-spec-val {
    font-weight: 600;
    color: #374151;
}

.pl-spec-sub {
    font-size: 0.7rem;
    color: #6b7280; /* Fixed: Improved contrast for accessibility */
}

/* Price Button */
.pl-price-btn {
    margin-top: 12px;
    background: #eff6ff;
    color: var(--primary);
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.pl-card:hover .pl-price-btn {
    background: var(--primary);
    color: #fff;
}

/* Blog Filters */
.pl-blog-filters {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.pl-filter-link {
    text-decoration: none;
    color: #777;
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s;
}

.pl-filter-link:hover,
.pl-filter-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Blog Card Tweaks */
.pl-blog-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: #999;
    margin-bottom: 5px;
}

.pl-cat {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

/* --- Single Phone Enhancements --- */

/* Sticky Nav */
.pl-sticky-nav-container {
    height: 60px;
    /* Placeholder to prevent jump */
    margin-bottom: 20px;
}

.pl-sticky-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 90;
    width: 100%;
    transition: all 0.3s;
}

.pl-sticky-nav.is-sticky {
    position: fixed;
    top: 0;
    /* Adjust if header is sticky */
    left: 0;
    right: 0;
    padding: 0 20px;
}

.pl-sticky-nav ul {
    display: flex;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: auto;
}

.pl-nav-link {
    display: block;
    padding: 15px 5px;
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.pl-nav-link:hover,
.pl-nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Compare Toggle */
.pl-compare-btn {
    background: #fff;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pl-compare-btn:hover {
    background: #eff6ff;
}

.pl-compare-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Verdict Section */
.pl-verdict-box {
    background: linear-gradient(to right, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
}

.pl-verdict-box h3 {
    color: #0369a1;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pl-verdict-content {
    color: #0c4a6e;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* --- ARCHIVE FILTERS --- */
.pl-filters {
    background: #fff;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    height: fit-content;
}

/***********************************
 FIX: Phone Images Collapse on Home,
 Trending, Latest, and Grid Layouts
************************************/

/* 1. Normalize all phone thumbnails */
.plx-thumb img {
    width: 55% !important;
    /* User requested 55% */
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    aspect-ratio: 3 / 4 !important;
}

/* 2. Ensure thumbnail container has enough height and centering */
.plx-thumb {
    width: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fff;
}

/* 3. General Grids (Latest / Card Grid) - Auto Fill */
.plx-card-grid,
.plx-latest-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
    gap: 20px !important;
    margin-bottom: 30px;
}

/* 4. Trending Grid - Strict 5 Columns */
.plx-trending-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    /* User request: 5x2 */
    gap: 20px !important;
    margin-bottom: 30px;
}

/* Specific Image Size for Trending (60%) */
.plx-trending-grid .plx-thumb img {
    width: 60% !important;
    /* User: "make trnding boxes small to 60%" */
}

/* 5. Archive Grid - Strict 3 Columns Default */
.plx-archive-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    margin-bottom: 30px;
}

/* 6. List View Override */
.plx-archive-grid.plx-list-view {
    grid-template-columns: 1fr !important;
}

.plx-archive-grid.plx-list-view .plx-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    text-align: left;
}

.plx-archive-grid.plx-list-view .plx-thumb {
    width: 200px;
    min-height: auto;
    padding: 10px;
    flex-shrink: 0;
}

.plx-archive-grid.plx-list-view .plx-card-title {
    font-size: 1.25rem;
    margin-bottom: 5px;
}

/* 7. Specs Capsules - Force 2 Columns (not single) */
.pl-specs-grid,
.plx-spec-grid-8,
.plx-spec-grid {
    /* Added .plx-spec-grid */
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
}

/* 8. Fix Blocksy WP Show Posts presets */
.wp-show-posts-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* 9. Override WP 6.9 contain-intrinsic-size bug */
img[sizes="auto"] {
    contain-intrinsic-size: auto !important;
}

/* 10. Seasonal Theme Styles */
body.season-ramadan {
    --primary: #10b981;
    --primary-dark: #059669;
}

body.season-ramadan .pl-header {
    border-top: 5px solid var(--primary);
}

body.season-eid {
    --primary: #06b6d4;
    --primary-dark: #0891b2;
}

body.season-eid .pl-header {
    border-top: 5px solid var(--primary);
}

body.season-pakistan {
    --primary: #166534;
    --primary-dark: #14532d;
}

body.season-pakistan .pl-header {
    border-top: 5px solid var(--primary);
}

body.season-winter {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
}

body.season-winter .pl-header {
    border-top: 5px solid var(--primary);
}

body.season-spring {
    --primary: #ec4899;
    --primary-dark: #be185d;
}

body.season-spring .pl-header {
    border-top: 5px solid var(--primary);
}

body.season-default .pl-header {
    border-top: 5px solid var(--primary);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .plx-trending-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {

    .plx-trending-grid,
    .plx-archive-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .plx-archive-grid.plx-list-view .plx-card {
        flex-direction: column;
        text-align: center;
    }

    .plx-archive-grid.plx-list-view .plx-thumb {
        width: 100%;
    }
}

@media (max-width: 480px) {

    .plx-trending-grid,
    .plx-archive-grid {
        grid-template-columns: 1fr !important;
    }
}
/* =========================================
   UX POLISH & MODERN UI (2025) - ADDED
   ========================================= */

/* Contrast & Card Consistency */
.pl-card, .plx-card, .pl-guide-card, .pl-promo-box {
    background-color: #ffffff;
    color: #111827; /* Dark Gray for text */
    border: 1px solid #e5e7eb; /* Subtle border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.pl-card:hover, .plx-card:hover, .pl-guide-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Typography Hierarchy */
h1, .pl-hero-tagline { font-family: 'Outfit', sans-serif; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-family: 'Outfit', sans-serif; font-weight: 600; letter-spacing: -0.01em; color: #1f2937; }
h3 { font-family: 'Inter', sans-serif; font-weight: 600; color: #374151; }
p, li, a { font-family: 'Inter', sans-serif; line-height: 1.6; }

/* Spacing & Layout */
.pl-section {
    margin-bottom: 80px !important; /* Increased breathing room */
}

.pl-btn {
    font-weight: 500;
    padding: 10px 24px;
    border-radius: 8px;
    letter-spacing: 0.01em;
}

/* Button Consistency */
/* Primary (Solid) */
.pl-btn-primary {
    background-color: var(--primary, #2563eb);
    color: white;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.3);
}
/* Secondary (Ghost) */
.pl-btn-secondary {
    background: transparent;
    border: 2px solid var(--primary, #2563eb);
    color: var(--primary, #2563eb);
}


/* --- NEW COMPARISON TABLE (Server-Side) --- */
.pl-compare-table th, .pl-compare-table td {
    border-right: 1px solid #e5e7eb;
}
.pl-compare-table th:last-child, .pl-compare-table td:last-child {
    border-right: none;
}
.pl-compare-page.show-diffs .pl-diff-row td:not(:first-child) {
    background-color: #fee2e2;
}
.pl-compare-page.show-diffs .pl-diff-row td:first-child {
    background-color: #fef2f2;
    color: #991b1b;
}

/* Floating Compare Widget (Optional) */
.pl-compare-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    z-index: 999;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}
.pl-compare-float:hover {
    transform: translateY(-2px);
    color: white; 
}

