/*
Theme Name: YouPhones Theme
Theme URI: https://youphones.fr
Description: Thème personnalisé pour YouPhones - Vente de coques personnalisées et réparations de smartphones à Poitiers
Author: YouPhones
Author URI: https://youphones.fr
Version: 1.6.0
Text Domain: youphones-theme
*/

/* Styles personnalisés */
:root {
    /* Brand palette: White, Red, Black */
    --primary-color: #e30613; /* Red */
    --secondary-color: #111111; /* Black */
    --accent-color: #b3000f; /* Darker red for emphasis */
    --text-color: #111111; /* Black */
    --light-bg: #ffffff; /* White */
    --dark-bg: #000000; /* Black */
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

.youphones-custom-product .yc-how-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none;
}

/* Generic container (used across templates) */
.container {
    width: min(1200px, 100% - 32px);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 600px) {
    body.woocommerce-cart .container,
    body.woocommerce-checkout .container {
        width: 95% !important;
    }
    body:not(.home) .container {
        width: auto;
    }
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Responsive typography */
h1 { font-size: clamp(36px, 4vw, 42px); letter-spacing: 0.5px; }
h2 { font-size: clamp(26px, 3vw, 32px); letter-spacing: 0.4px; font-weight: 600; }
h3 { font-size: clamp(22px, 2.5vw, 26px); letter-spacing: 0.3px; font-weight: 500; }
body, p, li { font-size: clamp(14px, 1.2vw, 18px); }
.repair-card p { font-size: 12px; }
.repairs-grid-tarifs .repair-card .price { font-size: clamp(14px, 1.2vw, 18px); }
/* Buttons & CTAs */
.btn-primary, .btn-secondary,
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: clamp(16px, 1.8vw, 18px);
    padding: 12px 26px;
    border-radius: 999px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: #fff;
}

