/* =============================================
   Faro Bestsellers Block – Frontend Styles
   ============================================= */

.faro-bestsellers {
    margin-block: 2rem;
}

.faro-bestsellers__title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Grid responsywny z CSS Custom Properties */
.faro-bestsellers__grid {
    display: grid;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.25rem;
}

/* Kolumny – generowane przez atrybut bloku */
.faro-bestsellers--cols-2 .faro-bestsellers__grid {
    grid-template-columns: repeat(2, 1fr);
}

.faro-bestsellers--cols-3 .faro-bestsellers__grid {
    grid-template-columns: repeat(3, 1fr);
}

.faro-bestsellers--cols-4 .faro-bestsellers__grid {
    grid-template-columns: repeat(4, 1fr);
}

.faro-bestsellers--cols-5 .faro-bestsellers__grid {
    grid-template-columns: repeat(5, 1fr);
}

.faro-bestsellers--cols-6 .faro-bestsellers__grid {
    grid-template-columns: repeat(6, 1fr);
}

/* Tablet */
@media (max-width: 1024px) {

    .faro-bestsellers--cols-5 .faro-bestsellers__grid,
    .faro-bestsellers--cols-6 .faro-bestsellers__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .faro-bestsellers--cols-2 .faro-bestsellers__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .faro-bestsellers--cols-3 .faro-bestsellers__grid,
    .faro-bestsellers--cols-4 .faro-bestsellers__grid,
    .faro-bestsellers--cols-5 .faro-bestsellers__grid,
    .faro-bestsellers--cols-6 .faro-bestsellers__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Karta produktu */
.faro-bestsellers__item {
    position: relative;
}

.faro-bestsellers__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8e8e8;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    background: #fff;
}

.faro-bestsellers__link:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

/* Miniatura */
.faro-bestsellers__image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f8f8;
}

.faro-bestsellers__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.faro-bestsellers__link:hover .faro-bestsellers__image-wrap img {
    transform: scale(1.04);
}

/* Badge „Bestseller" */
.faro-bestsellers__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #111;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1.4;
}

/* Badge „Promocja" */
.faro-bestsellers__sale-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #e02020;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 3px;
    line-height: 1.4;
}

/* Szczegóły produktu */
.faro-bestsellers__details {
    padding: 0.75rem 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 4px;
}

.faro-bestsellers__name {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.faro-bestsellers__price {
    font-size: 0.9rem;
    margin-top: auto;
    padding-top: 6px;
}

/* Przycisk CTA */
.faro-bestsellers__cta {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-align: center;
    border: 2px solid #111;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.faro-bestsellers__link:hover .faro-bestsellers__cta {
    background: #111;
    color: #fff;
}

/* Stan pusty */
.faro-bestsellers-empty {
    text-align: center;
    color: #888;
    padding: 2rem;
    font-style: italic;
}