.ytpc-carousel-wrapper {
    margin: 24px 0;
}

.ytpc-block-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px;
    font-family: Roboto, Arial, sans-serif;
    color: #0f0f0f;
}

.ytpc-carousel-outer {
    position: relative;
    display: flex;
    align-items: center;
}

.ytpc-track {
    --ytpc-visible: 4;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
    padding: 4px 2px 8px;
    min-width: 0;
}

.ytpc-track::-webkit-scrollbar {
    display: none;
}

.ytpc-card {
    flex: 0 0 calc((100% - (var(--ytpc-visible, 4) - 1) * 12px) / var(--ytpc-visible, 4));
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--ytpc-card-bg, #f9f9f9);
    border-radius: 12px;
    padding: 8px;
    transition: transform 0.2s ease;
}

.ytpc-card:hover {
    transform: translateY(-5px);
}

.ytpc-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #eee;
}

.ytpc-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ytpc-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 12px;
    line-height: 1.4;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: Roboto, Arial, sans-serif;
}

.ytpc-card-body {
    padding-top: 8px;
}

.ytpc-card-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0 0 4px;
    color: #0f0f0f;
    font-family: Roboto, Arial, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ytpc-card-meta {
    font-size: 12px;
    color: #606060;
    margin: 0;
    line-height: 1.5;
    font-family: Roboto, Arial, sans-serif;
}

.ytpc-arrow {
    border-radius: 100px;
    padding: .1rem 1rem;
    background-color: var(--Rojo2, #c62828);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    z-index: 2;
    flex-shrink: 0;
    color: #fff;
    font-size: 14px;
    transition: box-shadow 0.15s ease;
}

.ytpc-arrow:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ytpc-arrow-prev {
    margin-right: 8px;
}

.ytpc-arrow-next {
    margin-left: 8px;
}

.ytpc-notice {
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffe58f;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    color: #664d03;
    font-size: 14px;
}

/* Valores por defecto por breakpoint (respaldo). Lo que se elija en el panel
   del widget (Contenido → Tarjetas visibles) los sobrescribe. */
@media (max-width: 1024px) {
    .ytpc-track {
        --ytpc-visible: 3;
    }
}

@media (max-width: 767px) {
    .ytpc-track {
        --ytpc-visible: 2;
    }
}
