/* =========================================================================
   OP FINDING v1
   Template Finding — CSS local
   Objectif :
   - conserver exactement le look actuel
   - ne rien changer aux fichiers globaux
   - regrouper proprement le CSS spécifique à Finding
   ========================================================================= */

/* =========================================================================
   ALERT / TOAST LOCAL
   ========================================================================= */
.alerte-ajout {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #292929;
  color: #fbc21a;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  display: none;
  pointer-events: none;
  animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
  0%   { opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { opacity: 0; }
}

/* =========================================================================
   PRODUCT GRID
   ========================================================================= */
.product-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 0 10px;
  gap: 0;
}

.product-block {
  width: calc(16% - 20px);
  margin: 36px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 0.5rem;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: 420px;
  font-size: 0.85rem;
}

.product-block img {
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.product-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #292929;
}

/* =========================================================================
   TITLES
   ========================================================================= */
.product-info h3 {
  color: #292929;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 6px;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
}

.title-two-lines .t1 {
  display: block;
}

.title-two-lines .t2 {
  display: block;
  color: #555;
  font-weight: 500;
}

/* =========================================================================
   SELECT / BUTTONS
   ========================================================================= */
.select-variante {
  width: 100%;
}

.product-block button {
  background: #fbc81d;
  color: #000;
  opacity: 0.85;
  border: none;
  padding: 0.75rem;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  transform: scale(1);
}

.product-block button:hover {
  opacity: 1;
  transform: scale(1.03);
}

.product-block button.notify {
  background: #ccc;
  color: #000;
}

/* =========================================================================
   DISCOUNT / PRICE / QUANTITY
   ========================================================================= */
.rabais-text {
  min-height: 16px;
  line-height: 1.1;
  margin: 0 0 2px 0;
  padding: 0;
  font-weight: 700;
  font-size: 0.78rem;
  color: red;
  display: none;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
  flex-wrap: nowrap;
}

.qty-label {
  font-weight: 600;
}

.uom-static {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e5e5e5;
}

.prix-total {
  margin-left: auto;
  font-weight: 700;
  white-space: nowrap;
}

/* =========================================================================
   FILTER BAR
   ========================================================================= */
.filters-bar {
  position: relative;
  z-index: 20;
  background: transparent;
  padding: 6px 0;
}

.filters-placeholder {
  display: none;
  width: 100%;
}

.filters-bar.is-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  background: transparent;
  box-shadow: none;
}

/* =========================================================================
   FILTER BUTTONS
   ========================================================================= */
.metal-filters,
.category-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 8px 0 18px;
  flex-wrap: wrap;
}

.metal-filters .mf-btn,
.category-filters .mf-btn {
  padding: 0.55rem 1rem;
  border: 1px solid #ccc;
  background: #fff;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.metal-filters .mf-btn.is-active,
.category-filters .mf-btn.is-active {
  background: #292929;
  color: #fff;
  border-color: #292929;
}

/* =========================================================================
   MOBILE
   ========================================================================= */
@media (max-width: 768px) {
  .product-block {
    flex: 1 1 100%;
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

#invGuardModal{
  display:none;
  position:fixed;
  inset:0;
  z-index:10000;
}
#invGuardModal .bg{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.45);
}
#invGuardModal .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);
}
#invGuardModal .top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}
#invGuardModal .ttl{
  font-weight:800;
  font-size:16px;
  color:#FBC21a;
}
#invGuardModal .x{
  border:none;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
  color:#FBC21a;
}
#invGuardModal .txt{
  margin-top:10px;
  color:#FBC21a;
  font-size:14px;
  line-height:1.35;
}
#invGuardModal .row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
#invGuardModal .b{
  flex:1 1 160px;
  border:none;
  border-radius:8px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  color:#292929;
}
#invGuardModal .b.adjust{
  background:#FBC21a;
}
#invGuardModal .b.notify{
  background:#e6e6e6;
}
#invGuardModal .b.cancel{
  flex:1 1 120px;
  border:1px solid #bbb;
  background:#fff;
}
#invGuardModal .note{
  margin-top:10px;
  font-size:12px;
  color:#FBC21a;
}
