/* =========================================================
   OP OR V1
   CSS extrait du template OR inline
   Aucun changement de logique, juste sorti en fichier
   ========================================================= */

/* 🎨 OR — CSS SCOPÉ (identique au look ARGENT, sans collisions) */
.or-template .product-container{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:stretch;
  padding:0 10px;
  gap:18px;
}

.or-template .product-block{
  width:16%;
  min-width:260px;
  margin:0;
  box-sizing:border-box;
  border:1px solid #ccc;
  border-radius:10px;
  background:#fff;
  box-shadow:0 4px 8px rgba(0,0,0,.05);
  padding:.5rem;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:430px;
  font-size:.85rem;
}

/* Infos */
.or-template .product-info{
  flex-grow:1;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:180px;
  color:#292929;
}

/* Menus / champs full width */
.or-template .variant-row{ width:100%; }

.or-template .variant-row .variant-select,
.or-template .product-info select,
.or-template .product-info input{
  width:100%;
  display:block;
}

/* Rangée d’actions + boutons */
.or-template .action-row{
  display:block;
  margin-top:.5rem;
}

.or-template .btn-main.notify{
  background:#ccc;
  color:#000;
}

/* Total (si affiché plus tard) */
.or-template .wire-total[data-role="wire-total"]{
  margin-top:6px;
  font-size:1.08rem;
  font-weight:600;
}

/* Responsive */
@media (max-width:768px){
  .or-template .product-block{
    width:100%;
    min-width:0;
  }
}

/* Assure la même présentation que l’argent */
.or-template .product-photo{
  display:block;
  margin:0 auto .5rem;
  max-height:150px;
  max-width:100%;
  object-fit:contain;
}

/* === OR template — bouton jaune pour Add to cart === */
.or-template .btn-main{
  display:block;
  width:100%;
  margin-top:.5rem;
  padding:.65rem 1rem;
  border-radius:10px;
  background:#FBC21D;
  color:#1a1a1a;
  font-weight:700;
  border:1px solid rgba(0,0,0,.08);
  cursor:pointer;
  transition:transform .08s ease, filter .12s ease, box-shadow .12s ease;
}

.or-template .btn-main:hover{
  filter:brightness(.95);
  box-shadow:0 6px 16px rgba(0,0,0,.12);
}

.or-template .btn-main:active{
  transform:translateY(1px);
}

/* Variante Notify: reste grise */
.or-template .btn-main.notify{
  background:#e0e0e0;
  color:#111;
  border-color:#d0d0d0;
}

.or-template .btn-main[disabled],
.or-template .btn-main.is-disabled{
  opacity:.55;
  cursor:not-allowed;
  box-shadow:none;
  transform:none;
}

/* OR: on montre les champs de fil (longueur/poids) */
.or-template .metal-slots{
  display:block;
}

.or-template .price-row{
  margin-top:.5rem;
  font-weight:600;
  font-size:1rem;
}

.or-template .price-row .price-value{
  min-width:4ch;
  display:inline-block;
}

.or-template .btn-main:focus-visible{
  outline:2px solid #1a1a1a;
  outline-offset:2px;
}

/* 🔁 Même style que battery pour portal-alert 
.portal-alert{
  position:fixed;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  background-color:#292929;
  color:#fbc81d;
  padding:1.2rem 2rem;
  border-radius:10px;
  font-weight:bold;
  font-size:18px;
  box-shadow:0 4px 12px rgba(0,0,0,.25);
  z-index:9999;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity 180ms ease, visibility 0s linear 180ms;
}

.portal-alert.is-visible{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity 180ms ease;
}
*/
/* Boutons soudure : style de base (non sélectionné = jaune pâle) */
.or-template .solder-buttons .solder-choose{
  flex:1 1 100%;
  padding:.50rem .85rem;
  border-radius:6px;
  border:1px solid #e0c56a;
  background:#fff7d1;
  color:#333;
  text-align:left;
  font-size:.80rem;
  font-weight:600;
}

/* Bouton sélectionné */
.or-template .solder-buttons .solder-choose.is-active{
  background:#FBC21D;
  border-color:#FBC21D;
  color:#1a1a1a;
}

/* Forcer un style uniforme pour tous les titres de cartes OR */
.or-template .product-title{
  font-size:.95rem;
  line-height:1.3em;
  margin:0 0 4px 0;
  font-weight:600;
}

/* === Fix: Alloys + Grains pas écrasés === */
.or-template .product-container.or-alloys,
.or-template .product-container.or-grains{
  display:flex !important;
  justify-content:center !important;
  align-items:flex-start !important;
  flex-wrap:nowrap !important;
}

/* La carte unique garde une vraie largeur */
.or-template .product-container.or-alloys .product-block,
.or-template .product-container.or-grains .product-block{
  width:360px !important;
  max-width:100% !important;
  margin:0 !important;
}

/* Bonus: éviter que les inputs/select deviennent minuscules */
.or-template .product-container.or-alloys select,
.or-template .product-container.or-grains select,
.or-template .product-container.or-alloys input,
.or-template .product-container.or-grains input{
  width:100% !important;
}

/* ✅ Alloys + Grains : titre toujours AU-DESSUS du select */
.or-template .alloys-card .product-info,
.or-template .grains-card .product-info{
  display:flex;
  flex-direction:column;
  justify-content:flex-start !important;
  gap:10px;
}

.or-template .alloys-card .product-title,
.or-template .grains-card .product-title{
  order:0;
  margin:0;
  padding:0;
}

