/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.logo h1 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
}

.logo .tagline {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 400;
}

.logo a {
    text-decoration: none;
}

.header-search {
    flex: 1;
    max-width: 400px;
    min-width: 200px;
}

.header-search form {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.3s;
}

.header-search form:focus-within {
    border-color: #3498db;
}

.header-search input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 14px;
}

.header-search button {
    background: #3498db;
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.header-search button:hover {
    background: #2980b9;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-icon {
    position: relative;
    color: #2c3e50;
    font-size: 24px;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    min-width: 18px;
    text-align: center;
}

.login-btn, .register-btn {
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
}

.login-btn {
    color: #3498db;
    border: 2px solid #3498db;
}

.login-btn:hover {
    background: #3498db;
    color: white;
}

.register-btn {
    background: #3498db;
    color: white;
}

.register-btn:hover {
    background: #2980b9;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #2c3e50;
    padding: 8px 15px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 5px;
    z-index: 1;
}

.user-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: background 0.3s;
}

.dropdown-content a:hover {
    background: #f0f0f0;
}

/* Navigation */
.main-nav {
    background: #2c3e50;
    padding: 0;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
    margin: 0;
}

.main-nav ul li {
    position: relative;
}

.main-nav ul li a {
    display: block;
    padding: 12px 25px;
    color: white;
    text-decoration: none;
    transition: background 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.main-nav ul li a:hover {
    background: #34495e;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 40px;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    padding: 30px 0;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-info {
    padding: 20px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
}

.product-name a {
    text-decoration: none;
    color: inherit;
}

.product-price {
    font-size: 20px;
    color: #e74c3c;
    font-weight: 700;
    margin-bottom: 10px;
}

.product-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.status-in-stock {
    background: #d4edda;
    color: #155724;
}

.status-out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

.add-to-cart-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
    width: 100%;
}

.add-to-cart-btn:hover {
    background: #2980b9;
}

.add-to-cart-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Section Headers */
.section-title {
    font-size: 32px;
    color: #2c3e50;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #3498db;
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 20px 0;
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    font-size: 18px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-search {
        max-width: 100%;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
    }
    
    .main-nav ul li a {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}