/* ==========================================
   CSS Variables & Reset
   ========================================== */

:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --text-dark: #1e293b;
    --text-light: #ffffff;
    --text-gray: #64748b;
    --bg-light: #f8fafc;
    --bg-dark: #1e293b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================
   Top Bar
   ========================================== */

.top-bar {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span,
.user-actions a {
    margin-right: 1.5rem;
    color: var(--text-light);
    text-decoration: none;
}

.user-actions a:hover {
    color: var(--accent-color);
}

.contact-info i,
.user-actions i {
    margin-right: 0.3rem;
}

/* ==========================================
   Header
   ========================================== */

.header {
    background: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
}

.search-bar {
    flex: 1;
    max-width: 600px;
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 0.8rem 1rem;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 25px 0 0 25px;
    font-size: 1rem;
    outline: none;
}

.search-bar input:focus {
    border-color: var(--primary-color);
}

.search-bar button {
    padding: 0.8rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: #1d4ed8;
}

.cart {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    position: relative;
}

.cart i {
    font-size: 1.8rem;
    color: var(--text-dark);
}

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

/* ==========================================
   Navigation
   ========================================== */

.navbar {
    background: var(--primary-color);
    padding: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu li a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu li a.sale {
    background: var(--danger-color);
}

.nav-menu li a.sale:hover {
    background: #dc2626;
}

.nav-menu li a i {
    margin-right: 0.3rem;
}

/* ==========================================
   Hero Banner
   ========================================== */

.hero-banner {
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    color: white;
    padding: 5rem 0;
    margin-bottom: 3rem;
}

.banner-content {
    max-width: 600px;
}

.banner-content .badge {
    display: inline-block;
    background: var(--accent-color);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.banner-content h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* ==========================================
   Buttons
   ========================================== */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-dark);
}

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

.btn-cart {
    width: 100%;
    background: var(--primary-color);
    color: white;
}

.btn-cart:hover {
    background: #1d4ed8;
}

/* ==========================================
   Section Titles
   ========================================== */

.section-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* ==========================================
   Categories
   ========================================== */

.categories {
    padding: 3rem 0;
    background: white;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background: var(--bg-light);
    padding: 2rem 1rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon i {
    font-size: 2.5rem;
    color: white;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.category-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ==========================================
   Filter Buttons
   ========================================== */

.filter-buttons {
    display: flex;
    gap: 1rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==========================================
   Products
   ========================================== */

.products {
    padding: 3rem 0;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 10;
}

.product-badge.sale {
    background: var(--danger-color);
    color: white;
}

.product-badge.new {
    background: var(--success-color);
    color: white;
}

.product-image {
    background: var(--bg-light);
    padding: 3rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 250px;
}

.product-icon {
    font-size: 5rem;
    color: var(--text-gray);
}

.product-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.product-card:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-dark);
    min-height: 50px;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.product-rating i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.product-rating span {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.old-price {
    color: var(--text-gray);
    text-decoration: line-through;
    font-size: 1rem;
}

.price {
    color: var(--danger-color);
    font-size: 1.5rem;
    font-weight: 900;
}

/* ==========================================
   Features
   ========================================== */

.features {
    padding: 3rem 0;
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-gray);
}

/* ==========================================
   Footer
   ========================================== */

.footer {
    background: var(--bg-dark);
    color: var(--text-light);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-section p {
    color: var(--text-gray);
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.3s;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-gray);
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .search-bar {
        order: 3;
        max-width: 100%;
        width: 100%;
    }

    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .banner-content h1 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }
}
