@charset "UTF-8";
:root {
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent-blue: #2567be;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-green-hover: #15803d;
    --save-green: #16a34a;
    --badge-bg: #eff6ff;
    --badge-text: #1d4ed8;
    --badge-border: #bfdbfe;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-stack);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.main-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

/* Header Section */
.deals-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 24px;
}

.deals-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 6px;
}

.deals-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.deals-last-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.affiliate-disclosure {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 18px;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.search-wrap {
    position: relative;
    flex: 1 1 200px;
    min-width: 180px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-search {
    width: 100%;
    height: 36px;
    padding: 0 10px 0 32px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.15s ease;
}

.input-search:focus {
    border-color: var(--accent-blue);
}

.select-filter {
    height: 36px;
    padding: 0 10px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.select-filter:focus {
    border-color: var(--accent-blue);
}

.counter-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0 8px;
    margin-left: auto;
    white-space: nowrap;
}

/* Table Architecture (Single DOM) */
.deals-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.deals-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.deals-thead th {
    background: #f1f5f9;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    border-bottom: 2px solid var(--border-color);
}

.th-product { width: 440px; }
.th-specs { width: 340px; }
.th-price { width: 260px; text-align: right; }

.deal-tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.1s ease;
}

.deal-tr:hover {
    background: #f8fafc;
}

.td-product,
.td-specs,
.td-price {
    padding: 14px;
    vertical-align: middle;
}

/* Column 1: Product Cell */
.product-cell-flex {
    display: flex;
    gap: 14px;
    align-items: center;
}

.prod-img-box {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
}

.prod-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.prod-info {
    flex: 1;
    min-width: 0;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--badge-bg);
    color: var(--badge-text);
    border: 1px solid var(--badge-border);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 9999px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-pill svg {
    width: 12px;
    height: 12px;
}

.prod-title-link {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 4px;
    transition: color 0.15s ease;
}

.prod-title-link:hover {
    color: var(--accent-blue);
}

.prod-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Column 2: Specs Cell */
.specs-column {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.spec-line {
    font-size: 12px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.spec-key {
    font-weight: 600;
    color: var(--text-primary);
}

.spec-val {
    color: var(--text-secondary);
}

.spec-val-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    line-height: 1.4;
    text-align: left;
}

.spec-val-btn:hover {
    background: #e2e8f0;
    border-color: #2567be;
    color: #1d4ed8;
}

.spec-val-btn.active {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    border-color: #1e40af !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(29, 78, 216, 0.35);
}

.spec-val-btn .filter-pill-icon {
    opacity: 0.5;
    transition: transform 0.15s ease;
}

.spec-val-btn:hover .filter-pill-icon {
    opacity: 1;
    stroke: #1d4ed8;
    transform: scale(1.15);
}

.spec-val-btn.active .filter-pill-icon {
    opacity: 1;
    stroke: #ffffff !important;
}

.spec-val-btn.disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

.active-spec-banner {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 8px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #1e3a8a;
    animation: fadeIn 0.15s ease;
}

.active-spec-banner.active {
    display: flex;
}

.active-spec-banner-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.active-spec-title {
    font-weight: 600;
    color: #1e3a8a;
    font-size: 13px;
}

.active-spec-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.active-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1d4ed8;
    color: #ffffff;
    padding: 3px 6px 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(29, 78, 216, 0.25);
}

.active-chip strong {
    font-weight: 700;
    color: #ffffff;
}

.chip-remove {
    background: rgba(255, 255, 255, 0.25);
    border: none;
    color: #ffffff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: background 0.15s ease;
}

.chip-remove:hover {
    background: rgba(255, 255, 255, 0.45);
}

.active-spec-badge-val {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #1d4ed8;
    color: #ffffff;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.active-spec-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    font-weight: 600;
    font-size: 12px;
    font-family: inherit;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.active-spec-reset-btn:hover {
    background: #fecaca;
    border-color: #ef4444;
}

.spec-filter-clear-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.spec-filter-clear-badge:hover {
    background: #fee2e2;
    border-color: #f87171;
}

/* Mobile Filter Toggle Button (Hidden on Desktop) */
.mobile-filter-btn {
    display: none;
}

.filter-dropdowns-group {
    display: contents;
}

/* Column 3: Price Cell */
.price-column {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
}

.price-main {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.price-merchant {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.price-save {
    font-size: 12px;
    font-weight: 700;
    color: var(--save-green);
}

.price-was {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.btn-view-deal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-green);
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 700;
    height: 38px;
    padding: 0 18px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    margin-top: 6px;
    transition: background 0.15s ease;
}

.btn-view-deal:hover {
    background: var(--accent-green-hover);
}

/* Mobile View: Transform table to clean Single-DOM cards (screen <= 768px) */
@media (max-width: 768px) {
    /* Mobile Filter Bar & Drawer */
    .filters-bar {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        padding: 10px;
    }
    .search-wrap {
        flex: none;
        width: 100%;
        min-width: 0;
        height: auto;
    }
    .input-search {
        height: 40px;
    }
    .mobile-filter-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        height: 40px;
        background: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        color: #1e293b;
        cursor: pointer;
        font-family: inherit;
        transition: all 0.15s ease;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }
    .mobile-filter-btn:hover {
        background: #f8fafc;
        border-color: #94a3b8;
    }
    .mobile-filter-btn.open {
        background: #eff6ff;
        border-color: #2563eb;
        color: #1d4ed8;
    }
    .mobile-filter-btn .mobile-filter-caret {
        transition: transform 0.2s ease;
    }
    .mobile-filter-btn.open .mobile-filter-caret {
        transform: rotate(180deg);
    }
    .mobile-filter-badge {
        background: #1d4ed8;
        color: #ffffff;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 7px;
        border-radius: 10px;
        line-height: 1;
    }
    .filter-dropdowns-group {
        display: none;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
        animation: fadeIn 0.15s ease;
    }
    .filter-dropdowns-group.open {
        display: grid !important;
    }
    .filter-dropdowns-group #sort-select {
        grid-column: span 2;
    }
    .filter-dropdowns-group .select-filter {
        width: 100%;
        height: 38px;
    }

    /* Mobile Catalog Cards */
    .deals-thead {
        display: none;
    }
    .deals-table,
    .deals-table tbody {
        display: block;
        width: 100%;
    }
    .deal-tr {
        display: flex;
        flex-direction: column;
        background: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: 10px;
        margin-bottom: 16px;
        padding: 14px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .deal-tr:hover {
        background: #ffffff;
    }
    .td-product,
    .td-specs,
    .td-price {
        display: block;
        width: 100%;
        padding: 0;
        border: none;
    }

    /* Product cell: Full width image on top, title & snippet below */
    .product-cell-flex {
        display: flex;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        margin-bottom: 12px;
    }
    .prod-img-box {
        width: 100%;
        height: 220px;
        max-width: 100%;
        background: #f8fafc;
        border: 1px solid #f1f5f9;
        border-radius: 8px;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        overflow: hidden;
    }
    .prod-img-box img {
        width: 100%;
        height: 100%;
        max-height: 195px;
        object-fit: contain;
    }
    .prod-info {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    .badge-pill {
        align-self: flex-start;
        margin-bottom: 4px;
    }
    .prod-title-link {
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
        color: var(--text-primary);
    }
    .prod-snippet {
        font-size: 13px;
        line-height: 1.45;
        color: var(--text-secondary);
        margin-top: 2px;
    }

    /* Specs & Price on mobile */
    .td-specs {
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
        margin-bottom: 12px;
    }
    .td-price {
        border-top: 1px solid #f1f5f9;
        padding-top: 12px;
    }
    .price-column {
        display: flex;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 8px;
    }
    .price-main {
        font-size: 20px;
        font-weight: 800;
    }
    .btn-view-deal {
        width: 100%;
        height: 44px;
        font-size: 15px;
        font-weight: 700;
        border-radius: 8px;
        margin-top: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .counter-badge {
        margin-left: 0;
        width: 100%;
        text-align: center;
        margin-top: 4px;
    }
}

/* ==========================================================================
   Modern Polished Pagination
   ========================================================================== */
.pagination-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 24px 0 8px;
    margin-top: 24px;
    border-top: 1px solid var(--border-color, #e2e8f0);
    flex-wrap: wrap;
    font-family: inherit;
}

.pagination-bar .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-primary, #334155);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.pagination-bar a.page-link:hover {
    background: #f8fafc;
    border-color: var(--primary-color, #2563eb);
    color: var(--primary-color, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    text-decoration: none !important;
}

.pagination-bar .page-link.active {
    background: var(--primary-color, #2563eb);
    color: #ffffff !important;
    border-color: var(--primary-color, #2563eb);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
    cursor: default;
    font-weight: 700;
    transform: none;
}

.pagination-bar .prev-link,
.pagination-bar .next-link {
    padding: 0 18px;
    font-weight: 600;
    color: var(--text-primary, #1e293b);
}

.pagination-bar a.prev-link:hover,
.pagination-bar a.next-link:hover {
    color: var(--primary-color, #2563eb);
    border-color: var(--primary-color, #2563eb);
    background: #eff6ff;
}

@media (max-width: 640px) {
    .pagination-bar {
        gap: 6px;
        padding: 16px 0 4px;
        margin-top: 16px;
    }
    .pagination-bar .page-link {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 6px;
    }
    .pagination-bar .prev-link,
    .pagination-bar .next-link {
        padding: 0 12px;
    }
}

/* SEO Bottom Section */
.seo-bottom-section {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px 28px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.seo-bottom-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

.seo-bottom-text {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.seo-bottom-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 22px 0 8px;
}

.seo-bottom-text p {
    margin-bottom: 14px;
}

.seo-bottom-text strong {
    color: var(--text-primary);
}

/* FAQ Accordion Section */
.faq-container {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.faq-section-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px 16px;
    transition: background 0.15s ease;
}

.faq-item[open] {
    background: #ffffff;
    border-color: #cbd5e1;
}

.faq-question {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: "+";
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
}

.faq-item[open] .faq-question::after {
    content: "−";
}

.faq-answer {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* E-E-A-T Footer & Trust Navigation */
.site-footer {
    text-align: center;
    padding: 24px 0 12px;
    color: var(--text-muted);
    font-size: 12px;
}

.footer-trust-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.footer-link-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.15s ease;
}

.footer-link-btn:hover {
    color: var(--accent-blue);
}

.footer-sep {
    color: var(--text-muted);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* Trust Modal Dialogs */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: #ffffff;
    border-radius: 12px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 26px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.modal-body h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.modal-body p {
    margin-bottom: 12px;
}

.modal-body ul {
    margin: 0 0 12px 20px;
}

.modal-body li {
    margin-bottom: 6px;
}
