/* === MOBILE hotfix: kill horizontal overflow on single product === */
@media (max-width: 768px){
  html,
  body{ overflow-x:hidden; }

  /* conteneurs principaux : clamp + cache le hors-cadre */
  .single-product .product,
  .single-product .entry-summary,
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery__wrapper{
    width:100%;
    max-width:100%;
    overflow-x:clip;
    position:relative;
  }

  /* médias jamais plus larges que l'écran */
  .single-product img,
  .single-product video,
  .single-product iframe{
    display:block;
    max-width:100%;
    height:auto;
  }

  /* rails/vignettes/galeries ne poussent pas à l'horizontal */
  .single-product .flex-control-nav,
  .single-product .flex-control-thumbs,
  .single-product [class*="gallery"],
  .single-product [class*="thumb"]{
    max-width:100%;
    overflow:hidden;
  }
  .single-product .flex-control-thumbs{
    overflow-x:auto;
    gap:.5rem;
  }

  /* neutraliser les largeurs arbitraires type Tailwind w-[***] */
  .single-product [class*="w-\\["]{
    width:100% !important;
    max-width:100% !important;
  }

  /* flèches/controls ou badges positionnés hors-cadre */
  .single-product .flex-direction-nav .flex-prev{
    left:.5rem !important;
    right:auto !important;
    transform:none !important;
  }
  .single-product .flex-direction-nav .flex-next{
    right:.5rem !important;
    left:auto !important;
    transform:none !important;
  }
  .single-product .onsale{
    left:.5rem !important;
    right:auto !important;
    transform:none !important;
  }

  /* sections full-bleed éventuelles */
  .single-product .full-bleed{
    margin-inline:0;
    width:100%;
    max-width:100%;
  }

  /* listes produits WooCommerce dans les rails */
  .single-product .products{
    margin:0;
    padding:0;
    list-style:none;
    display:flex;
    flex-direction:column;
    gap:1.25rem;
  }
  .single-product .products > *{
    width:100% !important;
    max-width:100% !important;
    float:none !important;
    margin:0 !important;
  }
}

/* confort supplémentaire */
html{ overscroll-behavior-x:none; }
*,*::before,*::after{ box-sizing:border-box; }
:where(p,h1,h2,h3,h4,h5,h6){ overflow-wrap:anywhere; word-break:break-word; }

