/* ==========================================================================
   pulse — Modern Pulsing Energy
   Vibrant gradients, large rounded corners, discount bubbles, lively animations.
   Design language: energetic, conversion-focused, contemporary. Inter body + Sora headings.
   Optimized for affiliate marketing platforms across all content categories.
   ========================================================================== */

/* NOTE: --primary/--primary-rgb/--primary-dark/--primary-light come from the
   inline color scheme in base_frontend.html. Do NOT override them here. */
:root {
    --bg: #f5f7fb;
    --text: #1a1d29;
    --text-light: #5a6275;
    --text-muted: #8a92a8;
    --border: #e4e8f0;
    --card-bg: #fff;
    --accent: #ff4757;
    --ink: #1a1d29;
    --gold: #ffa502;
    --shadow-sm: 0 2px 8px rgba(20, 30, 60, .06);
    --shadow-md: 0 8px 24px rgba(20, 30, 60, .1);
    --shadow-lg: 0 16px 48px rgba(20, 30, 60, .14);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --font-sans: 'Inter', 'Noto Sans SC', -apple-system, sans-serif;
    --font-heading: 'Sora', 'Noto Sans SC', sans-serif;
    --glow-primary: 0 0 24px color-mix(in srgb, var(--primary) 35%, transparent);
    --glow-accent: 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent);
    --hero-bg: linear-gradient(135deg, #1a1d29 0%, #2d3561 40%, #1a1d29 100%);
    --hero-text: #fff;
    --hero-subtext: rgba(255, 255, 255, .7);
    --footer-bg: #1a1d29;
    --footer-text: rgba(255, 255, 255, .6);
    --footer-link: rgba(255, 255, 255, .5);
    --footer-heading: #fff;
    --footer-border: rgba(255, 255, 255, .08);
    --footer-bottom-text: rgba(255, 255, 255, .35);
    --header-bg: color-mix(in srgb, var(--card-bg) 90%, transparent);
}

/* === Fluid Typography === */
.hero h1 {
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.15;
}

.hero p {
    font-size: clamp(.9rem, 2vw, 1.05rem);
}

.section-header h2 {
    font-size: clamp(1.1rem, 2.8vw, 1.4rem);
    font-weight: 700;
}

/* === Hero: gradient mesh overlay === */
.hero::before {
    background: radial-gradient(circle at 70% 30%, color-mix(in srgb, var(--primary) 15%, transparent) 0%, transparent 50%),
                radial-gradient(circle at 30% 70%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 50%);
}

/* === Deal Cards: lively hover with gradient border glow === */
.deal-card {
    border-radius: var(--radius-md);
    transition: transform .4s var(--ease-spring), box-shadow .4s var(--ease-out), border-color .4s var(--ease-out);
    will-change: transform;
    overflow: hidden;
}
.deal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-md);
    padding: 2px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity .35s var(--ease-out);
    pointer-events: none;
    z-index: 1;
}
.deal-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 20px 40px rgba(20, 30, 60, .12), 0 8px 16px rgba(20, 30, 60, .06);
}
.deal-card:hover::before {
    opacity: 1;
}
.deal-card:active {
    transform: translateY(-2px) scale(.99);
    transition-duration: .1s;
}

/* === Deal card image: zoom + gradient tint === */
.deal-card-img {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 8%, var(--bg)), color-mix(in srgb, var(--accent) 4%, var(--bg)));
}
.deal-card:hover .deal-card-img img {
    transform: scale(1.15) rotate(1deg);
}

/* === Hero CTA: pulsing glow button === */
.hero-cta-btn {
    border-radius: var(--radius-sm);
    font-weight: 700;
    letter-spacing: -.01em;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 35%, transparent);
    transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
    animation: pulseGlow 2.5s ease-in-out infinite;
}
.hero-cta-btn:hover {
    box-shadow: 0 8px 32px color-mix(in srgb, var(--primary) 45%, transparent), var(--glow-primary);
    transform: translateY(-2px);
    animation-play-state: paused;
}
.hero-cta-btn:active {
    transform: translateY(0) scale(.98);
    transition-duration: .1s;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 4px 20px color-mix(in srgb, var(--primary) 30%, transparent); }
    50% { box-shadow: 0 4px 32px color-mix(in srgb, var(--primary) 50%, transparent); }
}

/* === Section header: gradient accent bar === */
.section-header {
    position: relative;
}
.section-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 3px;
}

/* === Category pills: gradient active state === */
.cat-pill {
    border-radius: 24px;
    transition: all .3s var(--ease-spring);
}
.cat-pill:hover,
.cat-pill.active {
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 80%, var(--accent)));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 30%, transparent);
    transform: translateY(-2px);
}

/* === Pagination: gradient active === */
.pagination .active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}
.pagination a {
    transition: all .25s var(--ease-spring);
    border-radius: var(--radius-sm);
}
.pagination a:hover:not(.active) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* === Deal CTA card: vibrant pill === */
.deal-cta-card {
    border-radius: 28px;
    background: linear-gradient(135deg, var(--ink), color-mix(in srgb, var(--ink) 85%, var(--primary)));
    transition: transform .25s var(--ease-spring), box-shadow .25s var(--ease-out);
}
.deal-cta-card:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--ink) 25%, transparent);
}

/* === Deal badge: pulsing accent === */
.deal-badge {
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000));
    box-shadow: 0 2px 12px color-mix(in srgb, var(--accent) 40%, transparent);
    border-radius: 8px;
}

