/* Wrapper */
.carousel-wrapper {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    background-color: #f4f4f4; /* Added background color to help see if the wrapper is showing */
}

/* Title */
.carousel-title {
    font-size: 24px;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

/* Carousel */
.carousel {
    display: flex;
    justify-content: center; /* Center items horizontally */
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    white-space: nowrap; /* Prevent items from stacking */
}


/* Items */
.carousel-item {
    min-width: 220px;
    border: 1px solid #333;
    padding: 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    color: #000;
    text-decoration: none;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    display: inline-flex; /* Ensures it’s laid out as a block in a flex container */
    flex-direction: column;
    align-items: center; /* Center items horizontally */
    height: 100%;
    box-sizing: border-box; /* Make sure padding doesn't cause overflow */
}

.carousel-item-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure the content is spaced evenly */
    height: 100%;
}

.carousel-item img {
    max-width: 100%; /* Ensure image scales properly within its container */
    margin-bottom: 10px; /* Adds space between the image and the button */
    display: block; /* Ensures image is treated as a block element */
}

.buy-button {
    margin-top: 15px; /* Adds some space above the button */
    display: block; /* Ensures button is treated as a block-level element */
    width: 100%; /* Makes button span the full width of the parent container */
    padding:20px;
}



/* Hover effect */
.carousel-item:hover {
    background: #bcbcbc;
    color: #fff;
}

/* Modal styles */
.modal {
    display: none; /* Initially hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Semi-transparent background */
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Ensure modal is on top */
}

.modal.show {
    display: flex; /* Display modal when the show class is added */
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    overflow-y: auto; /* Allow scrolling within the modal if content overflows */
}

.modal-content a {
    display: block;
    margin: 10px 0;
    color: #5b5b5b;
    text-decoration: none;
    font-size: 18px;
}

/* Close button */
.modal-close {
    text-align: center;
    font-weight: bold;
    color: #d9534f;
    text-decoration: none;
    font-size: 16px;
    margin-top: 20px;
    background-color: #bcbcbc;
    text-decoration: none; /* Removes underline */
    padding: 30px;
}



/* Mobile Adjustments */
@media (max-width: 768px) {
    .carousel-item {
        padding: 15px;
        min-width: 90%; /* Ensure items take full width on mobile */
    }

    .carousel-title {
        font-size: 20px;
    }

    .modal-content {
        width: 90%; /* Make modal content take up more space on mobile */
    }
}

.modal-title {
    text-align: center;
    font-weight: bold;
}

.carousel-popup-link {
    border: 1px solid #bcbcbc;
    color: #bcbcbc;
    text-align: center;
    padding: 10px;
    display: block;  /* Ensures each link takes up full width */
    text-decoration: none;  /* Removes underline */
}


