﻿
:root {
    /* رنگ‌های پیش‌فرض */
    --primary-50: 245, 243, 255;
    --primary-100: 237, 233, 254;
    --primary-200: 221, 214, 254;
    --primary-300: 196, 181, 253;
    --primary-400: 167, 139, 250;
    --primary-500: 139, 92, 246;
    --primary-600: 124, 58, 237;
    --primary-700: 109, 40, 217;
    --primary-800: 91, 33, 182;
    --primary-900: 76, 29, 149;
    --secondary-500: 16, 185, 129;
    --accent-500: 245, 158, 11;
    --light-100: 248, 250, 252;
    --light-200: 241, 245, 249;
    --light-300: 226, 232, 240;
    --dark-700: 51, 65, 85;
    --dark-800: 30, 41, 59;
    --dark-900: 15, 23, 42;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: rgb(var(--light-100));
    color: rgb(var(--dark-800));
}


/* هدر مینیمال */
header {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* منوی دسته‌بندی افقی */
.categories-container {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgb(var(--primary-600)) rgb(var(--light-200));
}

    .categories-container::-webkit-scrollbar {
        height: 6px;
    }

    .categories-container::-webkit-scrollbar-track {
        background: rgb(var(--light-200));
        border-radius: 3px;
    }

    .categories-container::-webkit-scrollbar-thumb {
        background-color: rgb(var(--primary-600));
        border-radius: 3px;
    }

.category-item {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    margin: 0 0.5rem;
    border-radius: 12px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

    .category-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-2px);
        border-color: rgba(var(--primary-500), 0.3);
    }

    .category-item.active {
        background-color: rgb(var(--primary-600));
        color: white;
    }

.category-icon {
    margin-left: 0.5rem;
    font-size: 1.1rem;
}

/* کارت محصول جدید */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

    .product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
        border-color: rgba(var(--primary-500), 0.2);
    }

.product-image-container {
    height: 320px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgb(var(--light-200)) 0%, rgb(var(--light-300)) 100%);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

/* گالری تمام صفحه جدید */
.fullscreen-gallery {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.98);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.gallery-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.gallery-main-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: zoom-in;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

    .gallery-main-img.zoomed {
        transform: scale(2);
        cursor: zoom-out;
    }

/* سایدبار اطلاعات محصول */
.gallery-sidebar {
    flex: 0 0 350px;
    background-color: white;
    padding: 2.5rem;
    overflow-y: auto;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
}

/* دکمه‌های نویگیشن جدید */
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    color: rgb(var(--primary-600));
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .gallery-nav-btn:hover {
        background-color: rgb(var(--primary-600));
        color: white;
        transform: translateY(-50%) scale(1.1);
    }

.gallery-prev {
    right: 30px;
}

.gallery-next {
    left: 30px;
}

/* دکمه بستن جدید */
.gallery-close {
    background-color: white;
    position: absolute;
    top: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgb(var(--primary-600));
    font-size: 1.5rem;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .gallery-close:hover {
        background-color: rgb(var(--primary-600));
        color: white;
        transform: scale(1.1);
    }

/* تامبنیل‌ها */
.gallery-thumbnails {
    padding: 1.5rem;
    overflow-x: auto;
    white-space: nowrap;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: white;
}

.thumbnail-item {
    display: inline-block;
    width: 80px;
    height: 80px;
    margin: 0 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

    .thumbnail-item:hover {
        border-color: rgb(var(--primary-600));
        transform: translateY(-3px);
    }

    .thumbnail-item.active {
        border-color: rgb(var(--primary-600));
        box-shadow: 0 4px 12px rgba(var(--primary-500), 0.3);
    }

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* آیکن پلی برای ویدیوها */
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* شمارنده تصاویر */
.image-counter {
    color: white;
    font-size: 0.9rem;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    backdrop-filter: blur(4px);
}

/* تب‌های موبایل */
.mobile-tabs {
    display: none;
    background-color: white;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-tabs-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-tab-btn {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background-color: transparent;
    color: rgb(var(--dark-700));
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
}

    .mobile-tab-btn.active {
        background-color: rgb(var(--primary-600));
        color: white;
    }

/* اسپینر لودینگ */
.loader-spinner {
    border: 4px solid rgba(var(--primary-500), 0.1);
    border-top: 4px solid rgb(var(--primary-600));
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* پنل تنظیمات رنگ */
.settings-panel {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    width: 320px;
    max-width: 90vw;
}

    .settings-panel.expanded {
        transform: translateX(0);
    }

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: rgb(var(--primary-600));
    color: white;
    border-radius: 12px 12px 0 0;
}

.settings-content {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

.color-logoOptions {
    margin-bottom: 1rem;
}

.color-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: rgb(var(--dark-800));
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.color-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.color-input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid rgb(var(--light-300));
    border-radius: 6px;
    font-family: 'Vazirmatn', sans-serif;
}

.reset-btn {
    margin-top: 1rem;
    width: 100%;
    padding: 0.75rem;
    background-color: rgb(var(--light-100));
    border: 1px solid rgb(var(--light-300));
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Vazirmatn', sans-serif;
}

    .reset-btn:hover {
        background-color: rgb(var(--light-200));
    }


/* اضافه کردن استایل‌های جدید برای ویدیوها */

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* نسبت تصویر 16:9 */
    overflow: hidden;
    border-radius: 12px;
    background-color: #000;
}

    .video-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: none;
    }

.video-fullscreen-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10;
}

    .video-fullscreen-btn:hover {
        background: rgba(0,0,0,0.7);
    }

/* برای حالت تمام صفحه */
.video-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

    .video-fullscreen iframe {
        width: 90%;
        height: 90%;
    }

.close-fullscreen {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 1001;
}

/* رسپانسیو */
@media (max-width: 1024px) {
    .gallery-sidebar {
        flex: 0 0 300px;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .gallery-content {
        flex-direction: column;
    }

    .gallery-main {
        flex: 0 0 60%;
        padding: 1rem;
    }

    .gallery-sidebar {
        flex: 0 0 40%;
        width: 100%;
        padding: 1.5rem;
    }

    .mobile-tabs {
        display: block;
    }

    .gallery-nav-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .gallery-close {
        top: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }

    .category-item {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    /* نمایش تب‌های موبایل */
    .mobile-tab-content {
        display: none;
    }

        .mobile-tab-content.active {
            display: block;
        }

    .settings-panel {
        top: 70px;
        right: 10px;
        width: 280px;
    }
}

@media (max-width: 480px) {
    .thumbnail-item {
        width: 60px;
        height: 60px;
    }

    .gallery-main-img {
        max-height: 60vh;
    }

    .category-item {
        padding: 0.5rem 0.75rem;
        margin: 0 0.25rem;
        font-size: 0.85rem;
    }

    .settings-panel {
        width: 260px;
    }
}

