:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.home-header {
    position: fixed; top: 0; left: 0; right: 0; height: 70px;
    background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(20px);
    box-shadow: var(--shadow); z-index: 1000; border-bottom: 1px solid var(--light-gray);
}

.header-container {
    max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
}

.home-logo {
    display: flex; align-items: center; gap: 0.75rem; font-size: 1.4rem; font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none;
}

.home-nav { display: flex; gap: 0.5rem; }
.home-nav a {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1rem;
    color: var(--dark); text-decoration: none; font-weight: 600; border-radius: var(--radius-xs);
    transition: all 0.3s; font-size: 0.95rem;
}
.home-nav a:hover, .home-nav a.active { background: var(--light); color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 0.75rem; }

.auth-btn {
    display: flex; align-items: center; gap: 0.5rem; padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary)); color: white;
    text-decoration: none; border-radius: 50px; font-weight: 600; font-size: 0.9rem;
    transition: all 0.3s; box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4); }

.user-dropdown-wrapper { position: relative; }
.user-profile-btn {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.4rem 1rem 0.4rem 0.4rem;
    background: var(--light); border: 2px solid var(--light-gray); border-radius: 50px;
    cursor: pointer; transition: all 0.3s; font-weight: 600;
}
.user-profile-btn:hover { background: white; border-color: var(--primary); box-shadow: var(--shadow); }

.user-avatar {
    width: 38px; height: 38px; background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1rem; flex-shrink: 0;
}
.user-avatar.large { width: 48px; height: 48px; font-size: 1.2rem; }
.user-name-text { color: var(--dark); font-size: 0.9rem; }
.user-profile-btn i.fa-chevron-down { color: var(--gray); font-size: 0.8rem; transition: transform 0.3s; }
.user-profile-btn:hover i.fa-chevron-down { transform: rotate(180deg); }

.user-dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0; background: white;
    border-radius: var(--radius-sm); box-shadow: var(--shadow-xl); min-width: 260px;
    opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s;
    z-index: 1001; border: 1px solid var(--light-gray); overflow: hidden;
}
.user-dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown-user-info {
    display: flex; align-items: center; gap: 1rem; padding: 1.25rem;
    background: var(--light); border-bottom: 1px solid var(--light-gray);
}
.dropdown-user-info h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.dropdown-user-info p { font-size: 0.8rem; color: var(--gray); }

.user-dropdown-menu a {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.25rem;
    color: var(--dark); text-decoration: none; transition: all 0.3s; font-weight: 500; font-size: 0.95rem;
}
.user-dropdown-menu a:hover { background: var(--light); color: var(--primary); }
.user-dropdown-menu a i { width: 20px; color: var(--gray); }
.user-dropdown-menu a:hover i { color: var(--primary); }

.dropdown-divider { height: 1px; background: var(--light-gray); margin: 0.5rem 0; }
.logout-link { color: var(--danger) !important; }
.logout-link:hover { background: #fef2f2 !important; color: var(--danger) !important; }
.logout-link i { color: var(--danger) !important; }

.mobile-toggle-btn {
    display: none; background: var(--light); border: none; width: 42px; height: 42px;
    border-radius: 50%; cursor: pointer; font-size: 1.2rem; color: var(--dark); transition: all 0.3s;
}
.mobile-toggle-btn:hover { background: var(--primary); color: white; }

/* ===== Mobile Menu ===== */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 320px; max-width: 85%; height: 100vh;
    background: white; box-shadow: -5px 0 30px rgba(0,0,0,0.2); z-index: 10000;
    transition: right 0.3s ease; overflow-y: auto;
}
.mobile-menu.open { right: 0; }
.mobile-menu-header {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--light-gray);
    display: flex; justify-content: space-between; align-items: center; background: var(--light);
}
.mobile-menu-header h3 { font-size: 1.2rem; color: var(--dark); }
.close-mobile-menu {
    background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--gray);
    width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.close-mobile-menu:hover { background: var(--light-gray); color: var(--dark); }

.mobile-menu-content { padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-menu-content a {
    display: flex; align-items: center; gap: 1rem; padding: 1rem; color: var(--dark);
    text-decoration: none; font-weight: 600; border-radius: var(--radius-xs); transition: all 0.3s;
}
.mobile-menu-content a:hover, .mobile-menu-content a.active { background: var(--light); color: var(--primary); }

.mobile-user-section { margin-top: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--light-gray); }
.mobile-user-card {
    display: flex; align-items: center; gap: 1rem; padding: 1rem;
    background: var(--light); border-radius: var(--radius-sm); margin-bottom: 0.75rem;
}
.mobile-user-details h4 { font-size: 1rem; margin-bottom: 0.25rem; }
.mobile-user-details p { font-size: 0.8rem; color: var(--gray); }
.mobile-logout { color: var(--danger) !important; margin-top: 0.5rem; }
.mobile-logout:hover { background: #fef2f2 !important; }
.mobile-auth-btn {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
    color: white !important; justify-content: center; margin-top: 0.5rem;
}

.mobile-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5);
    z-index: 9999; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.mobile-overlay.active { opacity: 1; visibility: visible; }

