:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-amazon: #fbbf24;
    --accent-ali: #ef4444;
    --accent-primary: #38bdf8;
    --glass-border: rgba(255, 255, 255, 0.1);
    --container-width: 1200px;
    --header-height: 70px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

h1, h2, h3, .logo-text {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Nav */
header {
    height: var(--header-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    white-space: nowrap;
}

.logo img {
    height: 32px;
    width: auto;
}

.logo-icon {
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.logo-text span {
    color: var(--accent-primary);
}

.nav-links {
    display: flex;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.nav-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

/* Hero & Search */
.search-header {
    flex: 1;
    max-width: 500px;
}

.search-box {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: var(--transition);
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.15);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    width: 100%;
    outline: none;
    font-size: 0.95rem;
}

.hero.compact {
    margin-top: calc(var(--header-height) + 2rem);
    text-align: center;
    padding: 1.5rem 1rem;
    margin-bottom: 1rem;
    background: radial-gradient(circle at top, rgba(56, 189, 248, 0.1), transparent);
}

.hero.compact h1 { 
    font-size: 2.8rem; 
    margin-bottom: 0.75rem; 
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-primary), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.filters-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.filters-mobile {
    display: flex;
    gap: 0.5rem;
    background: rgba(255,255,255,0.03);
    padding: 0.4rem;
    border-radius: 100px;
    border: 1px solid var(--glass-border);
}

.filter-chip {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1.2rem;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.filter-chip:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.filter-chip.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.logo img {
    max-height: 45px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}

.social-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.social-header .social-icon {
    font-size: 1.2rem;
    color: var(--accent-primary);
    transition: var(--transition);
}

.social-header .social-icon:hover {
    transform: scale(1.15);
    color: white;
}

.social-links {
    display: flex;
    gap: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    transition: var(--transition);
}

.nav-item.fav-link {
    color: var(--accent-ali);
    background: rgba(239, 68, 68, 0.1);
}

#fav-count {
    font-size: 0.8rem;
    font-weight: 800;
}

/* Skeleton Loading */
.skeleton-card {
    height: 400px;
    background: linear-gradient(90deg, var(--card-bg) 25%, rgba(255,255,255,0.05) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 24px;
}

@keyframes loading {
    to { background-position: -200% 0; }
}

/* Deal Card Enhancements */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.fav-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.fav-btn.active { color: var(--accent-ali); }
.fav-btn:hover { transform: scale(1.2); }

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent-primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* Grid Layout */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.deal-card {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.deal-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.deal-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: white;
    border-radius: 16px;
    margin-bottom: 1rem;
    padding: 10px;
}

.deal-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.deal-prices {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: auto;
    margin-bottom: 1.5rem;
}

.price-now { font-size: 1.5rem; font-weight: 800; color: var(--accent-primary); }
.price-old { font-size: 1rem; color: var(--text-secondary); text-decoration: line-through; }
.discount-tag { background: #ef4444; color: white; padding: 0.2rem 0.6rem; border-radius: 8px; font-weight: 700; font-size: 0.8rem; }

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-amazon { background: rgba(251, 191, 36, 0.2); color: var(--accent-amazon); }
.badge-aliexpress { background: rgba(239, 68, 68, 0.2); color: var(--accent-ali); }

.buy-btn {
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    padding: 0.8rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.buy-btn:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}
/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.deal-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.deal-card:nth-child(1) { animation-delay: 0.1s; }
.deal-card:nth-child(2) { animation-delay: 0.2s; }
.deal-card:nth-child(3) { animation-delay: 0.3s; }
.deal-card:nth-child(4) { animation-delay: 0.4s; }

/* Shine Effect on Hover */
.deal-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.8s;
    pointer-events: none;
}

.deal-card:hover::after {
    left: 100%;
    top: 100%;
}

.filter-chip.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 5rem;
}

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

.social-links {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

/* Media Queries */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .filters-mobile { display: flex; }
    .hero h1 { font-size: 2.5rem; }
    footer .container { flex-direction: column; gap: 2rem; text-align: center; }
}

/* Loading State */
.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
