body {
    font-family: 'Poppins', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    color: #333;
    opacity: 0;
    animation: fadeIn 0.6s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#orders-button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

#orders-button i {
    font-size: 1.2em;
}

#orders-button {
    position: relative;
}

.order-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: red;
    color: white;
    border-radius: 50%;
    padding: 4px 10px;
    font-size: 0.8em;
}

@media (max-width: 480px) {
    #orders-button {
        font-size: 0.9em;
        /* Smaller font on very small screens */
        padding: 8px 12px;
    }
}

#toast-container {
    text-align: center;
    position: fixed;
    top: 50%;
    /* Center vertically */
    left: 50%;
    /* Center horizontally */
    transform: translate(-50%, -50%);
    /* Adjust for element size */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center items horizontally */
}

.toast {
    opacity: 0;
    transform: translateY(-20px);
    /* Start slightly above center */
    transition: opacity 0.3s ease, transform 0.3s ease;
    /* Add transition for smooth animation */
    margin-bottom: 10px;
    /* Add some space between toasts */
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    /* Move to center */
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-in-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo img {
    height: 30px;
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 10px;
    border: 2px solid #007bff;
    border-radius: 25px;
    outline: none;
    font-size: 16px;
    transition: 0.3s ease-in-out;
}

.search-bar input:focus {
    border-color: #0056b3;
    box-shadow: 0 0 8px rgba(0, 91, 187, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links a {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.3s ease-in-out;
}

.nav-links a:hover {
    color: #0056b3;
}

.nav-links .cart,
.profile-menu {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links .cart i,
.profile-menu i {
    font-size: 25px;
    color: #007bff;
}

.cart {
    display: flex;
    align-items: center;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    color: #007bff;
}

.profile-menu {
    margin-left: 10px;
    left: 0;
    position: relative;
    display: inline-block;
}

.edit-btn {
    color: white;
    background-color: #007bff;
}

.profile-menu .profile-btn {
    background: none;
    border: none;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 5px;
    color: #007bff;
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    min-width: 150px;
    z-index: 1000;
    overflow: hidden;
    padding: 20px;
}

.profile-dropdown a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.3s ease-in-out;
}

.profile-dropdown a:hover {
    background: #f0f0f0;
}

.profile-menu:hover .profile-dropdown {
    display: block;
}

@keyframes cart-move {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(5px);
    }
}

.nav-links .cart:hover {
    animation: cart-move 0.5s ease-in-out infinite;
}

@keyframes cart-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

.nav-links .cart:active {
    animation: cart-bounce 0.3s ease;
}

.menu-toggle {
    display: none;
}

.ad-section {
    width: 100%;
    max-width: 1640px;
    height: auto;
    aspect-ratio: 1640 / 664;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slideshow-container {
    position: relative;
    width: 100%;
     max-width: auto; 
    height: auto;
    aspect-ratio: 1640 / 664;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    display: none;
    width: 100%;
    position: relative;
}

.slide picture img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dots-container {
    text-align: center;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background-color: #007bff;
    transform: scale(1.2);
}

.delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: red;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    opacity: 0.8;
    transition: 0.3s;
}

.delete-btn:hover {
    opacity: 1;
}

.upload-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.upload-section form {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.upload-section input[type="file"] {
    padding: 8px;
    border: 2px solid #007bff;
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.upload-section button {
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.upload-section button:hover {
    background: #0056b3;
}

.admin-actions {
    margin-top: 20px;
    text-align: center;
}

.admin-actions button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s;
}

.admin-actions button:hover {
    background-color: #0056b3;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 10px 15px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
    user-select: none;
}

.prev:hover,
.next:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev {
    left: 10px;
}

.next {
    right: 10px;
}

.discount-star {
    display: inline-block;
    background-color: gold;
    color: black;
    font-weight: bold;
    font-size: 12px;
    padding: 5px 10px;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%,
            50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.delete-btn-product {
    color: white;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

.delete-btn-product:hover {
    background-color: #cc0000;
}

.delete-btn-product:active {
    background-color: #a30000;
}

.product-container {
    height: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    max-width: 1500px;
    margin: 0 auto;
    justify-content: center;
}

.product-card {
    position: relative;
    /* Needed for absolute positioning of the banner */
    width: 350px;
    height: auto;
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s ease-in-out forwards;
    display: flex;
    flex-direction: column;
}

.discount-banner {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: red;
    color: white;
    font-size: 1em;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 1;
}

/* Rest of your CSS remains the same */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card:nth-child(1) {
    animation-delay: 0.2s;
}

.product-card:nth-child(2) {
    animation-delay: 0.4s;
}

.product-card:nth-child(3) {
    animation-delay: 0.6s;
}

.product-card:nth-child(4) {
    animation-delay: 0.8s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.product-card img {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    object-fit: fill;
}

.product-card img {
    transition: transform 0.3s ease-in-out;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h3 {
    margin: 15px 0 5px;
    font-size: 18px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 55px;
}

.product-card p {
    font-size: 24px;
    color: #007bff;
    font-weight: bold;
}

.product-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.product-buttons button {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart {
    background-color: #007bff;
    color: white;
}

.add-to-cart:hover {
    background-color: #0056b3;
}

.buy-now {
    background-color: #28a745;
    color: white;
}

.buy-now:hover {
    background-color: #1e7e34;
}

.product-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 50px 10px;
    max-width: 1500px;
    margin: auto;
}

.product-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.product-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 10px;
}

.product-info {
    flex: 1;
    text-align: left;
    max-width: 500px;
}

.product-info h2 {
    font-size: 28px;
    color: #333;
}

.product-info p {
    font-size: 20px;
    color: #555;
    margin-bottom: 15px;
}

.product-info .product-description {
    font-size: 16px;
    color: #666;
    line-height: 1.5;
}

button {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

@media (min-width: 1024px) {
    .search-bar {
        max-width: 400px;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .slideshow-container {
        display: flex;
    }
}

@media (max-width: 768px) {
    #toast-container {
        text-align: center;
        position: fixed;
        top: 20%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 1000;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .toast {
        opacity: 0;
        transform: translateY(-20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
        margin-bottom: 10px;
    }

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .delete-btn {
        top: 5px;
        right: 5px;
        font-size: 12px;
        padding: 6px 10px;
    }

    .slideshow-container {
        position: relative;
        width: 100%;
        max-width: 800px;
        height: auto;
        aspect-ratio: 800 / 664;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .product-detail {
        flex-direction: column;
        text-align: center;
    }

    .product-image img {
        max-width: 300px;
    }

    .product-info {
        text-align: center;
    }

    .prev,
    .next {
        font-size: 18px;
        padding: 8px 12px;
    }

    .navbar {
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 10px 5%;
    }

    .logo img {
        width: 150px;
    }

    .search-bar {
        order: 2;
        width: 80%;
        margin: 10px 15px;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 60px;
        right: 5%;
        width: 200px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        border-radius: 5px;
        padding: 10px 0;
        align-items: flex-start;
    }

    .nav-links a {
        display: block;
        text-align: left;
        width: 100%;
        padding-left: 10px;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .profile-menu {
        left: 0;
        width: 100%;
        text-align: left;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-direction: row;
        position: relative;
    }

    .profile-menu .profile-btn {
        text-align: left;
        padding-left: 0px;
        border: none;
        background: none;
        font-size: 16px;
        font-weight: bold;
        cursor: pointer;
        color: #007bff;
    }

    .profile-menu i {
        text-align: left;
        padding-left: 0px;
    }

    .profile-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: white;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        border-radius: 5px;
        min-width: 150px;
        z-index: 1000;
        overflow: hidden;
        padding: 10px;
    }

    .profile-dropdown a {
        color: #007bff;
        padding: 10px;
        font-size: 16px;
        text-align: left;
        display: block;
    }

    .profile-menu.show-dropdown .profile-dropdown {
        display: block;
    }

    .menu-toggle {
        margin-left: 20px;
        order: 3;
        display: block;
        cursor: pointer;
        font-size: 25px;
        color: #007bff;
    }

    .upload-section form {
        flex-direction: column;
        width: 100%;
        align-items: center;
    }

    .upload-section input[type="file"] {
        width: 100%;
        text-align: center;
    }

    .upload-section button {
        width: 100%;
    }

    .product-container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 480px) {
    .search-bar {
        max-width: 100%;
    }

    .product-container {
        padding: 10px;
    }
}