/**
 * Smart Cross-Sell - Front CSS
 * Reproduction du style Creative Elements miniature produit
 */

.mat-smartcrosssell {
    margin: 40px 0;
    clear: both;
}

.mat-smartcrosssell__title {
    font-size: 1.4em;
    margin-bottom: 25px;
    text-align: center;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Grille responsive */
.mat-smartcrosssell__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1199px) {
    .mat-smartcrosssell__grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 991px) {
    .mat-smartcrosssell__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 767px) {
    .mat-smartcrosssell__grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

/* Item produit */
.mat-smartcrosssell__item {
    position: relative;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.mat-smartcrosssell__item:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Badges en absolute, en haut à gauche */
.mat-smartcrosssell__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.mat-smartcrosssell__badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.mat-smartcrosssell__badge--sale { background: #e74c3c; }
.mat-smartcrosssell__badge--new { background: #27ae60; }
.mat-smartcrosssell__badge--pack { background: #3498db; }

/* Image */
.mat-smartcrosssell__image-link {
    display: block;
    margin-bottom: 12px;
    overflow: hidden;
}

.mat-smartcrosssell__image {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.mat-smartcrosssell__image-link:hover .mat-smartcrosssell__image {
    transform: scale(1.05);
}

/* Stock */
.mat-smartcrosssell__stock {
    font-size: 12px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.mat-smartcrosssell__stock-label {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mat-smartcrosssell__stock--in .mat-smartcrosssell__stock-label { color: #27ae60; }
.mat-smartcrosssell__stock--out .mat-smartcrosssell__stock-label { color: #e74c3c; }

.mat-smartcrosssell__stock-value {
    color: #666;
    margin-left: 4px;
}

/* Avis (laisse passer le HTML steavisgarantis avec ses propres styles) */
.mat-smartcrosssell__reviews {
    margin-bottom: 8px;
    min-height: 20px;
}

.mat-smartcrosssell__reviews #categoryStarsMain,
.mat-smartcrosssell__reviews .categoryStars {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* Nom */
.mat-smartcrosssell__name {
    font-size: 13px;
    line-height: 1.35;
    margin: 8px 0;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

.mat-smartcrosssell__name a {
    color: #333;
    text-decoration: none;
}

.mat-smartcrosssell__name a:hover {
    color: #000;
    text-decoration: underline;
}

/* Prix */
.mat-smartcrosssell__price-wrap {
    margin: 10px 0;
    min-height: 24px;
}

.mat-smartcrosssell__price {
    font-size: 1.1em;
    font-weight: 700;
    color: #222;
}

.mat-smartcrosssell__price-old {
    font-size: 0.9em;
    color: #999;
    text-decoration: line-through;
    margin-right: 6px;
}

/* Bouton acheter */
.mat-smartcrosssell__btn {
    display: inline-block;
    margin-top: auto;
    padding: 8px 16px;
    background: #6BB53F;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s ease;
}

.mat-smartcrosssell__btn:hover,
.mat-smartcrosssell__btn:focus {
    background: #FD6282;
    color: #fff !important;
    text-decoration: none;
}
