@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

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

:root {
    --red: #ff0033;
    --red-dark: #cc0029;
    --black: #0a0a0a;
    --white: #ffffff;
    --gray-50: #f8f8f8;
    --gray-100: #f0f0f0;
    --gray-200: #e0e0e0;
    --gray-400: #a3a3a3;
    --gray-600: #525252;
    --gray-900: #171717;
    --accent: #ff0033;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 50%, #f0f0f0 100%);
    background-attachment: fixed;
    color: var(--black);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* HEADER */
header {
    background: var(--black);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 50%, rgba(255, 0, 51, 0.12) 0%, transparent 55%),
        radial-gradient(circle at 90% 50%, rgba(255, 0, 51, 0.07) 0%, transparent 55%);
    pointer-events: none;
}

.header-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
}

.header-main {
    display: flex;
    align-items: center;
    gap: 36px;
    padding: 44px 24px 52px;
    position: relative;
}

.header-icon {
    width: clamp(80px, 10vw, 130px);
    height: clamp(80px, 10vw, 130px);
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 24px rgba(255, 0, 51, 0.35));
}

.header-text h1 {
    font-size: clamp(3.5rem, 9vw, 8rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.85;
    color: var(--white);
    text-shadow: 0 0 60px rgba(255, 0, 51, 0.25);
}

.header-text .tagline {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-400);
    margin-top: 14px;
    letter-spacing: -0.01em;
}

/* TICKER */
.ticker-wrapper {
    display: flex;
    align-items: stretch;
    background: var(--black);
    overflow: hidden;
}

.ticker-label {
    flex-shrink: 0;
    background: var(--red);
    color: var(--white);
    padding: 12px 24px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
}

.ticker {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-content {
    display: flex;
    gap: 80px;
    padding: 12px 0;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.ticker-item .name {
    font-weight: 600;
}

.ticker-item .price {
    color: var(--red);
    font-weight: 700;
}

.ticker-item .category {
    color: var(--gray-400);
    font-weight: 500;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.ticker:hover .ticker-content {
    animation-play-state: paused;
}

/* CONTROLS */
.controls {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 40px 0;
    border-bottom: none;
    background: var(--white);
    margin: -20px -24px 0;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-top: 40px;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab {
    padding: 10px 20px;
    border: 2px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border-radius: 8px;
}

.tab:hover {
    border-color: var(--black);
    color: var(--black);
    background: var(--gray-50);
}

.tab.active {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-control label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-600);
}

.sort-control select {
    padding: 10px 16px;
    border: 2px solid var(--gray-200);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--white);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.sort-control select:hover {
    border-color: var(--gray-400);
}

.sort-control select:focus {
    outline: none;
    border-color: var(--black);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* PRODUCTS GRID */
main {
    padding-bottom: 80px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    background: transparent;
    margin-top: 40px;
    border: none;
}

/* PRODUCT CARD */
.product-card {
    background: var(--white);
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.2s ease;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--red) 0%, var(--red-dark) 100%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.product-card:hover {
    background: var(--white);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.06);
}

.product-card:hover::before {
    opacity: 1;
}

.product-image-wrap {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin: -32px -32px 24px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    mix-blend-mode: multiply;
}

/* RATING */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: 0.8rem;
}

.product-rating .stars {
    color: #f59e0b;
    letter-spacing: -1px;
    font-size: 0.85rem;
}

.product-rating .rating-value {
    font-weight: 700;
    color: var(--gray-600);
}

.product-rating .rating-count {
    color: var(--gray-400);
    font-weight: 400;
}

/* BEST VALUE BADGE */
.badge-bestvalue {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--red);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    padding: 4px 10px;
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 0, 51, 0.35);
}

.product-card--best {
    border-color: rgba(255, 0, 51, 0.2);
}

.product-card--best::before {
    opacity: 1;
}

.product-info {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-category {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 8px;
}

.product-name {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
    color: var(--black);
}

.product-store {
    font-size: 0.875rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 24px;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 16px;
    margin-bottom: 16px;
    margin-top: auto;
}

.price-main {
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--black);
}

.price-serving {
    display: flex;
    flex-direction: column;
}

.price-serving-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--red);
}

.price-serving-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-details {
    display: flex;
    gap: 24px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 24px;
}

.buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--black) 0%, #1a1a1a 100%);
    color: var(--white);
    text-decoration: none;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: none;
    transition: all 0.2s ease;
    align-self: flex-start;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.buy-button:hover {
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 0, 51, 0.3);
}

.buy-button--disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    box-shadow: none;
    cursor: default;
    pointer-events: none;
}

/* LOADING & NO RESULTS */
.loading,
.no-results {
    text-align: center;
    padding: 80px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-400);
    display: none;
}

.loading.show,
.no-results.show {
    display: block;
}

/* ── HOMEPAGE SECTIONS ───────────────────────────────── */

.home-section {
    padding: 56px 0;
    border-bottom: 1px solid var(--gray-100);
}

.home-section:last-child {
    border-bottom: none;
}

.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 16px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--black);
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--gray-400);
    font-weight: 500;
    margin-top: 4px;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--red);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.section-link:hover {
    text-decoration: underline;
}

/* ── ARTICLE CARDS ───────────────────────────────────── */

.article-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 12px 12px 0 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.article-card {
    background: var(--white);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.1);
}

.article-card-inner {
    padding: 28px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-category {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 10px;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--black);
    margin-bottom: 12px;
}

.article-summary {
    font-size: 0.875rem;
    color: var(--gray-600);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 20px;
}

.article-meta {
    font-size: 0.75rem;
    color: var(--gray-400);
    font-weight: 500;
}

/* ── PICKS GRID ──────────────────────────────────────── */

.picks-section .section-header {
    flex-direction: column;
    align-items: flex-start;
}

.picks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.pick-card {
    background: var(--white);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.pick-image-wrap {
    background: var(--gray-50);
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--gray-100);
}

.pick-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    mix-blend-mode: multiply;
}

.pick-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.pick-category {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--red);
}

.pick-name {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--black);
    margin-bottom: 4px;
}

.pick-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.pick-stars {
    font-size: 0.75rem;
    color: #f59e0b;
    font-weight: 700;
}

.pick-price {
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--black);
}

.pick-cta {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--red);
    margin-top: auto;
}

/* ── TICKER (homepage variant) ───────────────────────── */

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-size: 0.875rem;
    flex-shrink: 0;
    text-decoration: none;
}

.ticker-item .category {
    background: rgba(255,255,255,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gray-400);
}

.ticker-item .name {
    font-weight: 600;
    color: var(--white);
}

/* ── FOOTER */
footer {
    background: var(--black);
    padding: 40px 0;
    text-align: center;
    border-top: none;
    margin-top: 40px;
}

footer .disclosure {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-bottom: 8px;
}

footer .copyright {
    font-size: 0.75rem;
    color: var(--gray-600);
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 640px) {
    header {
        padding: 48px 0 40px;
    }

    header h1 {
        font-size: 3rem;
    }

    header .tagline {
        font-size: 1rem;
    }

    .ticker-label {
        padding: 12px 16px;
        font-size: 0.7rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-card {
        padding: 24px;
    }

    .product-image-wrap {
        margin: -24px -24px 20px;
    }

    .product-name {
        font-size: 1.5rem;
    }

    .price-main {
        font-size: 2rem;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .tab {
        flex-shrink: 0;
    }
}
