/* Product Page Specific Styles */

/* Product Hero Section */
.product-hero {
    padding: 150px 0 80px;
    background-color: var(--light-color);
    text-align: center;
    width: 100%; /* Ensure hero spans full width */
}

.product-hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.product-hero-content p {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-color);
}

/* Product Details Section */
.product-details {
    padding: 80px 0;
    background-color: var(--white);
}

.product-details .container {
    display: flex;
    flex-direction: column; /* Stack children vertically */
    align-items: center; /* Center content if container is wider */
    gap: 30px; /* Adjust gap as needed */
}

.product-image-gallery,
.thumbnail-section,
.product-info,
.product-specs {
    width: 100%; /* Make these sections full width */
    /* max-width: 1000px; */ /* Removed to inherit from parent .container */
}

.main-image {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.main-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.main-image:hover img {
    transform: scale(1.05);
}


/* Thumbnail Images Styling */
.thumbnail-section {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    gap: 30px; /* Space between thumbnail items */
    padding: 20px 0;
}

.thumbnail-item-horizontal {
    display: flex;
    flex-direction: column; /* Title above image and text */
    align-items: center; /* Center content of each item */
    width: 100%; /* Full width for stacking */
    max-width: 1500px; /* Max width for each item */
    text-align: center;
}

.thumbnail-title {
    font-size: 1.5em;
    color: var(--dark-color); /* Align with product-info h2 */
    margin-bottom: 15px;
}

.thumbnail-content-wrapper {
    display: flex;
    flex-direction: row; /* Image and text side-by-side */
    align-items: flex-start; /* Align items to the top */
    gap: 30px; /* Space between image and text */
    width: 100%;
}

.thumbnail-image-horizontal {
    max-width: 150%; /* Slightly reduce image to give more space to caption */
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

.thumbnail-caption-horizontal {
    font-size: 16px; /* Slightly increase font size for readability */
    color: var(--text-color); /* Align with product-info p */
    line-height: 1.7;
    text-align: left; /* Align text to the left for readability */
    flex: 1; /* Allow caption to take remaining space */
    padding-left: 20px; /* Add some padding if image is on the left */
}

/* Responsive adjustments for thumbnail section */
@media (max-width: 768px) {
    .thumbnail-content-wrapper {
        flex-direction: column; /* Stack image and text on smaller screens */
        align-items: center; /* Center items when stacked */
    }

    .thumbnail-image-horizontal {
        max-width: 80%; /* Larger image width when stacked */
        margin-bottom: 15px;
    }

    .thumbnail-caption-horizontal {
        text-align: center; /* Center text when stacked */
    }

    .thumbnail-title {
        font-size: 1.3em;
    }
}

.product-info h2 {
    font-size: 36px;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.product-info p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.product-features,
.product-specs {
    margin: 30px 0;
}

.product-features h3,
.product-specs h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.product-features ul {
    list-style: none;
}

.product-features ul li {
    padding: 8px 0;
    position: relative;
    padding-left: 30px;
}

.product-features ul li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.product-specs table {
    width: 100%;
    border-collapse: collapse;
}

.product-specs table tr {
    border-bottom: 1px solid #eee;
}

.product-specs table tr:last-child {
    border-bottom: none;
}

.product-specs table td {
    padding: 12px 0;
}

.product-specs table td:first-child {
    font-weight: 600;
    width: 40%;
}

/* Product Application Section */
.product-application-section {
    padding: 60px 0;
    background-color: var(--white);
}

.product-application-section .container {
    max-width: 1000px; /* Adjusted for better layout with 100% width images */
}

.application-image-container {
    position: relative;
    width: 100%;
    margin-bottom: 30px; /* Space between sections */
    overflow: hidden; /* Ensures hover text stays within bounds */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.application-image-container img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.application-hover-text {
    position: absolute;
    top: 0; /* Align to top for left slide-in */
    left: 0;
    width: 50%; /* Adjust width as needed, could be a fixed pixel value too */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Slightly more opaque for better readability */
    color: var(--white);
    padding: 30px;
    transform: translateX(-100%); /* Start off-screen to the left */
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smoother transition */
    opacity: 0;
    visibility: hidden;
    box-sizing: border-box;
    overflow-y: auto; /* Add scroll for content that might overflow */
}

.application-image-container:hover .application-hover-text {
    transform: translateX(0); /* Slide in from the left */
    opacity: 1;
    visibility: visible;
}

.application-image-container:hover img {
    transform: scale(1.03); /* Keep slight zoom, or adjust as preferred */
}

.application-hover-text h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--primary-color-light); /* Lighter color for heading on dark background */
}

.application-hover-text p,
.application-hover-text ul {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.application-hover-text ul {
    list-style: disc;
    padding-left: 20px;
}

.application-hover-text ul li {
    margin-bottom: 5px;
}

/* Responsive adjustments for product application sections */
@media (min-width: 1200px) { /* For wider screens */
    .application-image-container img {
        transition: transform 0.4s ease;
    }
    .application-image-container:hover img {
        transform: scale(1.15); /* Increase scale up to 115% on hover for wider screens */
    }
    .product-application-section .container {
        max-width: 1200px; /* Allow container to be wider */
    }
}

@media (max-width: 992px) {
    .application-hover-text {
        width: 60%; /* Adjust width for medium screens */
        padding: 20px;
    }
    .application-hover-text h3 {
        font-size: 20px;
    }
    .application-hover-text p,
    .application-hover-text ul {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .application-hover-text {
        width: 100%; /* Full width overlay on smaller screens */
        transform: translateY(100%); /* Revert to bottom slide-in for small screens if preferred, or keep left */
        /* If keeping left slide-in for small screens, ensure content is very concise or scrolling is good */
    }
    .application-image-container:hover .application-hover-text {
        transform: translateY(0); /* Adjust if changed above */
    }
    .application-hover-text h3 {
        font-size: 18px;
    }
    .application-hover-text p,
    .application-hover-text ul {
        font-size: 13px;
    }
    .product-application-section {
        padding: 40px 0;
    }
}

/* Environmental Impact Section */
.environmental-impact {
    padding: 80px 0;
    background-color: var(--light-color);
    text-align: center;
}

.impact-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 50px;
}

.impact-item {
    max-width: 200px;
}

.impact-icon {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.impact-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.impact-text {
    font-size: 16px;
}

/* Related Products Section */
.related-products {
    padding: 80px 0;
    background-color: var(--white);
}

.related-products .application-item {
    display: flex;
    flex-direction: column;
}

.related-products .application-item .btn {
    margin: 15px;
    margin-top: auto;
    align-self: flex-start;
}

/* Responsive Styles for Product Pages */
@media (max-width: 992px) {
    .product-details .container {
        flex-direction: column;
    }

    .product-image-gallery,
    .product-info {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .product-hero-content h1 {
        font-size: 36px;
    }

    .product-hero-content p {
        font-size: 18px;
    }

    .product-info h2 {
        font-size: 30px;
    }

    .product-features h3,
    .product-specs h3 {
        font-size: 22px;
    }

    .impact-stats {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
}

@media (max-width: 576px) {
    .product-hero-content h1 {
        font-size: 28px;
    }

    .product-hero-content p {
        font-size: 16px;
    }

    .product-info h2 {
        font-size: 24px;
    }

    .product-features h3,
    .product-specs h3 {
        font-size: 20px;
    }

    .thumbnail-images {
        grid-template-columns: repeat(2, 1fr);
    }
}