.wcpc-box{
  border:2px solid color-mix(in srgb, var(--wcpc-accent) 40%, #e5e7eb);
  border-radius:var(--wcpc-radius);
  background:#ffffff;
  padding:16px;
  margin:18px 0;
  box-shadow:0 8px 24px rgba(0,0,0,0.06);
}

/* Exclusive mode: hide theme/default WooCommerce add-to-cart blocks to avoid duplicates */
body.wcpc-exclusive form.cart:not(.wcpc-variations-form),
body.wcpc-exclusive .single_add_to_cart_button,
body.wcpc-exclusive .woocommerce-variation-add-to-cart,
body.wcpc-exclusive .woocommerce-product-details__short-description + form.cart{
  display:none !important;
}

.wcpc-head{
  margin-bottom:14px;
  font-size:14px;
  color:#111827;
}

.wcpc-fields{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  margin-bottom:14px;
}

.wcpc-field.wcpc-full{grid-column:1 / -1;}

.wcpc-label{
  display:block;
  font-size:13px;
  color:#374151;
  margin-bottom:6px;
}

.wcpc-req{color:#ef4444;}

.wcpc-input{
  width:100%;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:12px 12px;
  font-size:15px;
  outline:none;
  background:#fff;
  transition:box-shadow .15s, border-color .15s;
}

.wcpc-input:focus{
  border-color:color-mix(in srgb, var(--wcpc-accent) 70%, #e5e7eb);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--wcpc-accent) 20%, transparent);
}

.wcpc-error{
  border-color:#ef4444 !important;
  box-shadow:0 0 0 4px rgba(239,68,68,.15) !important;
}

/* Variations */
.wcpc-variations-form{
  margin:10px 0 14px;
}

.wcpc-variations-form table.variations{
  width:100%;
  border-collapse:collapse;
  margin:0;
}

.wcpc-variations-form td.label{
  width:88px;
  padding:6px 0;
  font-weight:600;
  color:#111827;
}

.wcpc-variations-form td.value{
  padding:6px 0;
}

.wcpc-hidden-select{
  position:absolute !important;
  left:-9999px !important;
  width:1px !important;
  height:1px !important;
  overflow:hidden !important;
}

.wcpc-opt-wrap{margin-top:6px;}
.wcpc-options{display:flex; flex-wrap:wrap; gap:8px;}

.wcpc-opt{
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:12px;
  padding:10px 12px;
  font-size:13px;
  line-height:1;
  cursor:pointer;
  transition:transform .12s, border-color .12s, box-shadow .12s;
}
.wcpc-opt:hover{transform:translateY(-1px);}
.wcpc-opt.is-active{
  border-color:var(--wcpc-accent);
  box-shadow:0 0 0 4px color-mix(in srgb, var(--wcpc-accent) 18%, transparent);
}

.wcpc-opt-color{
  padding:10px;
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.wcpc-swatch{
  width:22px;
  height:22px;
  border-radius:8px;
  border:1px solid rgba(0,0,0,.12);
}

/* Actions (layout pro) */
.wcpc-actions{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:12px;
  margin-top:12px;
}

/* Quantité row: placed under variations/fields (premium mobile layout) */
.wcpc-qty-row{
  margin-top:12px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}

.wcpc-qty-row .wcpc-qty{
  width:160px;
}

.wcpc-btn{
  border:1px solid transparent;
  border-radius:14px;
  padding:14px 16px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:transform .12s, box-shadow .12s, opacity .12s;
}

.wcpc-btn:disabled{opacity:.7; cursor:not-allowed;}

.wcpc-btn-primary{
  width:100%;
  background:var(--wcpc-accent);
  color:#fff;
  box-shadow:0 10px 24px color-mix(in srgb, var(--wcpc-accent) 35%, transparent);
  position:relative !important;
  left:0;
  will-change: left;
  transform: translateZ(0);
  /* Attention animation (micro vibration) like premium stores */
  animation: wcpcAttention 4.2s ease-in-out infinite !important;
}

.wcpc-btn-primary:hover:not(.wcpc-shake){transform:translateY(-1px);}
.wcpc-btn-primary:active:not(.wcpc-shake){transform:scale(0.98);}

.wcpc-btn-secondary{
  background:var(--wcpc-secondary);
  color:#fff;
  padding:12px 14px;
  box-shadow:0 10px 24px color-mix(in srgb, var(--wcpc-secondary) 32%, transparent);
}

.wcpc-btn-secondary{
  width:100%;
}

.wcpc-btn-secondary:hover:not(.wcpc-shake){transform:translateY(-1px);}

.wcpc-btn-mini{
  padding:10px 12px;
  border-radius:12px;
  background:var(--wcpc-accent);
  color:#fff;
}


/* Quantité (premium, compact, mobile-safe) */
.wcpc-qty{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:0;
  padding:4px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 22px rgba(0,0,0,0.06);
  position:relative;
  z-index:3;
}


/* Quantité : plus pro et lisible */
.wcpc-qty-input{
  width:52px !important;
  text-align:center;
  border:none !important;
  border-radius:10px !important;
  padding:0 !important;
  font-size:14px !important;
  height:36px !important;
  line-height:36px !important;
  box-sizing:border-box;
  background:transparent !important;
  outline:none !important;
}

.wcpc-qty-btn{
  width:36px !important;
  height:36px !important;
  border-radius:12px !important;
  border:none !important;
  background:transparent !important;
  color:#111827 !important;
  font-size:18px !important;
  font-weight:900 !important;
  line-height:1 !important;
  cursor:pointer;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  transition:transform .12s, box-shadow .12s, background .12s;
}

.wcpc-qty-btn:hover{
  background:color-mix(in srgb, var(--wcpc-accent) 10%, #ffffff) !important;
  transform:translateY(-1px);
}

/* Remove default number spinners (cleaner look) */
.wcpc-qty-input::-webkit-outer-spin-button,
.wcpc-qty-input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; }
.wcpc-qty-input[type=number]{ -moz-appearance: textfield; }

.wcpc-qty-btn:active{transform:scale(0.96);}

/* Coupon */
.wcpc-coupon{
  margin-top:12px;
}

.wcpc-coupon-toggle{
  background:none;
  border:none;
  padding:0;
  color:#4b5563;
  cursor:pointer;
  text-decoration:underline;
}

.wcpc-coupon-box{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top:8px;
}

.wcpc-coupon-input{
  flex:1;
  border:1px solid #e5e7eb;
  border-radius:12px;
  padding:10px 12px;
}

.wcpc-coupon-msg{font-size:13px; color:#16a34a;}

/* Summary */
.wcpc-summary{
  margin-top:14px;
  border:1px solid color-mix(in srgb, var(--wcpc-accent) 30%, #e5e7eb);
  border-radius:16px;
  overflow:hidden;
  background:color-mix(in srgb, var(--wcpc-accent) 10%, #fff);
}

.wcpc-summary-toggle{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:transparent;
  border:none;
  padding:12px 14px;
  font-weight:800;
  cursor:pointer;
}

.wcpc-summary-body{
  padding:12px 14px 14px;
}

.wcpc-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 0;
  border-top:1px solid rgba(0,0,0,0.06);
}
.wcpc-row:first-child{border-top:none;}

.wcpc-prod{font-weight:700; color:#111827;}

.wcpc-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  height:22px;
  margin-left:8px;
  border-radius:999px;
  padding:0 8px;
  background:var(--wcpc-accent);
  color:#fff;
  font-size:12px;
}

.wcpc-muted{color:#6b7280;}

.wcpc-total{font-weight:900; font-size:16px;}

/* Message */
.wcpc-message{
  margin-top:12px;
  padding:12px 12px;
  border-radius:14px;
  display:none;
  font-size:14px;
}
.wcpc-message.ok{
  background:#dcfce7;
  color:#166534;
  border:1px solid rgba(22,101,52,.2);
}
.wcpc-message.err{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid rgba(153,27,27,.2);
}

/* Disable shake/attention when option is OFF */
.wcpc-no-shake .wcpc-btn-primary{animation:none !important;}
.wcpc-no-shake .wcpc-shake{animation:none !important;}

/* Shake animation */
@keyframes wcpcShake{
  0%{left:0}
  15%{left:-4px}
  30%{left:4px}
  45%{left:-3px}
  60%{left:3px}
  75%{left:-2px}
  100%{left:0}
}
.wcpc-shake{animation:wcpcShake .45s ease-in-out both !important;}
.wcpc-box .wcpc-order-now.wcpc-shake{animation:wcpcShake .45s ease-in-out both !important;}
/* Fallback: vibration even if JS is blocked by theme */
.wcpc-box .wcpc-order-now:active{animation:wcpcShake .45s ease-in-out both !important;}
.wcpc-box .wcpc-order-now:focus-visible{animation:wcpcShake .45s ease-in-out both !important;}

/* Continuous micro-vibration (runs only at the end of the cycle) */
@keyframes wcpcAttention{
  0%, 82%, 100%{left:0}
  84%{left:-3px}
  86%{left:3px}
  88%{left:-2px}
  90%{left:2px}
  92%{left:-1.2px}
  94%{left:1.2px}

}



@media (prefers-reduced-motion: reduce){
  .wcpc-btn-primary{animation:none !important;}
  .wcpc-shake{animation:none !important;}
}

/* Responsive */
@media (max-width: 640px){
  .wcpc-fields{grid-template-columns:1fr;}
  /* Compact quantity on mobile */
  .wcpc-qty-row .wcpc-qty{
    width:140px;
    justify-content:space-between;
    padding:3px;
    border-radius:12px;
    box-shadow:0 6px 18px rgba(0,0,0,0.06);
  }

  /* Smaller +/- controls on mobile */
  .wcpc-qty-btn{
    width:28px !important;
    height:28px !important;
    border-radius:10px !important;
    font-size:16px !important;
  }
  .wcpc-qty-input{
    width:38px !important;
    height:28px !important;
    line-height:28px !important;
    font-size:13px !important;
  }

}

.wcpc-btn-primary.wcpc-shake{animation:wcpcShake .45s ease-in-out both !important;}


/* =========================================================
   Livraison interne (Gratuite / Prix fixe)
   ========================================================= */
.wcpc-ship-option{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  cursor:pointer;
  user-select:none;
}
.wcpc-ship-leftwrap{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.wcpc-ship-option input[type="radio"]{
  width:16px;
  height:16px;
}
.wcpc-ship-left{
  font-weight:600;
  color:#374151;
}
.wcpc-ship-right{
  font-weight:700;
  color:#111827;
}
.wcpc-ship-option.is-active .wcpc-ship-right{
  color:var(--wcpc-accent);
}
