/* ============================================
   TEMPLATE PRODUIT V2 - OPTIMISÉE SEO & CONVERSION
   ============================================ */

/* Product Hero Grid */
.product-hero-v2 {
    margin: 2rem 0;
}

.product-hero-grid-v2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 968px) {
    .product-hero-grid-v2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Product Gallery Component */
.product-gallery-v2 {
    position: sticky;
    top: 2rem;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f5f5f5;
    margin-bottom: 1rem;
}

.gallery-zoom-container {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: zoom-in;
}

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

.gallery-zoom-container:hover .gallery-main-image {
    transform: scale(1.1);
}

.zoom-lens {
    position: absolute;
    border: 2px solid var(--primary);
    width: 100px;
    height: 100px;
    display: none;
    pointer-events: none;
    z-index: 10;
}

.zoom-result {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 400px;
    border: 1px solid #ccc;
    background: white;
    display: none;
    z-index: 20;
    overflow: hidden;
}

.zoom-result img {
    width: 800px;
    height: 800px;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    background: #f5f5f5;
    cursor: pointer;
    transition: border-color 0.3s;
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--primary);
}

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

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

.product-h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin: 0;
}

@media (max-width: 768px) {
    .product-h1 {
        font-size: 1.5rem;
    }
}

.product-sku {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-family: monospace;
}

/* Status & Badges */
.product-status {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.badge-v2 {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success-v2 {
    background: #4caf50;
    color: white;
}

.badge-warning-v2 {
    background: #D4C5B9;
    color: white;
}

/* ✅ FORCER badge-warning-v2 EN VERT (classe utilisée pour PRÉCOMMANDE sur produit.html) */
.badge-warning-v2,
#productBadges .badge-warning-v2,
.badge-v2.badge-warning-v2 {
    color: #28a745 !important;
    border-color: #28a745 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.badge-danger-v2 {
    background: #f44336;
    color: white;
}

.badge-promo-v2 {
    background: var(--primary);
    color: white;
}

/* Price Block Component */
.price-block-v2 {
    padding: 1.5rem 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.price-main-v2 {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.price-current-v2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000;
}

.price-old-v2 {
    font-size: 1.5rem;
    color: var(--gray-600);
    text-decoration: line-through;
}

.price-pvc-v2 {
    font-size: 1.25rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.price-quantity-v2 {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Quantity & Actions */
.product-actions-v2 {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 48px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    transition: background 0.3s;
}

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

.qty-input {
    width: 60px;
    height: 48px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.btn-add-cart-v2 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.btn-add-cart-v2:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-add-cart-v2:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

/* Payment Options */
.payment-options {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
}

.payment-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.payment-3x,
.payment-4x {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
}

/* Points forts */
.product-highlights-v2 {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
}

.highlights-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1rem;
}

.highlights-list-v2 {
    list-style: none;
    padding: 0;
    margin: 0;
}

.highlights-list-v2 li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--dark);
}

.highlights-list-v2 li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Sticky CTA Mobile */
.sticky-cta-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .sticky-cta-mobile {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
}

.sticky-price {
    flex: 1;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.sticky-btn {
    flex: 1;
    padding: 1rem 2rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

/* Product Tabs */
.product-tabs-v2 {
    margin: 3rem 0;
}

.tabs-header {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-600);
    cursor: pointer;
    transition: color 0.3s, border-color 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--dark);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    padding: 2rem 0;
}

.tab-content.active {
    display: block;
}

/* Description Content */
.description-content {
    line-height: 1.8;
    color: var(--dark);
    font-size: 1.125rem;
}

.description-content p {
    margin-bottom: 1.5rem;
}

/* Tech Specs Component */
.tech-specs-v2 {
    width: 100%;
}

.specs-table-v2 {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.specs-table-v2 tr {
    border-bottom: 1px solid #e0e0e0;
}

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

.specs-table-v2 .spec-label-v2 {
    padding: 1rem;
    font-weight: 600;
    color: var(--dark);
    background: #f8f8f8;
    width: 30%;
    border-right: 1px solid #e0e0e0;
}

.specs-table-v2 .spec-value-v2 {
    padding: 1rem;
    color: var(--gray-600);
}

/* Reviews Section */
.reviews-section {
    padding: 2rem 0;
}

.reviews-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.reviews-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reviews-stars {
    font-size: 1.5rem;
    color: #C4B5A0;
}

.reviews-average {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.reviews-count {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.review-item {
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.review-author {
    font-weight: 600;
    color: var(--dark);
}

.review-date {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.review-stars {
    color: #C4B5A0;
    margin-bottom: 0.5rem;
}

.review-text {
    color: var(--gray-600);
    line-height: 1.6;
}

/* Accordions */
.product-accordions-v2 {
    margin: 3rem 0;
}

.accordion-item-v2 {
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-header-v2 {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: #f9f9f9;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    text-align: left;
}

.accordion-header-v2:hover {
    background: #f0f0f0;
}

.accordion-icon-v2 {
    font-size: 1.25rem;
    transition: transform 0.3s;
}

.accordion-content-v2 {
    padding: 1.25rem;
    display: none;
    background: white;
    line-height: 1.8;
    color: var(--gray-600);
}

.accordion-content-v2.active {
    display: block;
}

.accordion-content-v2 h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin: 1rem 0 0.5rem;
}

.accordion-content-v2 p {
    margin-bottom: 0.75rem;
}

/* Similar Products Carousel */
.similar-products-v2 {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

.section-title-v2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1.5rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    flex: 0 0 calc(25% - 1.125rem);
    min-width: 200px;
}

@media (max-width: 968px) {
    .carousel-item {
        flex: 0 0 calc(33.333% - 1rem);
    }
}

@media (max-width: 640px) {
    .carousel-item {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s, border-color 0.3s;
}

.carousel-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.carousel-prev {
    left: -20px;
}

.carousel-next {
    right: -20px;
}

@media (max-width: 768px) {
    .carousel-prev,
    .carousel-next {
        display: none;
    }
}

/* Recently Viewed */
.recently-viewed-v2 {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

.products-grid-recent {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .products-grid-recent {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Image lazy loading placeholder */
.gallery-main-image[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Header desktop categories bigger on product pages only */
@media (min-width: 769px) {
    body.product-page .header-desktop .main-nav.mega-nav .nav-link,
    body.product-page .header-desktop .main-nav.mega-nav .dropdown-toggle {
        font-size: 1.12rem !important;
    }
}

