* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background-color: #ff5722;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #333;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
}

main {
    padding: 2rem 0;
}

.products {
    margin-bottom: 2rem;
}

.products h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: #333;
}

.price-note {
    text-align: center;
    font-weight: bold;
    color: #ff5722;
    margin-bottom: 2rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.product-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card h3 {
    padding: 0.5rem 1rem;
    color: #333;
}

.product-card p {
    padding: 0 1rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

.product-card button {
    display: block;
    width: 90%;
    margin: 0 auto 1rem;
    padding: 0.5rem;
    background-color: #ff5722;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.product-card button:hover {
    background-color: #e64a19;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 101;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.cart-header h3 {
    font-size: 1.2rem;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
    padding: 0 1rem;
}

.cart-item-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.cart-item-price {
    color: #ff5722;
    font-size: 0.9rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
}

.cart-item-quantity button {
    background-color: #eee;
    border: none;
    width: 25px;
    height: 25px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-item-quantity span {
    margin: 0 0.5rem;
}

.remove-item {
    color: #ff5722;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
}

.cart-total {
    padding: 1rem;
    border-top: 1px solid #eee;
    text-align: right;
}

.cart-total p {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.checkout-btn {
    width: 100%;
    padding: 0.8rem;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #388e3c;
}

.empty-cart-message {
    text-align: center;
    color: #666;
    padding: 2rem 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 102;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal h3 {
    color: #4caf50;
    margin-bottom: 1rem;
}

.modal p {
    margin-bottom: 1rem;
}

.confirm-btn {
    padding: 0.5rem 2rem;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.confirm-btn:hover {
    background-color: #388e3c;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .cart-sidebar {
        width: 300px;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 280px;
    }
}