/* =========================================
   LHMIZA STYLE - EXACT MATCH REDESIGN
   ========================================= */

:root {
    --lhmiza-orange: #f97316;
    --lhmiza-orange-hover: #ea580c;
    --lhmiza-green: #22c55e;
    --lhmiza-green-hover: #16a34a;
    --lhmiza-red: #ef4444;
    --lhmiza-border: #e5e7eb;
    --lhmiza-text: #1f2937;
    --lhmiza-muted: #6b7280;
}

/* Pas de margin-top ici : le body a déjà padding-top pour le header fixe — sinon double vide énorme */
.product_details_container {
    padding: 8px 0 20px;
    margin: 0 0 20px 0 !important;
    background-color: #f3f4f6;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
}

.product_details_wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 20px;
}

/* Images — sans « cadre » : intégré à la carte blanche comme les grands e-commerce */
.product_images {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.main_image {
    width: 100%;
    min-height: 280px;
    max-height: min(72vh, 620px);
    height: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px 16px;
    cursor: zoom-in;
}

.main_image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: min(66vh, 560px);
    object-fit: contain;
    display: block;
    transition: transform 0.35s ease;
    border-radius: 0;
    box-shadow: none;
}

.main_image:hover img {
    transform: scale(1.02);
}

.promo_badge_lhmiza {
    position: absolute;
    top: 15px;
    left: 0;
    background: var(--lhmiza-orange);
    color: #fff;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 800;
    z-index: 5;
    text-transform: uppercase;
}

.promo_badge_lhmiza::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 0;
    border-width: 14px 10px 14px 0;
    border-style: solid;
    border-color: var(--lhmiza-orange) transparent var(--lhmiza-orange) var(--lhmiza-orange);
}

.zoom_icon_lhmiza {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12);
    color: var(--lhmiza-text);
    z-index: 6;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.zoom_icon_lhmiza:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.zoom_icon_lhmiza:focus-visible {
    outline: 2px solid var(--lhmiza-orange);
    outline-offset: 2px;
}

