:root {
    --primary-color: #0066B3;
    --primary-dark: #004d8c;
    --primary-light: #e6f2fa;
    --secondary-color: #2E8B57;
    --secondary-dark: #236b43;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.15);
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.header-search form {
    display: flex;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 14px;
}

.search-btn {
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: var(--secondary-dark);
}

.header-actions {
    display: flex;
    gap: 20px;
}

.header-actions a {
    color: white;
    font-size: 20px;
    text-decoration: none;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -12px;
    background-color: var(--warning-color);
    color: var(--dark-color);
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 50%;
    min-width: 18px;
    text-align: center;
}

.main-nav {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 12px 0;
}

.nav-menu a {
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.main-content {
    min-height: 60vh;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-light) 0%, white 100%);
    padding: 80px 20px;
    text-align: center;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.hero-content h1 {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    color: var(--gray-color);
    margin-bottom: 30px;
}

.btn-hero {
    display: inline-block;
    padding: 15px 40px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-hero:hover {
    background-color: var(--primary-dark);
}

.features-section {
    padding: 40px 0;
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.feature-item i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.feature-item h3 {
    margin-bottom: 10px;
}

.categories-section {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.category-card {
    background: white;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--dark-color);
    border-radius: var(--border-radius);
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.products-section {
    padding: 40px 0;
    background-color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--danger-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: bold;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 10px;
    height: 40px;
    overflow: hidden;
}

.product-price {
    margin-bottom: 10px;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray-color);
    font-size: 14px;
    margin-right: 10px;
}

.current-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.product-stock {
    font-size: 12px;
}

.in-stock {
    color: var(--success-color);
}

.out-stock {
    color: var(--danger-color);
}

.btn-add-cart {
    width: calc(100% - 30px);
    margin: 0 15px 15px 15px;
    padding: 10px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.btn-add-cart:hover {
    background-color: var(--primary-dark);
}

.newsletter-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.newsletter-content h3 {
    font-size: 28px;
    margin-bottom: 15px;
}

.newsletter-form {
    max-width: 500px;
    margin: 20px auto 0;
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.newsletter-form button {
    padding: 12px 25px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.newsletter-form button:hover {
    background-color: var(--secondary-dark);
}

.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-info h3, .footer-links h4, .footer-payment h4 {
    margin-bottom: 15px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--gray-color);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.payment-icons i {
    font-size: 40px;
    margin-right: 15px;
    color: var(--gray-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray-color);
}

.products-page {
    display: flex;
    gap: 30px;
    padding: 40px 0;
}

.products-sidebar {
    width: 280px;
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-box {
    margin-bottom: 25px;
}

.filter-box h3 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.category-filter {
    list-style: none;
}

.category-filter li {
    margin-bottom: 10px;
}

.category-filter a {
    color: var(--dark-color);
    text-decoration: none;
    display: block;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: background-color 0.3s;
}

.category-filter a:hover,
.category-filter a.active {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

.order-select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 8px 15px;
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--dark-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.empty-products {
    text-align: center;
    padding: 60px 20px;
}

.empty-products i {
    font-size: 80px;
    color: var(--gray-color);
    margin-bottom: 20px;
}

.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-container {
    max-width: 450px;
    width: 100%;
}

.auth-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 14px;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: var(--primary-color);
    text-decoration: none;
    margin: 0 10px;
}

.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .products-page {
        flex-direction: column;
    }
    
    .products-sidebar {
        width: 100%;
        position: static;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    .features-grid,
    .categories-grid,
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .header .container {
        flex-direction: column;
    }
    
    .header-search {
        max-width: 100%;
        width: 100%;
    }
    
    .nav-menu {
        overflow-x: auto;
        gap: 15px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .logo img {
        height: 32px;
    }
}