.product-image {
    width: 100%;
    height: 100%; /* Ensures the image fills the container */
    object-fit: cover; /* Ensures the image covers the container without distortion */
}

.image-container {
    position: relative;
    overflow: hidden;
}

.delete-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
}

.image-container:hover .delete-image-overlay {
    opacity: 1;
}

.delete-image-button-large {
    background-color: #f56a6a;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    z-index: 10;
}

.image-container {
    position: relative;
    overflow: hidden;
}

.prev-arrow, .next-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%; /* Make it circular */
    width: 40px; /* Set a fixed width and height for the circle */
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.prev-arrow {
    left: 0;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.next-arrow {
    right: 0;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.modal-prev-arrow, .modal-next-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%; /* Make it circular */
    width: 40px; /* Set a fixed width and height for the circle */
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 1002; /* Higher z-index to be above modal content */
    opacity: 1; /* Always visible in modal */
    transition: opacity 0.3s ease;
}

.modal-prev-arrow {
    left: 20px; /* Position from the left edge of the modal content */
}

.modal-next-arrow {
    right: 20px; /* Position from the right edge of the modal content */
}

.product-image-container:hover .prev-arrow,
.product-image-container:hover .next-arrow {
    opacity: 1;
    z-index: 11;
}

.modal-images:hover .modal-prev-arrow,
.modal-images:hover .modal-next-arrow {
    opacity: 1;
}

ul.actions.vertical-align-center {
    align-items: center;
}

.whatsapp-icon {
    font-size: 2.5em;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column; /* Arrange items vertically */
    justify-content: center;
    align-items: center;
    overflow: hidden;
    width: 90vw; /* Make modal content take up most of the viewport width */
    height: 90vh; /* Make modal content take up most of the viewport height */
    box-sizing: border-box; /* Include padding in width/height */
}

.modal-content img {
    max-width: 80vw; /* Image scales within the new modal content size */
    max-height: 80vh; /* Image scales within the new modal content size */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure the whole image is visible */
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    z-index: 1001;
}

/* Custom File Upload Button */
.custom-file-upload {
    border: 1px solid #ccc;
    display: inline-block;
    padding: 6px 12px;
    cursor: pointer;
}

input[type="file"] {
    display: none;
}

/* Responsive Table/Card View */
.mobile-only {
    display: none; /* Hidden by default on larger screens */
}

 @media screen and (max-width: 736px) {
    .desktop-only {
        display: none; /* Hide table on small screens */
    }

    .mobile-only {
        display: block; /* Show cards on small screens */
    }
}

.delete-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.delete-modal-content {
    position: relative;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    max-width: 500px; /* Adjust as needed */
    text-align: center;
}

.delete-modal-content h3 {
    margin-bottom: 10px;
}

.delete-modal-content .actions button {
    margin: 0 10px;
}

.nav-item .nav-link {
    vertical-align: middle;
}

 @media screen and (max-width: 1280px) {
    #top-navbar {
        display: none !important; /* Ensure it's hidden on mobile */
    }

    #sticky-header-container {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 7%;
        z-index: 1000; /* Ensure it's above other content */
        background-color: #252526; /* Example background, match sidebar background */
        /* Add padding to the container to give space for the button */
        padding: 0.5em 1em;
        display: flex; /* Use flexbox to position the toggle button */
        justify-content: flex-end; /* Push the toggle button to the right */
        align-items: center; /* Vertically align the toggle button */
    }

#sidebar .toggle {
    /* Remove fixed positioning as parent is fixed */
    position: relative; /* Or static, depending on desired flow */
    width: 4em; /* Fixed width for the button */
    height: 4em; /* Fixed height for the button */
    /* z-index is inherited from parent, but can be set if needed */
    background-color: transparent; /* Make background transparent, container has background */
    text-indent: -9999px; /* Hide the "Toggle" text */
    overflow: hidden;
    border-bottom-left-radius: 0.375em;
    border-bottom-right-radius: 0.375em;
    display: block; /* Ensure it's a block element for width/height to apply */
    /* Remove background-color from here, as it's on the container */
}

#sidebar .toggle:before {
    content: "\f0c9"; /* Explicitly set the Font Awesome bars icon content */
    font-family: 'Font Awesome 5 Free'; /* Ensure correct font */
    font-weight: 900; /* Ensure solid icon style */
    color: white; /* Icon color */
    position: absolute; /* Keep original absolute positioning */
}

#sidebar .toggle:after {
    content: none; /* Hide the :after pseudo-element if it's causing issues */
}

}

/* Slideshow container */
.slideshow-container {
    position: relative;
    width: 100%;
    height: 800px; /* Fixed height for the slideshow */
    overflow: hidden; /* Hide overflowing parts of the images */
}

/* Slides */
.slide {
    display: none;
    width: 100%;
    height: 100%;
    animation-name: slide;
    animation-duration: 1.5s;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Make images cover the container */
}

@keyframes slide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Text on top of the image */
.text {
    color: #f2f2f2;
    font-size: 3em;
    font-weight: bold;
    padding: 8px 12px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
    animation-name: slideIn;
    animation-duration: 1.5s;
}

@keyframes slideIn {
    from { bottom: -50px; opacity: 0; }
    to { bottom: 8px; opacity: 1; }
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

body {
    background-color: #121212;
    color: #ffffff;
}

.round-button {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #00bfff;
    margin: 0 auto;
}

.round-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.text-on-image {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: #222;
    padding: 20px;
    border-radius: 10px;
    max-width: 40%;
}

.category-item {
    text-align: center;
}

.category-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.category-sidebar {
    padding: 20px;
    background-color: #222;
    border-radius: 10px;
    margin-bottom: 20px;
}

.category-sidebar h3 {
    color: #00bfff;
    margin-bottom: 15px;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin-bottom: 5px;
}

.category-item:hover {
    background-color: #333;
}

.category-item.active {
    background-color: #00bfff;
    color: #fff;
}

.search-box {
    margin-top: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
}

.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive columns */
    gap: 5em; /* Space between articles */
    align-items: stretch; /* Ensures all items in a row have the same height */
}

.posts article {
    width: 100%; /* Makes sure the article takes the full height of the grid cell */
}

.posts article .product-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* This will make the images cover the container without distortion */
    transition: transform 0.3s ease;
}

.posts article {
    margin-bottom: 0; /* Remove previous margin */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push content to top and bottom */
    background-color: #222; /* Add background to articles */
    padding: 1.5em; /* Add padding */
    border-radius: 10px; /* Rounded corners */
    box-sizing: border-box;
}

.pagination {
    margin-top: 2em;
}

.product-list-container {
    display: flex;
    flex-wrap: wrap;
}

/* New Product List Layout */
.product-list-page {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    flex-grow: 1;
}

.product-card {
    background-color: #222;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-image-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    color: #00bfff;
    margin-top: 0;
}

.product-info p {
    flex-grow: 1;
}

.product-actions {
    margin-top: 1em;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.product-actions .button {
    max-width: 100%;
}

.pagination-container {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