.thumbnail_images {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

/* Carré fixe — annule min-width:100px de style.css qui créait 100×70 */
.product_details_container .thumbnail,
.thumbnail {
    min-width: 0;
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    border: 1px solid var(--lhmiza-border);
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.thumbnail.active {
    border-color: var(--lhmiza-orange);
    border-width: 2px;
}

.product_details_container .thumbnail img,
.thumbnail img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 6px;
    box-sizing: border-box;
    display: block;
}

/* Info Section */
.product_info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product_category {
    font-size: 13px;
    font-weight: 700;
    color: var(--lhmiza-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.product_title {
    font-size: clamp(1rem, 0.85rem + 0.45vw, 1.2rem);
    font-weight: 700;
    color: var(--lhmiza-text);
    line-height: 1.25;
    margin: 0;
    font-family: 'Inter', system-ui, sans-serif;
    letter-spacing: -0.02em;
}

.product_rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #fbbf24;
}

.rating_text {
    color: var(--lhmiza-muted);
    font-size: 13px;
    margin-left: 5px;
}

/* Price Section - Exact LHMIZA */
.product_price_section {
    margin: 10px 0;
}

.price_display {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.current_price {
    font-size: 28px;
    font-weight: 800;
    color: var(--lhmiza-red);
}

.old_price {
    font-size: 16px;
    color: var(--lhmiza-muted);
    text-decoration: line-through;
}

/* Button Layout - Exact LHMIZA */
.product_actions_exact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.action_row_top {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
}

.quantity_box_lhmiza {
    display: flex;
    align-items: center;
    border: 1px solid var(--lhmiza-border);
    border-radius: 6px;
    height: 48px;
    overflow: hidden;
}

.quantity_box_lhmiza button {
    flex: 1;
    border: none;
    background: #f9fafb;
    height: 100%;
    cursor: pointer;
    font-size: 18px;
}

.quantity_box_lhmiza input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--lhmiza-border);
    border-right: 1px solid var(--lhmiza-border);
    height: 100%;
    font-weight: 700;
}

.btn_add_lhmiza {
    background: #fff;
    border: 2px solid var(--lhmiza-orange);
    color: var(--lhmiza-orange);
    height: 48px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn_add_lhmiza:hover {
    background: var(--lhmiza-orange);
    color: #fff;
}

.btn_buy_lhmiza {
    background: var(--lhmiza-orange);
    color: #fff;
    border: none;
    height: 50px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn_buy_lhmiza:hover {
    background: var(--lhmiza-orange-hover);
}

.btn_whatsapp_lhmiza {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--lhmiza-green);
    color: #fff;
    text-decoration: none;
    height: 50px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 16px;
    transition: background 0.2s;
}

.btn_whatsapp_lhmiza:hover {
    background: var(--lhmiza-green-hover);
}

.btn_whatsapp_lhmiza i {
    font-size: 24px;
}

.extra_links_lhmiza {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.extra_links_lhmiza p {
    font-size: 14px;
    color: var(--lhmiza-text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.extra_links_lhmiza i {
    color: var(--lhmiza-orange);
}

/* Sequential Product Details Sections */
.product_details_sequential {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.product_details_section {
    padding-bottom: 20px;
    border-bottom: 1px solid #f3f4f6;
}

.product_details_section:last-child {
    border-bottom: none;
}

.section_title_lhmiza {
    font-size: 18px;
    font-weight: 700;
    color: var(--lhmiza-text);
    margin-bottom: 15px;
    position: relative;
    padding-left: 12px;
    text-transform: uppercase;
}

.section_title_lhmiza::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--lhmiza-orange);
    border-radius: 2px;
}

.section_body_lhmiza {
    font-size: 15px;
    line-height: 1.7;
    color: var(--lhmiza-muted);
}

.section_body_lhmiza p {
    margin-bottom: 12px;
}

.ingredients_list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.ingredient_item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    padding: 10px 15px;
    border-radius: 6px;
}

.ingredient_item i {
    color: var(--lhmiza-orange);
}

/* Tech Table */
.tech_table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.tech_table tr {
    border-bottom: 1px solid #f3f4f6;
}

.tech_table td {
    padding: 10px 0;
    font-size: 14px;
}

.tech_label {
    font-weight: 600;
    color: var(--lhmiza-text);
    width: 150px;
}

.tech_value {
    color: var(--lhmiza-muted);
}

/* Related Products */
.related_products { margin-top: 40px; text-align: center; }
.related_products h2 {
    font-size: 24px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.related_products h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--lhmiza-orange);
}

.related_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .product_details_wrapper { grid-template-columns: 1fr; }
    .related_grid { grid-template-columns: repeat(2, 1fr); }
    .action_row_top { grid-template-columns: 1fr; }
    .main_image {
        min-height: 240px;
        max-height: min(56vh, 420px);
        padding: 12px;
        display: flex;
        aspect-ratio: unset;
    }
    .main_image img {
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: min(50vh, 380px);
        object-fit: contain;
        position: relative;
        inset: unset;
    }
}

/* Desktop: image entière visible (contain) — pas de crop comme avec cover */
@media (min-width: 769px) {
    .product_details_container .main_image {
        min-height: 420px;
        max-height: min(78vh, 720px);
        aspect-ratio: unset;
        padding: 12px 8px 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .product_details_container .main_image img {
        position: relative;
        inset: unset;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: min(72vh, 640px);
        object-fit: contain;
        object-position: center;
        border-radius: 0;
        box-shadow: none;
    }

    .product_details_container .main_image:hover img {
        transform: scale(1.02);
    }
}

/* ========== Beat global style.css on this page ========== */
/* Annule border / fond gris éventuels de style.css sur .main_image */
.product_details_container .main_image {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

.product_details_container .product_info.premium_card {
    gap: 10px;
}

.product_details_container .product_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}

.product_details_container .product_category {
    margin-bottom: 0;
    padding: 5px 12px;
    background: #eef2f6;
    color: var(--lhmiza-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    border-radius: 6px;
    width: fit-content;
    text-transform: uppercase;
}

/* responsiveness-global.css sets all h1 to clamp(32px…64px) !important — must override here */
.product_details_container .product_info h1#productTitle.product_title {
    font-size: clamp(1rem, 0.85rem + 0.45vw, 1.2rem) !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    font-family: 'Inter', system-ui, sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    color: var(--lhmiza-text) !important;
}

@media (min-width: 769px) {
    .product_details_container .product_info h1#productTitle.product_title {
        font-size: clamp(0.95rem, 0.8rem + 0.35vw, 1.1rem) !important;
        line-height: 1.22 !important;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .product_details_container .product_info h1#productTitle.product_title {
        font-size: clamp(1.05rem, 3.2vw, 1.22rem) !important;
    }
}

.product_details_container .product_price_section {
    margin: 4px 0 10px;
    padding: 10px 0;
    border-top-width: 1px;
    border-bottom-width: 1px;
}

.product_details_container .current_price {
    font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem);
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: var(--lhmiza-red) !important;
    color: var(--lhmiza-red);
}

.product_details_container .old_price {
    font-size: 0.95rem;
}

/* ========== Image lightbox (zoom) ========== */
.pd-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.pd-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.pd-lightbox__backdrop {
    position: absolute;
    inset: 0;
    border: none;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.88);
    cursor: zoom-out;
}

.pd-lightbox__inner {
    position: relative;
    z-index: 2;
    max-width: min(96vw, 1200px);
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-lightbox__inner img {
    max-width: 100%;
    max-height: 88vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.pd-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    z-index: 3;
    font-size: 1.25rem;
}

.pd-lightbox__close:hover {
    background: #f3f4f6;
}

@media (max-width: 600px) {
    .pd-lightbox__close {
        top: 8px;
        right: 8px;
    }
}
