/* Dây phơi ảnh Selfbooth — dùng chung trang chủ + /cutebooth.
   Ảnh do admin chọn ở /admin/selfbooth (chỉ cuộn phim khách đã đồng ý cho dùng).
   Các cuộn phim treo trên một sợi dây, kẹp gỗ giữ ở đầu, đung đưa nhẹ và trôi ngang.
   Dùng var(--...) có fallback để chạy được cả trên trang /cutebooth (shell HTML riêng). */

.bs-section {
    width: 100%;
    max-width: min(1200px, 90vw); /* = width:90%/max 1200px ở trang chủ, mà /cutebooth vẫn khít .wrap */
    margin: 46px auto;
    padding: 34px 0 30px;
    position: relative;
    background: linear-gradient(160deg, #fffcfb 0%, #fff5f2 60%, #fff0f4 100%);
    border: 1px solid var(--border-soft, #ffe6e0);
    border-radius: 28px;
    box-shadow: 0 10px 30px rgba(250, 208, 196, 0.3);
    overflow: hidden;
}

/* Đốm pastel mờ trang trí (style.md §5.6) */
.bs-section::before,
.bs-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(38px);
    opacity: .55;
    pointer-events: none;
}
.bs-section::before { width: 190px; height: 190px; background: var(--pastel-pink, #ffd6e6); top: -60px; left: -50px; }
.bs-section::after  { width: 220px; height: 220px; background: var(--pastel-yellow, #ffe9b3); bottom: -80px; right: -60px; }

.bs-head {
    position: relative;
    text-align: center;
    padding: 0 20px;
    margin-bottom: 30px;
}

.bs-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: .82rem;
    font-weight: 700;
    color: var(--accent, #d67d63);
    background: #fff;
    border: 1px solid var(--border-soft, #ffe6e0);
    border-radius: 999px;
    padding: 7px 16px;
    box-shadow: 0 6px 18px rgba(250, 208, 196, .35);
}

.bs-eyebrow svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.bs-section h2 {
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: clamp(1.4rem, 1rem + 1.9vw, 2.1rem);
    line-height: 1.3;
    font-weight: 800;
    color: var(--accent-soft, #e59882);
    margin: 14px 0 0;
    text-align: center;
}

.bs-sub {
    max-width: 560px;
    margin: 10px auto 0;
    font-size: .93rem;
    line-height: 1.6;
    color: var(--text-muted, #8a7772);
    text-align: center;
}

/* ── Dây phơi ── */
.bs-wall {
    position: relative;
    padding: 26px 0 16px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

/* Sợi dây vắt ngang, đi qua đúng chỗ các kẹp gỗ */
.bs-wall::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 32px;
    border-top: 2px dashed var(--border-peach, #fbc1b0);
    opacity: .75;
}

.bs-track {
    display: flex;
    width: max-content;
    animation: bsScroll 60s linear infinite;
}

.bs-wall:hover .bs-track,
.bs-wall:focus-within .bs-track { animation-play-state: paused; }

.bs-half {
    display: flex;
    align-items: flex-start;
    gap: 26px;
    padding-right: 26px; /* nửa nào cũng có khe đuôi -> vòng lặp -50% khít, không giật */
}

@keyframes bsScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.bs-item {
    position: relative;
    flex: 0 0 auto;
    padding: 12px 0 0;
    border: none;
    background: none;
    cursor: zoom-in;
    transform-origin: 50% 10px; /* xoay quanh chỗ kẹp -> trông như đang treo thật */
    transform: rotate(var(--r, 0deg));
    transition: transform .3s ease, filter .3s ease;
}

.bs-item:hover,
.bs-item:focus-visible {
    transform: rotate(0deg) translateY(-5px) scale(1.03);
    filter: drop-shadow(0 14px 26px rgba(214, 125, 99, .28));
    outline: none;
}

/* Kẹp gỗ nhỏ giữ cuộn phim trên dây */
.bs-clip {
    position: absolute;
    top: 0;
    left: 50%;
    width: 15px;
    height: 26px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, var(--primary-peach, #fad0c4), var(--primary-peach-hover, #fbc1b0));
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(214, 125, 99, .28);
    z-index: 2;
}
.bs-clip::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 9px;
    width: 3px;
    height: 12px;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, .75);
    border-radius: 2px;
}

.bs-item img {
    display: block;
    height: 300px;
    width: auto;
    max-width: none;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 24px -10px rgba(250, 208, 196, .95);
    user-select: none;
}

.bs-cta {
    position: relative;
    text-align: center;
    margin-top: 22px;
    padding: 0 20px;
}

.bs-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main, #5c4b47);
    text-decoration: none;
    background: linear-gradient(135deg, #fad0c4 0%, #fbc1b0 100%);
    padding: 13px 30px;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(250, 208, 196, .5);
    transition: transform .25s ease, box-shadow .25s ease;
}
.bs-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 10px 22px rgba(250, 208, 196, .7); }
.bs-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.bs-note {
    position: relative;
    margin: 14px 20px 0;
    font-size: .78rem;
    color: var(--text-muted, #8a7772);
    text-align: center;
}

/* ── Xem to ── */
.bs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10050; /* trên header (999) và cả menu mobile (9999) */
    display: none;
    align-items: center;
    justify-content: center;
    padding: 26px 16px;
    background: rgba(92, 75, 71, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
.bs-lightbox.open { display: flex; }
.bs-lightbox img {
    max-width: min(92vw, 520px);
    max-height: 88vh;
    width: auto;
    padding: 8px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(92, 75, 71, .45);
}
.bs-lb-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: var(--accent, #d67d63);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(92, 75, 71, .3);
}
.bs-lb-close:hover { background: var(--peach-light, #fff5f2); transform: scale(1.06); }

@media (max-width: 1000px) {
    .bs-section { width: 100%; max-width: 100%; margin: 30px 0; border-radius: 22px; padding: 26px 0 24px; }
    .bs-head { margin-bottom: 22px; }
    .bs-item img { height: 210px; }
    .bs-half { gap: 18px; padding-right: 18px; }
    .bs-track { animation-duration: 45s; }
    .bs-wall::before { top: 30px; }
}

/* Tôn trọng người tắt hiệu ứng: dừng chạy chữ, cho vuốt tay thay thế */
@media (prefers-reduced-motion: reduce) {
    .bs-track { animation: none; }
    .bs-wall { overflow-x: auto; }
    .bs-item { transition: none; }
}
