.category-filter-wrapper {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-filter-wrapper::-webkit-scrollbar {
    display: none;
}
.category-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    color: #495057;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}
.category-item:hover, .category-item.active {
    background-color: #FF096A;
    color: #ffffff;
    border-color: #FF096A;
}

.video-grid {
    margin-top: 20px;
}
.video-card {
    display: block;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background-color: #e9ecef;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}
.video-card:hover {
    transform: translateY(-5px);
}
.video-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 30px 15px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: #ffffff;
}
.video-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.video-meta {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.9;
}
.video-meta i, .video-meta svg {
    margin-left: 5px;
}


 .custom-sv-modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 99999; display: flex; align-items: center; justify-content: center; direction: rtl; }
.custom-sv-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); }
.custom-sv-wrapper { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; }

.custom-sv-container { position: relative; width: 100%; max-width: 400px; height: 100vh; max-height: 800px; background: #000; border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); display: flex; flex-direction: column; }
#sv-video-player { width: 100%; flex: 1; min-height: 0; object-fit: cover; }
.custom-sv-header { position: absolute; top: 0; left: 0; width: 100%; padding: 15px; display: flex; align-items: center; z-index: 10; color: #fff; background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%); }
.sv-close-btn { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; padding: 0 0 0 15px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.sv-title-text { font-size: 14px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }

.custom-sv-next-btn, .custom-sv-preview-btn { position: absolute; left: calc(50% + 220px); background: rgba(255,255,255,0.2); border: 2px solid #fff; color: #fff; border-radius: 50%; width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; z-index: 10; transition: all 0.3s; }
.custom-sv-next-btn { bottom: 90%; }
.custom-sv-preview-btn { top: 90%; }
.custom-sv-next-btn:hover, .custom-sv-preview-btn:hover { background: rgba(255,255,255,0.4); }

@media (max-width: 900px) {
    .custom-sv-next-btn { left: 15px; top: auto; bottom: 50%; }
    .custom-sv-preview-btn { left: 15px; bottom: auto; top: 50%; }
}

.custom-sv-actions { background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(5px);  position: absolute; right: 15px; bottom: 250px; display: flex; flex-direction: column; gap: 10px; z-index: 10; padding: 10px; }
.sv-action-item { display: flex; flex-direction: column; align-items: center; color: #fff; cursor: pointer; }

.sv-action-item i {width: 25px; height: 20px; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 5px; color: #ffffff; transition: background 0.3s; }
.sv-action-item span { font-size: 13px; font-weight: bold; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }

.sv-center-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255, 255, 255, 0.8); font-size: 60px; pointer-events: none; z-index: 5; text-shadow: 0 0 15px rgba(0,0,0,0.5); }
.text-danger i { color: #ff2a5f !important; }

.custom-sv-bottom { width: 100%; padding: 15px; display: flex; flex-direction: column; gap: 10px; z-index: 10; background: #111; /* پس زمینه تیره زیر ویدیو */ border-top: 1px solid #222; }

.sv-progress-container { width: 100%; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; overflow: hidden; margin-bottom: 5px; }
.sv-progress-bar { width: 0%; height: 100%; background: #e91e63; border-radius: 2px; transition: width 0.1s linear; }

.sv-products-wrapper { width: 100%; overflow: hidden; }
.sv-products-scroll { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 10px; padding-bottom: 5px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; cursor: grab; -ms-overflow-style: none; scrollbar-width: none; }
.sv-products-scroll::-webkit-scrollbar { display: none; }
.sv-products-scroll.active { cursor: grabbing; }
.sv-products-scroll a, .sv-products-scroll img { user-select: none; -webkit-user-drag: none; }

.sv-product-item { flex: 0 0 auto; width: 220px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(8px); border-radius: 12px; display: flex; padding: 8px; align-items: center; gap: 10px; text-decoration: none; border: 1px solid rgba(255, 255, 255, 0.1); transition: transform 0.2s ease; }
.sv-product-item:active { transform: scale(0.98); }
.sv-product-img { width: 50px; height: 50px; border-radius: 8px; object-fit: cover; background-color: #fff; }
.sv-product-info { display: flex; flex-direction: column; justify-content: center; overflow: hidden; width: 100%; }
.sv-product-title { color: #333; font-size: 12px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; text-align: right; }
.sv-product-price-box { display: flex; flex-direction: column; align-items: flex-end; }
.sv-price-discount { color: #ff6b6b; font-size: 10px; text-decoration: line-through; line-height: 1; }
.sv-price-main { color: #4ade80; font-size: 13px; font-weight: bold; }
.custom-sv-comments-panel { position: absolute; bottom: -100%; left: 0; width: 100%; height: 70%; background: #fff; border-radius: 20px 20px 0 0; z-index: 20; transition: bottom 0.3s ease-in-out; display: flex; flex-direction: column; direction: rtl; }
.custom-sv-comments-panel.active { bottom: 0; }

.comments-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 20px 10px 20px; border-bottom: 1px solid #f0f0f0; }
.comments-panel-header h3 { font-size: 16px; font-weight: bold; color: #000; margin: 0; }
.close-comments-btn { background: none; border: none; font-size: 20px; color: #aaa; cursor: pointer; padding: 0; }

.sv-comments-list { flex-grow: 1; overflow-y: auto; padding: 15px 20px; }
.comment-item { padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid #f9f9f9; }
.comment-item:last-child { border-bottom: none; }
.comment-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.comment-user-info { display: flex; align-items: center; gap: 8px; }
.comment-user-info strong { font-size: 14px; font-weight: bold; color: #222; }
.comment-time { font-size: 12px; color: #a0a0a0; }
.comment-like { display: flex; align-items: center; gap: 5px; color: #a0a0a0; font-size: 13px; cursor: pointer; }
.comment-like i { font-size: 16px; }
.comment-body { font-size: 14px; color: #444; line-height: 1.7; margin-bottom: 8px; text-align: right; }
.comment-reply-action { font-size: 12px; color: #a0a0a0; cursor: pointer; text-align: right; }
.comment-reply-wrapper { padding-right: 40px; margin-top: 15px; }

.comments-panel-footer { padding: 15px 20px; border-top: 1px solid #f0f0f0; background: #fff; }
.reply-indicator { display: flex; justify-content: space-between; align-items: center; background-color: #f0f2f5; padding: 8px 12px; border-radius: 8px 8px 0 0; font-size: 12px; color: #555; margin-bottom: -5px; border: 1px solid #ddd; border-bottom: none; }
.cancel-reply-btn { background: none; border: none; color: #888; cursor: pointer; font-size: 14px; padding: 0; }
.cancel-reply-btn:hover { color: #e74c3c; }

.comment-input-wrapper { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.comment-input-style { flex-grow: 1; border: 1px solid #e0e0e0; border-radius: 10px; padding: 12px 15px; font-size: 14px; outline: none; direction: rtl; width: 100%; }
.comment-input-style::placeholder { color: #bbb; }
.comment-submit-btn { background-color: #333; color: #fff; border: none; border-radius: 10px; padding: 0 20px; height: 45px; font-size: 14px; cursor: pointer; transition: background-color 0.2s ease; }
.comment-submit-btn:hover { background-color: #555; }
.custom-sv-next-btn.disabled,
.custom-sv-preview-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}
