/* Product Container */
.product-container {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background: #faebd7; /* Antiquewhite */
}

/* Left Section (Product Image) */
.product-image {
    flex: 1;
    min-width: 220px; /* Minimum width for narrow images */
    max-width: 50%; /* Adjusts based on aspect ratio */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #E0CAB0;
}

.product-image img{
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
}

.product-image div{
    background-color: #E0CAB0; /* Light secondary white */
    padding: 8px;
}

.prodPlayer {
    width: 100%;
    border: none;
    background-color: #E0CAB0;
    margin-top: 25px;
    height: 60px;
}

.prodPlayer .timeCD-tx {
    display: none !important;
}

/* If the image is taller than wide, reduce the width to free space */
@media (min-aspect-ratio: 3/4) {
    .product-image {
        max-width: 30%;
    }
}

/* Right Section (Product Info) */
.product-info {
    flex: 1;
    padding-left: 20px;
    min-width: 250px;
}

/* Title */
.product-title {
    font-size: 24px;
    font-weight: bold;
    color: #73542D; /* Medium Brown */
    margin-bottom: 8px;
}

/* Category */
.product-category {
    font-size: 0.9em;
    color: #73542D; /* Dark Brown */
    margin-bottom: 10px;
    font-weight: bold;
}

/* Description */
.product-description {
    font-size: 1em;
    line-height: 1.6;
    color: #73542D; /* Dark Brown */
    margin-bottom: 15px;
}

/* Details table */
.details-table-wrapper{
    display: grid;
    grid-template-columns: 1fr;
}
    
.details-table{
    display: grid;
    grid-template-columns: 30% 60%;
    column-gap: 0.5em;
    align-content: start;
    padding: 0.5rem 0;
    margin-bottom:0;
    text-align: left;
}
    

/* Optional Gallery */
.product-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.product-gallery img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    border: 2px solid #a38157; /* Light Brown */
}

.product-gallery img:hover {
    transform: scale(1.1);
}

/* Price, Quantity & Button */
.product-purchase {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between elements */
    margin-top: 10px;
}

/* Price */
.product-price {
    font-size: 22px;
    font-weight: bold;
    color: #73542D; /* Medium Brown */
}

/* Quantity Selector */
.quantity-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-container input {
    width: 50px;
    height: 30px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #73542D;
    background-color: #faebd7;
    color: #73542D;
}

/* Add to Cart Button */
.add-to-cart {
    background: #73542D; /* Medium Brown */
    color: #faebd7;
    font-size: 16px;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
}

.add-to-cart:hover {
    background: #a38157; /* Light Brown */
}

/* Responsive */
@media (max-width: 768px) {
    .product-container {
        flex-direction: column;
        align-items:center;
    }
    .product-image {
        max-width: 100%;
        padding-left: 0;
        margin-bottom: 2em;
    }
    .product-purchase {
        flex-direction: column;
        align-items: flex-start;
    }
    .product-info {
        flex: 1;
        padding-inline: 10px;
    }
    .details-table{
        grid-template-columns: 35% 60%;
        font-size: 0.9em;
    }
}

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

.modal-content {
    max-width: 95%;
    max-height: 95%;
}

.modal-caption {
    margin-top: 15px;
    color: #faebd7;
    text-align: center;
    font-size: 18px;
    max-width: 90vw;
    padding: 0 20px;
    position: absolute;
    bottom: 2em;
    background-color: rgba(0, 0, 0, 0.5);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 2;
}

.nav-btn.left {
    left: 10px;
}

.nav-btn.right {
    right: 10px;
}

#modalImg {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 25px;
    right: 25px;
    color: #faebd7; /* Antiquewhite */
    font-size: 45px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #a38157; /* Light Brown */
}