/* ===== Hero Section ===== */
.hero-section {
    position: relative; padding: 8rem 2rem 5rem; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden; min-height: 600px; display: flex; align-items: center; justify-content: center;
}
.hero-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; }
.hero-shape {
    position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.08);
    animation: heroFloat 20s infinite ease-in-out;
}
.shape-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation-delay: 0s; }
.shape-2 { width: 300px; height: 300px; top: 50%; right: -50px; animation-delay: -5s; }
.shape-3 { width: 200px; height: 200px; bottom: -50px; left: 30%; animation-delay: -10s; }

@keyframes heroFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(40px, -40px) rotate(120deg); }
    66% { transform: translate(-30px, 30px) rotate(240deg); }
}

.hero-content { position: relative; z-index: 10; text-align: center; color: white; max-width: 900px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); border-radius: 50px;
    font-size: 0.9rem; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(255, 255, 255, 0.3);
}
.hero-content h1 { font-size: 3.5rem; font-weight: 900; margin-bottom: 1rem; line-height: 1.2; }
.gradient-text {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-content p { font-size: 1.2rem; opacity: 0.95; margin-bottom: 3rem; max-width: 600px; margin-left: auto; margin-right: auto; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 3rem; }
.hero-stat {
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(10px); padding: 1.5rem 1rem;
    border-radius: var(--radius); border: 1px solid rgba(255, 255, 255, 0.2); transition: all 0.3s;
}
.hero-stat:hover { transform: translateY(-5px); background: rgba(255, 255, 255, 0.25); }
.stat-icon { font-size: 1.5rem; margin-bottom: 0.75rem; opacity: 0.9; }
.stat-number { font-size: 2.25rem; font-weight: 900; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.85rem; opacity: 0.9; }

.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary, .btn-hero-secondary {
    display: inline-flex; align-items: center; gap: 0.75rem; padding: 1rem 2rem;
    border-radius: 50px; font-weight: 700; font-size: 1.05rem; text-decoration: none; transition: all 0.3s;
}
.btn-hero-primary { background: white; color: var(--primary); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3); }
.btn-hero-secondary { background: rgba(255, 255, 255, 0.2); color: white; border: 2px solid rgba(255, 255, 255, 0.3); backdrop-filter: blur(10px); }
.btn-hero-secondary:hover { background: rgba(255, 255, 255, 0.3); transform: translateY(-3px); }

/* ===== Search Section ===== */
.search-section {
    padding: 2rem 0; background: white; position: sticky; top: 70px; z-index: 100;
    box-shadow: var(--shadow); border-bottom: 1px solid var(--light-gray);
}
.search-wrapper { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.search-input-box { flex: 1; min-width: 250px; position: relative; }
.search-input-box i { position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 1.1rem; }
.search-input-box input {
    width: 100%; padding: 0.9rem 1.25rem 0.9rem 3.25rem; border: 2px solid var(--light-gray);
    border-radius: 50px; font-size: 1rem; transition: all 0.3s; font-family: inherit; background: var(--light);
}
.search-input-box input:focus { outline: none; border-color: var(--primary); background: white; box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1); }

.filter-buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn {
    padding: 0.75rem 1.25rem; background: var(--light); border: 2px solid var(--light-gray);
    border-radius: 50px; cursor: pointer; font-weight: 600; transition: all 0.3s;
    display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; color: var(--dark); font-family: inherit;
}
.filter-btn:hover, .filter-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== Models Section ===== */
.models-section { padding: 4rem 0; background: var(--light); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; color: var(--dark); margin-bottom: 0.5rem; display: flex; align-items: center; justify-content: center; gap: 0.75rem; }
.section-title h2 i { color: var(--primary); }
.section-title p { color: var(--gray); font-size: 1.05rem; }

.models-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.75rem; }

.model-card {
    background: white; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
    transition: all 0.3s; border: 1px solid var(--light-gray); animation: fadeIn 0.5s ease;
}
.model-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--primary); }

/* Thumbnail & Slider */
.model-slider {
    position: relative; width: 100%; height: 200px; overflow: hidden; background: var(--light);
}
.discount-badge {
    position: absolute; top: 15px; left: 15px; background: var(--danger); color: white;
    padding: 0.35rem 0.75rem; border-radius: 20px; font-size: 0.75rem; font-weight: 700; z-index: 10;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}
.wishlist-btn {
    position: absolute; top: 15px; right: 15px; width: 36px; height: 36px;
    background: rgba(255, 255, 255, 0.9); border: none; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: all 0.3s; z-index: 10; color: var(--gray); font-size: 1.1rem;
}
.wishlist-btn:hover, .wishlist-btn.active { background: var(--danger); color: white; transform: scale(1.1); }

.slider-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.6);
    display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s;
}
.model-slider:hover .slider-overlay { opacity: 1; }
.quick-view-btn {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem 1.75rem;
    background: white; color: var(--primary); border: none; border-radius: 50px;
    font-weight: 700; cursor: pointer; transition: all 0.3s; font-size: 1rem; font-family: inherit;
}
.quick-view-btn:hover { transform: scale(1.05); box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3); }

