/* Base styles */
.product-page {
    padding: 8rem 2rem 4rem;
    background: var(--background-color);
    min-height: 100vh;
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

/* Product Content Layout */
.product-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Product Gallery */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Hide radio buttons */
.main-images input[type="radio"] {
    display: none;
}

/* Main image container */
.main-images {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.main-image {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Show selected image */
#img1:checked ~ #main1,
#img2:checked ~ #main2,
#img3:checked ~ #main3,
#img4:checked ~ #main4,
#img5:checked ~ #main5,
#img6:checked ~ #main6,
#img7:checked ~ #main7,
#img8:checked ~ #main8 {
    opacity: 1;
}

/* Thumbnail Gallery */
.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumbnail {
    position: relative;
    width: 100%;
    height: 80px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Active thumbnail styles */
#img1:checked ~ .thumbnail-gallery label:nth-child(1),
#img2:checked ~ .thumbnail-gallery label:nth-child(2),
#img3:checked ~ .thumbnail-gallery label:nth-child(3),
#img4:checked ~ .thumbnail-gallery label:nth-child(4) {
    opacity: 1;
    transform: translateY(-2px);
}

/* Hover effects */
.thumbnail:hover {
    opacity: 1;
    transform: translateY(-2px);
}

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

/* Product Info */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-info h1 {
    font-size: 2rem;
    color: var(--primary-color);
}

.product-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.product-price {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: bold;
}

.product-description,
.product-features {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.product-description h2,
.product-features h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-decoration: underline;
    text-underline-offset: 1px;  /* Très léger décalage */
}

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

.product-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.product-features li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

/* Contact Section */
.contact-section {
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.contact-section h2 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-section p {
    color: #666;
    margin-bottom: 1rem;
}

.contact-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    color: var(--light-text);
    font-weight: 500;
    transition: all 0.3s ease;
    background: var(--button-color);
}

.contact-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: var(--hover-color);
}

/* Focus states for accessibility */
.contact-btn:focus,
.thumbnail:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .product-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .main-images {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 6rem 1rem 2rem;
    }

    .contact-buttons {
        flex-direction: column;
    }

    .contact-btn {
        width: 100%;
        justify-content: center;
    }

    .product-info h1 {
        font-size: 1.8rem;
    }

    .product-price {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .product-content {
        padding: 1rem;
    }

    .main-images {
        height: 300px;
    }

    .thumbnail {
        height: 60px;
    }

    .product-info h1 {
        font-size: 1.5rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .breadcrumb {
        font-size: 0.9rem;
    }

    .product-description h2,
    .product-features h2,
    .contact-section h2 {
        font-size: 1.1rem;
    }
}

/* Print styles */
@media print {
    .contact-section,
    .thumbnail-gallery,
    .header-v2,
    .footer-v2 {
        display: none;
    }

    .product-content {
        grid-template-columns: 1fr;
        box-shadow: none;
    }

    .main-images {
        height: 300px;
    }

    .product-page {
        padding: 1rem;
    }
}