.or-template .alloys-card .variant-row,
.or-template .grains-card .variant-row{
  order:1;
  margin-top:0;
}

/* ✅ Enlever l’espace vide sous Add to cart — seulement Alloys + Grains */
.or-template .alloys-card,
.or-template .grains-card{
  min-height:auto !important;
  height:auto !important;
}

.or-template .alloys-card .product-info,
.or-template .grains-card .product-info{
  min-height:0 !important;
}

/* Qty + unité GR (Alloys/Grains) */
.or-template .qty-unit{
  display:flex;
  align-items:center;
  gap:8px;
}

.or-template .unit-tag{
  font-weight:800;
  opacity:.75;
  padding:6px 10px;
  border:1px solid #ddd;
  border-radius:8px;
  background:#f7f7f7;
  line-height:1;
}

.rabais-text{
  font-weight:700;
  color:#b30000;
  text-align:center;
  font-size:1.05rem;
  line-height:1.25;
  margin:0 0 .75rem 0;
  padding:.6rem .9rem;
  background:linear-gradient(180deg, #fff7f7 0%, #ffecec 100%);
  border:1px solid #efb0b0;
  border-radius:12px;
  box-shadow:0 1px 4px rgba(0,0,0,.06);
  display:block;
}

@media (max-width:768px){
  .rabais-text{
    font-size:.95rem;
    padding:.5rem .7rem;
  }
}

/* ✅ Soudure: aligner la taille/poids du prix avec les autres cartes */
.or-template .solder-total{
  margin-top:.5rem;
  font-weight:600;
  font-size:1rem;
  line-height:1.2;
}

/* === Utilitaires CSP / nettoyage HTML === */
.or-template .or-field-gap{ margin:.25rem 0 .5rem; }
.or-template .or-mt-05{ margin-top:.5rem; }
.or-template .or-flex-gap-wrap{ display:flex; gap:.5rem; flex-wrap:wrap; }
.or-template .or-maxw-80{ max-width:80px; }
.or-template .or-maxw-90{ max-width:90px; }

.u-visually-hidden{
  position:absolute !important;
  width:1px !important;
  height:1px !important;
  padding:0 !important;
  margin:-1px !important;
  overflow:hidden !important;
  clip:rect(0, 0, 0, 0) !important;
  white-space:nowrap !important;
  border:0 !important;
}

/* === Modal inventaire soudure sorti du JS === */
#invGuardModalSolder[hidden]{ display:none !important; }

#invGuardModalSolder{
  position:fixed;
  inset:0;
  z-index:10000;
}

#invGuardModalSolder .bg{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
}

#invGuardModalSolder .box{
  position:relative;
  max-width:520px;
  margin:12vh auto 0 auto;
  background:#292929;
  color:#FBC21a;
  border-radius:12px;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  padding:16px 16px 14px 16px;
  border:1px solid rgba(251,194,26,.30);
}

#invGuardModalSolder .top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

#invGuardModalSolder .ttl{
  font-weight:900;
  font-size:16px;
  color:#FBC21a;
}

#invGuardModalSolder .x{
  border:none;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:#FBC21a;
}

#invGuardModalSolder .txt{
  margin-top:10px;
  color:#FBC21a;
  font-size:14px;
  line-height:1.35;
}

#invGuardModalSolder .row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}

#invGuardModalSolder .b{
  flex:1 1 160px;
  border:none;
  border-radius:8px;
  padding:10px 12px;
  font-weight:900;
  cursor:pointer;
  color:#292929;
}

#invGuardModalSolder .b.adjust{ background:#FBC21a; }
#invGuardModalSolder .b.notify{ background:#e6e6e6; }
#invGuardModalSolder .b.cancel{
  flex:1 1 120px;
  border:1px solid #bbb;
  background:#fff;
}

/* === ALIGNEMENT FINAL DES CARTES OR === */
.or-template .product-block{
  min-height:575px;
}

.or-template .product-photo{
  width:100%;
  height:150px;
  object-fit:contain;
  margin:0 auto .75rem;
}

.or-template .product-info{
  flex:1;
  display:flex;
  flex-direction:column;
  justify-content:flex-start !important;
  min-height:0;
}

.or-template .product-title{
  min-height:2.8em;
  display:flex;
  align-items:flex-end;
  margin:0 0 .55rem 0;
}

.or-template .variant-row{
  width:100%;
  flex:1;
  display:flex;
  flex-direction:column;
}

/* prix proche du bouton */
.or-template .price-row{
  margin-top:auto;
  margin-bottom:.45rem;
}

.or-template .action-row{
  margin-top:0;
}

/* soudure : même logique, mais dans son bloc interne */
.or-template .solder-card{
  min-height:575px !important;
  height:auto !important;
}

.or-template .solder-card .product-info{
  min-height:0 !important;
  justify-content:flex-start !important;
  gap:0;
}

.or-template .solder-card .variant-row{
  display:flex;
  flex-direction:column;
  flex:1;
}

.or-template .solder-card .solder-box{
  display:flex !important;
  flex-direction:column;
  flex:1;
}

.or-template .solder-card .solder-total{
  display:block !important;
  min-height:22px;
  margin-top:auto !important;
  margin-bottom:.15rem !important;
  font-weight:600;
  font-size:1rem;
  line-height:1.2;
}

.or-template .solder-card .action-row{
  margin-top:0 !important;
}

.or-template .product-block[data-family] .product-info > .product-title{
  display:none;
}

.or-template .solder-card .action-row .btn-main{
  margin-top:0 !important;
}

.or-template .solder-card .solder-total{
  margin-bottom:.15rem !important;
}