/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    color: #0f1111;
    line-height: 1.5;
}

/* Header */
.header {
    background: #232f3e;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}
.logo span { color: #f0ad00; }

/* Search */
.header-search {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
    display: flex;
}
.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}
.search-btn {
    background: #f0ad00;
    color: #0f1111;
    border: none;
    padding: 10px 20px;
    border-radius: 0 4px 4px 0;
    font-weight: 600;
    cursor: pointer;
}
.search-btn:hover {
    background: #e09d00;
}

/* Navigation */
.main-nav {
    background: #37475a;
}
.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    overflow-x: auto;
}
.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 12px 18px;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.2s;
}
.main-nav a:hover {
    background: #485769;
}
.main-nav .nav-all {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    font-weight: 600;
    margin-left: auto;
}
.main-nav .nav-all:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 25px 15px 15px;
    text-align: center;
}
.page-header h1 {
    font-size: 26px;
    margin-bottom: 6px;
}
.page-header .subtitle {
    color: #aaa;
    font-size: 13px;
}

/* Disclosure */
.disclosure-bar {
    background: #fff9e6;
    padding: 6px 15px;
    font-size: 11px;
    color: #856404;
    text-align: center;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

/* Page Layout */
.page-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 30px;
}

/* Products List */
.products-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: 80px 280px 1fr auto;
    transition: box-shadow 0.2s;
}
.product-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Rank */
.product-rank {
    background: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border-right: 1px solid #eee;
}
.rank-number {
    font-size: 28px;
    font-weight: 700;
    color: #0f1111;
}
.rank-label {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
}

/* Gold #1 */
.product-card[data-rank="1"] .product-rank {
    background: linear-gradient(135deg, #f0ad00 0%, #e09d00 100%);
}
.product-card[data-rank="1"] .rank-number,
.product-card[data-rank="1"] .rank-label {
    color: #fff;
}

/* Silver #2 */
.product-card[data-rank="2"] .product-rank {
    background: #c0c0c0;
}
.product-card[data-rank="2"] .rank-number,
.product-card[data-rank="2"] .rank-label {
    color: #333;
}

/* Bronze #3 */
.product-card[data-rank="3"] .product-rank {
    background: #cd7f32;
}
.product-card[data-rank="3"] .rank-number,
.product-card[data-rank="3"] .rank-label {
    color: #fff;
}

/* Product Image */
.product-image {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
}
.product-image img {
    max-width: 200px;
    max-height: 180px;
    object-fit: contain;
}
.best-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2e7d32;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Product Info */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.product-brand {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.product-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f1111;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Features/Pros list */
.product-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}
.product-features li {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 6px;
    padding-left: 20px;
    position: relative;
    color: #333;
}
.product-features li::before {
    content: "✔";
    color: #ffb700;
    position: absolute;
    left: 0;
    font-weight: 700;
}
.read-more-link {
    font-size: 13px;
    font-weight: 600;
    color: #0066c0;
    cursor: pointer;
    text-decoration: none;
}
.read-more-link:hover {
    text-decoration: underline;
}

/* Rating - Big score box like old site */
.product-rating {
    background: #fff9e6;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.rating-score {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    line-height: 1;
}
.rating-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

/* Badges */
.product-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.badge-discount {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.badge-shipping {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Actions */
.product-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-left: 1px solid #eee;
    min-width: 200px;
}
.product-price {
    text-align: center;
}
.price-current {
    font-size: 24px;
    font-weight: 700;
    color: #b12704;
}
.price-old {
    font-size: 14px;
    color: #888;
    text-decoration: line-through;
}
.btn-deal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffb700;
    color: #000;
    padding: 14px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 3px 0 #cc9500;
    transition: all 0.2s;
    white-space: nowrap;
    min-width: 160px;
}
.btn-deal:hover {
    background: #e6a400;
    transform: translateY(-1px);
}
.amazon-note {
    font-size: 11px;
    color: #666;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
}
.sidebar-widget {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.sidebar-widget h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #0f1111;
}
.category-list {
    list-style: none;
    max-height: 400px;
    overflow-y: auto;
}
.category-list li {
    margin-bottom: 8px;
}
.category-list a {
    color: #0066c0;
    text-decoration: none;
    font-size: 13px;
}
.category-list a:hover {
    text-decoration: underline;
}
.category-list a.active {
    font-weight: 600;
    color: #0f1111;
}

/* Footer */
.site-footer {
    background: #232f3e;
    color: #fff;
    padding: 40px 20px;
    margin-top: 50px;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.footer-inner p {
    color: #aaa;
    font-size: 13px;
    margin: 5px 0;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Mobile */
@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Header - centered logo */
    .header {
        padding: 10px 15px;
    }
    .header-inner {
        justify-content: center;
    }
    .logo {
        font-size: 22px;
    }
    .header-search {
        display: none;
    }

    /* Nav - horizontal scroll */
    .main-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-inner {
        min-width: max-content;
        padding: 0 10px;
    }
    .main-nav a {
        padding: 8px 10px;
        font-size: 12px;
    }

    /* Page header - compact */
    .page-header {
        padding: 12px 10px 8px;
    }
    .page-header h1 {
        font-size: 18px;
        margin-bottom: 3px;
    }
    .page-header .subtitle {
        font-size: 11px;
    }
    .disclosure-bar {
        padding: 4px 10px;
        font-size: 10px;
    }
    .container {
        padding: 10px;
    }
    .products-list {
        gap: 12px;
    }

    /* Product cards - compact */
    .product-card {
        grid-template-columns: 1fr;
        border-radius: 8px;
    }
    .product-rank {
        flex-direction: row;
        gap: 8px;
        padding: 8px 12px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .rank-number {
        font-size: 20px;
    }
    .rank-label {
        font-size: 10px;
    }
    .product-image {
        padding: 10px;
    }
    .product-image img {
        max-height: 130px;
    }
    .best-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
    .product-info {
        padding: 10px 12px;
    }
    .product-brand {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .product-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .product-features {
        margin-bottom: 8px;
    }
    .product-features li {
        font-size: 12px;
        margin-bottom: 4px;
        padding-left: 18px;
    }

    /* Rating - big box on mobile too */
    .product-rating {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    .rating-score {
        font-size: 24px;
    }
    .rating-label {
        font-size: 12px;
    }

    .product-badges {
        gap: 6px;
    }
    .badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* Actions - stacked with full-width button */
    .product-actions {
        padding: 12px;
        border-left: none;
        border-top: 1px solid #eee;
        flex-direction: column;
        gap: 8px;
    }
    .product-price {
        text-align: center;
    }
    .price-current {
        font-size: 22px;
    }
    .price-old {
        font-size: 12px;
    }
    .btn-deal {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
    }
    .amazon-note {
        font-size: 10px;
    }
}
