﻿/* ----------------------------------------------
   Global Styles & Resets
---------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    color: #333;
}

/* ----------------------------------------------
   Header
---------------------------------------------- */
.header-logo-img {
    margin:0 auto;
    width: 95vw;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

    .header-logo-img a img {
        max-height: 70px;
    }

/* ----------------------------------------------
   Layout for Checkout Form & Cart
---------------------------------------------- */
#formCheckout {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ----------------------------------------------
   Customer Details Section
---------------------------------------------- */
.customer-details {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

    .customer-details input,
    .customer-details select {
        margin-bottom: 10px;
        padding: 10px;
        font-size: 16px;
        border: 1px solid #ccc;
        border-radius: 5px;
        width: 100%;
        transition: border-color 0.3s ease;
    }

        .customer-details input:focus,
        .customer-details select:focus {
            outline: none;
            border-color: #ffe800;
        }

/* ----------------------------------------------
   Cart Container
---------------------------------------------- */
.cart-container {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1.5rem;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
}

    .cart-container h1 {
        color: #ffe800; /* Theme color for headings */
        margin-bottom: 1.5rem;
        font-size: 2.25rem;
        text-align: center;
        grid-column: 1 / -1;
    }

/* ----------------------------------------------
   Main Content Area
---------------------------------------------- */
main {
    padding-left: 20px;
}

/* ----------------------------------------------
   Cart Summary
---------------------------------------------- */
.cart-summary {
    background: #ffffff; /* Soft yellow background */
    border: 1px solid #ffe800;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    animation: fadeInRight 1s ease-in-out;
    z-index: 1;
}

    .cart-summary h3 {
        border-bottom: 1px solid #ddd;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        font-size: 1.5rem;
    }

    .cart-summary p {
        margin: 0.5rem 0;
        font-size: 1rem;
    }

        .cart-summary p.price {
            font-weight: bold;
            color: #ffe800;
            animation: pulse 1s infinite;
        }

/* ----------------------------------------------
   Cart Items
---------------------------------------------- */
.cart-items {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    height: 400px;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

    .cart-item:hover {
        background-color: #fffbea;
        transform: scale(1.02);
    }

    .cart-item img {
        width: 130px;
        height: 130px;
        object-fit: cover;
        border-radius: 8px;
        margin-right: 1rem;
        transition: transform 0.3s ease;
    }

        .cart-item img:hover {
            transform: scale(1.1);
        }

.item-details {
    flex: 1;
}

    .item-details h2 {
        font-size: 0.8rem;
        color: #333;
    }

    .item-details p {
        margin: 0.5rem 0;
        font-size: 0.8rem;
    }

        .item-details p.price {
            font-size: 1.25rem;
            font-weight: bold;
            color: #ffe800;
            animation: pulse 1s infinite;
        }

/* ----------------------------------------------
   Confirm Order Button
---------------------------------------------- */
#btnConfirmOrder {
    background-color: #ffe800;
    color: #333;
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

    #btnConfirmOrder:hover {
        background-color: #e6d500; /* Slightly darker shade */
        transform: scale(1.02);
    }

/* ----------------------------------------------
   Animations
---------------------------------------------- */
@keyframes fadeInRight {
    0% {
        transform: translateX(10px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ----------------------------------------------
   Responsive Styles
---------------------------------------------- */
@media (max-width: 768px) {
    #formCheckout {
        grid-template-columns: 1fr;
    }

    .cart-container {
        position: static;
        width: 100%;
        margin-top: 1.5rem;
        padding: 1rem;
    }

    .cart-summary {
        margin-top: 1.5rem;
        position: static;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem;
    }

        .cart-item img {
            width: 100px;
            height: 100px;
            margin-bottom: 1rem;
        }

    .item-details h2 {
        font-size: 1.25rem;
    }

    .item-details p {
        font-size: 0.875rem;
    }

    #btnConfirmOrder {
        font-size: 16px;
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .cart-container {
        padding: 0.75rem;
        margin-top: 2rem;
    }

        .cart-container h1 {
            font-size: 1.5rem;
        }

    .cart-item img {
        width: 90px;
        height: 90px;
    }

    .item-details h2 {
        font-size: 1.125rem;
    }

    .item-details p {
        font-size: 0.75rem;
    }
}

/* ----------------------------------------------
   Additional Animations (Optional)
---------------------------------------------- */
@keyframes fadeIn123 {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes popUp123 {
    from {
        transform: scale(0.9);
    }

    to {
        transform: scale(1);
    }
}

@keyframes bounce123 {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}
