/*
 * File: product-detail.css
 * Location: /modernvillagers/assets/css/product-detail.css
 */

 .detail-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
    display: flex;
    gap: 40px;
    background: #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
}

/* --- Image Gallery Section --- */
.product-gallery {
    display: flex;
    gap: 15px;
    flex: 1 1 50%;
}

/* .thumbnails {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 450px;
    overflow-y: auto;
} */

.thumbnails img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.thumbnails img:hover,
.thumbnails img.active {
    border-color: #007bff;
}

.main-image {
    flex-grow: 1;
}

.main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    border-radius: 6px;
}

/* --- Product Info Section --- */
.product-info-panel {
    flex: 1 1 50%;
    padding: 10px 0;
}

.product-info-panel h1 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 10px;
}

.product-info-panel .price {
    font-size: 1.8em;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 20px;
}

.product-info-panel hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* --- Specifications List --- */
.product-info-panel h2 {
    font-size: 1.5em;
    color: #555;
    margin-bottom: 10px;
}

.product-info-panel ul {
    list-style: none;
    padding: 0;
}

.product-info-panel li {
    padding: 5px 0;
    color: #666;
    font-size: 1.05em;
}

.product-info-panel li strong {
    color: #333;
    display: inline-block;
    min-width: 100px;
}

/* --- Action Buttons --- */
.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.action-buttons a {
    text-align: center;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 1.1em;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    flex-grow: 1;
}

.btn-add-to-cart {
    background-color: #ffc107;
    color: #333;
    border: 1px solid #ffc107;
}

.btn-add-to-cart:hover {
    background-color: #e0a800;
}

.btn-buy-now {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-buy-now:hover {
    background-color: #0056b3;
}

/* ---------------for share button style ------ */

/* Container to place the H1 and Share button on the same line and justify them */
.header-and-share {
    display: flex;
    justify-content: space-between; /* Pushes the H1 left and the button right */
    align-items: center; /* Vertically centers the items */
    margin-bottom: 5px; /* Adjust spacing below the product name */
}

/* Style for the unique share button (using an image) */
.btn-share-unique {
    /* Base button reset for a clean icon look */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px; /* Gives a clickable area around the icon */
    transition: transform 0.2s ease-in-out;
    border-radius: 50%; /* Optional: Makes the clickable area circular for hover effect */
}

/* Hover effect to make it feel responsive */
.btn-share-unique:hover {
    transform: scale(1.1); /* Slightly enlarges the icon on hover */
    /* Optional: Add a light background glow */
    background-color: rgba(255, 140, 0, 0.1);
}

/* Style for the image/icon inside the button */
.share-icon-img {
    width: 30px; /* Control the size of the icon */
    height: 30px;
    display: block; /* Ensure no strange spacing */
    filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, 0.1)); /* Subtle shadow for depth */
}

/* Ensure the H1 doesn't get squished if the product name is long */
.header-and-share h1 {
    margin: 0;
    max-width: 80%; /* Ensure H1 doesn't push the share button off-screen */
}



/* ==================================== */
/* MOBILE RESPONSIVENESS       */
/* ==================================== */
@media (max-width: 768px) {
    .detail-wrapper {
        /* Stack the image gallery and info panel vertically */
        flex-direction: column;
        margin: 10px;
        padding: 10px;
        gap: 20px;
    }

    /* Change image layout for smaller screens */
    .product-gallery {
        flex-direction: column-reverse; /* Put thumbnails below the main image */
        gap: 10px;
    }

    .main-image img {
        /* Remove max height to allow image to be full width */
        max-height: none;
        /* 💡 THE FIX IS HERE: ADD BORDER FOR MOBILE ONLY 💡 */
        border: 1px solid #E2A16F; /* Light gray border: 1px thick, solid */
        padding: 5px;            /* Optional: Add slight inner padding to separate the image from the border */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Optional: Add a subtle shadow */
    
    }
    
    .thumbnails {
        /* Arrange thumbnails horizontally below the main image */
        flex-direction: column;
        justify-content: flex-start;
        overflow-x: auto; /* Enable horizontal scrolling for many thumbnails */
        max-height: none;
        padding-bottom: 10px; /* Space for scrollbar */
    }

    .thumbnails img {
        width: 60px;
        height: 60px;
        flex-shrink: 0; /* Prevents images from shrinking */
    }

    .product-info-panel {
        padding: 0;
    }

    .product-info-panel h1 {
        font-size: 1.8em;
    }
    
    /* Make action buttons stack vertically on mobile */
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons a {
        padding: 12px 20px;
        font-size: 1em;
    }



}