/* --- style_p.css --- */
/* Base Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Product Info Layout */
.product-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: flex-start;
}

/* Product Title (placed left-aligned under header) */
.product-title {
    margin: 20px 0 10px;
    text-align: left;
    padding-left: 20px;
}

.product-title h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0;
}


/* --- Carousel Styles --- */
.carousel {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.main-image-container {
    width: 100%;
    padding-bottom: 100%; /* 1:1 aspect ratio */
    position: relative;
    margin-bottom: 15px;
}

.main-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Thumbnail Row */
.thumbnail-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail-row img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 5px;
    cursor: pointer;
    transition: border 0.3s ease;
}

.thumbnail-row img:hover {
    border: 2px solid #008CBA;
}

/* --- Details Section --- */
.details {
    flex: 1;
    min-width: 280px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Product Description */
.details .description {
    font-size: 1rem;
    color: #333;
    line-height: 1.6;
}

/* Product Price */
.details .price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
}

/* Add to Cart Button */
.actions {
    margin-top: 10px;
}

.btn.add {
    background-color: #008CBA;
    color: white;
    padding: 12px 24px;
    font-weight: bold;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.btn.add:hover {
    background-color: #005f73;
}

/* Back to Products Button (less emphasized) */
.back-link {
    margin-top: 5px;
}

.btn.back {
    background-color: #e0e0e0;
    color: #333;
    font-weight: normal;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn.back:hover {
    background-color: #d0d0d0;
    color: #222;
}

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .product-info {
        flex-direction: column;
        align-items: center;
    }

    .details {
        text-align: center;
        width: 100%;
    }

    .btn.add,
    .btn.back {
        width: 100%;
    }

    .thumbnail-row {
        justify-content: center;
    }

    .product-title {
        text-align: center;
    }
}
