/* ================================================
   YouTube Shorts Carousel — WooCommerce
   ================================================ */

.ysc-section {
    width: 100%;
    margin: 40px 0;
    padding: 0;
    box-sizing: border-box;
}

/* Header */
.ysc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.ysc-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    border: none;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ysc-yt-icon {
    flex-shrink: 0;
}

/* Carousel container */
.ysc-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
}

.ysc-track-wrap {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.ysc-track {
    display: flex;
    gap: 12px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    align-items: flex-start;
}

/* Each slide — Shorts ratio 9:16 */
.ysc-slide {
    flex: 0 0 160px;
    width: 160px;
    cursor: pointer;
    transition: transform 0.2s;
}

.ysc-slide:hover {
    transform: scale(1.03);
}

.ysc-thumb-wrap {
    position: relative;
    width: 160px;
    height: 284px; /* 9:16 */
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 2px 12px rgba(0,0,0,.18);
}

.ysc-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
}

.ysc-slide:hover .ysc-thumb {
    opacity: 0.85;
}

/* Play button overlay */
.ysc-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.2s;
}

.ysc-slide:hover .ysc-play-overlay svg {
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
    transform: scale(1.1);
    transition: transform 0.2s;
}

/* Share / External link */
.ysc-share {
    position: absolute;
    bottom: 10px;
    left: 10px;
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,.55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    z-index: 2;
}

.ysc-share:hover {
    background: rgba(0,0,0,.85);
}

/* Video title */
.ysc-video-title {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.35;
    color: #333;
    text-align: left;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-width: 160px;
}

/* Navigation arrows */
.ysc-arrow {
    flex-shrink: 0;
    width: 36px;
    height: 60px;
    background: rgba(0,0,0,.07);
    border: none;
    border-radius: 6px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #444;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 1;
}

.ysc-arrow:hover {
    background: rgba(0,0,0,.18);
    color: #000;
}

.ysc-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.ysc-prev { margin-right: 8px; }
.ysc-next { margin-left: 8px; }

/* ================================================
   Modal / Player
   ================================================ */

.ysc-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.ysc-modal.is-open {
    display: flex;
}

.ysc-modal-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.82);
    cursor: pointer;
}

.ysc-modal-box {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
    margin: 0 16px;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 48px rgba(0,0,0,.7);
}

.ysc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(0,0,0,.6);
    border: none;
    color: #fff;
    font-size: 22px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

.ysc-modal-close:hover {
    background: rgba(255,0,0,.7);
}

/* 9:16 iframe wrapper */
.ysc-iframe-wrap {
    position: relative;
    width: 100%;
    padding-top: 177.78%; /* 16/9 × 100 */
}

.ysc-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ================================================
   Responsive
   ================================================ */

@media (max-width: 768px) {
    .ysc-slide {
        flex: 0 0 140px;
        width: 140px;
    }
    .ysc-thumb-wrap {
        width: 140px;
        height: 249px;
    }
    .ysc-video-title {
        max-width: 140px;
    }
    .ysc-arrow {
        width: 28px;
        font-size: 22px;
    }
    .ysc-modal-box {
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .ysc-slide {
        flex: 0 0 120px;
        width: 120px;
    }
    .ysc-thumb-wrap {
        width: 120px;
        height: 213px;
    }
    .ysc-video-title {
        max-width: 120px;
        font-size: 11px;
    }
    .ysc-title {
        font-size: 1.05rem;
    }
}
