.carousel-container {
    position: relative;
    width: 300px;
    /* Adjust width as needed */
    overflow: hidden;
    margin: auto;
    border: 2px solid black;
    border-radius: 20px;
}

.carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-image {
    width: 300px;
    /* Same as container width */
    height: auto;
    border-radius: 8px;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.prev {
    left: 0;
}

.next {
    right: 0;
}

.prev:hover,
.next:hover {
    background-color: black;
}

.info-image-container {
    display: flex;
    align-items: stretch;
    gap: 30px;
    width: 100%;
}

.info-box {
    flex: 1;
    /* Takes 40% of space */
    padding: 20px;
    border-radius: 8px;
}

.column {
    float: left;
    width: 25%;
    padding: 10px;
}

/* Style the images inside the grid */
.column img {
    opacity: 0.8;
    cursor: pointer;
}

.column img:hover {
    opacity: 1;
}

/* Clear floats after the columns */
.row:after {
    content: "";
    display: table;
    clear: both;
}

/* The expanding image container (positioning is needed to position the close button and the text) */
.container {
    position: relative;
    display: none;
}

/* Expanding image text */
#imgtext {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: white;
    font-size: 20px;
}

/* Closable button inside the image */
.closebtn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: white;
    font-size: 35px;
    cursor: pointer;
}

.content-container {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    /* Ensures equal height alignment */
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Left Side: Image Section */
.image-section {
    display: flex;
    flex-direction: column;
    /* Stacks main image & thumbnails */
    align-items: center;
    gap: 15px;
    object-fit: contain;
    max-width: 591px;
    max-height: 591px;
}

/* Main Image Styling */
.main-image {
    width: 591px;
    /* Fixed width */
    height: 550px;
    /* Fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 0px 0px 6px 3px rgb(12, 45, 98);
}

.main-video {
    width: 591px;
    /* Fixed width */
    height: 500px;
    /* Fixed height */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid black;
    box-shadow: 0px 0px 6px 3px rgb(12, 45, 98);
}

/* Image inside Main Image Div */
.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}



/* Thumbnail Section */
.thumbnail-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

/* Thumbnail List */
.thumbnail-list {
    display: flex;
    flex-direction: row;
    gap: 10px;
    overflow: hidden;
    max-width: 520px;
    border-radius: 6px;
    white-space: nowrap;
    border: 3px solid rgb(12, 45, 98);
    /* box-shadow: 0px 0px 6px 3px rgb(12, 45, 98); */
}

/* Thumbnail Images */
.thumbnail-list img {
    width: 120px;
    /* Increased from 75px */
    height: 120px;
    /* Increased from 75px */
    object-fit: contain;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    border: 3px solid transparent;
}

/* Hover Effect for Thumbnails */
.thumbnail-list img:hover {
    border: 2px solid rgb(12, 45, 98);
}

/* Navigation Buttons */
button {
    padding: 8px 12px;
    border: none;
    background-color: rgb(242, 190, 0);
    color: rgb(12, 45, 98);
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s ease-in-out;
}

button:hover {
    background-color: rgb(12, 45, 98);
    color: rgb(242, 190, 0);
}

.hidden {
    display: none;
}


.product-info {
    flex: 1;
    max-width: 42%;
    height: auto;
    /* Matches .main-image */
    background: #f9f9f9;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Ensures even spacing */
    border: 3px solid rgb(12, 45, 98);
    width: 100%;
    max-width: 600px;
    font-family: Arial, sans-serif;
    padding: 20px;
    box-shadow: 2px 2px 10px rgb(12, 45, 98);
    overflow: hidden;
}

/* Title Styling */
.product-info h3 {
    font-size: 24px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
    /* Makes it more structured */
    letter-spacing: 1px;
}

/* Product Details Styling */
.product-info p {
    margin: 10px 0;
    font-size: 17px;
    line-height: 1.5;
    /* Better readability */
    font-weight: 500;
}

.product-info p strong {
    font-size: 18px;
    color: black;
    /* Ensures readability */
}

/* Enhancing the Price */
.product-info p b {
    font-size: 20px;
    font-weight: bold;
}

