/* SoukPilot V1.6.8-R13-RC1-UX5 — stabilisation de la vitrine, landing et fiche produit. */

/* Miniatures du dashboard : ne jamais montrer les valeurs génériques avant le chargement réel. */
html.sp-card-preview-mode:not(.sp-storefront-ready) body{visibility:hidden}
html.sp-card-preview-mode.sp-storefront-ready body{visibility:visible}

/* Vitrine : densité commerciale raisonnable et catalogue visible sans écran vide. */
body.merchant-storefront{background:#f7f8fa}
body.merchant-storefront .notice{padding:7px 14px;font-size:11px}
body.merchant-storefront .site-header{height:70px}
body.merchant-storefront .merchant-hero{padding:38px 0 34px;min-height:0;background:linear-gradient(135deg,color-mix(in srgb,var(--sp-theme-accent,#f2a45b) 13%,#fff),#fff 48%,color-mix(in srgb,var(--sp-theme-primary,#1b2a4a) 9%,#fff))}
body.merchant-storefront .merchant-hero-inner{max-width:1050px}
body.merchant-storefront .merchant-hero h1{max-width:900px;margin:15px 0 10px;font-size:clamp(34px,4.5vw,56px);line-height:1.03;letter-spacing:-2px}
body.merchant-storefront .merchant-hero p{max-width:760px;margin:0 0 18px;font-size:15px;line-height:1.55}
body.merchant-storefront .merchant-hero .btn{min-height:42px}
body.merchant-storefront #catalogue{padding:48px 0 58px}
body.merchant-storefront .section-head{margin-bottom:18px}
body.merchant-storefront .section-head h2{font-size:30px}
body.merchant-storefront .storefront-trust-strip{margin-bottom:18px}

/* Corrige une ancienne règle trop large qui transformait aussi le texte des garanties en icône de 30 px. */
body.merchant-storefront .storefront-trust-item{min-width:0;align-items:flex-start;line-height:1.35}
body.merchant-storefront .storefront-trust-item > span{display:block;flex:1 1 auto;width:auto;height:auto;border-radius:0;background:transparent;color:inherit;box-shadow:none;place-items:initial;min-width:0}
body.merchant-storefront .storefront-trust-item > span:first-child{display:grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:10px;background:#fff;color:var(--teal,#287d9d);box-shadow:0 8px 20px -15px rgba(22,33,58,.6)}
body.merchant-storefront .storefront-toolbar{margin-bottom:18px}
body.merchant-storefront .product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
body.merchant-storefront .product-card{display:flex;min-width:0;flex-direction:column;border-radius:18px;box-shadow:0 12px 35px -26px rgba(16,45,73,.55)}
body.merchant-storefront .product-image{height:auto;aspect-ratio:4/5;background:#f1f3f5}
body.merchant-storefront .product-image img{object-fit:contain;background:#fff}
body.merchant-storefront .product-card-body{display:flex;flex:1;flex-direction:column;padding:17px}
body.merchant-storefront .product-card h3{margin:6px 0 6px;font-size:20px;line-height:1.2}
body.merchant-storefront .product-card p{display:-webkit-box;min-height:40px;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2;font-size:12px}
body.merchant-storefront .product-meta{margin-top:auto;padding-top:14px;align-items:flex-end}
body.merchant-storefront .product-price{font-size:22px}
body.merchant-storefront .product-card-actions{justify-content:flex-end}
body.merchant-storefront #service{padding:44px 0}
body.merchant-storefront .value-card{padding:18px}

/* Fiche produit : image non recadrée, formulaire lisible et hiérarchie claire. */
body[data-product-base="/boutique/produit/"]{background:#f6f7f9}
body[data-product-base="/boutique/produit/"] .notice{padding:7px 14px;font-size:11px}
body[data-product-base="/boutique/produit/"] .site-header{height:70px}
body[data-product-base="/boutique/produit/"] .detail{width:min(1180px,calc(100% - 32px));padding:24px 0 60px}
body[data-product-base="/boutique/produit/"] .detail-grid{grid-template-columns:minmax(0,1.08fr) minmax(380px,.92fr);gap:20px}
body[data-product-base="/boutique/produit/"] .gallery,
body[data-product-base="/boutique/produit/"] .order-card,
body[data-product-base="/boutique/produit/"] .info-card{border-radius:18px;box-shadow:0 14px 40px -30px rgba(16,45,73,.55)}
body[data-product-base="/boutique/produit/"] .gallery{padding:12px}
body[data-product-base="/boutique/produit/"] .main-image{height:min(64vh,610px);min-height:440px;background:#fff}
body[data-product-base="/boutique/produit/"] .main-image img{object-fit:contain;background:#fff}
body[data-product-base="/boutique/produit/"] .thumb{height:82px;background:#fff}
body[data-product-base="/boutique/produit/"] .thumb img{object-fit:contain}
body[data-product-base="/boutique/produit/"] .order-card{top:84px;padding:21px}
body[data-product-base="/boutique/produit/"] .order-card h1{font-size:32px;letter-spacing:-1px}
body[data-product-base="/boutique/produit/"] .description{max-height:92px;overflow:auto}
body[data-product-base="/boutique/produit/"] .price{font-size:30px;margin-bottom:14px}
body[data-product-base="/boutique/produit/"] .form-heading{margin-top:16px;padding-top:15px}
body[data-product-base="/boutique/produit/"] .field input,
body[data-product-base="/boutique/produit/"] .field select,
body[data-product-base="/boutique/produit/"] .field textarea{min-height:46px;background:#fff}
body[data-product-base="/boutique/produit/"] .summary{margin-top:12px}
body[data-product-base="/boutique/produit/"] .order-button{min-height:54px;font-size:15px}
body[data-product-base="/boutique/produit/"] .info-grid{margin-top:16px}

/* Landing mono-produit : image intégrale et contenu au-dessus de la ligne de flottaison. */
body .lp-root{max-width:1120px;padding-top:22px}
body .lp-section{padding:24px;border-radius:20px}
body .lp-hero{grid-template-columns:minmax(0,1fr) minmax(340px,.9fr);gap:30px;align-items:start}
body .lp-gallery-main{max-height:620px;background:#fff}
body .lp-gallery-main img{object-fit:contain;background:#fff}
body .lp-hero h1{font-size:clamp(30px,4vw,46px)}
body .lp-commercial{max-height:150px;overflow:auto}
body .lp-trust span{padding:10px 7px}

@media(max-width:1040px){
 body.merchant-storefront .product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-product-base="/boutique/produit/"] .detail-grid{grid-template-columns:1fr}
 body[data-product-base="/boutique/produit/"] .order-card{position:static}
}
@media(max-width:720px){
 body.merchant-storefront .site-header,body[data-product-base="/boutique/produit/"] .site-header{height:auto;min-height:66px}
 body.merchant-storefront .merchant-hero{padding:28px 0}
 body.merchant-storefront .merchant-hero h1{font-size:36px;letter-spacing:-1.2px}
 body.merchant-storefront .product-grid{grid-template-columns:1fr}
 body.merchant-storefront .product-image{aspect-ratio:1/1}
 body[data-product-base="/boutique/produit/"] .detail{width:calc(100% - 20px)}
 body[data-product-base="/boutique/produit/"] .main-image{height:auto;min-height:0;aspect-ratio:1/1}
 body[data-product-base="/boutique/produit/"] .order-card h1{font-size:27px}
 body .lp-hero{grid-template-columns:1fr;gap:22px}
 body .lp-gallery-main{max-height:none;aspect-ratio:1/1}
 body .lp-section{padding:16px}
}

/* Lisibilité des actions publiques : aucun texte blanc sur fond blanc ou sombre sur fond sombre. */
body.merchant-storefront .sp-share-button{color:#fff}
body.merchant-storefront .sp-share-button:hover{color:#fff;filter:brightness(.96)}
body.merchant-storefront .product-card-actions .view-link:not(.primary){color:var(--sp-public-ink,#16213a)}