.btn-secondary {
    background: #ffffff;
    color: var(--secondary-color);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.22);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.92);
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.22);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}
a:hover { color: var(--accent-color); }
.site-footer { background-color: #000; color: #fff; padding: 3rem 0; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 24px;
    align-items: start;
}
/* Footer columns and text */
.footer-col .widget-title { margin-bottom: 12px; font-size: 16px; letter-spacing: .5px; color: #fff; }
.footer-col, .footer-col p, .footer-col li { color: #fff; }
.site-branding img.custom-logo,
.custom-logo-link img,
.footer-col-brand .footer-logo img { max-height: 110px; height: auto; width: auto; }
.footer-copy { margin-top: 10px; opacity: .85; font-size: 14px; text-transform: none; color: #fff; }

/* Footer links */
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 6px 0; }

/* Footer contact + socials */
.footer-contact { list-style: none; margin: 0; padding: 0; }
.footer-contact li { margin: 6px 0; opacity: .9; }
.social-icons a { display: inline-flex; align-items: center; justify-content: center; margin-right: 8px; color: #fff; opacity: .9; transition: var(--transition); }
.social-icons a:hover { color: var(--primary-color); opacity: 1; }

/* Footer: keep three columns on one line across breakpoints */
/* No breakpoint collapse requested */

/* Mobile menu (kept minimal if needed elsewhere) */
.mobile-menu { display: none; background: #fff; border-top: 1px solid rgba(0,0,0,0.06); box-shadow: 0 10px 20px rgba(0,0,0,0.06); }
.mobile-menu.active { display: block; animation: dropdownFade .25s ease forwards; }
.mobile-menu li { list-style: none; }
.mobile-menu li a { display: block; padding: 12px 4px; color: var(--secondary-color); }
.mobile-menu .sub-menu { display: none; padding-left: 12px; }
.mobile-menu .menu-item.open > .sub-menu { display: block; }

/* ================= Header (restored) ================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--light-bg);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
    transform: translateY(0);
}

.site-header.scrolled { box-shadow: 0 6px 20px rgba(0,0,0,0.06); }

/* Header caché par défaut sur la page d'accueil, visible après scroll */
body.page-template-template-home.home-header-hidden .site-header {
    transform: translateY(-100%);
}

/* Sur la page d'accueil, le header ne doit pas réserver de place au-dessus de la vidéo */
body.page-template-template-home .site-header {
    position: fixed;
    width: 100%;
    left: 0;
}

/* Produit personnalisé: header au-dessus de la vidéo, caché en haut puis visible au scroll */
body.youphones-custom-product .site-header {
    position: fixed;
    width: 100%;
    left: 0;
}
body.youphones-custom-product.custom-header-hidden .site-header {
    transform: translateY(-100%);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

.site-branding { flex: 0 0 auto; }
.main-navigation { flex: 1 1 auto; overflow: hidden; }
.header-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; }

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
}

.main-navigation > ul > li > a {
    display: inline-block;
    padding: 10px 8px;
    color: var(--secondary-color);
    font-weight: 500;
    white-space: nowrap;
}
.main-navigation > ul > li > a:hover { color: var(--primary-color); }

/* Desktop dropdowns */
.main-navigation ul li { position: relative; }
.main-navigation ul li .sub-menu {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}
.main-navigation ul li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* Header actions */
.account-link, .cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    padding: 8px 10px;
    border-radius: 8px;
    transition: var(--transition);
}
.account-link:hover, .cart-link:hover { color: var(--primary-color); background: rgba(227,6,19,0.08); }
.cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; font-size: 12px; color: #fff; background: var(--primary-color); border-radius: 999px; }

/* Header promo banner */
.youphones-header-banner {
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 10px 0;
}
.youphones-disabled-atc{
    width: 100%;
    border-radius: 10px;
    padding: 12px 16px;
}

.youphones-header-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

@media (max-width: 600px) {
    .youphones-header-banner {
        padding: 8px 0;
        font-size: 13px;
    }
}

/* Hamburger */
.menu-toggle { display: none; width: 42px; height: 42px; border: 1px solid rgba(0,0,0,0.08); border-radius: 10px; background: #fff; align-items: center; justify-content: center; flex-direction: column; gap: 5px; transition: var(--transition); }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--secondary-color); transition: var(--transition); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* WooCommerce: rupture de stock UI */
.single-product .youphones-oos-badge {
	display: inline-flex;
	align-items: center;
	margin-left: 10px;
	padding: 6px 10px;
	border-radius: 999px;
	background: rgba(227, 6, 19, 0.10);
	color: var(--primary-color);
	font-weight: 700;
	font-size: 13px;
    
}

.single-product .youphones-oos-atc {
	margin-top: 14px;
    width: 100%;
    border-radius: 10px;
}

.single-product .youphones-disabled-atc {
	pointer-events: none;
}

/* Responsive header */
@media (max-width: 992px) {
    .main-navigation { display: none; }
    .menu-toggle { display: inline-flex; }
}

/* Ajustements header mobile */
@media (max-width: 600px) {
    /* Logo un peu plus petit pour éviter que le header déborde */
    .site-branding img.custom-logo,
    .custom-logo-link img {
        max-height: 80px;
    }

    /* Ne garder que l'icône compte, pas le texte */
    .header-actions .account-text {
        display: none;
    }

    /* Footer: masquer la colonne "liens rapides" en mobile (2e colonne) */
    .footer-grid > .footer-col:nth-child(2) {
        display: none;
    }
    /* Footer: 2 colonnes visibles et gap réduit en mobile */
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* =============================
   WooCommerce: Panier / Checkout / Compte
   ============================= */

.woocommerce-cart .cart_totals,
.woocommerce-checkout-review-order,
.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details,
.woocommerce-account .woocommerce-MyAccount-content {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
    padding: 20px 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

/* =============================
   WooCommerce: Checkout (classic + Blocks)
   ============================= */

/* Page container spacing */
.woocommerce-checkout .woocommerce,
.woocommerce-checkout #primary,
.wc-block-checkout {
    padding-bottom: 40px;
}

/* Notices */
.woocommerce-checkout .woocommerce-error,
.woocommerce-checkout .woocommerce-info,
.woocommerce-checkout .woocommerce-message,
.wc-block-checkout .wc-block-components-notice-banner {
    border-radius: 14px;
}

/* Classic checkout: customer details panels */
.woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: 22px;
    align-items: start;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.woocommerce-checkout #order_review_heading {
    margin: 0 0 10px;
}

/* Form fields (classic) */
.woocommerce-checkout form.checkout .form-row label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.woocommerce-checkout form.checkout .input-text,
.woocommerce-checkout form.checkout select,
.woocommerce-checkout form.checkout textarea {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.woocommerce-checkout form.checkout .input-text:focus,
.woocommerce-checkout form.checkout select:focus,
.woocommerce-checkout form.checkout textarea:focus {
    outline: none;
    border-color: rgba(227, 6, 19, 0.55);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.10);
}

/* Payment box (classic) */
.woocommerce-checkout #payment {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid #e5e7eb;
}

/* Place order button (classic) */
.woocommerce-checkout #place_order {
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
}

/* Blocks checkout: make sections look like cards without breaking layout */
.wc-block-checkout .wc-block-components-checkout-step,
.wc-block-checkout .wc-block-components-sidebar,
.wc-block-checkout .wc-block-components-order-summary {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.wc-block-checkout .wc-block-components-checkout-step {
    padding: 18px;
}

.wc-block-checkout .wc-block-components-sidebar {
    padding: 18px;
}

/* Inputs (Blocks) */
.wc-block-checkout input[type="text"],
.wc-block-checkout input[type="email"],
.wc-block-checkout input[type="tel"],
.wc-block-checkout input[type="number"],
.wc-block-checkout select,
.wc-block-checkout textarea {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.wc-block-checkout input[type="text"]:focus,
.wc-block-checkout input[type="email"]:focus,
.wc-block-checkout input[type="tel"]:focus,
.wc-block-checkout input[type="number"]:focus,
.wc-block-checkout select:focus,
.wc-block-checkout textarea:focus {
    outline: none;
    border-color: rgba(227, 6, 19, 0.55);
    box-shadow: 0 0 0 4px rgba(227, 6, 19, 0.10);
}

/* CTA button (Blocks) */
.wc-block-checkout .wc-block-components-checkout-place-order-button {
    border-radius: 999px;
    font-weight: 700;
}

@media (max-width: 992px) {
    .woocommerce-checkout form.checkout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #0f172a;
    border-radius: 18px;
    padding: 16px 18px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    color: #e5e7eb;
}

/* =============================
   WooCommerce: Galerie produit
   ============================= */

.single-product .woocommerce-product-gallery.youphones-slick {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    overflow: visible;
    position: relative;
    z-index: 3;
    max-width: 420px; /* limite la taille globale de la galerie */
}

.single-product .woocommerce-product-gallery.youphones-slick .product-gallery-slick {
	flex: 1 1 auto;
}

.single-product .woocommerce-product-gallery.youphones-slick .product-gallery-slick .pg-slide {
	position: relative;
	width: 100%;
	/* Carré/rectangle légèrement plus bas (ratio ~4:5) */
	/*padding-top: 20%;*/
	overflow: hidden;
	background: #f8fafc;
	border-radius: 12px;
}

.single-product .woocommerce-product-gallery.youphones-slick .product-gallery-slick .pg-slide img {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	display: block;
}

.single-product .woocommerce-product-gallery.youphones-slick .product-thumbs-slick {
    flex: 0 0 70px;
    max-width: 70px;
    overflow-y: auto;
}

.single-product .woocommerce-product-gallery.youphones-slick .product-thumbs-slick .pg-thumb img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Laisser Slick ajuster la hauteur automatiquement pour la galerie produit */
.single-product .woocommerce-product-gallery.youphones-slick .slick-list.draggable {
	height: auto !important;
}

/* Accordéon produit (coques) */
.single-product .youphones-product-accordion {
	margin-top: 20px;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
	padding: 12px 14px;
}

.single-product .youphones-product-accordion .yp-accordion-item {
	border-bottom: 1px solid #e5e7eb;
	padding: 6px 0;
}

.single-product .youphones-product-accordion .yp-accordion-item:last-child {
	border-bottom: none;
}

.single-product .youphones-product-accordion .yp-accordion-summary {
	list-style: none;
	cursor: pointer;
	font-weight: 600;
	font-size: 20px;
	padding: 12px 10px;
	text-align: center;
	position: relative;
}

.single-product .youphones-product-accordion .yp-accordion-summary::-webkit-details-marker {
	display: none;
}

.single-product .youphones-product-accordion .yp-accordion-summary::after {
	content: '+';
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	font-weight: 600;
}

.single-product .youphones-product-accordion .yp-accordion-item[open] .yp-accordion-summary::after {
	content: '−';
}

.single-product .youphones-product-accordion .yp-accordion-content {
	padding: 0 4px 8px 4px;
	font-size: 14px;
}

/* Section galerie custom : juste une marge basse, galerie centrée */
.single-product section.yc-gallery-section {
	margin-bottom: 24px;
}

.single-product section.yc-gallery-section .woocommerce-product-gallery.youphones-slick {
	margin-left: auto;
	margin-right: auto;
}

.single-product section.yc-gallery-section .yc-gallery-left {
	flex: 0 0 auto; /* largeur contrôlée par les styles existants de la galerie */
}

.single-product section.yc-gallery-section .yc-gallery-right {
	flex: 1 1 0;
}

@media (max-width: 768px) {
    .single-product .woocommerce-product-gallery.youphones-slick {
        flex-direction: column;
        gap: 8px;
    }

    .single-product .woocommerce-product-gallery.youphones-slick .product-thumbs-slick {
        flex: 0 0 auto;
        max-width: 100%;
        max-height: none;
        overflow-y: visible;
    }

	/* Sur mobile, repasser la section en pile verticale */
	.single-product section.yc-gallery-section {
		flex-direction: column;
		gap: 16px;
	}
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    background: #f97316;
    color: #0f172a;
}

.woocommerce table.shop_table {
    border-radius: 14px;
    overflow: hidden;
}

@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content {
        margin-bottom: 16px;
    }
}

/* ================= WooCommerce Shop (modern grid) ================ */
/* Grid container */
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding-left: 0; /* retirer le padding par défaut des <ul> */
}

@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .woocommerce ul.products {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Page d'accueil : produits phares en grille 2 colonnes sur mobile */
@media (max-width: 768px) {
    body.page-template-template-home .home-featured-products ul.products {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 16px !important;
    }
}

/* Product card */
.woocommerce ul.products li.product {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    transition: transform .25s ease, box-shadow .25s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.10);
}

/* Image wrapper with fixed ratio */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: block;
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Content area */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.3;
    margin: 12px 14px 6px;
    color: var(--secondary-color);
    text-align: center;
}
.woocommerce ul.products li.product .price {
    margin: 0 14px 10px;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
}

/* Centrer le contenu des cartes produits (image, titre, prix) */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

@media (max-width: 600px) {
	/* Centrer la carte produit entière en mobile */
	.woocommerce ul.products li.product {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}

/* Homepage featured products: textes un peu plus petits */
.home-featured-products .home-featured-grid.products .product .woocommerce-loop-product__title {
    font-size: 16px;
}
.home-featured-products .home-featured-grid.products .product .price {
    font-size: 0.9em;
}

/* Add to cart button */
.woocommerce ul.products li.product .button {
    margin: 10px auto 16px;
    width: auto;
    text-align: center;
    border-radius: 8px;
    box-shadow: none;
    cursor: pointer;
}

/* Fiche produit: bouton Ajouter au panier sans style "pilule" */
.single-product .cart .button,
.single-product .cart .single_add_to_cart_button {
    border-radius: 8px;
    box-shadow: none;
    padding: 10px 18px;
}

/* Hover rouge sur le bouton Ajouter au panier */
.single-product .single_add_to_cart_button,
.single-product .single_add_to_cart_button.button {
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.05s ease;
}

.single-product .single_add_to_cart_button:hover,
.single-product .single_add_to_cart_button.button:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    transform: translateY(-1px);
    cursor: pointer;
}

/* Grille 2x2 fiche produit classique :
   (1,1) galerie, (1,2) résumé, (2,1) produits similaires, (2,2) description longue */
.single-product .product {
	/* déjà en grid avec 2 colonnes, on force juste les positions des blocs clés */
	grid-auto-rows: auto;
}

.single-product .product > div.images {
	grid-column: 1;
	grid-row: 1;
}

.single-product .product > .summary.entry-summary {
	grid-column: 2;
	grid-row: 1;
}

.single-product .product .related.products {
	grid-column: 1;
	grid-row: 2;
}

.single-product .product .youphones-single-long-description {
	grid-column: 2;
	grid-row: 2;
	font-size: 15px;
	line-height: 1.6;
}

@media (max-width: 992px) {
	.single-product .product {
		grid-template-columns: 1fr;
	}
	.single-product .product > div.images,
	.single-product .product > .summary.entry-summary,
	.single-product .product .related.products,
	.single-product .product .youphones-single-long-description {
		grid-column: 1;
		grid-row: auto;
	}
}

/* Badges */
.woocommerce span.onsale {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: var(--primary-color);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Sorting bar and result count */
.woocommerce .woocommerce-result-count { margin: 0 0 16px 0; opacity: .8; }
.woocommerce .woocommerce-ordering select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination ul {
    display: inline-flex;
    gap: 8px;
    border: 0;
}
.woocommerce nav.woocommerce-pagination ul li {
    border: 0;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    color: var(--secondary-color);
}
.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* ================= Homepage ================= */
/* Reveal animations */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Hero */
.home-hero { background: linear-gradient(180deg, #fafafa, #ffffff); padding: 64px 0; }
.home-hero .hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.home-hero .hero-content h1 { margin-bottom: 12px; }
.home-hero .hero-sub { font-size: 18px; opacity: .85; margin-bottom: 18px; }
.home-hero .hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.home-hero .hero-media { min-height: 320px; border-radius: 16px; background: url('https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?q=80&w=1200&auto=format&fit=crop') center/cover no-repeat; box-shadow: 0 16px 40px rgba(0,0,0,.08); }

/* Hero vidéo plein écran (accueil) */
.home-hero-video {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 480px;
    overflow: hidden;
}
.home-hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.home-hero-video-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.45), rgba(0,0,0,0.25));
    color: #fff;
}
.home-hero-video .hero-inner {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.home-hero-video .hero-cta {
    justify-content: center;
}
.home-hero-video .hero-content h1,
.home-hero-video .hero-content p,
.home-hero-video .hero-cta a { color: #fff; }
.home-hero-video .hero-cta .btn-primary { background: var(--primary-color); color:#fff; }
.home-hero-video .hero-cta .btn-secondary { background: #fff; color: var(--secondary-color); }

@media (max-width: 992px) {
  .home-hero .hero-inner { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
.home-hero-video .hero-cta .btn-primary { margin-bottom: 10px; }
}


/* Benefits */
.home-benefits { background: #f7f7f8; padding: 40px 0; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
.benefit { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 18px; text-align: center; }
.benefit .icon { width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 14px; background: #e8f0fe; display: flex; align-items: center; justify-content: center; }
.benefit .icon .icon-symbol { font-size: 22px; line-height: 1; }

@media (max-width: 992px) { .benefits-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .benefits-grid { grid-template-columns: 1fr; } }

/* Section header */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.section-head .link-more { color: var(--secondary-color); opacity: .7; }
.section-head .link-more:hover { color: var(--primary-color); opacity: 1; }

/* Featured products */
.home-featured-products { padding: 40px 0; }
.home-featured-products .home-featured-grid .product { box-shadow: none; border: 1px solid #eee; }
.home-featured-products .home-featured-grid .product:hover { box-shadow: 0 12px 30px rgba(0,0,0,0.10); }

/* Repairs */
.home-repairs { padding: 40px 0; }
.repairs-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.repair-card {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 16px;
    transition: transform .2s ease, box-shadow .2s ease;
}
.repair-card .img {
	height: 185px;
	background: #f3f4f6;
	border-radius: 8px;
	margin-bottom: 10px;
	background-position: center center;
	background-repeat: no-repeat;
	background-size: cover; /* remplit le bloc, quitte à recadrer un peu */
}
.repair-card h3 { font-size: 18px; margin-bottom: 6px; }
.repair-card .btn-link { color: var(--primary-color); font-weight: 600; }
.repair-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }

/* Variante tarifs par modèle : icône ronde au lieu d'image */
.repairs-grid-tarifs .repair-card {
    text-align: left;
}
.repairs-grid-tarifs .repair-card .repair-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.repairs-grid-tarifs .repair-card .repair-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}
.repairs-grid-tarifs .repair-card p {
    margin: 4px 0;
}
.repairs-grid-tarifs .repair-card .price {
    font-weight: 700;
    color: var(--primary-color);
}
@media (max-width: 992px) { .repairs-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px) { .repairs-grid { grid-template-columns: 1fr; } }

/* Customization */
.home-custom { padding: 40px 0; }
.custom-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }
.custom-media { min-height: 395px; border-radius: 16px; background: url('https://images.unsplash.com/photo-1505740420928-5e560c06d30e?q=80&w=1200&auto=format&fit=crop') center/cover no-repeat; }
.custom-content p { margin: 10px 0 14px; }
@media (max-width: 992px) { .custom-inner { grid-template-columns: 1fr; } }

/* Testimonials */
.home-testimonials { background: #f7f7f8; padding: 40px 0; }
.testimonial-card { background: #fff; padding: 18px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.06); margin: 0 10px; }
.testimonial-card .author { margin-top: 8px; font-weight: 600; color: var(--primary-color); }

/* Offer */
.home-offer { background: #0f172a; color: #fff; text-align: center; padding: 40px 0; }
.home-offer .offer-inner p { margin: 8px 0 14px; }

/* Contact (home section) */
.home-contact { padding: 40px 0; }
.contact-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
.contact-grid .map iframe { width: 100%; height: 320px; border: 0; border-radius: 12px; box-shadow: 0 12px 30px rgba(0,0,0,.08); }
.contact-grid .contact-info ul { list-style: none; margin: 10px 0 14px; padding: 0; }
.contact-grid .contact-info li { margin: 6px 0; }
@media (max-width: 992px) { .contact-grid { grid-template-columns: 1fr; } }

/* Contact page template */
.contact-page-header {
    padding: 32px 0 16px;
    background: #f7f7f8;
}
.contact-page-header .page-title {
    margin: 0 0 6px;
}

.contact-content {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    padding: 32px 0 40px;
}

.contact-details {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.contact-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
}
.contact-text h4 {
    margin: 0 0 4px;
    font-size: 14px;
    text-transform: none;
}
.contact-text p {
    margin: 0;
    font-size: 14px;
}

.contact-map {
    margin-top: 20px;
}
.contact-map h3 {
    margin-bottom: 8px;
}
.contact-map .google-map iframe {
    width: 100%;
    height: 280px;
    border: 0;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.contact-form-container {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #eee;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}
.contact-form-container h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Fallback form layout */
.contact-form .form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}
.contact-form .form-column {
    flex: 1;
}
.contact-form .form-column.full-width {
    flex: 0 0 100%;
}
.contact-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}

/* Contact Form 7 inside contact page */
.contact-form-container .wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 10px;
}
.contact-form-container .wpcf7-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}
.contact-form-container .wpcf7-form input[type="text"],
.contact-form-container .wpcf7-form input[type="email"],
.contact-form-container .wpcf7-form input[type="tel"],
.contact-form-container .wpcf7-form textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 10px;
    font: inherit;
}
.contact-form-container .wpcf7-form input[type="submit"] {
    margin-top: 6px;
}

@media (max-width: 992px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .contact-content {
        padding: 20px 0 32px;
        gap: 20px;
    }
    .contact-form .form-row {
        flex-direction: column;
    }
}

/* ================= Single Product ================= */
.single-product-container { padding: 24px 0 40px; }
.single-product .product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 992px){ .single-product .product { grid-template-columns: 1fr; } 
.single-product div.images {padding: 0px !important;}}

/* Gallery */
.single-product div.images { position: relative; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.04); }
.single-product div.images img { border-radius: 8px; width: 100%; height: auto; }
.single-product .flex-control-thumbs li img { border-radius: 8px; }

@media (max-width: 600px) {
	/* S'assurer que la galerie produit est bien centrée en mobile */
	.single-product div.images,
	.single-product .woocommerce-product-gallery,
	.product-gallery-slick {
		max-width: 100%;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}
	.single-product div.images img,
	.product-gallery-slick .pg-slide img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}
}

/* Custom case product (coque personnalisée) */
.youphones-custom-product .single-product-container {
padding-top: 28px;
}

.youphones-custom-product .single-product .product {
grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
gap: 32px;
}

.youphones-custom-product .yc-gallery-section {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
	gap: 32px;
	align-items: flex-start;
	margin-bottom: 24px;
}

.youphones-custom-product .yc-gallery-main,
.youphones-custom-product .yc-gallery-desc {
	width: 100%;
}

.youphones-custom-product .yc-gallery-desc {
	grid-column: 2;
}

@media (max-width: 768px) {
    .youphones-custom-product .yc-gallery-desc {
         width: 95%;
    margin: 0 auto;
    }
}

.youphones-custom-product .yc-gallery-main {
	grid-column: 1;
}

@media (max-width: 992px) {
	.youphones-custom-product .yc-gallery-section {
		grid-template-columns: minmax(0, 1fr);
	}
	.youphones-custom-product .yc-gallery-main,
	.youphones-custom-product .yc-gallery-desc {
		grid-column: 1;
	}
}

.youphones-custom-product .youphones-configurator {
margin-top: 18px;
background-color: #fff;
}

.youphones-custom-product .youphones-configurator canvas {
    max-width: 100%;
    border-radius: 14px;
}

.youphones-custom-product .youphones-configurator .cfg-stage {
    background: #fff;
    border-color: #fff;
    max-width: 520px;
    margin: 0 auto;
}

.youphones-custom-product .youphones-configurator .cfg-model {
    margin-bottom: 10px;
}

.youphones-custom-product .youphones-configurator .cfg-toolbar {
    align-items: center;
}

.youphones-custom-product .youphones-configurator .cfg-actions input[type="file"] {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
    cursor: pointer;
}

.youphones-custom-product .youphones-configurator .cfg-actions input[type="file"]::-webkit-file-upload-button {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 0;
    background-color: #0f172a;
    color: #fff;
    cursor: pointer;
}

.youphones-custom-product .youphones-configurator .cfg-actions input[type="file"]::file-selector-button {
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 0;
    background-color: #0f172a;
    color: #fff;
    cursor: pointer;
}

.youphones-custom-product .youphones-configurator .cfg-model select#youphones_model {
    width: 100%;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background-color: #f8fafc;
}

.youphones-custom-product .single_add_to_cart_button {
    margin-bottom: 12px;
}

.youphones-custom-product .youphones-configurator .cfg-actions .button,
.youphones-custom-product .youphones-configurator .cfg-actions button {
    border-radius: 999px;
}

.youphones-custom-product .youphones-configurator .cfg-note {
    font-size: 12px;
    color: #64748b;
}

/* AirPods Max configurator layout */
.youphones-configurator-airpods .cfg-stage-dual {
    display: flex;
    gap: 24px;
}

.youphones-configurator-airpods .cfg-side {
    flex: 1 1 0;
}

@media (max-width: 768px) {
    .youphones-configurator-airpods .cfg-stage-dual {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .youphones-custom-product .single-product .product {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .youphones-custom-product .single-product-container {
        padding-top: 20px;
        padding-bottom: 32px;
    }
    .youphones-custom-product .youphones-configurator {
        margin-top: 14px;
    }
    .youphones-custom-product .youphones-configurator .cfg-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .youphones-custom-product .youphones-configurator .cfg-actions {
        justify-content: flex-start;
    }
}

/* Custom product flow: video + how it works + pricing note */
.youphones-custom-product .youphones-custom-flow {
    margin-bottom: 18px;
}

/* Supprimer l'espace blanc avant la vidéo sur le produit personnalisé */
body.youphones-custom-product .site-main {
    padding-top: 0;
}
body.youphones-custom-product .youphones-custom-product-page {
    margin-top: 0;
}

.youphones-custom-product .yc-intro-video {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
}

.youphones-custom-product .yc-mockup {
    width: 100%;
}

.youphones-custom-product .yc-mockup-frame {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background: #0f172a;
}

.youphones-custom-product .yc-mockup-screen {
    border-radius: 0;
    overflow: hidden;
}

.youphones-custom-product .yc-video {
    width: 100%;
    height: 100vh;
    max-height: none;
    display: block;
    object-fit: cover;
}

.youphones-custom-product .yc-mockup-product-thumb {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 220px;
    max-width: 40%;
}

.youphones-custom-product .yc-mockup-product-thumb img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.4);
}

.youphones-custom-product .yc-how-it-works {
    margin: 24px auto;}
.yc-how-iphone {
    max-width: 1200px;
}
@media (max-width: 768px) {
    .yc-how-iphone {
        width: 95%;
    }
}

.youphones-custom-product .yc-how-it-works h3 {
    margin: 0 0 10px;
    font-size: 30px;
    max-width: 460px;
}

.youphones-custom-product .yc-how-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 28px;
    align-items: center;
    min-height: auto;
}

.youphones-custom-product .yc-how-text {
    max-width: 520px;
}

.youphones-custom-product .yc-how-text p {
    font-size: 18px;
}

.youphones-custom-product .yc-steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.youphones-custom-product .yc-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 18px;
}

