/* --- Bouton principal --- */
#shop-filters button.filter-btn {
  display:flex; align-items:center;
  background:rgba(137, 43, 226, 0.496); color:white;
  border:0; border-radius:10px;
  padding:2px 3px; font-weight:600; margin-top: 14px;
  cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,0.15);
  transition:background 0.2s;
}
#shop-filters button.filter-btn:hover { background:#1f29377b; }
#shop-filters button.filter-btn span.icon { font-size:18px; }

/* --- Dialog / Popup --- */
.filter-dialog {
  position:fixed; top:0; left:0; width:100%; height:100%;
  background:rgba(0,0,0,0.4); display:none;
  align-items:center; justify-content:center;
  z-index:1000;
}
.filter-dialog.active { display:flex; }

.filter-content {
  background:white; width:90%; max-width:600px;
  border-radius:14px; padding:20px;
  box-shadow:0 8px 30px rgba(0,0,0,0.2);
  animation:fadeIn .3s ease;
}
@keyframes fadeIn { from {opacity:0; transform:translateY(10px);} to {opacity:1; transform:none;} }

.filter-header {
  display:flex; justify-content:space-between; align-items:center;
  margin-bottom:15px;
}
.filter-header h2 { font-size:18px; margin:0; }
.filter-header button.close {
  background:transparent; border:0; font-size:22px; cursor:pointer;
}