/* Button Enhancements */
.buy-btn {
    background-color: rgb(242, 190, 0);
    color: rgb(85, 85, 85);
    padding: 12px;
    font-size: 15px;
    border: none;
    border-radius: 6px;
    /* More rounded */
    cursor: pointer;
    width: 215px;
    /* Slightly wider */
    font-weight: 900;
    transition: all 0.3s ease;
    text-transform: uppercase;
    /* Gives a strong CTA effect */
    letter-spacing: 1px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    align-self: center;
    /* Centers button */
}

/* Button Hover Effect */
.buy-btn:hover {
    transform: scale(1.05);
    /* Slight pop-up effect */
    color: rgb(242, 190, 0);
    background-color: rgb(85, 85, 85);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

dialog {
    width: 50%;
    max-width: 900px;
    padding: 20px;
    border: none;
    border-radius: 10px;
    box-shadow: 0px 0px 40px 8px rgba(0, 0, 0, 0.7);
    background: white;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    /* font-family: 'Poppins', sans-serif; */
}
/* Dark overlay when open */
dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
}
/* Popup Content Layout */
.popup-box {
    display: flex;
    flex-direction: row;
    gap: 20px;
    width: 100%;
    height: 100%;
    padding: 10px;
    /* Ensures content doesn't touch edges */
}
/* Left Section: Product Details */
.popup-left {
    background-color: #F6F6F6;
    padding: 20px;
    border-radius: 10px;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0px 0px 10px 2px rgba(12, 45, 98, 0.5);
}
/* Ensure Image Fits Properly */
.popup-left img {
    width: 100%;
    max-height: 250px;
    /* Adjusted for better visibility */
    object-fit: contain;
    border-radius: 10px;
}
/* Product Details Text */
.product-name {
    font-size: 22px;
    /* Slightly increased for better readability */
    font-weight: bold;
    margin: 15px 0;
    color: rgb(12, 45, 98);
}
.product-price {
    font-size: 18px;
    color: #FF5722;
    font-weight: bold;
}
.sold-by {
    font-size: 16px;
    margin-top: 8px;
}
.seller-name {
    color: #007BFF;
    font-weight: bold;
}
.product-specs span {
    display: block;
    font-size: 16px;
    margin-top: 6px;
}
/* Right Section: Form */
.popup-right {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 20px;
    width: 60%;
    border-radius: 12px;
    box-shadow: 0px 0px 10px 2px rgba(12, 45, 98, 0.5);
    /* Ensures the right side uses full available space */
}
/* Ensure Proper Spacing */
.popup-right h3 {
    margin-bottom: 15px;
    font-size: 22px;
}
.popup-right p {
    font-size: 16px;
    margin-bottom: 12px;
}
label {
    font-weight: bold;
    font-size: 16px;
}
/* Input Field */
input {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    margin-bottom: 12px;
    border: 2px solid rgb(12, 45, 98);
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
input:focus {
    border-color: #007BFF;
    outline: none;
    box-shadow: 0px 0px 8px rgba(0, 123, 255, 0.3);
}
/* Contact Message */
.contact-msg {
    font-size: 14px;
    color: #666;
}
/* Buttons */
.submit-btn,
.close-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}
.submit-btn {
    background: #28A745;
    color: white;
}
.submit-btn:hover {
    background: #218838;
}
/* Close Button */
.close-btn {
    background: #D9534F;
    color: white;
}
.close-btn:hover {
    background: #C9302C;
}
dialog {
    display: none;
    /* Hide by default */
}
dialog[open] {
    display: flex;
    /* Show when open */
    flex-direction: column;
    visibility: visible;
    opacity: 1;
}
@media (max-width: 1132px) {
    .popup-box {
        flex-direction: column;
        gap: 10px;
        overflow-y: auto;
    }
    .popup-left,
    .popup-right {
        width: 100%;
        padding: 10px;
    }
    .popup-left img {
        max-height: 200px;
    }
    .product-name {
        font-size: 18px;
    }
    .product-specs span {
        font-size: 14px;
    }
    input,
    .submit-btn,
    .close-btn {
        font-size: 14px;
        padding: 10px;
    }
}


h3 {
    text-align: center;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    table-layout: fixed;
    /* Ensures equal column width */
}

