/* ============================================================
   LJD PDP — Overrides spécifiques aux fiches produit live
   Compense les styles WooCommerce + Shoptimizer qui prennent
   priorité sur le CSS V4 mockup.
   ============================================================ */

/* ============ GALERIE — miniatures en rangée SOUS l'image ============ */
/* Override de la grille mockup (.v-gallery: 80px 1fr) : on passe en colonne
   verticale, image principale en haut, bande de miniatures horizontale dessous. */
body.ljd-pdp .v-gallery {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}
body.ljd-pdp .v-main {
    order: 1;
}
body.ljd-pdp .v-thumbs-side {
    order: 2;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
}

/* ============ IMAGE PRINCIPALE — pleine largeur, carrée, remplit tout ============ */
/* Les photos sont en 1:1 : zone carrée pleine largeur => l'image remplit
   bord à bord, plus aucun gris sur les côtés. */
body.ljd-pdp .v-main {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    width: 100% !important;
    background: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
}
body.ljd-pdp .v-main img {
    width: 100%;
    height: 100%;
    max-height: none !important;
    object-fit: cover;
    display: block;
}

/* Aligner les colonnes en haut (pas étirer la colonne droite) */
body.ljd-pdp .v-product-inner {
    align-items: flex-start;
}

/* ============ BOUTON AJOUTER AU PANIER ============ */
/* Override WC .button.alt + Shoptimizer vert menthe par notre design noir LJD */
body.ljd-pdp .single_add_to_cart_button,
body.ljd-pdp button.v-cta,
body.ljd-pdp .v-qty-row button[type="submit"] {
    background: #1a1a1a !important;
    background-color: #1a1a1a !important;
    color: #fff !important;
    padding: 18px 28px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: background 0.15s !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    min-width: 220px !important;
    height: auto !important;
}
body.ljd-pdp .single_add_to_cart_button:hover,
body.ljd-pdp button.v-cta:hover {
    background: #333 !important;
    color: #fff !important;
}
body.ljd-pdp .single_add_to_cart_button:disabled,
body.ljd-pdp .single_add_to_cart_button.disabled {
    background: #999 !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* ============ ZONE QUANTITÉ + CTA ============ */
body.ljd-pdp .v-qty-row {
    margin: 20px 0 !important;
}
body.ljd-pdp .v-qty-row .v-opt-label {
    margin-bottom: 10px !important;
}
body.ljd-pdp .v-qty,
body.ljd-pdp .woocommerce-variation-add-to-cart {
    display: flex !important;
    gap: 12px !important;
    align-items: stretch !important;
    width: 100% !important;
    border: none !important;
}
body.ljd-pdp .v-qty input.qty,
body.ljd-pdp input[type="number"].qty {
    width: 80px !important;
    padding: 16px 8px !important;
    border: 1px solid #ccc !important;
    background: #fff !important;
    text-align: center !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 0 !important;
    -moz-appearance: textfield !important;
}
body.ljd-pdp .v-qty input.qty::-webkit-outer-spin-button,
body.ljd-pdp .v-qty input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ============ SWATCHES ============ */
body.ljd-pdp .v-swatches {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
}
body.ljd-pdp .v-swatch {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
    box-shadow: 0 0 0 1px #ccc !important;
    cursor: pointer !important;
    padding: 0 !important;
    transition: box-shadow 0.15s !important;
}
body.ljd-pdp .v-swatch:hover {
    box-shadow: 0 0 0 2px #1a1a1a !important;
}
body.ljd-pdp .v-swatch.active {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px #1a1a1a !important;
}
body.ljd-pdp .sr-only {
    position: absolute !important;
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ============ PRIX ============ */
body.ljd-pdp .v-price-range {
    font-size: 26px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 14px 0 24px !important;
}
body.ljd-pdp .v-price-range .woocommerce-Price-amount {
    color: #1a1a1a;
    font-weight: 600;
}

/* ============ BLOC LIVRAISON ============ */
body.ljd-pdp .v-delivery {
    background: #f7f5f0 !important;
    padding: 14px 16px !important;
    margin: 18px 0 !important;
    font-size: 13px !important;
    color: #1a1a1a !important;
    border-left: 3px solid #1a1a1a;
}

/* ============ VARIATION MESSAGES WC ============ */
body.ljd-pdp .woocommerce-variation-description {
    margin: 10px 0;
    font-size: 13px;
    color: #555;
}
body.ljd-pdp .woocommerce-variation-availability {
    margin: 8px 0;
    font-size: 13px;
}
body.ljd-pdp .woocommerce-variation-availability .in-stock {
    color: #0f8a3c;
    font-weight: 600;
}
body.ljd-pdp .woocommerce-variation-availability .out-of-stock {
    color: #d9251c;
    font-weight: 600;
}
body.ljd-pdp .woocommerce-variation-price {
    margin: 8px 0 12px;
    font-size: 22px;
    font-weight: 600;
}
body.ljd-pdp .reset_variations {
    display: inline-block;
    margin: 8px 0;
    font-size: 12px;
    color: #0073cf;
    text-decoration: underline;
}

/* ============ BREADCRUMB ============ */
body.ljd-pdp .v-breadcrumb {
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 24px 8px;
    font-size: 12px;
    color: #888;
}
body.ljd-pdp .v-breadcrumb a {
    color: #888;
    text-decoration: none;
}
body.ljd-pdp .v-breadcrumb a:hover {
    color: #1a1a1a;
    text-decoration: underline;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 992px) {
    body.ljd-pdp .v-product-inner { grid-template-columns: 1fr !important; }
    body.ljd-pdp .v-qty,
    body.ljd-pdp .woocommerce-variation-add-to-cart {
        flex-wrap: wrap !important;
    }
    body.ljd-pdp .single_add_to_cart_button { min-width: 100% !important; }
}