/* Klarna logo sizing + head grid */
.am-klarna-box{margin-block:12px clamp(14px,1.6vw,22px);padding:14px 16px;border:1px solid #eee;border-radius:12px;background:#fff;max-width:100%;overflow:hidden}
.am-klarna-head{display:flex;align-items:center;gap:12px;margin-bottom:8px;min-width:0}
.am-klarna-logo{flex:0 0 auto;width:clamp(28px,3.2vw,40px);height:clamp(28px,3.2vw,40px);border-radius:8px;overflow:hidden;background:#f7d4df;display:grid;place-items:center}
.am-klarna-logo img{width:100%;height:100%;object-fit:contain;display:block}
.am-klarna-title{margin:0;font-weight:700}
.am-klarna-sub{margin:0;font-size:.9rem;color:#556}
.am-klarna-buttons{display:flex;gap:8px;margin:10px 0 8px;flex-wrap:wrap}
.am-klarna-buttons button{padding:8px 12px;border:1px solid #dfe5ef;border-radius:999px;background:#fff;cursor:pointer;line-height:1;font-weight:600}
.am-klarna-box + *{margin-top:clamp(10px,1.2vw,16px)}
.am-klarna-buttons button.is-active{background:#0b1220;color:#fff;border-color:#0b1220}
.am-klarna-main{font-weight:800;margin-top:6px}
.am-klarna-note{font-size:.9rem;color:#556;margin-top:4px}
/* Sécurité anti-overflow */
@media (max-width:768px){
  html,body{overflow-x:hidden}
  .single-product .product,
  .single-product .entry-summary,
  .single-product .woocommerce-product-gallery,
  .single-product .woocommerce-product-gallery__wrapper{
    width:100%;max-width:100%;position:relative;overflow-x:clip
  }
.single-product [class*="w-\\["]{width:100%!important;max-width:100%!important}
}

/* Kill conflicting hides */
.woocommerce-product-gallery .flex-direction-nav a{ display:block !important; opacity:1 !important; z-index:9999 !important; }
.woocommerce-product-gallery .flex-control-nav,
.woocommerce-product-gallery .flex-viewport{ overflow:visible !important; }

:root{ --text:#111; --muted:#6b7280; --hair:#e5e7eb; --brand:#d31334; --radius:12px; }
.chk-wrap{max-width:1200px;margin:24px auto;padding:0 16px;color:var(--text)}
.chk-head{display:grid;grid-template-columns:1fr auto;gap:8px 12px;align-items:end;margin-bottom:12px}
.chk-h1{font-size:28px;line-height:1.1;margin:0}
.chk-top-total{font-weight:800}
.chk-count{grid-column:1/-1;color:var(--muted);font-size:18px}
.mobile-top-cta{grid-column:1/-1}
.mobile-top-cta .btn-primary{margin-top:4px}
.chk-grid{display:grid;grid-template-columns:1.1fr .7fr;gap:28px}
@media (max-width:980px){ .chk-grid{grid-template-columns:1fr;gap:16px} }
.chk-ship{display:flex;gap:12px;align-items:flex-start;padding:14px 0;border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.strong{font-weight:700}.muted{color:var(--muted)}.small{font-size:.9rem}
.chk-alert{display:flex;gap:10px;align-items:flex-start;border:1px solid #ef4444;background:#fff5f5;padding:12px 14px;border-radius:8px;margin:16px 0}
.chk-alert-icon{color:#b91c1c}
.chk-items{display:flex;flex-direction:column;gap:18px;margin:20px 0}
.chk-item{display:grid;grid-template-columns:96px 1fr auto;gap:16px;align-items:start;padding-bottom:18px;border-bottom:1px solid var(--hair)}
.chk-item:last-child{border-bottom:0}
.chk-thumb-link{display:block;border-radius:12px;overflow:hidden}
.chk-item-img{width:100%;aspect-ratio:1/1;object-fit:cover;display:block;border-radius:12px;background:#f9fafb}
.chk-item-img--ph{background:#f3f4f6;border-radius:12px;width:100%;aspect-ratio:1/1}
.chk-item-name{margin:0 0 6px;font-size:18px;line-height:1.25}
.chk-item-meta{font-size:14px;color:var(--muted);display:grid;gap:4px;margin-bottom:10px}
.chk-backorder{font-size:13px;color:#b91c1c;margin:6px 0}
.chk-item-row{display:flex;align-items:center;gap:12px;margin:10px 0}
.chk-qty input.qty,.chk-qty select{width:90px;padding:6px 8px;border:1px solid var(--hair);border-radius:8px;font-size:15px}
.chk-item-actions{display:flex;flex-wrap:wrap;align-items:center;gap:6px;color:var(--muted);margin:8px 0}
.chk-item-actions .link{color:inherit;text-decoration:none;font-weight:600}
.chk-item-actions .link:hover{text-decoration:underline}
.divider{color:var(--hair)}
.chk-item-price{font-weight:700;font-size:18px;text-align:right}
.chk-actions{display:grid;gap:12px;margin:24px 0}
.chk-actions .coupon{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.chk-actions .coupon input{flex:1 1 200px;min-width:180px;padding:10px 12px;border:1px solid var(--hair);border-radius:8px}
.chk-actions-row{display:flex;gap:10px;flex-wrap:wrap}
.chk-actions .btn-secondary{flex:0 0 auto}
.chk-right{position:sticky;top:16px;height:fit-content;border:1px solid var(--hair);border-radius:12px;padding:18px;background:#fff}
.chk-sum-title{margin:0 0 12px;font-size:22px}
.chk-sum{border-top:1px solid var(--hair);border-bottom:1px solid var(--hair)}
.chk-sum .row{display:flex;justify-content:space-between;align-items:center;padding:12px 0;border-bottom:1px solid var(--hair)}
.chk-sum .row:last-child{border-bottom:0}
.chk-total{display:flex;justify-content:space-between;align-items:center;margin:14px 0 8px;font-weight:800}
/* --- Klarna pill in Summary --- */
.chk-paylater{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1px solid var(--hair,#e5e7eb);border-radius:12px;background:#f7f8fb;color:#111;font-weight:600;line-height:1.25;box-shadow:0 1px 0 rgba(0,0,0,.03);font-size:.95rem;margin-bottom:12px}
.chk-paylater .badge{display:inline-flex;align-items:center;gap:8px;padding:4px 10px;border-radius:999px;border:1px solid #e7e7ea;background:#fff;font-weight:800;font-size:.9rem;color:#111}
.chk-paylater .badge::before{content:"K";display:inline-grid;place-items:center;width:22px;height:22px;border-radius:999px;background:#f6b2c5;color:#111;font-weight:900}
.chk-paylater strong{margin-left:auto;font-weight:800}
@media (max-width:768px){.chk-paylater{padding:10px 12px}}
.btn-primary{display:block;width:100%;border:0;border-radius:10px;background:var(--brand);color:#fff;font-weight:800;padding:14px 16px;margin:6px 0 10px;cursor:pointer;text-align:center;text-decoration:none}
.btn-primary:hover{filter:brightness(.95)}
.btn-secondary{border:1px solid var(--hair);background:#fff;border-radius:8px;padding:10px 14px;font-weight:600;cursor:pointer}
.btn-secondary:hover{background:#f3f4f6}
@media (max-width:768px){
  .chk-right{position:static}
  .chk-item{grid-template-columns:88px 1fr;grid-template-areas:"thumb info" "thumb price";gap:14px}
  .chk-item-price{grid-area:price;text-align:left}
}
