/* ============================================
   LYNX FINDS DEALS - DESIGN SYSTEM
   Universal styles for all pages
   ============================================ */

/* CSS VARIABLES */
:root {
    --bg-primary: #FFF8F3;
    --bg-secondary: #FFFBF7;
    --card-bg: #FFFFFF;
    --text-primary: #2D2D2D;
    --text-secondary: #6B6B6B;
    --text-light: #9B9B9B;
    --accent-coral: #FF6B6B;
    --accent-peach: #FFB088;
    --accent-orange: #FF8C42;
    --border-light: #F0E6E0;
    --shadow-soft: rgba(255, 107, 107, 0.08);
}

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

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION SYSTEM
   ============================================ */

/* Transparent nav with dark gradient overlay for readability */
.nav-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.nav-header.scrolled {
    backdrop-filter: blur(12px);
}

.nav-header.scrolled::before {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8C42 100%);
    padding: 4px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: block;
}

/* Nav links */
.nav-links {
    display: flex;
    gap: 48px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: white;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Desktop search */
.nav-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.nav-search:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

.nav-search input {
    border: none;
    outline: none;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 14px;
    width: 200px;
    background: transparent;
    color: white;
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.nav-search svg {
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.9);
}

/* Mobile search icon */
.mobile-search-icon {
    display: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-search-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-orange) 100%);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-search-overlay.open {
    transform: translateY(0);
}

.mobile-search-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.mobile-search-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.mobile-search-close svg {
    stroke: white;
}

.mobile-search-content {
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.mobile-search-content h2 {
    color: white;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.mobile-search-box {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.mobile-search-box svg {
    width: 24px;
    height: 24px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.mobile-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-family: inherit;
    color: var(--text-primary);
}

.mobile-search-box input::placeholder {
    color: var(--text-secondary);
}

/* Mobile hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 2000;
    overflow-y: auto;
}

.mobile-menu.open {
    right: 0;
}

.mobile-menu-header {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-orange) 100%);
    padding: 32px 24px 24px;
    position: relative;
}

.mobile-menu-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.mobile-menu-logo img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.mobile-menu-logo span {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.mobile-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s;
}

.mobile-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mobile-close svg {
    stroke: white;
}

.mobile-menu-content {
    padding: 24px 0;
}

.mobile-menu-section {
    margin-bottom: 32px;
}

.mobile-menu-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    padding: 0 24px 12px;
}

.mobile-links {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.mobile-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 16px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.mobile-links a:hover,
.mobile-links a.active {
    background: var(--bg-primary);
    color: var(--accent-coral);
    border-left-color: var(--accent-coral);
}

.mobile-links a svg {
    width: 20px;
    height: 20px;
    opacity: 0.4;
}

.mobile-menu-footer {
    padding: 24px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.mobile-socials {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.mobile-social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    text-decoration: none;
}

.mobile-social-link:hover {
    background: var(--accent-coral);
    transform: scale(1.1);
}

.mobile-social-link svg {
    width: 18px;
    height: 18px;
    fill: var(--text-secondary);
    transition: fill 0.3s;
}

.mobile-social-link:hover svg {
    fill: white;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    z-index: 1999;
}

.mobile-overlay.open {
    opacity: 1;
    pointer-events: all;
}

/* Bottom tab bar (mobile) */
.bottom-tabs {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 8px 0 6px;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

/* Hide on scroll down, show on scroll up */
.bottom-tabs.hidden {
    transform: translateY(100%);
}

.bottom-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.4) 0%, transparent 100%);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    z-index: -1;
}

.tab-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s;
    padding: 2px 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.tab-item svg {
    width: 20px;
    height: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.tab-item.active,
.tab-item:active {
    color: white;
}

/* MOBILE RESPONSIVE */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
        height: 60px;
    }

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

    .nav-links,
    .nav-search {
        display: none;
    }

    .hamburger,
    .mobile-search-icon {
        display: flex;
    }

    .bottom-tabs {
        display: block;
    }
}

/* ============================================
   SHARED COMPONENTS
   ============================================ */

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px var(--shadow-soft);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--shadow-soft);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-coral) 0%, var(--accent-orange) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 107, 107, 0.3);
}

/* Section spacing */
.section {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 32px;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 20px 80px;
    }
}
