/* ==========================================================================
   هایلایت‌های محصول شبیه Woodmart
   ========================================================================== */

.product-highlights-section,
.woodmart-highlights-section {
    padding: 28px 0;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.highlights-header,
.highlights-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.highlights-title,
.section-title {
    margin: 0;
    color: var(--dark-text, #0f172a);
    font-size: 16px;
    font-weight: 900;
}

.subtitle-hint {
    color: var(--muted-text, #64748b);
    font-size: 12px;
}

.highlights-carousel-track {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 10px 4px 16px;
    scrollbar-width: thin;
    scrollbar-color: #bae6fd transparent;
    overscroll-behavior-inline: contain;
}

.highlights-carousel-track::-webkit-scrollbar {
    height: 5px;
}

.highlights-carousel-track::-webkit-scrollbar-track {
    background: transparent;
}

.highlights-carousel-track::-webkit-scrollbar-thumb {
    background: #bae6fd;
    border-radius: 10px;
}

.highlight-story-card {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    width: 90px;
    color: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.highlight-story-card:hover {
    transform: translateY(-4px);
}

.story-avatar-ring {
    position: relative;
    width: 78px;
    height: 78px;
    padding: 3px;
    background: linear-gradient(45deg, #0284c7, #38bdf8, #0284c7);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

.has-video-type .story-avatar-ring {
    background: linear-gradient(45deg, #ef4444, #f59e0b, #0284c7);
    animation: ringSpin 6s linear infinite;
}

@keyframes ringSpin {
    100% {
        filter: hue-rotate(360deg);
    }
}

.story-avatar-inner {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 100%;
    padding: 2px;
    background: #ffffff;
    border-radius: 50%;
}

.story-avatar-inner img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.story-play-pill,
.story-image-pill {
    position: absolute;
    bottom: 0;
    left: 50%;
    padding: 1px 6px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    border-radius: 8px;
    font-size: 8px;
    font-weight: 800;
    white-space: nowrap;
    transform: translateX(-50%);
}

.story-play-pill {
    background: #dc2626;
}

.story-device-title {
    display: block;
    margin-top: 8px;
    color: var(--dark-text, #0f172a);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
}

.story-device-meta {
    color: var(--muted-text, #64748b);
    font-size: 10px;
    font-weight: 700;
}

/* لایت‌باکس استوری */
.story-lightbox-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
}

.story-lightbox-modal.active {
    display: flex;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox-card-container {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: min(90%, 420px);
    height: min(80vh, 720px);
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
}

.lightbox-progress-bar {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
}

.progress-fill {
    width: 0;
    height: 100%;
    background: var(--ice-primary, #0284c7);
}

.lightbox-header {
    position: absolute;
    z-index: 15;
    top: 20px;
    right: 15px;
    left: 55px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lb-title {
    display: block;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

.lb-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.badge-grade,
.badge-battery {
    padding: 1px 6px;
    color: #ffffff;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.badge-grade {
    background: #0284c7;
}

.badge-battery {
    background: #059669;
}

.lb-buy-btn {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: #ffffff;
    color: #0f172a !important;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
    text-decoration: none;
}

.lightbox-media-viewport {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #000000;
}

.lb-video-elem,
.lb-image-elem {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 640px) {
    .product-highlights-section,
    .woodmart-highlights-section {
        padding: 20px 0;
    }

    .highlights-carousel-track {
        gap: 14px;
    }

    .highlight-story-card {
        width: 82px;
    }

    .story-avatar-ring {
        width: 70px;
        height: 70px;
    }

    .lightbox-card-container {
        width: calc(100% - 24px);
        height: min(84vh, 720px);
        border-radius: 18px;
    }

    .lightbox-header {
        right: 10px;
        left: 50px;
    }
}


/* Admin-controlled Mobilelink highlight display variants */
.mlhf-highlights-hide-mobile { display: block !important; }
.mlhf-highlights-hide-desktop { display: block !important; }
@media (max-width: 781px) {
    .mlhf-highlights-hide-mobile { display: none !important; }
    .mlhf-highlights-style-minimal .highlights-header-title { margin-bottom: 10px; }
    .mlhf-highlights-style-minimal .story-avatar-ring { background: transparent; padding: 0; }
    .mlhf-highlights-style-minimal .story-avatar-inner { border-radius: 14px; }
    .mlhf-highlights-style-cards .highlight-story-card { padding: 10px; border-radius: 18px; background: rgba(255,255,255,.85); box-shadow: 0 8px 24px rgba(20,40,80,.08); }
}
@media (min-width: 782px) {
    .mlhf-highlights-hide-desktop { display: none !important; }
    .mlhf-highlights-style-minimal .story-avatar-ring { background: transparent; padding: 0; }
    .mlhf-highlights-style-minimal .story-avatar-inner { border-radius: 14px; }
    .mlhf-highlights-style-cards .highlight-story-card { padding: 12px; border-radius: 18px; background: rgba(255,255,255,.85); box-shadow: 0 8px 24px rgba(20,40,80,.08); }
}


/* Mobilelink header highlights: centered layout, isolated from internal page styles. */
.mlhf-highlights-container {
    width: min(100% - 32px, 1180px);
    margin-inline: auto;
}
.mlhf-highlights-container .highlights-header-title {
    justify-content: center;
    text-align: center;
}
.mlhf-highlights-container .highlights-carousel-track {
    justify-content: center;
    flex-wrap: wrap;
    overflow-x: visible;
    margin-inline: auto;
    max-width: 100%;
}
.mlhf-highlights-container .mlhf-highlights-subtitle {
    margin: 0 0 12px;
    text-align: center;
}
.mlhf-highlights-hide-mobile { display: none !important; }
@media (min-width: 783px) {
    .mlhf-highlights-hide-desktop { display: none !important; }
}
@media (max-width: 782px) {
    .mlhf-highlights-container { width: calc(100% - 24px); }
    .mlhf-highlights-container .highlights-carousel-track { gap: 12px; }
}

/* Center highlight cards even when the carousel contains fewer items than the row width. */
.highlights-stories-section .mlhf-highlights-container { margin-inline: auto !important; text-align: center; }
.highlights-stories-section .highlights-carousel-track { justify-content: center !important; }
