/* ==========================================================================
   BGC Premium Single Product Layout - Version 3.0 (Magical Glassmorphism)
   ========================================================================== */

/* --- OVERRIDES WOOCOMMERCE & KADENCE --- */
.woocommerce div.product, .site-main .product { display: block !important; }
.kadence-product-layout, .woocommerce-product-gallery, .product-layout, .product-summary-wrap { display: none !important; }
.summary.entry-summary { width: 100% !important; max-width: 100% !important; float: none !important; padding: 0 !important; margin: 0 !important; background: transparent !important; }
.kadence-sticky-add-to-cart, .product-bottom-sticky-add-to-cart { display: none !important; }

/* Purger le fond blanc du thème parent */
body.single-product .site-content, body.single-product .content-area, body.single-product .site-main { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; }

/* --- LE FOND IMMERSIF (HERO BLUR) & FULL-WIDTH BREAKOUT --- */
.bgc-premium-page-wrapper { 
    position: relative; 
    background-color: #f8fafc; 
    padding-bottom: 80px; 
    min-height: 100vh; 
    overflow-x: hidden;
    /* Hack pour casser l'encadré du thème et forcer le plein écran */
    width: 100vw !important;
    max-width: 100vw !important;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* L'image floutée boostée */
.bgc-hero-blur-bg { 
    position: absolute; top: -10%; left: -10%; width: 120%; height: 90vh; 
    background-size: cover; background-position: center; 
    filter: blur(80px) saturate(1.8); /* Flou plus large et couleurs plus vives */
    opacity: 0.65; /* Plus visible */
    z-index: 0; 
    mask-image: linear-gradient(to bottom, black 30%, transparent 100%); 
    -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%); 
    transition: background-image 0.5s ease; 
}

/* --- WRAPPER PRINCIPAL --- */
.bgc-super-wrapper { 
    max-width: 1400px; margin: 0 auto; padding: 40px 20px; 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #1e293b;
    display: flex; flex-direction: column; gap: 30px; position: relative; z-index: 10;
}
.bgc-area-pledge { order: 1; width: 100%; }
.bgc-area-gallery { order: 2; }
.bgc-area-buybox { order: 3; }
.bgc-area-details { order: 4; }

@media (min-width: 1024px) {
    .bgc-super-wrapper { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; gap: 40px 60px; }
    .has-pledge .bgc-area-pledge { grid-column: 1 / -1; grid-row: 1; margin-bottom: -15px; }
    .has-pledge .bgc-area-gallery { grid-column: 1; grid-row: 2; }
    .has-pledge .bgc-area-buybox { grid-column: 2; grid-row: 2 / span 2; position: sticky; top: 40px; }
    .has-pledge .bgc-area-details { grid-column: 1; grid-row: 3; }
    .bgc-super-wrapper:not(.has-pledge) .bgc-area-gallery { grid-column: 1; grid-row: 1; }
    .bgc-super-wrapper:not(.has-pledge) .bgc-area-buybox { grid-column: 2; grid-row: 1 / span 2; position: sticky; top: 40px; }
    .bgc-super-wrapper:not(.has-pledge) .bgc-area-details { grid-column: 1; grid-row: 2; }
}

