/* Product Section */
.product-section {
    padding: 10px 0;
}

.main-container {
    margin: auto;
    padding: 20px;
    padding-top: 0;
}

.title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
}

#activeCategoryTitle {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #0c1d3d;
    text-align: left;
    width: 100%;
    overflow-x: hidden;
}

#productTitle {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #0c1d3d;
    text-align: left;
    width: 100%;
    overflow-x: hidden;
}

/* Products Container */
.products-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Products Grid */
.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
}

/* Product Card */
.product-card {
    background: #ffffff;
    padding: 15px;
    border-radius: 10px;
    /* width: fit-content; */
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.1);
    text-align: left;
    transition: transform 0.3s ease-in-out;
}

/* Product Card Hover Effect */
.product-card:hover {
    transform: translateY(-5px);
}

/* Product Image */
.product-card img {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
}

/* Product Info */
.product-info h3 {
    font-size: 18px;
    font-weight: bold;
    color: #0c1d3d;
    margin-top: 10px;
}

.product-info p {
    font-size: 14px;
    color: #555;
    margin: 5px 0;
}


/* Layout */
.main-content {
    display: flex;
    gap: 20px;
}

/* Ensure sidebar and dropdown maintain spacing */
.categories-sidebar,
.categories-dropdown {
    margin-bottom: 20px;
}

/* Categories Sidebar (Large screens) */
.categories-sidebar {
    width: 350px;
    /* background: #fff; */
    padding: 15px;
    display: block;
}

.categories-sidebar ul {
    list-style: none;
    padding: 0;
}

.category-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

/* Sidebar Categories (Big Screens) */
#categoryList {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
    /* 1px gap between categories */
}

.category-item {
    background: #f1f1f1;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
    text-align: center;
}

.category-item.active {
    background: #e0e0e0;
    font-weight: bold;
    border-left: 4px solid #007bff;
}

.category-item:hover {
    border-left: 3px solid #007bff;
    background: #d6d6d6;
}

/* Dropdown (Small screens) */
.categories-dropdown {
    display: none;
    margin-bottom: 20px;
}

.categories-dropdown select {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid #007bff;
    border-radius: 10px;
    background: #ffffff;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.1);
    outline: none;
    overflow-x: hidden;
}

.categories-dropdown select:hover {
    background: #e6f0ff;
}

.categories-dropdown select:focus {
    border-color: #0056b3;
    background: #e6f0ff;
    box-shadow: 0px 0px 5px rgba(0, 91, 187, 0.5);
}


.view-product {
    background: #4d8fe0;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
}

/* Button Hover Effect */
.view-product:hover {
    background: #2661a9;
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Prevents page scrolling */
    padding: 20px;
}

.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    max-width: 600px;
    text-align: left;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal img {
    display: block;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    /* Ensures the image fits within the modal without cropping */
    margin-bottom: 15px;
}

/* Special handling for tall images */
.modal img.tall {
    width: auto;
    height: 100%;
    max-height: 500px;
    object-fit: contain;
}

/* Special handling for wide images */
.modal img.wide {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}

/* Close Button */
.close-modal {
    position: sticky;
    top: 0;
    right: 0;
    font-size: 20px;
    font-weight: bold;
    background: #2661a9;
    color: white;
    border: none;
    padding: 8px 12px;
    /* border-radius: 50%; */
    cursor: pointer;
    transition: 0.3s ease-in-out;
    z-index: 10;
    align-self: flex-end;
    display: block;
    margin-left: auto;
}

/* Hover effect for close button */
.close-modal:hover {
    background: #1e4f8c;
}

/* Add separation lines between each content section */
.modal-content p {
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.modal-content p:last-child {
    border-bottom: none;
}

/* Responsive */
@media (max-width: 768px) {
    .categories-sidebar {
        display: none;
    }

    .products {
        grid-template-columns: repeat(1, 1fr);
    }

    .categories-dropdown {
        display: block;
    }

    .main-content {
        flex-direction: column;
    }

    .modal-content {
        width: 100% !important;
        max-height: 85vh;
    }
}

.no-scroll {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

.breadnav ol.breadcrumb {
    padding: 15px !important;
    padding-bottom: 0 !important;
    margin: 0 !important;
}