th,
td {
    border: 1px solid #000;
    padding: 10px;
    text-align: left;
    word-wrap: break-word;
}

/* Ensures both columns have equal width */
th,
td {
    width: 50%;
}

th {
    background-color: #e0e0e0;
}

.buy-btn {
    background-color: rgb(242, 190, 0);
    color: rgb(85, 85, 85);
    padding: 10px 16px;
    /* Reduced vertical padding to prevent wrapping */
    font-size: 15px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: auto;
    /* Allow content to define width */
    min-width: 180px;
    /* Ensures button doesn’t shrink too much */
    font-weight: 900;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    display: inline-block;
    /* Prevents full-width stretching */
    text-align: center;
    white-space: nowrap;
    /* Ensures text remains in one line */
}

.buy-btn:hover {
    transform: scale(1.05);
    /* Slight pop-up effect */
    color: rgb(242, 190, 0);
    background-color: rgb(85, 85, 85);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive Styling */
@media (max-width: 1028px) {
    .content-container {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }

    .image-section,
    .product-info {
        flex: 1 1 100%;
        max-width: 100%;
        text-align: center;
    }

    /* Ensure the image adjusts according to its div */
    .main-image {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-video {
        width: 100%;
        max-width: 600px;
        height: 550px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-image img {
        width: 100%;
        max-width: 100%;
        height: auto;
        object-fit: contain;
        border-radius: 6px;
    }

    .thumbnail-container {
        justify-content: center;
    }

    /* Ensure button doesn't touch the bottom */
    .buy-btn {
        width: 100%;
        display: block;
        text-align: center;
        margin: 20px auto;
        padding: 12px 0;
    }
}

/* Responsive Fix for Image Visibility */
@media (max-width: 1026px) {
    .image-section {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-image {
        width: 100%;
        max-width: 600px;
        height: auto;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-video {
        width: 100%;
        max-width: 600px;
        height: 550px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-image img {
        width: 100%;
        max-width: 100%;
        max-height: 400px;
        height: auto;
        object-fit: contain;
        border-radius: 6px;
    }

    .thumbnail-container {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* Tablet Screens (Up to 768px) */
@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
        align-items: center;
    }

    .main-image {
        max-width: 100%;
        height: auto;
    }

    .main-video {
        width: 100%;
        max-width: 600px;
        height: 550px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .main-image img {
        width: 100%;
        max-width: 100%;
        max-height: 350px;
        height: auto;
        object-fit: contain;
    }

    .product-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .product-info table {
        width: 100%;
        max-width: 100%;
        display: block;
        overflow-x: auto;
        border-collapse: collapse;
        margin: 0 auto;
        text-align: center;
    }

    .product-info table th,
    .product-info table td {
        padding: 6px;
        font-size: 14px;
        text-align: center;
    }

    .buy-btn {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Mobile Screens (Up to 480px) */
@media (max-width: 480px) {
    .main-image img {
        width: 100%;
        max-width: 100%;
        max-height: 300px;
        height: auto;
    }

    .main-video {
        width: 100%;
        max-width: 600px;
        height: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .title-box h2 {
        font-size: 22px;
    }

    .product-info h3 {
        font-size: 18px;
    }

    .product-info table {
        width: 100%;
        max-width: 100%;
        border-collapse: collapse;
        margin: 0 auto;
        text-align: center;
        overflow-x: auto;
        display: block;
    }

    .product-info table th,
    .product-info table td {
        font-size: 12px;
        padding: 6px;
        text-align: center;
    }

    .thumbnail-list img {
        width: 40px;
        height: 40px;
    }

    .buy-btn {
        font-size: 14px;
        padding: 10px;
        margin-bottom: 20px;
    }
}

/* Ensure table is centered, fully visible, and tbody takes full width */
@media (max-width: 1026px) {
    .product-info {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }

    .product-info table {
        width: 100%;
        max-width: 100%;
        display: block;
        justify-content: center;
        overflow-x: auto;
        border-collapse: collapse;
        margin: 0 auto;
        text-align: center;
    }

    .product-info table tbody {
        width: 100%;
        display: table;
    }

    .product-info table th,
    .product-info table td {
        font-size: 12px;
        padding: 8px;
        text-align: center;
        white-space: nowrap;
    }
}