:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-darker: #4338ca;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --grey: #64748b;
    --white: #ffffff;
    --font-main: 'Outfit', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 12px;
}

html {
    scroll-behavior: smooth;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

ul {
    list-style: none;
}

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

/* Header */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--dark);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--grey);
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-logout-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--grey);
    font-weight: 500;
    font-size: 1rem;
    font-family: inherit;
    margin-right: 0.5rem;
    transition: color 0.2s ease;
}

.nav-logout-btn:hover {
    color: var(--primary);
}

.nav-actions,
.nav-actions-logged-in {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-logout {
    background-color: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.39);
}

.btn-start,
.btn-signup,
.btn-logout {
    border: 1.5px solid var(--dark);
    background: transparent;
    color: var(--dark);
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--dark);
}

.mobile-menu-btn svg {
    width: 28px;
    height: 28px;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: var(--white);
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem;
    position: fixed;
    top: 60px; /* Approximate navbar height */
    left: 0;
    right: 0;
    z-index: 90;
    box-shadow: var(--shadow-md);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    list-style: none;
    text-align: center;
}

.mobile-nav-links li a {
    display: block;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.mobile-nav-links li:last-child a {
    border-bottom: none;
}

.mobile-logout-item {
    margin-top: 0.5rem;
    border-top: 1px solid #e2e8f0;
}

.btn-start:hover,
.btn-signup:hover,
.btn-logout:hover {
    background: var(--dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.35);
}

.btn-start .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.btn-start:hover .arrow {
    transform: translateX(3px);
}

.btn-start.btn-large {
    padding: 15px 28px;
    font-size: 14.5px;
}

.text-link {
    font-size: 14px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.text-link:hover {
    opacity: 0.6;
}

.text-link .link-text {
    text-decoration: underline;
    text-decoration-color: rgba(15, 23, 42, 0.5);
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    transition: text-decoration-color 0.2s ease;
}

.text-link:hover .link-text {
    text-decoration-color: var(--dark);
}

.text-link .arrow {
    display: inline-block;
    transition: transform 0.2s ease;
    text-decoration: none;
}

.text-link:hover .arrow {
    transform: translateX(3px);
}

.nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #000000;
}

.btn-login {
    color: var(--dark);
    background: transparent;
}

.btn-login:hover {
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--grey);
    color: var(--dark);
}

.btn-outline:hover {
    border-color: var(--dark);
}

.btn-large {
    padding: 0.8rem 1.8rem;
    font-size: 1.1rem;
    text-align: center;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    padding: 140px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #e0e7ff 0%, #f8fafc 50%);
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.eyebrow {
    font-size: 12px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-dark);
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
    color: var(--dark);
}

.hero p {
    font-size: 1.25rem;
    color: var(--grey);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features */
.features {
    padding: 80px 0;
    background: var(--white);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 600px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-link {
    display: flex;
}

.feature-card {
    padding: 2rem;
    background: var(--light);
    border-radius: var(--radius);
    transition: transform 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: var(--white);
    border-color: #e2e8f0;
    box-shadow: var(--shadow-lg);
}

.feature-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.35rem;
}

.feature-card p {
    color: var(--grey);
}

.like-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--white);
    border: 1px solid #cbd5e1;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--grey);
    font-size: 1.3rem;
    padding: 0;
    z-index: 10;
    box-shadow: var(--shadow-md);
    outline: none;
}

.bookmark-icon {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5px;
    transition: all 0.2s;
}

.like-btn.active .bookmark-icon {
    fill: currentColor;
}

.like-btn:hover {
    transform: scale(1.15);
    color: var(--primary);
    border-color: #e0e7ff;
    background: #e0e7ff;
    box-shadow: var(--shadow-md);
}

.like-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.like-btn.active:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* Footer */
.site-footer {
    padding: 0;
    background: var(--white);
    border-top: 1px solid #e2e8f0;
    color: var(--grey);
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr repeat(3, 1fr);
    }
}

