﻿

/* Header */
.header-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    transition: all 0.3s;
}

    .header-sticky.scrolled {
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }

/* Product Card */
.product-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

    .product-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    }

.product-card-img {
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, #FFE5EC 0%, #E8D5F2 100%);
    position: relative;
    overflow: hidden;
}

    .product-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }

.product-card:hover .product-card-img img {
    transform: scale(1.08);
}

.product-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

    .product-action-btn:hover {
        background: linear-gradient(135deg, #FF6B9D, #C44569);
        color: white;
        transform: scale(1.1);
    }

    .product-action-btn.liked {
        background: linear-gradient(135deg, #FF6B9D, #C44569);
        color: white;
    }

/* Badge */
.badge-new {
    background: linear-gradient(135deg, #FFD6E0, #FFE5D0);
    color: #C44569;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-sale {
    background: linear-gradient(135deg, #FF6B9D, #FF8FA3);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Sidebar Filter */
.filter-section {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid rgba(0,0,0,0.05);
}

.filter-title {
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.3s;
}

    .filter-item:hover {
        color: #FF6B9D;
    }

.custom-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 2px solid #D1D5DB;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    flex-shrink: 0;
}

.filter-item.active .custom-checkbox {
    background: linear-gradient(135deg, #FF6B9D, #C44569);
    border-color: #FF6B9D;
    color: white;
}

.custom-checkbox i {
    opacity: 0;
    transition: opacity 0.3s;
}

.filter-item.active .custom-checkbox i {
    opacity: 1;
}

.filter-count {
    margin-right: auto;
    font-size: 0.75rem;
    color: #9CA3AF;
}

/* Color Filter */
.color-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
    position: relative;
}

    .color-swatch:hover, .color-swatch.active {
        border-color: #FF6B9D;
        transform: scale(1.1);
    }

/* Size Filter */
.size-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.size-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 2px solid rgba(0,0,0,0.1);
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .size-btn:hover {
        border-color: #FF6B9D;
        color: #FF6B9D;
    }

    .size-btn.active {
        background: linear-gradient(135deg, #FF6B9D, #C44569);
        color: white;
        border-color: #FF6B9D;
    }



/* Sort & View Controls */
.controls-bar {
    background: white;
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    border: 1px solid rgba(0,0,0,0.05);
}

.view-toggle {
    display: flex;
    gap: 4px;
    background: #F3F4F6;
    padding: 4px;
    border-radius: 12px;
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: #6B7280;
}

    .view-btn.active {
        background: white;
        color: #FF6B9D;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

.sort-select {
    padding: 10px 16px;
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    background: white;
    transition: border-color 0.3s;
}

    .sort-select:focus {
        outline: none;
        border-color: #FF6B9D;
    }

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border-radius: 14px;
    background: white;
    border: 2px solid rgba(0,0,0,0.08);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .page-btn:hover:not(.active):not(.disabled) {
        border-color: #FF6B9D;
        color: #FF6B9D;
        transform: translateY(-2px);
    }

    .page-btn.active {
        background: linear-gradient(135deg, #FF6B9D, #C44569);
        color: white;
        border-color: #FF6B9D;
        box-shadow: 0 6px 16px rgba(255,107,157,0.3);
    }

    .page-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

/* List View */
.list-view .product-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
}

.list-view .product-card-img {
    aspect-ratio: 1;
}

/* Filter Drawer (Mobile) */
.filter-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: white;
    z-index: 100;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -10px 0 40px rgba(0,0,0,0.1);
}

    .filter-drawer.active {
        right: 0;
    }

.filter-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    z-index: 99;
}

    .filter-drawer-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* Active Filters Tags */
.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,107,157,0.1);
    color: #FF6B9D;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

    .active-filter-tag:hover {
        background: rgba(255,107,157,0.2);
    }

/* Breadcrumb */
.breadcrumb-link {
    color: #6B7280;
    transition: color 0.3s;
}

    .breadcrumb-link:hover {
        color: #FF6B9D;
    }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #FF6B9D 0%, #C44569 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    transition: all 0.4s;
    box-shadow: 0 6px 16px rgba(255,107,157,0.3);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 24px rgba(255,107,157,0.45);
    }

.btn-secondary {
    background: white;
    color: #FF6B9D;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    border: 2px solid #FF6B9D;
    transition: all 0.3s;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

    .btn-secondary:hover {
        background: #FF6B9D;
        color: white;
    }

/* Scrollbar */
.sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFD6E0, #E8D5F2);
    border-radius: 10px;
}

/* Collapse animation */
.filter-content {
    overflow: hidden;
    transition: max-height 0.4s ease;
}

    .filter-content.collapsed {
        max-height: 0 !important;
    }

.filter-chevron {
    transition: transform 0.3s;
}

.filter-title.collapsed .filter-chevron {
    transform: rotate(-90deg);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(200%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    border-right: 4px solid #10B981;
}

    .toast.show {
        transform: translateY(0);
    }

@media (max-width: 1024px) {
    .sidebar-desktop {
        display: none;
    }
}


/* لودینگ اسپینر */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 30px;
    direction: rtl;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-container span {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
}

/* اسکلتون لودینگ (حرفه‌ای‌تر) */
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.skeleton-card {
    background: #f1f5f9;
    border-radius: 12px;
    padding: 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 150px;
    background: #e2e8f0;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-title {
    height: 20px;
    background: #e2e8f0;
    border-radius: 4px;
    margin-bottom: 8px;
    width: 80%;
}

.skeleton-price {
    height: 18px;
    background: #e2e8f0;
    border-radius: 4px;
    width: 60%;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* پیام خطا */
.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
}

    .error-message button {
        background: none;
        border: none;
        font-size: 18px;
        cursor: pointer;
        color: #dc2626;
    }