/* --- ZONE PLEDGE --- */
.bgc-pledge-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 12px 15px; margin-bottom: 10px; }
.bgc-pledge-header { display: flex; justify-content: space-between; align-items: center; color: #b45309; margin-bottom: 2px; }
.bgc-pledge-header strong { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.bgc-pledge-subtitle { font-size: 12px; color: #b45309; margin: 0 0 8px 0; opacity: 0.9; }
.bgc-pledge-progress-bg { background: #fef08a; border-radius: 10px; height: 10px; overflow: hidden; margin-bottom: 4px; }
.bgc-pledge-progress-fill { background: #f59e0b; height: 100%; border-radius: 10px; transition: width 0.5s ease; }
.bgc-pledge-percent { font-size: 11px; font-weight: 800; color: #b45309; }

.bgc-pledge-info { background: rgba(240,249,255,0.8); backdrop-filter: blur(4px); border: 1px solid #bae6fd; border-radius: 8px; padding: 12px 15px; margin-bottom: 0; }
.bgc-pledge-info strong { color: #0369a1; display: flex; align-items: center; gap: 6px; margin-bottom: 0px; font-size: 14px; }
.bgc-pledge-info ul { margin: 0; padding-left: 20px; color: #334155; font-size: 12px; line-height: 1.4; }
.bgc-pledge-info li { margin-bottom: 2px; }

/* --- LA GALERIE 3D MAGIQUE --- */
.bgc-product-gallery { display: flex; flex-direction: column-reverse; gap: 20px; }
@media (min-width: 768px) { .bgc-product-gallery { flex-direction: row; align-items: flex-start; } }

.bgc-gallery-thumbnails { display: flex; flex-direction: row; gap: 15px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.bgc-gallery-thumbnails::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .bgc-gallery-thumbnails { flex-direction: column; width: 80px; flex-shrink: 0; overflow-x: visible; } }

/* Miniatures en verre */
.bgc-thumbnail-btn { 
    background: rgba(255, 255, 255, 0.4); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 12px; overflow: hidden; width: 80px; height: 80px; 
    opacity: 0.6; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor:pointer; padding:4px; flex-shrink:0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.bgc-thumbnail-btn:hover, .bgc-thumbnail-btn.active { opacity: 1; border-color: #0f766e; transform: scale(1.05); background: rgba(255, 255, 255, 0.8); }
.bgc-thumbnail-btn img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px;}

/* Conteneur principal en Verre Dépoli (Glassmorphism) */
.bgc-gallery-main { 
    flex-grow: 1; position: relative; border-radius: 24px; overflow: hidden; 
    background: rgba(255, 255, 255, 0.35); /* Presque transparent pour laisser passer le blur */
    backdrop-filter: blur(16px); 
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.7); 
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15), inset 0 2px 10px rgba(255,255,255,0.6); 
    aspect-ratio: 1/1; display:flex; align-items:center; justify-content:center; padding: 40px; 
}
/* Halo de lumière derrière la boîte */
.bgc-gallery-main::before {
    content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 60%; height: 60%; background: #ffffff; filter: blur(60px); opacity: 0.5; z-index: 0;
}
/* La boîte qui flotte */
.bgc-gallery-main img { 
    max-width: 100%; max-height: 100%; object-fit: contain; position: relative; z-index: 1;
    transition: opacity 0.2s ease-in-out, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    filter: drop-shadow(0 30px 40px rgba(0,0,0,0.3)); 
    transform: translateY(-5px) scale(1); 
}
.bgc-gallery-main:hover img { 
    transform: translateY(-15px) scale(1.05); 
    filter: drop-shadow(0 40px 50px rgba(0,0,0,0.4)); 
}
.bgc-badge-overlay { position: absolute; top: 20px; left: 20px; color: white; padding: 6px 14px; border-radius: 20px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; z-index: 2; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

/* --- LA BUY BOX PREMIUM --- */
.bgc-sticky-buy-box { 
    background: rgba(255, 255, 255, 0.92); /* Légèrement transparente */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.8); border-radius: 24px; padding: 40px; 
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.1), 0 0 0 1px rgba(226, 232, 240, 0.5); 
}

/* --- USPs & INFOS --- */
.bgc-usp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 20px 0; padding: 20px 0; border-top: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; }
.bgc-usp-item { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; color:#334155; line-height: 1.2;}
.bgc-usp-item .dashicons { color: #0f766e; font-size: 18px; width: 18px; height: 18px;}

.bgc-stock-status { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 15px;}
.bgc-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.status-instock { color: #059669; } .status-instock .bgc-dot { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.status-preorder { color: #d97706; } .status-preorder .bgc-dot { background: #f59e0b; box-shadow: 0 0 0 3px #fef3c7; }
.status-outofstock { color: #dc2626; } .status-outofstock .bgc-dot { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }

/* --- FORMULAIRE D'ACHAT & BOUTON ANIMÉ --- */
.woocommerce div.product form.cart { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; margin: 0 !important; padding: 0 !important; background:transparent !important; border:none !important; box-shadow:none !important;}
.woocommerce div.product form.cart div.quantity { display: flex !important; width: 100px !important; margin: 0 !important; }
.woocommerce div.product form.cart input.qty { width: 100% !important; height: 55px !important; border-radius: 12px !important; border: 2px solid #e2e8f0 !important; background: #fff !important; font-weight: 800 !important; font-size: 18px !important; text-align: center !important; transition: border-color 0.2s; }
.woocommerce div.product form.cart input.qty:focus { border-color: #0f766e !important; outline: none !important; }

.woocommerce div.product form.cart button.single_add_to_cart_button { flex-grow: 1 !important; height: 55px !important; border-radius: 12px !important; font-size: 16px !important; font-weight: 800 !important; background-color: #0f766e !important; color: #fff !important; transition: all 0.3s ease !important; box-shadow: 0 10px 20px -5px rgba(15, 118, 110, 0.4) !important; border: none !important; text-transform: uppercase !important; letter-spacing: 1px !important; margin: 0 !important; overflow: hidden; position: relative; z-index: 1; }
.woocommerce div.product form.cart button.single_add_to_cart_button:hover { transform: translateY(-2px) !important; background-color: #115e59 !important; box-shadow: 0 15px 25px -5px rgba(15, 118, 110, 0.5) !important; }
.woocommerce div.product form.cart button.single_add_to_cart_button:disabled { background: #cbd5e1 !important; transform:none !important; box-shadow:none !important; color:#94a3b8 !important; cursor:not-allowed !important;}

/* L'effet de brillance sur le bouton */
.woocommerce div.product form.cart button.single_add_to_cart_button::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent); transform: skewX(-20deg); z-index: -1; animation: shine 3s infinite; }
@keyframes shine { 0% { left: -100%; } 20% { left: 200%; } 100% { left: 200%; } }

/* --- TRUST BADGES --- */
.bgc-trust-container { display: flex; flex-direction:column; gap:15px; margin-top: 25px; padding:20px; background:#f8fafc; border-radius:12px; }
.bgc-trust-item { display: flex; align-items: flex-start; gap: 12px; font-size: 13px; color: #64748b; line-height: 1.5; }
.bgc-trust-item strong { color: #1e293b; display:block; margin-bottom: 2px;}
.bgc-trust-icon { color: #0f766e; font-size: 22px; width: 22px; height: 22px; margin-top: 2px; }

/* --- ACCORDÉONS --- */
.bgc-product-accordions { background: #fff; border-radius: 16px; padding: 0 30px; box-shadow: 0 4px 20px rgba(0,0,0,0.02);}
.bgc-product-accordions details { border-bottom: 1px solid #f1f5f9; }
.bgc-product-accordions details:last-child { border-bottom: none; }
.bgc-product-accordions summary { list-style: none; padding: 25px 0; font-weight: 800; font-size: 1.1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: #0f172a; transition: color 0.2s;}
.bgc-product-accordions summary:hover { color: #0f766e; }
.bgc-product-accordions summary::-webkit-details-marker { display: none; }
.bgc-acc-icon { width: 24px; height: 24px; border-radius: 50%; background: #f1f5f9; display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.3s;}
.bgc-acc-icon::before, .bgc-acc-icon::after { content: ''; position: absolute; background: #64748b; transition: all 0.3s;}
.bgc-acc-icon::before { width: 12px; height: 2px; }
.bgc-acc-icon::after { width: 2px; height: 12px; }
.bgc-product-accordions details[open] .bgc-acc-icon::after { transform: rotate(90deg); opacity: 0; }
.bgc-accordion-content { padding-bottom: 25px; color: #475569; font-size: 1.05rem; line-height: 1.8; }

.bgc-specs-list { list-style: none; padding: 0; margin: 0; }
.bgc-specs-list li { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed #e2e8f0; }
.bgc-specs-list li:last-child { border-bottom: none; }
.bgc-specs-list li span { color: #64748b; }
.bgc-specs-list li strong { color: #0f172a; }

/* --- BLOCS DÉTAILS (Addons, B2B) --- */
.bgc-fw-block { background: #ffffff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.02); padding: 30px; border: 1px solid #fff; margin-top:20px;}
.bgc-card-orange { border: 1px solid #ffedd5; }
.bgc-card-pink { border: 1px solid #fce7f3; }
.bgc-fw-title { font-size: 20px !important; font-weight: 800 !important; color: #0f172a !important; margin: 0 0 25px 0 !important; display:flex !important; align-items:center !important; gap:10px !important; }

.bgc-addons-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }
.bgc-addon-card { display: flex; align-items: center; gap: 15px; padding: 15px; border: 1px solid #e2e8f0; border-radius: 12px; text-decoration: none; background: #fff; transition: all 0.2s ease; }
.bgc-addon-card:hover { border-color: #cbd5e1; box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05); transform: translateY(-2px); }
.bgc-addon-card img { width: 60px; height: 60px; object-fit: contain; border-radius: 8px; background: #f8fafc; padding: 4px; }
.bgc-addon-title { color: #0f172a; font-size: 14px; display: block; line-height: 1.3; margin-bottom: 4px; }
.bgc-addon-price { color: #ec4899; font-weight: 800; font-size: 15px; }

.bgc-b2b-scroll-wrapper { display: flex; gap: 15px; overflow-x: auto; padding-top: 18px; padding-bottom: 15px; margin-top: 10px; scrollbar-width: thin; scrollbar-color: #fdba74 #fff7ed; }
.bgc-b2b-scroll-wrapper::-webkit-scrollbar { height: 8px; }
.bgc-b2b-scroll-wrapper::-webkit-scrollbar-track { background: #fff7ed; border-radius: 10px; }
.bgc-b2b-scroll-wrapper::-webkit-scrollbar-thumb { background: #fdba74; border-radius: 10px; }

.bgc-b2b-tier { flex: 0 0 130px; text-align: center; padding: 20px 10px; background: #fff; border: 2px solid #ffedd5; border-radius: 12px; position: relative; transition: all 0.2s ease; }
.bgc-b2b-tier:hover { border-color: #fdba74; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(234, 88, 12, 0.08); }
.bgc-b2b-qty { display: block; color: #c2410c; font-size: 18px; font-weight: 800; }
.bgc-b2b-qty small { font-size: 12px; font-weight: 600; color: #fdba74; }
.bgc-b2b-price { color: #0f172a; font-weight: 900; font-size: 18px; margin: 12px 0 0 0; }

.bgc-b2b-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: #ea580c; color: white; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 800; box-shadow: 0 4px 6px rgba(234, 88, 12, 0.2); white-space: nowrap; border: 3px solid #fff; }

/* --- CROSS-SELLS --- */
.bgc-cross-sell-section { max-width: 1400px; margin: 60px auto 0 auto; padding: 0 20px; clear: both;}
.bgc-cross-sell-title { font-size: 28px; font-weight: 800; color: #0f172a; margin-bottom: 30px; letter-spacing: -0.5px; }
.bgc-horizontal-scroller { display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 30px; scrollbar-width: thin; }
.bgc-horizontal-scroller::-webkit-scrollbar { height: 8px; }
.bgc-horizontal-scroller::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 10px; }
.bgc-horizontal-scroller::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }

.bgc-cross-card { min-width: 240px; max-width: 240px; flex-shrink: 0; scroll-snap-align: start; background: #fff; border-radius: 16px; padding: 15px; border: 1px solid #e2e8f0; text-decoration: none; transition: all 0.3s ease; display: flex; flex-direction: column; }
.bgc-cross-card:hover { transform: translateY(-5px); box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05); border-color: #cbd5e1; }
.bgc-cross-img-wrap { background: #f8fafc; border-radius: 12px; padding: 15px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; }
.bgc-cross-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.bgc-cross-info { display: flex; flex-direction: column; flex-grow: 1; }
.bgc-cross-name { font-size: 15px; font-weight: 700; color: #0f172a; margin: 0 0 10px 0; line-height: 1.3; }
.bgc-cross-price { font-size: 18px; font-weight: 800; color: #0f766e; margin-bottom: 15px; margin-top: auto; }
.bgc-cross-btn { background: #f1f5f9; color: #0f172a; text-align: center; font-weight: 700; padding: 10px; border-radius: 8px; font-size: 13px; transition: background 0.2s; }
.bgc-cross-card:hover .bgc-cross-btn { background: #0f766e; color: #fff; }