/* === Hero stats: gradient numbers === */
.hero-stat .num {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Sidebar cards: rounded with subtle lift === */
.sidebar-card {
    border-radius: var(--radius-md);
    transition: box-shadow .3s var(--ease-out);
}
.sidebar-card:hover {
    box-shadow: var(--shadow-md);
}

/* === Article links: gradient underline === */
.article-content a {
    transition: color .2s var(--ease-out);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
}
.article-content a:hover {
    color: var(--primary);
    text-decoration-color: var(--primary);
}

/* === Focus ring === */
:focus-visible {
    outline-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* === Scrollbar: gradient thumb === */
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-dark), var(--primary));
}

/* === Mobile bottom nav: gradient active === */
.mobile-bottom-nav .active {
    color: var(--primary);
    box-shadow: 0 -2px 12px color-mix(in srgb, var(--primary) 20%, transparent);
}

/* === Trust bar: gradient icons === */
.trust-bar i {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === Brand items: gradient hover border === */
.brand-item:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--primary) 12%, transparent);
}
.brand-item:hover img {
    transform: scale(1.1) rotate(2deg);
}

/* === Breadcrumb === */
.breadcrumb a:hover {
    color: var(--primary);
}

/* ==========================================================================
   MOBILE RESPONSIVE — Pulse Theme
   ========================================================================== */

/* === Tablet (<= 768px) === */
@media (max-width: 768px) {
    .hero {
        padding: 28px 20px;
        border-radius: var(--radius-md);
        margin-bottom: 24px;
    }
    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    .hero p {
        font-size: .88rem;
        margin-bottom: 18px;
    }
    .hero-cta-btn {
        padding: 12px 26px;
        font-size: .9rem;
        border-radius: 14px;
        animation: none; /* Save battery on mobile */
    }
    .hero-stats {
        gap: 20px;
    }
    .hero-stat .num {
        font-size: 1.4rem;
    }
    .hero-stat .label {
        font-size: .72rem;
    }

    .section-header h2 {
        font-size: 1.1rem;
    }
    .section-header::after {
        width: 50px;
        height: 2px;
    }

    .deal-card {
        border-radius: 14px;
    }
    .deal-card::before {
        border-radius: 14px;
    }
    .deal-card:hover {
        transform: translateY(-3px); /* Less aggressive on touch */
        box-shadow: 0 12px 24px rgba(20, 30, 60, .1);
    }
    .deal-card:hover::before {
        opacity: 0; /* Hide gradient border on touch */
    }
    .deal-card-img {
        border-radius: 14px 14px 0 0;
        height: 100px;
    }

    .deal-cta-card {
        border-radius: 22px;
        padding: 10px 0;
        font-size: .74rem;
    }

    .cat-pill {
        padding: 6px 14px;
        font-size: .76rem;
        border-radius: 20px;
    }
    .cat-pill:hover,
    .cat-pill.active {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 25%, transparent);
    }

    .pagination a,
    .pagination span {
        width: 36px;
        height: 36px;
        font-size: .78rem;
        border-radius: 10px;
    }
    .pagination a:hover:not(.active) {
        transform: translateY(-1px);
    }

    .sidebar-card {
        border-radius: 14px;
    }

    .section-header {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .brand-item {
        border-radius: 12px;
    }
    .brand-item:hover {
        transform: translateY(-2px);
    }
}

/* === Phone (<= 480px) === */
@media (max-width: 480px) {
    .hero {
        padding: 22px 16px;
        border-radius: 16px;
    }
    .hero h1 {
        font-size: 1.3rem;
        letter-spacing: -.02em;
    }
    .hero p {
        font-size: .82rem;
        line-height: 1.5;
    }
    .hero-cta-btn {
        padding: 11px 22px;
        font-size: .85rem;
        width: 100%;
        justify-content: center;
    }
    .hero-stats {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-stat .num {
        font-size: 1.2rem;
    }
    .hero-stat .label {
        font-size: .68rem;
    }

    .section-header h2 {
        font-size: 1rem;
    }
    .section-header::after {
        width: 40px;
    }
    .section-header a {
        font-size: .76rem;
    }

    .deal-card {
        border-radius: 12px;
    }
    .deal-card-img {
        height: 90px;
        border-radius: 12px 12px 0 0;
    }
    .deal-card-body {
        padding: 12px 14px 10px;
    }
    .deal-cta-card {
        border-radius: 20px;
        font-size: .7rem;
        padding: 8px 0;
    }

    .cat-pill {
        padding: 5px 12px;
        font-size: .72rem;
        border-radius: 18px;
    }

    .pagination a,
    .pagination span {
        width: 32px;
        height: 32px;
        font-size: .74rem;
        border-radius: 8px;
    }
    .pagination .prev,
    .pagination .next {
        padding: 0 12px;
        border-radius: 8px;
    }

    .trust-bar {
        gap: 16px;
        font-size: .76rem;
        padding: 10px 16px;
    }

    .sidebar-card {
        border-radius: 12px;
        padding: 14px;
    }

    .brand-item {
        flex: 0 0 80px;
        border-radius: 10px;
    }
    .brand-item img {
        width: 44px;
        height: 44px;
    }
}

/* === Small phone (<= 360px) === */
@media (max-width: 360px) {
    .hero h1 {
        font-size: 1.15rem;
    }
    .hero-stats {
        gap: 12px;
    }
    .hero-stat .num {
        font-size: 1.05rem;
    }
    .deal-card-body {
        padding: 10px 12px 8px;
    }
    .cat-pill {
        padding: 4px 10px;
        font-size: .68rem;
    }
}
