.story-list-wrapper {
    padding: 10px;
}
.story-item {
    text-align: center;
    cursor: pointer;
    margin-top: 10px;
}
.story-thumb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #0D47A1;
    object-fit: cover;
    padding: 3px;
    background: #fff;
    /*background: linear-gradient(315deg, var(--primary), rgba(var(--primary-rgb), .5));*/
    box-shadow: 0 0 15px rgba(13, 71, 161, 0.4);
}
.story-title {
    display: block;
    font-size: 13px;
    margin-top: 5px;
}

/* ===== OVERLAY پایه ===== */
.story-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-family: inherit;
}

.story-overlay.active {
    display: flex;
    pointer-events: auto;
}

/* پس‌زمینه محو */
.story-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(10px);
}

/* ===== کارت استوری وسط صفحه ===== */
.story-card {
    position: relative;
    z-index: 2;
    width: 420px;
    height: 88vh;
    background: #000;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

/* موبایل: full-height نزدیک چیزی که فرستادی */
@media (max-width: 768px) {
    .story-card {
        width: 100%;
        height: 100dvh;
        border-radius: 0;
    }
}

/* ===== TOP: progress + header ===== */
.story-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 8px 12px 45px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
}
/* progress bars */
.story-progress-bars {
    display: flex;
    gap: 4px;
    padding: 6px 12px;
}

.story-progress-bars .bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.story-progress-bars .bar .fill {
    position: absolute;
    left: 0;
    top: 0;
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width linear;
}

/* header */
.story-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.story-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.story-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.7);
}

.story-header-meta {
    display: flex;
    flex-direction: column;
}

.story-header-title {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.story-header-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
}

.story-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* دکمه‌های کوچک بالایی */
.story-btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s;
}

.story-btn-icon:hover {
    background: rgba(0,0,0,0.6);
}

.story-btn-close {
    font-size: 18px !important;
}

.story-btn-icon.story-btn-close {
    font-size: 14px;
    padding: 4px 10px;
}

/* ===== محتوا (تصویر/ویدئو) ===== */
.story-content {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #000;
}

.story-content img,
.story-content video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    background: #000;
}

/* مناطق کلیک/تاچ */
.story-tap-left,
.story-tap-right {
    position: absolute;
    top: 0;
    width: 25%;
    height: 100%;
    z-index: 5;
}

.story-tap-left  { left: 0; }
.story-tap-right { right: 0; }

/* برای موبایل می‌خواهیم کل کارت تاچ‌پذیر باشد */
@media (max-width: 768px) {
    .story-tap-left,
    .story-tap-right {
        width: 33%;
    }
}

/* ===== bottom actions & widget ===== */
.story-bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 80px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.80), transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.story-bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* دکمه لایک */
.story-btn-like {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: none;
    cursor: pointer;
}

.story-btn-like.liked {
    color: #ff4a6a;
}

.story-like-count {
    font-size: 12px;
}

/* CTA اصلی وسط پایین */
.story-main-cta {
    border: none;
    border-radius: 12px;
    background: rgba(255,255,255,0.9);
    color: #111;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    width: 100%;
}
.story-main-cta-text {
    white-space: nowrap;
}

.story-main-cta i {
    font-size: 18px;
}



/* ===== Widget Product Card (Front) ===== */

.story-widget {
    margin-top: 4px;
}

.story-widget-card {
    position: relative;
    background: #fff;
    border-radius: 14px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/*.story-widget-img-wrapper {
    position: relative;
}
*/
.story-widget-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
}

.story-widget-discount {
    position: absolute;
    top: 4px;
    left: 4px;
    background: #ff5252;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 12px 6px 12px 6px;
}

.story-widget-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.story-widget-title {
    font-size: 12px;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    font-weight: 400;
    color: #333;
}

.story-widget-price {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.story-widget-price-old {
    text-decoration: line-through;
    color: #999;
    font-size: 11px;
    font-weight: bold;
}
.story-widget-price-final {
    color: #333;
    font-weight: bold;
    font-size: 12px;
}

/*===== Desktop Arrow Zones =====*/
.story-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: none;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    cursor: pointer;
    backdrop-filter: blur(6px);
}

.story-arrow-left { left: 5px; }
.story-arrow-right { right: 5px; }

.story-btn-sound {
    background: rgba(0,0,0,0.6);
    color: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.story-btn-sound i {
    pointer-events: none;
}
.story-reaction-box{
    position: relative;
}

.story-reactions-picker{
    position: absolute;
    bottom: 48px;
    right: 0;
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(8px);
    padding: 8px 10px;
    border-radius: 999px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(.96);
    transition: all .18s ease;
    z-index: 20;
}

.story-reaction-box:hover .story-reactions-picker,
.story-reaction-box.is-open .story-reactions-picker{
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.reaction-btn{
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
    transition: transform .15s ease;
}

.reaction-btn:hover{
    transform: scale(1.25);
}

.active-reaction-icon{
    font-size: 16px;
    line-height: 1;
}