﻿/* =========================================
   1. CẤU HÌNH CHUNG & BIẾN MÀU
   ========================================= */
:root {
    --primary-color: #6c5ce7;
    --secondary-color: #00cec9;
    --bg-dark: #121212;
    --bg-card: #1e1e1e;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --accent-color: #e84393;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* =========================================
   2. HEADER & NAVIGATION (Dùng chung Layout)
   ========================================= */
header {
    background-color: rgba(18, 18, 18, 0.95);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-menu ul {
    display: flex;
    gap: 30px;
}

    .nav-menu ul li a {
        display: inline-block;
        padding: 8px 10px;
        border-radius: 6px;
        color: var(--text-white);
    }

.nav-menu a.active, .nav-menu a:hover {
    color: var(--primary-color);
    font-weight: bold;
    background: rgba(108, 92, 231, 0.08);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 230px;
    justify-content: flex-end;
}

/* Nút Đăng nhập */
.btn-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.4s ease;
    height: 44px;
    min-width: 44px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.btn-login-icon .text {
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: all 0.4s ease;
    font-weight: bold;
    font-size: 0;
}

.btn-login-icon:hover {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 15px;
    gap: 10px;
}

    .btn-login-icon:hover .text {
        max-width: 100px;
        opacity: 1;
        font-size: 1rem;
    }

/* Icon Giỏ hàng */
.cart-icon {
    position: relative;
    color: #fff;
    font-size: 1.2rem;
}

#cart-count {
    display: none;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ff0000;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 50%;
    width: 18px;
    height: 18px;
}

/* =========================================
   3. HERO SECTION (BANNER) - Chỉ trang chủ có
   ========================================= */
.hero {
    height: 80vh;
    background: linear-gradient(135deg, rgba(76, 29, 149, 0.7), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0 100px;
    position: relative;
}

    .hero h1 {
        font-size: 4.5rem;
        margin-bottom: 20px;
        color: white;
        text-transform: uppercase;
        font-weight: 800;
        letter-spacing: 2px;
        text-shadow: 0 0 10px rgba(0, 206, 201, 0.5), 0 0 40px rgba(0, 206, 201, 0.3);
    }

    .hero p {
        font-size: 1.6rem;
        margin-bottom: 40px;
        color: #e0e0e0;
        max-width: 600px;
        font-weight: 300;
        text-shadow: 1px 1px 2px black;
    }

.btn-main {
    padding: 18px 50px;
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(108, 92, 231, 0.6);
    transition: 0.3s;
}

    .btn-main:hover {
        background-color: white;
        color: var(--primary-color);
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8);
        transform: translateY(-5px);
    }

/* =========================================
   4. GEAR GRID (DANH SÁCH SẢN PHẨM)
   ========================================= */
.container {
    padding: 50px;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 30px;
    border-left: 5px solid var(--secondary-color);
    padding-left: 15px;
}

.gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.gear-card {
    background-color: var(--bg-card);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .gear-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .gear-card::after {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: 10px;
        pointer-events: none;
        transition: background 0.3s ease;
    }

    .gear-card:hover::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0) 40%, rgba(0, 0, 0, 0.25) 100%);
    }

.gear-image {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 15px;
    border-bottom: 1px solid #333;
}

.gear-card:hover .gear-image {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.gear-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.gear-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gear-tags {
    font-size: 0.8rem;
    color: var(--text-gray);
    margin-bottom: 15px;
}

.gear-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.price {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

/* Responsive Grid */
@media (min-width: 1100px) {
    .gear-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 760px) and (max-width: 1099px) {
    .gear-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 759px) {
    .gear-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   5. FOOTER
   ========================================= */
footer {
    background-color: #0d0d0d;
    padding: 40px 50px;
    margin-top: 50px;
    text-align: center;
    border-top: 1px solid #333;
}

    footer p {
        color: var(--text-gray);
    }

/* Responsive Header */
@media (max-width: 786px) {
    header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .nav-menu ul {
        gap: 15px;
        font-size: 0.9rem;
    }

    .hero {
        padding: 0 20px;
    }

        .hero h1 {
            font-size: 3rem;
        }
}
