/* Layout */
.product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1500px;
    margin: 50px auto;
    padding: 20px;
}

/* Fixed Image Container - Prevents Jumping */
.main-image-container {
    width: 100%;
    height: 600px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.main-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

/* Image Thumbnails */
.image-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 60px;
    height: 60px;
     object-fit: contain; /* Shows full image without cropping */
    background: #f8f8f8; /* Add background color for consistency */ 
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;

}


/* Title & Price */
.product-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #000000;
}

.discount-price { 
    color: #000000; 
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.original-price { 
    color: #000000; 
    text-decoration: line-through;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

.price { 
    color: #000000; 
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 5px;
}

/* Sections */
.product-section {
    margin: 20px 0;
}

.product-section h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
}

/* Size Selection */
.size-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 100px;
    padding: 10px 15px;
    border: 1px solid #CDCDCD;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #000000;
}

.size-btn:hover:not(.disabled) {
    background: #f5f5f5;
    border-color: #656246;
}

.size-btn.active {
    background: #721c24;
    color: white;
    border-color: #721c24;
}

.size-btn.disabled {
    color: #656246;
    border-color: #CDCDCD;
    cursor: not-allowed;
    background: #f8f8f8;
}

.stock-info, 
.out-of-stock {
    font-size: 10px;
    display: block;
    margin-top: 4px;
}

/* Quantity */
.quantity-box {
    display: flex;
    align-items: center;
    border: 2px solid #CDCDCD;
    border-radius: 8px;
    width: fit-content;
    min-width: 120px;
}

.qty-btn {
    padding: 10px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    background: white;
    color: #000000;
    transition: background 0.2s ease;
}

.qty-btn:hover {
    background: #f5f5f5;
}

#quantity {
    width: 60px;
    text-align: center;
    border: none;
    font-size: 1rem;
    color: #000000;
}
.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-btn:disabled:hover {
    background-color: transparent;
}

/* Action Buttons */
.product-page-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0;
    padding-right: 40%;
}


/* Accordion */
details {
    border-top: 1px solid #CDCDCD;
    padding: 10px 0;
    cursor: pointer;
}

details summary {
    font-weight: 600;
    list-style: none;
    color: #000000;
    padding: 10px 0;
}

details[open] summary {
    color: #721c24;
}

details p {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #565B7A;
    line-height: 1.6;
}

details img {
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 0;
        margin: 0;
        padding: 0;
    }

    .product-image {
        padding: 15px;
        background: white;
    }
    .product-page-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 25px 0;
        padding: 0;
    }

    /* Fixed height for mobile too */
    .main-image-container {
        height: 400px;
        margin-bottom: 10px;
    }

    .image-thumbnails {
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 5px;
    }

    .product-info {
        padding: 20px 15px;
        background: white;
    }

    .product-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    .discount-price, .price {
        font-size: 1.5rem;
    }

    .original-price {
        font-size: 1.1rem;
    }

    .size-btn {
        padding: 14px 10px;
        font-size: 0.95rem;
        min-width: 80px;
    }

    .stock-info, .out-of-stock {
        font-size: 9px;
    }

    .quantity-box {
        min-width: 150px;
    }

    .qty-btn {
        padding: 14px 18px;
        font-size: 1.3rem;
    }

    details img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .product-image {
        padding: 12px;
    }

    .main-image-container {
        height: 350px;
    }

    .product-info {
        padding: 18px 12px;
    }

    .product-title {
        font-size: 1.3rem;
    }

    .discount-price, .price {
        font-size: 1.3rem;
    }

    .original-price {
        font-size: 1rem;
    }

    .size-btn {
        padding: 12px 8px;
        font-size: 0.85rem;
        min-width: 70px;
    }

    .quantity-box {
        min-width: 140px;
    }

    .qty-btn {
        padding: 12px 16px;
    }

    .thumbnail {
        width: 55px;
        height: 55px;
    }
}