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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.5;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 2rem;
    letter-spacing: -0.5px;
}

.logo h1 a {
    color: white;
    text-decoration: none;
}

.tagline {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-top: 5px;
}

.cart-icon {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    color: white;
    transition: all 0.3s ease;
}

.cart-icon:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 5rem 2rem;
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.products-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    position: relative;
    padding-top: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
}

.product-main-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-hover-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.product-image:hover .product-main-img {
    opacity: 0;
}

.product-image:hover .product-hover-img {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #ff6b6b;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 3;
}

.product-info {
    padding: 1.25rem;
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    height: 2.8rem;
    overflow: hidden;
}

.product-category {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 0.75rem;
}

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

.product-price {
    font-size: 1.4rem;
    font-weight: bold;
    color: #667eea;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: #667eea;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-to-cart-btn:hover {
    background: #5a67d8;
}

.features-section {
    max-width: 1400px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.feature p {
    color: #666;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    background: white;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 20px;
    max-height: 85%;
    overflow-y: auto;
}

.modal-header {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.5rem;
}

.modal-body {
    padding: 1.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    padding: 1.25rem;
    border-top: 1px solid #eee;
}

.close {
    font-size: 32px;
    cursor: pointer;
    color: white;
    transition: transform 0.2s;
}

.close:hover {
    transform: scale(1.2);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th,
.cart-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.cart-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.qty-input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.remove-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.cart-total {
    text-align: right;
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover {
    background: #218838;
    transform: translateY(-2px);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: #888;
}

footer {
    background: #1a1a2e;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

.footer-content p {
    margin: 0.5rem 0;
    opacity: 0.8;
}

.no-products {
    text-align: center;
    padding: 4rem;
    font-size: 1.2rem;
    color: #888;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .features-section {
        margin: 2rem 1rem;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .cart-icon {
        padding: 8px 16px;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-title {
        font-size: 0.9rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
}