.footer-col h3 {
    color: var(--dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    letter-spacing: -0.2px;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-col a {
    color: var(--grey);
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--primary);
}

.brand-col .footer-desc {
    max-width: 280px;
    line-height: 1.6;
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.footer-bottom {
    background: #111;
    color: #94a3b8;
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .logo {
        font-size: 1.25rem;
        gap: 0.5rem;
    }

    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
    }

    .mobile-menu {
        display: block;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-100%);
        pointer-events: none;
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease-in, visibility 0.4s;
    }

    .mobile-menu.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .desktop-logout, .nav-greeting, .nav-actions {
        display: none !important;
    }

    .nav-logo-img {
        width: 28px;
        height: 28px;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .hero {
        padding: 120px 0 40px;
    }

    .hero h1 {
        font-size: 2.5rem;
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hero-btns {
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    .hero-btns .btn {
        width: 100%;
    }

    .nav-links {
        display: none;
    }

    .nav-actions,
    .nav-actions-logged-in {
        gap: 0.5rem;
    }
}

@media (max-width: 400px) {
    .logo {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
}

.profile-btn-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.profile-btn {
    min-width: 200px;
    justify-content: center;
}

@media (max-width: 768px) {
    .profile-btn {
        width: 100%;
    }
}

/* Featured picks horizontal scrolling container */
.featured-scrolling-container {
    width: 100%;
    overflow: hidden;
    /* Hide scrollbars */
    position: relative;
    padding: 1rem 0 2rem;
}

.featured-scroll-grid {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    /* Fixed 20px gap for loop calculation */
    width: max-content !important;
    animation: marquee 70s linear infinite !important;
}

/* Pause scroll animation when user hovers over the cards */
.featured-scrolling-container:hover .featured-scroll-grid {
    animation-play-state: paused !important;
}

.featured-scroll-grid .feature-link {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: block !important;
}

/* Enforce exact width on the cards inside the link */
.featured-scroll-grid .product-card {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
}

/* Seamless infinite scroll animation loop for 12 items */
/* (280px width + 20px gap) * 12 items = 3600px total offset */
@keyframes marquee {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-3600px, 0, 0);
    }
}

/* Auth Modal Styles */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.auth-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.auth-modal-card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2.5rem 2rem 2rem;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    text-align: center;
}

.auth-modal-overlay.is-open .auth-modal-card {
    transform: scale(1);
}

.auth-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--grey);
    transition: color 0.2s ease;
    line-height: 1;
}

.auth-modal-close:hover {
    color: var(--dark);
}

.auth-modal-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: rgba(99, 102, 241, 0.1);
    margin-bottom: 1.25rem;
}

.auth-modal-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.auth-modal-content p {
    color: var(--grey);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.auth-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.auth-modal-buttons .btn {
    flex: 1;
    text-align: center;
}

/* Category Marquee in Footer */
.cat-section { 
    padding: 3rem 0; 
    border-top: 1px solid var(--grey); 
    background: var(--white);
}

.cat-head { 
    max-width: 1000px; 
    margin: 0 auto 2rem; 
    padding: 0 2rem; 
    display: flex; 
    align-items: baseline; 
    justify-content: space-between; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    padding-bottom: 1rem; 
}

.cat-head h2 { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--dark); 
}

.cat-head p { 
    font-size: 0.9rem; 
    color: var(--grey); 
}

.marquee-wrap { 
    position: relative; 
    overflow: hidden; 
}

.marquee-scroll {
    overflow-x: auto; 
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    width: 100%;
}

.marquee-scroll::-webkit-scrollbar {
    display: none;
}

.marquee-scroll:active {
    cursor: grabbing;
}

.marquee-wrap::before, .marquee-wrap::after { 
    content: ''; 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    width: 60px; 
    z-index: 2; 
    pointer-events: none; 
}

.marquee-wrap::before { 
    left: 0; 
    background: linear-gradient(90deg, var(--white), transparent); 
}

.marquee-wrap::after { 
    right: 0; 
    background: linear-gradient(270deg, var(--white), transparent); 
}

.marquee-track { 
    display: flex; 
    gap: 12px; 
    width: max-content; 
    padding: 4px 0 8px 0; 
}

.mcard {
    border: 1px solid rgba(0,0,0,0.1); 
    background: transparent; 
    border-radius: var(--radius); 
    padding: 10px 18px;
    display: flex; 
    align-items: center; 
    gap: 8px; 
    text-decoration: none; 
    color: var(--dark); 
    font-size: 0.95rem; 
    font-weight: 600;
    white-space: nowrap; 
    transition: all 0.2s ease;
}

.mcard:hover { 
    border-color: var(--dark); 
    background: var(--white); 
    transform: translateY(-2px); 
    box-shadow: 0 10px 20px -12px rgba(15,23,42,0.25); 
}

.mcard .arrow { 
    opacity: 0; 
    transform: translateX(-4px); 
    transition: all 0.2s ease; 
    font-size: 0.85rem; 
    color: var(--primary); 
}

.mcard:hover .arrow { 
    opacity: 1; 
    transform: translateX(0); 
}

@media(max-width: 768px) {
    .cat-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}
/* Auth Modal Specific Styles */
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1.5rem;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--grey);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.auth-form {
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--grey);
    margin: 1.5rem 0;
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.auth-divider span {
    padding: 0 10px;
}

.auth-submit-btn {
    width: 100%;
    margin-top: 1rem;
}

.auth-forgot-password {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.auth-forgot-password a {
    color: var(--grey);
    text-decoration: none;
}

.auth-forgot-password a:hover {
    color: var(--primary);
}

.field-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    padding: 0.5rem 0.75rem;
    background-color: #fef2f2;
    border-left: 3px solid #ef4444;
    border-radius: 4px;
    display: none;
    text-align: left;
    font-weight: 500;
}

.google-auth-container {
    margin-bottom: 1.5rem;
}

.auth-disclaimer {
    font-size: 0.8rem;
    color: var(--grey);
    margin-top: 1rem;
    text-align: center;
    line-height: 1.4;
}

.auth-disclaimer a,
.checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.auth-disclaimer a:hover,
.checkbox-label a:hover {
    color: var(--dark);
}

.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--dark);
}

.form-checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
}
