/* ===========================
   NEW UI REDESIGN STYLES
   SEO & Google Ads Optimized
   =========================== */

/* ===== HOMEPAGE STYLES ===== */

.hero-home {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-home h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.quick-search-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-primary);
}

.quick-search-card h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.quick-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-cta {
    color: var(--primary-color);
    font-weight: 600;
}

/* Trust Signals */
.trust-signals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.trust-item {
    text-align: center;
}

.trust-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trust-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.trust-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== BREADCRUMBS ===== */

.breadcrumbs-container {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb-list li {
    display: flex;
    align-items: center;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb-list a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-list a:hover {
    text-decoration: underline;
}

.breadcrumb-list li:last-child span {
    color: var(--text-secondary);
}

/* ===== COMPARISON TABLE (HERO FEATURE) ===== */

.comparison-header {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.comparison-header h1 {
    margin-bottom: 1rem;
}

.comparison-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.comparison-table-wrapper {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.comparison-table thead th {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem 1rem;
    font-weight: 600;
    text-align: left;
}

.comparison-table .feature-column {
    background: var(--bg-secondary);
    font-weight: 600;
    position: sticky;
    left: 0;
    z-index: 1;
}

.comparison-table .product-column {
    min-width: 200px;
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody td {
    padding: 1rem;
}

.comparison-table .product-header {
    text-align: center;
}

.comparison-table .lender-logo-small {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.comparison-table .product-name-header {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.best-value {
    color: var(--success-color);
    font-weight: 700;
}

.payment-highlight {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.calculator-row {
    background: var(--bg-tertiary);
}

.actions-row td {
    padding: 1.5rem 1rem;
}

.actions-row .btn {
    display: block;
    width: 100%;
    margin-bottom: 0.5rem;
}

.add-product-section {
    text-align: center;
    margin: 2rem 0;
}

/* Recommendation Box */
.recommendation-box {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.recommendation-box h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.recommendation-reasons ul {
    list-style: none;
    padding: 0;
}

.recommendation-reasons li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recommendation-reasons i {
    color: var(--success-color);
}

/* ===== PRODUCT SELECTION (CHECKBOXES) ===== */

.product-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.loans-table tr.selected {
    background: rgba(37, 99, 235, 0.05);
    border-left: 3px solid var(--primary-color);
}

.compare-button-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.compare-button-container .btn {
    box-shadow: var(--shadow-lg);
}

/* ===== CATEGORY PAGE ===== */

.category-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.category-header h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.category-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.seo-content {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.seo-text h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.seo-text ul,
.seo-text ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.seo-text li {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.faq-question {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-answer {
    color: var(--text-primary);
    line-height: 1.7;
}

/* ===== PRODUCT DETAIL PAGE ===== */

.product-header {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.product-header-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    align-items: center;
}

.product-info h1 {
    margin-bottom: 0.5rem;
}

.lender-name {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.stat-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-card h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.product-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.product-main {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.detail-table tr {
    border-bottom: 1px solid var(--border-color);
}

.detail-table td {
    padding: 1rem;
}

.detail-table td:first-child {
    color: var(--text-secondary);
}

.product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.calculator-widget {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.calculator-widget h3 {
    margin-bottom: 1rem;
}

.calc-result {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-align: center;
}

.calc-result h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-card h4 {
    margin-bottom: 0.5rem;
}

.product-card-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== GOOGLE ADS PLACEHOLDERS ===== */

.ad-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.ad-placeholder {
    background: var(--bg-tertiary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    position: relative;
}

.ad-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.ad-content {
    color: var(--text-light);
    font-size: 1.25rem;
}

.ad-sticky-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    border-top: 1px solid var(--border-color);
    padding: 1rem;
    text-align: center;
}

/* ===== FOOTER ===== */

.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
}

.footer-disclaimer {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .hero-home h1 {
        font-size: 1.75rem;
    }

    .quick-search-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .comparison-header {
        padding: 1rem 0;
    }

    .comparison-actions {
        flex-wrap: wrap;
    }

    .comparison-table .product-column {
        min-width: 150px;
    }

    .product-header-grid {
        grid-template-columns: 1fr;
    }

    .product-details-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .compare-button-container {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .compare-button-container .btn {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== LOADING & UTILITY CLASSES ===== */

.loading-screen {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-screen i {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.bg-light {
    background: var(--bg-secondary);
}

.text-center {
    text-align: center;
}

.not-found {
    padding: 4rem 2rem;
}

.not-found i {
    font-size: 4rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.not-found h1 {
    margin-bottom: 1rem;
}

.related-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.related-links a {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--primary-color);
    transition: background 0.2s;
}

.related-links a:hover {
    background: var(--border-color);
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        box-shadow: var(--shadow-lg);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
}
