        /* ====================================
 * PREVIEW MODAL STYLES
 * ==================================== */

/* Modal Overlay */
.preview-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow: hidden;
}

.preview-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Container */
.preview-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    background: var(--bg-color-2);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Modal Header */
.preview-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--navlinks-bg-color);
    color: var(--text-color-1);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.preview-modal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.preview-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-color-1);
}

.preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--lighter-text);
}

.preview-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.buy-now-btn {
    background: var(--orange-btn-bg);
    color: var(--orange-btn-color);
    padding: 8px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
     box-shadow: var(--cards-shadow);
}

.buy-now-btn:hover {
    //transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.preview-modal-close {
    background: var(--bg-color-2);
    border: 1px solid var(--btns-border);
    color: red;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: var(--cards-shadow);
}

.preview-modal-close:hover {
    background: red;
    color: white;
    transform: rotate(90deg);
}

/* Modal Body */
.preview-modal-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--bg-color-1);
    padding: 20px;
}

/* Image Container */
.preview-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* Navigation Arrows */
.preview-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    z-index: 10;
}

.preview-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--link-color);
    transform: translateY(-50%) scale(1.1);
}

.preview-nav-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.preview-prev-btn {
    left: 20px;
}

.preview-next-btn {
    right: 20px;
}

/* Loading State */
.preview-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color-1);
    font-size: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.preview-loading i {
    font-size: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Error State */
.preview-error {
    color: var(--red-text);
    font-size: 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.preview-error i {
    font-size: 60px;
    color: var(--red-text);
}

/* Image Counter */
.preview-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 10;
}

/* Thumbnail Strip */
.preview-thumbnails {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: var(--bg-color-2);
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    overflow-y: hidden;
}

.preview-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 10px;
    overflow: hidden;
    //border: 3px solid transparent;
    border: 3px solid var(--btns-border);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.preview-thumbnail:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.preview-thumbnail.active {
    border-color: var(--link-color);
    opacity: 1;
}

.preview-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom Scrollbar for Thumbnails */
.preview-thumbnails::-webkit-scrollbar {
    height: 8px;
}

.preview-thumbnails::-webkit-scrollbar-track {
    background: var(--bg-color-1);
    border-radius: 4px;
}

.preview-thumbnails::-webkit-scrollbar-thumb {
    background: var(--webkit-bg);
    border-radius: 4px;
}

.preview-thumbnails::-webkit-scrollbar-thumb:hover {
    background: var(--webkit-hover);
}

/* ==============================================
   RESPONSIVE STYLES FOR PREVIEW MODAL
   ============================================== */

/* Tablet view (up to 768px) */
@media (max-width: 768px) {
    .preview-modal-container {
        width: 95%;
        height: 85vh;
    }
    
    .preview-modal-header {
        padding: 12px 15px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-modal-title {
        font-size: 1rem;
    }
    
    .preview-meta {
        font-size: 0.85rem;
        gap: 8px;
    }
    
    .preview-modal-close {
        width: 36px;
        height: 36px;
        font-size: 18px;
        align-self: flex-end;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .buy-now-btn {
        padding: 6px 12px;
        font-size: 0.9rem;
    }
    
    .preview-nav-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .preview-prev-btn {
        left: 10px;
    }
    
    .preview-next-btn {
        right: 10px;
    }
    
    .preview-thumbnail {
        width: 70px;
        height: 70px;
    }
}

/* Mobile view (up to 480px) */
@media (max-width: 480px) {
    .preview-modal-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .preview-modal-header {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
    }
    
    .preview-modal-title {
        font-size: 0.9rem;
    }
    
    .preview-meta {
        font-size: 0.8rem;
        gap: 6px;
        justify-content: flex-start;
    }
    
    .preview-modal-close {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .preview-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .buy-now-btn {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
    
    .preview-modal-body {
        padding: 10px;
    }
    
    .preview-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .preview-prev-btn {
        left: 5px;
    }
    
    .preview-next-btn {
        right: 5px;
    }
    
    .preview-counter {
        bottom: 15px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .preview-thumbnails {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .preview-thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* Very small mobile (up to 320px) */
@media (max-width: 320px) {
    .preview-modal-title {
        font-size: 0.8rem;
    }
    
    .preview-meta {
        font-size: 0.75rem;
        gap: 4px;
    }
    
    .preview-modal-close {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .buy-now-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    .preview-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .preview-thumbnail {
        width: 50px;
        height: 50px;
    }
}