/* ===================================
   VINHT E-COMMERCE PLATFORM
   Modern CSS Design System
   =================================== */

:root {
    /* Primary Colors */
    --primary: #FF6B35;
    --primary-dark: #E55A2B;
    --primary-light: #FF8C5A;
    
    /* Secondary Colors */
    --secondary: #004E89;
    --secondary-light: #1F77B5;
    
    /* Neutral Colors */
    --dark: #1a1a1a;
    --gray-dark: #333333;
    --gray-mid: #666666;
    --gray-light: #f5f5f5;
    --white: #ffffff;
    
    /* Accent Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Outfit', sans-serif;
    --font-size-sm: 12px;
    --font-size-base: 16px;
    --font-size-lg: 18px;
    --font-size-xl: 24px;
    --font-size-2xl: 32px;
    --font-size-3xl: 48px;
    
    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
}

/* ===================================
   GLOBAL STYLES
   =================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-family: var(--font-primary);
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-small {
    padding: 6px 12px;
    font-size: var(--font-size-sm);
}

.btn-lg {
    padding: var(--spacing-md) var(--spacing-lg);
    font-size: var(--font-size-lg);
}

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

.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-light);
    padding: var(--spacing-md) 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
}

.logo {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-search {
    flex: 1;
    display: flex;
    max-width: 400px;
}

.search-input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-family: var(--font-primary);
}

.search-btn {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-dark);
}

.nav-items {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.btn-login, .btn-signup {
    padding: var(--spacing-sm) var(--spacing-md);
}

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

.cart-icon {
    position: relative;
    font-size: var(--font-size-lg);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
}

.user-menu {
    position: relative;
}

.user-name {
    cursor: pointer;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md);
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.user-menu:hover .dropdown-menu {
    display: flex;
}

.dropdown-menu a {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--gray-light);
    color: var(--dark);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--gray-light);
    color: var(--primary);
}

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    background: linear-gradient(135deg, #004E89 0%, #FF6B35 100%);
    color: var(--white);
    padding: var(--spacing-2xl) 0;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.gradient-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--white);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--white);
    bottom: -50px;
    left: 50px;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--white);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

.hero-title {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--spacing-md);
    animation: slideUp 0.8s ease;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    animation: slideUp 0.8s ease 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
    animation: slideUp 0.8s ease 0.4s both;
}

.hero-buttons .btn {
    color: var(--white);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   CATEGORIES SECTION
   =================================== */

.categories-section {
    padding: var(--spacing-2xl) 0;
    background: var(--gray-light);
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    position: relative;
    padding-bottom: var(--spacing-md);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-lg);
}

.category-card {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 40px;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.category-card h3 {
    margin-bottom: var(--spacing-sm);
    font-size: var(--font-size-lg);
}

.category-card p {
    font-size: var(--font-size-sm);
    color: var(--gray-mid);
}

/* ===================================
   FEATURES SECTION
   =================================== */

.features-section {
    padding: var(--spacing-2xl) 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
}

.feature-item {
    text-align: center;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--gray-light);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.feature-item h3 {
    margin-bottom: var(--spacing-sm);
}

.feature-item p {
    color: var(--gray-mid);
    font-size: var(--font-size-sm);
}

/* ===================================
   PRODUCTS SECTION
   =================================== */

.products-section {
    padding: var(--spacing-2xl) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: var(--gray-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
}

.badge-discount {
    background: var(--danger);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--font-size-sm);
}

.product-info {
    padding: var(--spacing-md);
}

.product-name {
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
    height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-seller {
    font-size: var(--font-size-sm);
    color: var(--gray-mid);
    margin-bottom: var(--spacing-sm);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.stars {
    color: var(--warning);
    font-size: 12px;
}

.review-count {
    font-size: var(--font-size-sm);
    color: var(--gray-mid);
}

.product-price {
    margin-bottom: var(--spacing-md);
}

.price {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--primary);
    margin-right: var(--spacing-sm);
}

.original-price {
    font-size: var(--font-size-sm);
    color: var(--gray-mid);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.product-actions .btn {
    flex: 1;
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    background: linear-gradient(135deg, #FF6B35 0%, #004E89 100%);
    color: var(--white);
    padding: var(--spacing-2xl) var(--spacing-md);
    text-align: center;
    margin: var(--spacing-2xl) 0;
    border-radius: var(--radius-xl);
}

.cta-content h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--spacing-md);
}

.cta-content p {
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-size-lg);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
    margin-top: var(--spacing-2xl);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--gray-light);
    display: block;
    padding: var(--spacing-sm) 0;
}

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

.social-icons {
    display: flex;
    gap: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.footer-bottom {
    border-top: 1px solid var(--gray-mid);
    padding-top: var(--spacing-lg);
    text-align: center;
    color: var(--gray-mid);
}

/* ===================================
   FORMS
   =================================== */

.form-group {
    margin-bottom: var(--spacing-lg);
}

label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: var(--spacing-md);
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .nav-search {
        max-width: 100%;
        order: 3;
        width: 100%;
        margin-top: var(--spacing-md);
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 300px;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-title {
        font-size: var(--font-size-2xl);
    }
    
    .section-title {
        font-size: var(--font-size-xl);
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
