/* Ensure the page's main container takes up at least the full viewport height minus the header/footer */
html,
body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
}

/* General Layout */
.container-custom {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    flex: 1 0 auto;
}

.product-detail-layout {
    display: flex;
    flex-wrap: wrap;
    /* Allows for wrapping on smaller screens */
    gap: 30px;
    align-items: flex-start;
}

/* Product Image Section */
.product-image-section {
    flex: 1 1 45%;
    /* Flex-grow, flex-shrink, basis */
    max-width: 500px;
}

.single-image {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
}

/* Custom Carousel Styling */
.carousel-custom {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    border-radius: 8px;
}

.carousel-inner-custom {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-item-custom {
    flex-shrink: 0;
    width: 100%;
}

.carousel-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.carousel-indicators-custom {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.indicator-button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.indicator-button.active {
    background-color: #fff;
}

.carousel-control-custom {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s;
}

.carousel-control-custom:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.carousel-control-custom.prev {
    left: 10px;
}

.carousel-control-custom.next {
    right: 10px;
}

/* Product Information Section */
.product-info-section {
    flex: 1 1 50%;
}

.product-name {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.product-short-description {
    color: #6c757d;
    font-style: italic;
    margin-bottom: 15px;
}

.product-price {
    font-size: 2rem;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 20px;
}

.product-long-description {
    line-height: 1.6;
    color: #333;
    margin-bottom: 25px;
}

.btn-add-to-cart {
    padding: 15px 30px;
    font-size: 1.25rem;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-add-to-cart:hover {
    background-color: #0056b3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-detail-layout {
        flex-direction: column;
    }

    .product-image-section {
        max-width: 100%;
    }

    .product-info-section {
        padding-top: 20px;
    }
}