﻿@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

.AddtoCart {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

.container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    padding: 40px;
}

.cart-section {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.cart-header {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
}

.cart-empty {
    text-align: center;
    padding:20px;
}

    .cart-empty img {
        width: 150px;
        margin: 20px 0;
        opacity: 0.8;
    }

    .cart-empty h2 {
        font-size: 20px;
        color: #555;
        margin-bottom: 10px;
    }

.shop-now {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background: black;
    color: white;
    text-decoration: none;
    font-size: 14px;
    border-radius: 5px;
    transition: background 0.3s, transform 0.2s;
}

    .shop-now:hover {
        /* background: #0056b3; */
        transform: translateY(-2px);
    }

.items-container {
    display: none;
    flex-direction: column;
    display: flex;
    min-height: 480px;
    max-height: 590px;
    overflow-y: auto;
}

.cart-item {
    position: relative;
    /* Ensure the parent container is positioned */
    display: grid;
    grid-template-columns: 120px 1.6fr 1.4fr;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #fff;
    margin: 5px 0;
    max-width: 900px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cart-item-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    padding-left: 20px;
}

    .cart-item-details h4 {
        font-size: 1rem;
        color: #333;
        margin: 0;
        cursor:pointer;
    }
        .cart-item-details h4:hover {
            color: #666;
        }
        .cart-item-details p {
            font-size: 0.8rem;
            color: #666;
            margin: 5px 0;
        }

    .cart-item-details .excluded {
        color: #27ae60;
        font-size: 0.85rem;
    }

.cart-item-actions {
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .cart-item-actions label {
        display: block;
        font-size: 0.85rem;
        margin-bottom: 5px;
    }

    .cart-item-actions select {
        padding: 5px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .cart-item-actions .total-price {
        font-weight: bold;
        font-size: 1.1rem;
        margin: 10px 0;
        color: #333;
    }

    .cart-item-actions button {
        padding: 8px 15px;
        background-color: #e74c3c;
        color: #fff;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        font-size: 0.9rem;
        transition: background 0.3s ease;
    }

        .cart-item-actions button:hover {
            background-color: #c0392b;
        }

.cancel-icon {
    position: absolute;
    top: 5px;
    right: 12px;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    color: #333;
    transition: transform 0.8s ease, color 0.8s ease;
}

    .cancel-icon:hover {
        transform: rotate(270deg);
        /* Rotate the icon 180 degrees */
        color: #ff6b6b;
        /* Change color on hover for better interactivity */
    }

/* Responsive Styles */
@media (max-width: 768px) {
    .cart-item-details h4 {
        font-size: 1rem;
    }
    .cancel-icon {
        top: 0px;
        font-size: 16px;
    }
    .cart-item {
        grid-template-columns: 120px 1fr;
        grid-template-rows: 2fr 0.5fr;
        padding: 10px;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        /* Span from the first to the last column */
        grid-row: 2;
        /* Place in the second row */
    }

        .cart-item-actions select {
            width: 150%;
        }

    
}
/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    .cart-item-details {
        padding-left: 0;
    }
    .cart-item {
        flex-direction: column; /* Stacks items vertically */
        text-align: center; /* Center-aligns content */
    }

    .cart-item-image img {
        margin: 0 auto; /* Centers image */
    }

    .cart-item-actions {
        text-align: center; /* Centers actions */
        margin-top: 10px; /* Adds space between sections */
    }

        .cart-item-actions select {
            width: auto; /* Adjust dropdown width */
        }
}


.cart-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 30px;
    border-top: 2px solid #f0f0f0;
}

.summary-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Roboto', sans-serif;
    max-width: 400px;
    margin: 0 auto;
}

    .summary-section h3 {
        font-size: 22px;
        color: #333;
        margin-bottom: 20px;
        font-weight: 500;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 10px;
    }

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
    transition: all 0.2s ease-in-out;
}

    .summary-item:hover {
        color: #333;
    }

    .summary-item.total {
        font-weight: bold;
        font-size: 18px;
        color: #000;
    }
    .summary-item .discount {
        color: #1aa179;
    }
hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

.checkout-btn {
    background-color: #ffcc00;
    border: 1px solid #ffcc00;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    width: 100%;
    cursor: pointer;
    margin-top: 20px;
    text-align:center;
    transition: all 0.3s ease-in-out;
}

    .checkout-btn:hover {
        background-color: #ffffff; /* Dark contrast on hover */
        color: #343a40;
        border-color: #ffe800;
        transform: scale(1.03);
    }

    .checkout-btn .lock-icon {
        margin-right: 10px;
    }

.credit-card-offer {
    margin-top: 20px;
    font-size: 14px;
    color: #555;
    background: #f7f7f7;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease-in-out;
}

    .credit-card-offer:hover {
        background: #f0f0f0;
    }

    .credit-card-offer a {
        text-decoration: none;
        font-weight: 500;
    }

        .credit-card-offer a:hover {
            text-decoration: underline;
        }

.payment-icons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

    .payment-icons img {
        width: 40px;
        height: auto;
        transition: transform 0.3s ease-in-out;
    }

        .payment-icons img:hover {
            transform: scale(1.1);
        }

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .summary-section {
        margin: 20px auto;
        max-width: none;
        width: 95%;
    }
}

/* Scrollbar corner */
::-webkit-scrollbar-corner {
    background: #f0f0f0; /* Same as track background */
}
/* Scrollbar styling for consistency */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 10px;
    border: 2px solid #fff;
    transition: background-color 0.3s ease;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #555;
    }
