body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #f3f4f7;
    color: #222;
}

header {
    background: #1f2937;
    color: white;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    flex-wrap: wrap;
    gap: 15px;
}

header .left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.logo {
    height: 50px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
}

.cart {
    color: white;
    font-size: 18px;
    text-decoration: none;
    background: #3b82f6;
    padding: 8px 15px;
    border-radius: 8px;
    transition: 0.2s;
}

.cart:hover {
    background: #60a5fa;
}

main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

h2 {
    border-left: 5px solid #3b82f6;
    padding-left: 10px;
    font-size: 24px;
}

/* SEARCH AND FILTER */
.search-filter {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

#searchInput {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: #3b82f6;
}

#categoryFilter {
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

#categoryFilter:focus {
    outline: none;
    border-color: #3b82f6;
}

/* GRID PRODUITS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.product-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.product-title {
    font-size: 18px;
    margin-top: 10px;
    font-weight: 600;
}

.price {
    font-size: 20px;
    margin-top: 10px;
    font-weight: bold;
    color: #0a7b28;
}

.add-btn {
    margin-top: 15px;
    background: #10b981;
    border: none;
    color: white;
    padding: 10px 15px;
    width: 100%;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.add-btn:hover {
    background: #34d399;
    transform: scale(1.02);
}

.add-btn:active {
    transform: scale(0.98);
}

.quantity-display {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #3b82f6;
    color: white;
    padding: 6px 10px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: popIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* PANIER */
#cartItems {
    margin-top: 25px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px 1fr auto 100px;
    gap: 20px;
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    background: #3b82f6;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background 0.2s;
}

.quantity-btn:hover {
    background: #60a5fa;
}

.quantity {
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.cart-item img {
    width: 100%;
    height: 100px;
    object-fit: contain;
}

.cart-total {
    font-size: 26px;
    font-weight: bold;
    text-align: right;
    margin-top: 20px;
}

.clear-btn {
    margin-top: 20px;
    background: #dc2626;
    color: white;
    padding: 12px 18px;
    border: none;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.clear-btn:hover {
    background: #ef4444;
}

.remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #dc2626;
    color: white;
    border: none;
    font-size: 18px;
    font-weight: bold;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}
.remove-btn:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* FOOTER */
footer {
    background: #1f2937;
    color: white;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: #3b82f6;
    margin-bottom: 15px;
}

.footer-section h4 {
    margin-bottom: 10px;
    color: #60a5fa;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    background: #111827;
    text-align: center;
    padding: 20px;
    border-top: 1px solid #374151;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }
    
    .nav-menu {
        display: none;
    }
    
    main {
        padding: 20px;
        margin: 20px auto;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 10px;
    }
    
    .cart-item img {
        height: 60px;
    }
    
    .quantity-controls {
        justify-content: center;
        margin-top: 10px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 20px;
    }
}
