* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
}

header {
    text-align: center;
    padding: 30px 20px;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

header h1 {
    margin: 0;
    font-size: 42px;
}

header p {
    color: #aaa;
}

main {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    padding: 25px;
}

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

.product-card {
    background: #1d1d1d;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #333;
    transition: 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
}

.product-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    display: block;
}

.price {
    font-size: 24px;
    font-weight: bold;
    margin: 15px 0;
}

button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: #e53935;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    opacity: 0.9;
}

.cart {
    background: #1d1d1d;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #333;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-footer {
    margin-top: 20px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

.cart-item {
    background: #2a2a2a;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 12px;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hidden {
    display: none;
}

.modal-content {
    background: #1d1d1d;
    width: 100%;
    max-width: 500px;
    padding: 25px;
    border-radius: 16px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

label {
    display: block;
    margin-top: 15px;
    margin-bottom: 6px;
}

input,
select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
}

@media (max-width: 900px) {

    main {
        grid-template-columns: 1fr;
    }

    .cart {
        position: static;
    }

}