/* Mind Products Widget — frontend.css */

.mind-products-widget {
    width: 100%;
}

/* ── Grid ───────────────────────────────────────────────── */
.mind-products-grid {
    display: grid;
    grid-template-columns: repeat( var(--mind-cols, 4), 1fr );
    gap: 20px;
}

@media (max-width: 1024px) {
    .mind-products-grid { grid-template-columns: repeat( 3, 1fr ); }
}
@media (max-width: 768px) {
    .mind-products-grid { grid-template-columns: repeat( 2, 1fr ); }
}
@media (max-width: 480px) {
    .mind-products-grid { grid-template-columns: 1fr; }
}

/* ── Card ───────────────────────────────────────────────── */
.mind-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.mind-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

/* ── Imagem ─────────────────────────────────────────────── */
.mind-product-image-link { display: block; }

.mind-product-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5f5f5;
}

.mind-product-image .mind-thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.mind-product-card:hover .mind-thumb {
    transform: scale(1.04);
}

/* ── Badge ──────────────────────────────────────────────── */
.mind-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 4px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.mind-badge--sale {
    background: #e74c3c;
    color: #fff;
}

.mind-badge--featured {
    background: #f39c12;
    color: #fff;
}

/* ── Info ───────────────────────────────────────────────── */
.mind-product-info {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mind-store-name {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 500;
}

.mind-product-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
}

.mind-product-title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}

.mind-product-title a:hover { color: var(--e-global-color-accent, #7a00e6); }

/* ── Rating ─────────────────────────────────────────────── */
.mind-product-rating .star-rating {
    font-size: 12px;
}

/* ── Preço ──────────────────────────────────────────────── */
.mind-product-price {
    margin-top: auto;
    font-size: 15px;
    font-weight: 700;
}

.mind-product-price del {
    opacity: .5;
    font-weight: 400;
    font-size: 12px;
}

.mind-product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* ── Botão carrinho ─────────────────────────────────────── */
.mind-add-to-cart {
    margin-top: 8px;
}

.mind-add-to-cart a.button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    background: var(--e-global-color-accent, #7a00e6);
    color: #fff;
    text-decoration: none;
    transition: opacity .2s, transform .15s;
    border: none;
    cursor: pointer;
}

.mind-add-to-cart a.button:hover {
    opacity: .88;
    transform: scale(1.02);
}

/* ── Sem produtos ───────────────────────────────────────── */
.mind-no-products {
    text-align: center;
    color: #aaa;
    padding: 2rem;
}

/* ── Paginação ──────────────────────────────────────────── */
.mind-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.mind-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s;
}

.mind-pagination .page-numbers.current,
.mind-pagination .page-numbers:hover {
    background: var(--e-global-color-accent, #7a00e6);
    color: #fff;
}

/* ── Carrossel ──────────────────────────────────────────── */
.mind-products-carousel-track {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mind-carousel-viewport {
    overflow: hidden;
    flex: 1;
}

.mind-products-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
    will-change: transform;
}

.mind-products-carousel .mind-product-card {
    min-width: calc( (100% - (var(--mind-cols,4) - 1) * 20px) / var(--mind-cols,4) );
    flex-shrink: 0;
}

.mind-carousel-prev,
.mind-carousel-next {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 40px; height: 40px;
    font-size: 22px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: background .15s, box-shadow .15s;
    line-height: 1;
    padding: 0;
}

.mind-carousel-prev:hover,
.mind-carousel-next:hover {
    background: var(--e-global-color-accent, #7a00e6);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

@media (max-width: 768px) {
    .mind-products-carousel .mind-product-card {
        min-width: calc( (100% - 20px) / 2 );
    }
}

@media (max-width: 480px) {
    .mind-products-carousel .mind-product-card {
        min-width: 80%;
    }
}
