/* ===== CSS GIAO DIỆN HÌNH ẢNH & SLIDER ===== */

.page { max-width: 1024px; }

.back-link {
    font-size: 13px;
    color: #38bdf8;
    text-decoration: none;
}
.back-link:hover {
    text-decoration: underline;
}

.price-label {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #facc15;
}

.admin-edit-box {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
    border: 1px dashed rgba(248,250,252,0.3);
    background: rgba(15,23,42,0.9);
}
.admin-edit-box a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 600;
}
.admin-edit-box a:hover {
    text-decoration: underline;
}

.gallery-wrapper {
    margin-top: 20px;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.gallery-item {
    background: rgba(15,23,42,0.9);
    border-radius: 12px;
    padding: 10px;
    border: 1px solid rgba(148,163,184,0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    cursor: pointer;
    transition: transform .12s, box-shadow .12s;
}
.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 35px rgba(0,0,0,0.8);
}
.gallery-item img {
    width: 100%;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}
.gallery-caption {
    margin-top: 6px;
    font-size: 12px;
    color: #9ca3af;
    word-break: break-all;
}
.no-images {
    margin-top: 20px;
    font-size: 14px;
    color: #9ca3af;
}

/* ===== POPUP LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    z-index: 99999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(255,255,255,0.4);
}

.lightbox-close {
    position: fixed;
    top: 22px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 100001;
    user-select: none;
}

.lightbox-prev, .lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 60px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
    z-index: 100001;
    padding: 10px 16px;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-close:hover {
    opacity: 0.7;
}

/* ===== Slider Ảnh Ngẫu Nhiên ===== */
.slider-container {
    width: 100%;
    overflow: hidden;
    margin-top: 24px;
    position: relative;
    /* Hiệu ứng mờ dần ở 2 cạnh trái phải */
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.slider-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: scrollSlider 30s linear infinite;
}
.slider-container:hover .slider-track {
    animation-play-state: paused; /* Tạm dừng cuộn khi rê chuột vào */
}
.slider-item {
    width: 180px;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(15,23,42,0.6);
    border: 1px solid rgba(148,163,184,0.3);
}
.slider-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.slider-item:hover img {
    transform: scale(1.08); /* Phóng to nhẹ khi hover */
}
@keyframes scrollSlider {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-50% - 8px)); }
}