/* Model Info */
.model-card-info { padding: 1.25rem; }
.model-card-info h3 { font-size: 1.1rem; margin-bottom: 0.4rem; color: var(--dark); font-weight: 700; }
.model-desc { color: var(--gray); font-size: 0.85rem; margin-bottom: 0.85rem; }
.model-details {
    display: flex; justify-content: space-between; align-items: center; padding: 0.65rem 0;
    border-top: 1px solid var(--light-gray); border-bottom: 1px solid var(--light-gray); margin-bottom: 0.85rem;
}
.detail-item { font-size: 0.8rem; color: var(--gray); display: flex; align-items: center; gap: 0.4rem; }
.detail-item i { color: var(--primary); }

/* Price Display */
/* Price Display - Updated */
.price-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    min-height: 40px;
}

.original-price {
    font-size: 1rem;
    color: #94a3b8;
    text-decoration: line-through;
    font-weight: 600;
}

.current-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--success);
    letter-spacing: -0.5px;
}

.current-price.free {
    color: var(--primary);
    font-size: 1.65rem;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    padding: 0.25rem 0.75rem;
    border-radius: 8px;
    border: 2px solid var(--success);
}

/* Discount Badge - Enhanced */
.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    padding: 0.4rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Price Notice (Not Logged In) */
.price-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    color: #92400e;
    font-weight: 600;
    margin-bottom: 1rem;
    border: 1px solid #fcd34d;
    justify-content: center;
}

.price-notice i {
    color: #f59e0b;
    font-size: 1rem;
}

/* Model Buttons */
.model-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }
.btn-view-3d, .btn-buy {
    display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.7rem;
    border-radius: var(--radius-xs); font-weight: 600; text-decoration: none; transition: all 0.3s;
    font-size: 0.85rem; border: none; cursor: pointer; font-family: inherit;
}
.btn-view-3d { background: var(--light); color: var(--primary); border: 2px solid var(--primary); }
.btn-view-3d:hover { background: var(--primary); color: white; transform: translateY(-2px); }
.btn-buy { background: linear-gradient(135deg, var(--success), #059669); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4); }

.empty-state { grid-column: 1/-1; text-align: center; padding: 4rem 2rem; color: var(--gray); }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state h2 { margin-bottom: 0.5rem; color: var(--dark); }

/* ===== Features Section ===== */
.features-section { padding: 5rem 0; background: white; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.feature-card {
    background: var(--light); padding: 2rem; border-radius: var(--radius); text-align: center;
    transition: all 0.3s; border: 2px solid var(--light-gray);
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: var(--shadow-lg); }
.feature-icon-box {
    width: 80px; height: 80px; background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem; font-size: 2rem; color: white;
}
.feature-card h3 { font-size: 1.2rem; margin-bottom: 0.75rem; color: var(--dark); }
.feature-card p { color: var(--gray); font-size: 0.95rem; line-height: 1.6; }

/* ===== Footer ===== */
.home-footer { background: var(--dark); color: white; padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-col h3 {
    font-size: 1.4rem; margin-bottom: 1rem; background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; display: flex; align-items: center; gap: 0.5rem;
}
.footer-col h3 i { -webkit-text-fill-color: var(--primary); }
.footer-col h4 { margin-bottom: 1rem; font-size: 1.1rem; }
.footer-col p { color: #94a3b8; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; }
.footer-col a { color: #94a3b8; text-decoration: none; display: block; margin-bottom: 0.75rem; transition: color 0.3s; font-size: 0.95rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1); color: #94a3b8; }
.footer-bottom p { margin-bottom: 0.5rem; font-size: 0.9rem; }

/* ===== Animations ===== */
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.75rem; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .home-nav { display: none; }
    .mobile-toggle-btn { display: flex; align-items: center; justify-content: center; }
    .user-name-text { display: none; }
    .user-profile-btn { padding: 0.4rem; }
    .auth-btn span { display: none; }
    .auth-btn { padding: 0.6rem; width: 42px; height: 42px; justify-content: center; }
    .hero-section { padding: 6rem 1rem 3rem; min-height: auto; }
    .hero-content h1 { font-size: 2rem; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .hero-stat { padding: 1rem; }
    .stat-number { font-size: 1.75rem; }
    .hero-buttons { flex-direction: column; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; justify-content: center; }
    .search-section { top: 70px; }
    .search-wrapper { flex-direction: column; }
    .search-input-box { width: 100%; }
    .filter-buttons { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; }
    .filter-btn { white-space: nowrap; flex-shrink: 0; }
    .models-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
    .model-slider { height: 180px; }
    .section-title h2 { font-size: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
    .header-container { padding: 0 1rem; }
    .home-logo { font-size: 1.2rem; }
    .hero-content h1 { font-size: 1.75rem; }
    .models-grid { grid-template-columns: 1fr; }
    .model-slider { height: 200px; }
    .container { padding: 0 1rem; }
}