/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* General Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #55883B;
    padding: 15px 30px;
    color: white;
    font-weight: 600;
    font-size: 20px;
    border-bottom: 3px solid #55883B;
}

.icon-cart {
    position: relative;
    cursor: pointer;
}

/* .icon-cart span {
    background: red;
    color: white;
    font-size: 14px;
    padding: 7px;
    border-radius: 50%;
    position: absolute;
    top: -10px;
    right: -10px;
} */

/* Product List */
.listProduct {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.item img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.item h2 {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
}
/* Product Grid */
#products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding-top: 20px;
}

/* Product Card */
.product-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

/* Product Image */
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 2px solid #ddd;
    transition: transform 0.3s ease-in-out;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* Product Info */
.card-body {
    text-align: center;
    padding: 15px;
}
.product-info h3{
    text-align: center;
    padding: 10px;
}
.card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.text-danger {
    color: #e63946 !important;
    font-size: 1.5rem;
    font-weight: bold;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background: #55883B;
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease-in-out;
}

.add-to-cart-btn:hover {
    transform: scale(1.05);
    box-shadow: 0px 4px 15px rgba(255, 154, 158, 0.4);
}

.add-to-cart-btn:active {
    background: #004099;
    transform: scale(0.98);
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4500;
    color: white;
    padding: 5px 10px;
    font-size: 0.9rem;
    font-weight: bold;
    border-radius: 5px;
}

.price {
    font-size: 20px;
    font-weight: bold;
    color: #ff6600;
}

/* button.addCart {
    background: #ff6600;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

button.addCart:hover {
    background: #d94f00;
} */

/* .discount-badge {
    background-color: red;
    color: white;
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 5px;
} */
/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
    padding: 20px;
    overflow-y: auto;
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
    /* Hides the sidebar */
    z-index: 1000;
}

.cart-sidebar.show {
    transform: translateX(0);
    /* Moves the sidebar into view */
}

#close-cart {
    background: red;
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 16px;
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

.cart-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 10px;
}

.cart-item-details {
    display: flex;
    align-items: center;
    flex-grow: 1;
}

.cart-item-details div {
    flex-grow: 1;
}

.cart-item p {
    margin: 0;
    font-size: 14px;
}
/* Price */
.product-price {
    color: #28a745;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(90deg, #d4edda, #c3e6cb);
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-price:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.5);
}

.original-price {
    font-weight: bold;
    color: green;
    font-size: 16px;
    /* text-decoration: line-through; */
}
span.original-price{
    font-size: large;
    padding-bottom: 5px;
}
.discounted-price {
    text-decoration: line-through;
    color: gray;
    font-size: 14px;
    margin-left: 5px;
}
.quantity-controls {
    display: flex;
    align-items: center;
}

.quantity-controls button {
    background: red;
    color: white;
    border: none;
    padding: 3px 7px;
    font-size: 14px;
    cursor: pointer;
}

.quantity-controls span {
    margin: 0 10px;
    font-weight: bold;
}
/* Checkout Button */
.checkout-btn {
    background: linear-gradient(135deg, #36d1dc, #55883B);
    color: white;
    border: none;
    padding: 14px 24px;
    cursor: pointer;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    width: 100%;
    margin-top: auto;
    transition: all 0.3s ease-in-out;
}

.checkout-btn:hover {
    transform: scale(1.07);
    box-shadow: 0px 5px 20px rgba(107, 229, 91, 0.582);
}
.checkout-btn a{
    text-decoration: none;
    color: #f8f9fa;
}
/* Cart Total */
#cart-total {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 15px 0;
}

#cart-total span {
    color: #ff416c;
    font-size: 22px;
}
/* Smooth Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.item {
    animation: fadeInUp 0.5s ease-in-out;
}
/* Smooth Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-sidebar ul,
.cart-sidebar p,
.cart-sidebar button {
    animation: fadeIn 0.5s ease-in-out;
}
footer {
    background: #111;
    color: white;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: auto;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease-out forwards;
}

.footer-logo {
    font-size: 2rem;
    font-weight: bold;
    color: #C1E899;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo img {
    width: 50px;
    animation: float 3s infinite alternate ease-in-out;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    position: relative;
}

.footer-section h3::after {
    content: "";
    width: 40px;
    height: 3px;
    background: #C1E899;
    display: block;
    margin-top: 5px;
    transition: width 0.4s ease;
}

.footer-section:hover h3::after {
    width: 80px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin: 8px 0;
}

.footer-section ul li a {
    color: #bbb;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-section ul li a:hover {
    color: white;
    transform: translateX(5px);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    color: #C1E899;
    font-size: 1.4rem;
    transition: all 0.3s ease-in-out;
}

.social-icons a:hover {
    transform: scale(1.2) rotate(10deg);
    color: white;
}

.newsletter {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    overflow: hidden;
}

.newsletter input {
    width: 100%;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    border-radius: 30px 0 0 30px;
    transition: all 0.3s ease;
}

.newsletter button {
    padding: 12px 20px;
    background: #C1E899;
    border: none;
    color: black;
    cursor: pointer;
    font-size: 1rem;
    border-radius: 0 30px 30px 0;
    transition: all 0.3s ease;
}

.newsletter button:hover {
    background: white;
    color: black;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 10px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-10px);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
    }

    .listProduct {
        grid-template-columns: 1fr;
    }
         .product-card img {
             height: 200px;
         }
    
         .card-title {
             font-size: 1rem;
         }
    
         .text-danger {
             font-size: 1.2rem;
         }
}