.filters-row {
  display:flex; flex-direction:column; gap:14px;
}
.filter-group label { display:block; font-size:13px; color:#333; margin-bottom:4px; }
.filter-input, .filter-select {
  padding:8px 10px; border:1px solid #e6e9ef; border-radius:8px;
  font-size:13px; width:100%;
}
.checkbox { display:flex; gap:6px; align-items:center; font-size:13px; color:#444; }
.price-input { width:48%; }

.filter-footer {
  display:flex; justify-content:flex-end; gap:10px;
  margin-top:20px;
}
.small-btn {
  padding:10px 14px; border-radius:8px; border:0; cursor:pointer; font-weight:600;
}
.btn-apply { background:#111827; color:white; }
.btn-reset { background:#e6e9ef; color:#111827; }

 



 
 
 
 
 
 

.products-grid {
    display: grid;
    margin: 8px 0;
    grid-template-columns: repeat(4, 1fr);
    animation: fadeInGrid 0.5s;
}

@keyframes fadeInGrid {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: none; }
}

.custom-product-card {
    background: linear-gradient(135deg, #f8f8ff 60%, #e6e9ef 100%);
    box-shadow: 0 8px 32px rgba(137,43,226,0.10), 0 2px 8px rgba(0,0,0,0.08);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1.5px solid #e6e9ef;
    animation: fadeInCard 0.5s;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.custom-product-card:hover {
    box-shadow: 0 12px 40px rgba(137,43,226,0.18), 0 4px 16px rgba(0,0,0,0.18);
    transform: translateY(-4px) scale(1.03);
    border-color: #764ba2;
}

.product-image-container {
    width: 100%;
    aspect-ratio: 1.1;
    background: linear-gradient(135deg, #e6e9ef 60%, #f8f8ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-image-square {
    width: 92%;
    height: 92%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(137,43,226,0.10);
    border: 1px solid #e6e9ef;
}

.product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 12px 12px 12px;
    gap: 8px;
    min-height: 120px;
}

.product-meta {
    display: flex;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
    font-weight: bold;
    gap: 8px;
    margin-bottom: 2px;
}

.product-category-icon {
    font-size: 1.2em;
    color: #764ba2;
    margin-right: 6px;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
}

.product-category {
    font-size: 0.9rem;
    color: #764ba2;
    margin-right: 6px;
    font-weight: 600;
}

.product-type {
    font-size: 0.7rem;
    color: #555;
    border: #764ba2 1px solid;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f8f8ff;
}

.product-price {
    font-size: 1rem;
    font-weight: 700;
    color: #764ba2;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.rich-text-content_title_promo {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    font-weight: bold;
    font-size: 1rem;
    color: #222;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.rich-text-row_title_promo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-promo {
    display: inline-block;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: white;
    font-weight: bold;
    background: linear-gradient(90deg, #ff3c3c 60%, #ffb347 100%);
    border-radius: 8px;
    padding: 2px 8px;
    box-shadow: 0 2px 8px rgba(255,60,60,0.10);
}

.product-selling-price {
    font-size: 0.8rem;
    color: #764ba2;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}

.product-price.one {
    font-size: 0.9rem;
    font-weight: 600;
    color: #764ba2;
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    margin-top: 6px;
}

.product-reduced-price {
    font-size: 1rem;
    font-weight: 700;
    color: #ff3c3c;
    margin-top: 6px;
}

.product-free-delivery {
    margin-top: 4px;
    display: flex;
    align-items: start;
    border: rgb(0, 226, 0) 1px solid;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e6ffe6;
    font-size: 0.9rem;
}

.product-free-delivery i {
    color: rgb(0, 226, 0);
    margin-right: 4px;
    font-size: 14px;
}

.product-free-delivery h1 {
    font-size: 0.8rem;
    color: rgb(0, 226, 0);
    margin: 0;
    padding: 0;
    font-weight: normal;
}

.product-exhausted-stock {
    color: #ff3c3c;
    font-weight: bold;
    font-size: 13px;
    background: #ffeaea;
    border-radius: 8px;
    padding: 2px 8px;
    margin-top: 4px;
}

.product-low-stock {
    color: orange;
    font-weight: bold;
    font-size: 13px;
    background: #fff6e6;
    border-radius: 8px;
    padding: 2px 8px;
    margin-top: 4px;
}

.product-stock {
    color: green;
    font-weight: bold;
    font-size: 13px;
    background: #e6ffe6;
    border-radius: 8px;
    padding: 2px 8px;
    margin-top: 4px;
}

.product-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #764ba2;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 1px 4px rgba(137,43,226,0.10);
    margin: 0 2px;
}

.product-colors-vertical-list {
    display: flex;
    gap: 8px;
    z-index: 2;
    flex-direction: column;
    bottom: 12px;
    right: 12px;
    position: absolute;
}

.product-sizes-vertical-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 3px 0;
    bottom: 12px;
    right: 12px;
    position: absolute;
}

.product-size-dot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    background: #fff;
    border: 2px solid #764ba2;
    border-radius: 16px;
    font-weight: 700;
    color: #764ba2;
    font-size: 0.7rem;
    box-shadow: 0 1px 4px rgba(137,43,226,0.08);
}

.product-color-dot-more {
    background: rgba(0, 0, 0, 0.489) !important;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    border: 2px solid #764ba2;
    border-radius: 50%;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #FFD700;
    padding: 2px 8px;
    border-radius: 18px;
    background-color: #ffd9003f;
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.206);
    z-index: 2;
    flex-direction: row;
    top: 12px;
    right: 12px;
    position: absolute;
    border: #FFD700 1px solid;
}

.product-top-seller {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    color: #FFD700;
    padding: 2px 12px;
    border-radius: 10px 0 100px 0;
    background: linear-gradient(90deg, #ff3c3c 60%, #ffb347 100%);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.206);
    z-index: 2;
    flex-direction: row;
    bottom: 12px;
    left: 12px;
    position: absolute;
}

 .product-image-container {
     width: 100%;
     aspect-ratio: 1.1;
     background: #f5f5f5;
     /* display: flex; */
     align-items: center;
     justify-content: center;
     position: relative;
 }

 .product-image-square {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
 }

 .product-info {
     display: flex;
     flex-direction: column;
     align-items: flex-start;
     padding: 8px;
     gap: 4px;
 }

 .product-meta {
     display: flex;
     font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
     font-weight: bold;
 }

 .product-category-icon {
     font-size: 1.2em;
     color: #764ba2;
     margin-right: 6px;
     vertical-align: middle;
     display: inline-flex;
     align-items: center;
 }

 .product-category {
     font-size: 0.8rem;
     color: #764ba2;
     margin-right: 6px;
 }

 .product-type {
     font-size: 0.6rem;
     color: #555;
     border: #555 1px solid;
     padding: 2px 4px;
     border-radius: 10px;
 }

 .product-price {
     font-size: 0.8rem;
     font-weight: 600;
     color: green;
     /* margin-top: 6px; */
 }

 .rich-text-content_title_promo {
     display: -webkit-box;
     -webkit-line-clamp: 3;
     /* Limite à 3 lignes */
     -webkit-box-orient: vertical;
     overflow: hidden;
     text-overflow: ellipsis;
     white-space: normal;
     line-height: 1.4;
     max-width: 100%;
     word-break: break-word;
     /* pouir le title */
     font-weight: bold;
     font-size: 0.7rem;
     color: black;
     margin: 0;
     padding: 0;
     font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
 }

 .rich-text-row_title_promo {
     display: flex;
     align-items: center;
     gap: 8px;
 }

 .product-promo {
     display: inline-block;
     align-items: center;
     gap: 6px;
     font-size: 0.8rem;
     color: white;
     font-weight: bold;
     background-color: red;
     border-radius: 5px;
     padding: 0 2px;
 }

 .product-selling-price {
     font-size: 0.6rem;
     color: #764ba2;
     text-decoration: line-through;
     text-decoration-thickness: 1.5px;
 }

 .product-price.one {
     font-size: 0.7rem;
     font-weight: 600;
     color: green;
     text-decoration: line-through;
     text-decoration-thickness: 1.5px;
     margin-top: 6px;
 }

 .product-reduced-price {
     font-size: 0.8rem;
     font-weight: 600;
     color: red;
     margin-top: 6px;
 }

 .product-free-delivery {
     margin-top: 4px;
     display: flex;
     align-items: start;
     border: rgb(0, 226, 0) 1px solid;
     padding: 2px 4px;
     border-radius: 10px;
 }

 .product-free-delivery i {
     color: rgb(0, 226, 0);
     margin-right: 4px;
     font-size: 10px;
 }

 .product-free-delivery h1 {
     font-size: 0.6rem;
     color: rgb(0, 226, 0);
     margin: 0;
     padding: 0;
     font-weight: normal;
 }

 .product-exhausted-stock {
     color: red;
     font-weight: bold;
     font-size: 12px;
 }

 .product-low-stock {
     color: orange;
     font-weight: bold;
     font-size: 12px;
 }

 .product-stock {
     color: green;
     font-weight: bold;
     font-size: 12px;
 }

 .product-color-dot {
     width: 18px;
     height: 18px;
     border-radius: 50%;
     border: 1px solid #ccc;
     display: inline-block;
     vertical-align: middle;
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
     margin: 0 2px;
     /* Pas de padding, le cercle est plein */
 }

 .product-colors-vertical-list {
     display: flex;
     gap: 6px;
     z-index: 2;
     flex-direction: column;
     bottom: 8px;
     right: 8px;
     position: absolute;
 }

 .product-sizes-vertical-list {
     display: flex;
     flex-direction: column;
     gap: 4px;
     margin: 3px 0;
     bottom: 8px;
     right: 8px;
     position: absolute;
 }

 .product-size-dot {
     display: flex;
     align-items: center;
     justify-content: center;
     /* max-width: 32px; */
     /* max-height: 32px; */
     padding: 2px 4px;
     background: #fff;
     border: 1.5px solid #764ba2;
     border-radius: 16px;
     font-weight: 600;
     color: #764ba2;
     font-size: 0.5rem;
     box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
 }


 .product-color-dot-more {
     background: rgba(0, 0, 0, 0.489) !important;
     color: white;
     font-weight: bold;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 0.8em;
     border: 1px solid #ccc;
     border-radius: 50%;
 }

 .product-rating {
     display: flex;
     align-items: center;
     gap: 4px;
     font-size: 0.8rem;
     color: #FFD700;
     padding: 2px 4px;
     border-radius: 18px;
     background-color: #ffd9003f;
     box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.206);
     z-index: 2;
     flex-direction: row;
     top: 8px;
     right: 8px;
     position: absolute;
     border: #FFD700 1px solid;
 }

 .product-top-seller {
     display: flex;
     align-items: center;
     gap: 4px;
     font-size: 0.8rem;
     color: #FFD700;
     padding: 2px 8px;
     border-radius: 10px 0 100px 0;
     background-color: red;
     box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.206);
     z-index: 2;
     flex-direction: row;
     bottom: 8px;
     left: 8px;
     position: absolute;
 }




 @media (max-width: 1200px) {
     .products-grid {
         grid-template-columns: repeat(4, 1fr);
     }
 }

 @media (max-width: 900px) {
     .products-grid {
         grid-template-columns: repeat(3, 1fr);
     }
 }

 @media (max-width: 600px) {
     .products-grid {
         grid-template-columns: repeat(2, 1fr);
     }
 }

 @media (max-width: 400px) {
     .products-grid {
         grid-template-columns: 1fr;
     }
 }

 .product-card {
     background: #fff;
     border-radius: 10px;
     margin: 3px;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.51);
 }