.youphones-custom-product .yc-steps .step-label {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.youphones-custom-product .yc-pricing-note {
    font-size: 14px;
}

.youphones-custom-product .yc-discount-banner {
    padding: 16px 20px;
    background: linear-gradient(90deg, #0f172a, #1e293b);
    color: #fff;
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.youphones-custom-product .yc-discount-banner .yc-price-note {
    color: rgba(226, 232, 240, 0.9);
}

.youphones-custom-product .yc-discount-banner .yc-second-case {
    margin-top: 4px;
    font-size: 13px;
}

.youphones-custom-product .yc-price {
    margin: 0 0 4px;
    font-weight: 600;
}

.youphones-custom-product .yc-price-note {
    display: block;
    font-weight: 400;
    font-size: 13px;
    color: #64748b;
}

.youphones-custom-product .yc-second-case {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
    text-align: center;
}

.yc-second-case-main {
    font-weight: 900;
    font-size: 28px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: center;
}

.youphones-custom-product .yc-discount-banner {
    background: linear-gradient(135deg, #dc2626, #fb923c);
    color: #f9fafb;
    padding: 14px 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    .youphones-custom-product .yc-mockup-product-thumb {
        width: 160px;
    }
    /* Version mobile du bandeau de réductions */
    .youphones-custom-product .yc-discount-banner {
        border-radius: 18px;
        padding: 10px 14px;
        width: 100%;
        box-sizing: border-box;
    }

    .yc-second-case-main {
        font-size: 18px;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 600px) {
    /* Titre "Comment ça marche ?" en pleine largeur sur mobile */
    .youphones-custom-product .yc-how-it-works h3 {
        max-width: none;
        text-align: center;
    }

    /* Version AirPods Max : texte plus lisible sur mobile */
    .youphones-custom-product .yc-how-airpods-hero .yc-how-text {
        padding: 16px;
        text-align: left;
    }
    .youphones-custom-product .yc-how-airpods-hero h3 {
        font-size: 20px;
        margin-bottom: 8px;
    }
    .youphones-custom-product .yc-how-airpods-hero .yc-steps {
        font-size: 14px;
        line-height: 1.5;
        gap: 6px;
    }
    .youphones-custom-product .yc-how-airpods-hero .yc-steps li {
        align-items: flex-start;
    }
    .youphones-custom-product .yc-how-airpods-hero .step-label {
        min-width: 22px;
        height: 22px;
        line-height: 22px;
        font-size: 13px;
    }
}

/* Custom layout columns for personalized product */
.youphones-custom-product-layout .youphones-custom-layout-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
}

@media (max-width: 992px) {
    .youphones-custom-product-layout .youphones-custom-layout-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Slick gallery sizing */
.product-gallery-slick { width: 100%; }
.product-gallery-slick .pg-slide { position: relative; }
.product-gallery-slick .pg-slide img { width: 100%; height: auto; max-height: 520px; object-fit: contain; background: #fff; }
/* Forcer une hauteur minimale sur le slide actif pour éviter une zone trop petite */
.product-gallery-slick .pg-slide.slick-current.slick-active {
	min-height: 420px;
}
@media (max-width: 992px){ .product-gallery-slick .pg-slide img { max-height: 380px; } }

.product-thumbs-slick { margin-top: 10px; }
.product-thumbs-slick .pg-thumb { padding: 4px; }
.product-thumbs-slick .pg-thumb img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid #eee; }
.product-thumbs-slick .slick-current .pg-thumb img { border-color: var(--primary-color); box-shadow: 0 0 0 2px rgba(227,6,19,.15); }

/* Hide default Flex gallery when Slick active */
.woocommerce-product-gallery.youphones-slick .flex-viewport,
.woocommerce-product-gallery.youphones-slick .flex-control-nav,
.woocommerce-product-gallery.youphones-slick .woocommerce-product-gallery__wrapper { display: none !important; }

/* Fallback constraints if Slick fails: avoid huge images */
.woocommerce-product-gallery { overflow: hidden; }
.woocommerce-product-gallery__image a, .woocommerce-product-gallery__image img { display: block; }
.woocommerce-product-gallery__image img { max-width: 100%; width: auto; height: auto; max-height: 420px; object-fit: contain; margin: 0 auto; background: #fff; }
@media (max-width: 768px){ .woocommerce-product-gallery__image img { max-height: 360px; } }

/* Galerie produit – hauteur réduite en mobile */
@media (max-width: 600px) {
	.product-gallery-slick .pg-slide.slick-current.slick-active {
		min-height: 260px;
	}
	.woocommerce-product-gallery__image img {
		max-height: 360px;
	}
}

/* If Slick failed/not active, show only the first image to avoid stacking */
.woocommerce-product-gallery:not(.youphones-slick) .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image { display: none; }
.woocommerce-product-gallery:not(.youphones-slick) .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:first-child { display: block; }

/* ================= Tarifs Page ================= */
.tarifs-area { padding: 24px 0 48px; }
.tarifs-header h1 { margin-bottom: 6px; }
.tarifs-header .sub { opacity: .85; margin-bottom: 6px; }
.tarifs-header .note { font-size: 14px; opacity: .8; }

.tarifs-header .tarifs-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 6px;
}

.tarifs-filters { margin: 16px 0; }
.tarifs-filters .filters-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; }
.tarifs-filters label { display: block; font-size: 12px; opacity: .8; margin-bottom: 4px; }
.tarifs-filters select, .tarifs-filters input[type=search] { width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; }
@media (max-width: 992px){ .tarifs-filters .filters-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .tarifs-filters .filters-grid { grid-template-columns: 1fr; } }

.tarifs-models { margin-top: 16px; }
.tarifs-models h2 { font-size: 18px; margin: 8px 0 12px; }
.models-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
@media (max-width: 1200px){ .models-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 992px){ .models-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 640px){ .models-grid { grid-template-columns: repeat(2,1fr); } }
.model-card { background:#fff; border:1px solid #eee; border-radius: 18px; padding: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.05); text-align:center; cursor:pointer; transition: transform .15s ease, box-shadow .15s ease; width: 100%; }
.model-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0,0,0,.08); }
.model-card .img {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    background: linear-gradient(180deg,#fafafa,#f1f5f9);
    margin-bottom: 10px;
    /* Centrer l'image de modèle (WebP ou autre) dans son cadre */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}
.model-card .name { font-weight:600; font-size:14px; color:#0f172a; }

/* DataTable look */
#tarifsDataTable { width: 100% !important; border-collapse: separate; border-spacing: 0 8px; }
#tarifsDataTable thead th { background: #f7f7f8; border: 0; padding: 10px; text-align: left; }
#tarifsDataTable tbody tr { background: #fff; border: 1px solid #eee; box-shadow: 0 6px 18px rgba(0,0,0,.04); }
#tarifsDataTable tbody td { padding: 10px; border: 0; }
#tarifsDataTable tbody tr.row-hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.06); transition: .15s ease; }

/* Model detail */
.tarifs-model-detail { margin-top: 24px; }
.model-card { display: grid; grid-template-columns: 1fr 2fr; gap: 18px; background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 5px; box-shadow: 0 6px 20px rgba(0,0,0,.06); }
.model-media img { width: 100%; height: auto; border-radius: 8px; }
.model-table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.model-table th { text-align: left; font-size: 14px; opacity: .8; padding: 6px; }
.model-table td { background: #fafafa; border-radius: 8px; padding: 8px 10px; }
.model-card .actions { margin-top: 10px; }
@media (max-width: 768px){ .model-card { grid-template-columns: 1fr; } }

/* CTA */
.tarifs-cta { margin-top: 28px; }
.tarifs-cta .cta-box { background: #0f172a; color: #fff; border-radius: 12px; padding: 20px; text-align: center; }
.tarifs-cta .cta-box .cta-actions { margin-top: 10px; display: inline-flex; gap: 10px; flex-wrap: wrap; }

/* Preview overlay for custom image */
.youphones-preview { position: absolute; right: 16px; bottom: 16px; width: 120px; height: 120px; border: 2px dashed rgba(0,0,0,.15); border-radius: 12px; overflow: hidden; background: #fafafa; display: none; }
.youphones-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Summary */
.single-product .summary { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.04); }
.single-product .product_title { font-family: 'Poppins', sans-serif; font-weight: 700; margin-bottom: 6px; }
.single-product .woocommerce-product-rating { margin-bottom: 10px; }
.single-product p.price, .single-product span.price { color: var(--primary-color); font-weight: 700; font-size: 20px; }
.single-product .stock { display: none; }
.single-product .cart .button { width: 100%; border-radius: 10px; padding: 12px 16px; }

/* Customization block */
.youphones-customizer { margin-top: 14px; border-top: 1px solid #eee; padding-top: 14px; }
.youphones-customizer h3 { font-family: 'Poppins', sans-serif; font-size: 16px; margin-bottom: 8px; }
.youphones-customizer .form-row { margin-bottom: 10px; }
.youphones-customizer input[type=file] { display: block; width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px; background: #fff; }
.youphones-customizer select { width: 100%; border: 1px solid #e5e7eb; border-radius: 8px; padding: 8px 10px; background: #fff; }
.youphones-customizer .radio { margin-right: 10px; }
.youphones-customizer .upsell-second { margin-top: 6px; }

/* Tabs */
.woocommerce-tabs { margin-top: 24px; }
.woocommerce-tabs .tabs { display: flex; gap: 8px; border-bottom: 1px solid #eee; }
.woocommerce-tabs .tabs li { margin: 0; }
.woocommerce-tabs .tabs li a { display: inline-flex; align-items: center; padding: 10px 14px; border: 1px solid #eee; border-bottom: 0; border-radius: 8px 8px 0 0; background: #fafafa; color: var(--secondary-color); }
.woocommerce-tabs .tabs li.active a, .woocommerce-tabs .tabs li a:hover { background: #fff; color: var(--primary-color); }
.woocommerce-tabs .panel { background: #fff; border: 1px solid #eee; border-radius: 0 8px 8px 8px; padding: 16px; box-shadow: 0 6px 24px rgba(0,0,0,.04); }

/* Related / Upsells */
.related.products, .upsells.products { margin-top: 28px; }
.related.products h2, .upsells.products h2 { margin-bottom: 12px; }

@media (max-width: 600px) {
	/* Centrer le titre des produits similaires en mobile */
	.related.products h2 {
		text-align: center;
	}
}

/* Intro AirPods Max: image gauche, texte droite sur fond gris */
.yc-intro-airpods {
  background-color: #f5f5f5;
  padding: 40px 20px;
}

.yc-intro-airpods .yc-intro-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 40px;
}

.yc-intro-airpods .yc-intro-media img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 420px;
}

.yc-intro-airpods .yc-intro-text h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.yc-intro-airpods .yc-intro-text p {
  font-size: 1rem;
  line-height: 1.6;
}

/* Empilement sur mobile */
@media (max-width: 768px) {
  .yc-intro-airpods .yc-intro-inner {
    flex-direction: column;
    text-align: center;
  }
}

/* AirPods Max - section Comment ça marche en plein écran */
.yc-how-airpods-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 480px;
  overflow: hidden;
}

.yc-how-airpods-hero .yc-how-video-bg {
  position: absolute;
  inset: 0;
}

.yc-how-airpods-hero .yc-how-video-bg .yc-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yc-how-airpods-hero .yc-how-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
  color: #fff;
  text-align: center;
}

.yc-how-airpods-hero .yc-how-overlay li{
  text-align: left;
}

.yc-how-airpods-hero .yc-how-text h3 {
  font-size: 2.2rem;
  margin-bottom: 12px;
  color: #fff;
}

.yc-how-airpods-hero .yc-how-text .yc-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yc-how-airpods-hero .yc-how-text .yc-steps li {
  margin: 6px 0;
  font-size: 1rem;
}

.yc-how-airpods-hero .yc-how-text .step-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin-right: 8px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: 0.9rem;
}
/* AirPods Max - plein écran réel pour la section Comment ça marche */
.youphones-custom-product .yc-how-airpods-hero {
  position: relative;      /* déjà là mais on le rappelle */
  width: 100vw;
}

/* AirPods Max - flow (intro + how it works) pleine largeur */
.youphones-custom-product .youphones-custom-flow {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
}