/**
 * Skeleton Loader Styles
 * استایل‌های لودینگ اسکلتی برای کل سایت
 */

/* استایل‌های پایه اسکلت - مشابه فیسبوک */
.skeleton-wrapper {
    width: 100%;
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ==================== اسکلت هدر دسکتاپ ==================== */
/* استایل‌های هدر در header-pc.css قرار دارند */

/* ==================== اسکلت هدر موبایل ==================== */
.header-mobile-skeleton .skeleton-notice {
    width: 100%;
    height: 40px;
    margin-bottom: 10px;
}

.header-mobile-skeleton .skeleton-mobile-search {
    padding: 10px 15px;
}

.header-mobile-skeleton .skeleton-search-bar {
    width: 100%;
    height: 50px;
}

/* ==================== اسکلت آرشیو محصولات ==================== */
.archive-skeleton {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Breadcrumb */
.skeleton-breadcrumb {
    margin-bottom: 20px;
}

.skeleton-breadcrumb-item {
    height: 20px;
    width: 250px;
}

/* Archive Wrapper */
.skeleton-archive-wrapper {
    display: flex;
    gap: 25px;
}

/* Sidebar */
.skeleton-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.skeleton-filter-box {
    background: #fff;
    border-radius: 16px;
    padding: 10px;
    border: 1px solid #e0e0e2;
}

.skeleton-filter-box .skeleton-filter-header {
    height: 50px;
    margin-bottom: 10px;
}

.skeleton-filter-group {
    border-bottom: 1px solid #f0f0f1;
    padding: 15px 0;
}

.skeleton-filter-group .skeleton-filter-title {
    height: 20px;
    width: 100px;
    margin-bottom: 12px;
}

.skeleton-filter-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-filter-items .skeleton-filter-item {
    height: 24px;
    width: 90%;
}

.skeleton-filter-box .skeleton-apply-btn {
    height: 45px;
    margin: 20px 0;
    border-radius: 10px;
}

/* Products Area */
.skeleton-products-area {
    flex: 1;
}

/* Sort Bar */
.skeleton-sort-bar {
    background: #fff;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skeleton-sort-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.skeleton-sort-left .skeleton-sort-icon {
    width: 20px;
    height: 20px;
}

.skeleton-sort-left .skeleton-sort-item {
    width: 80px;
    height: 18px;
}

.skeleton-sort-bar .skeleton-result-count {
    width: 80px;
    height: 20px;
}

/* Products Grid */
.skeleton-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.skeleton-product-card {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #eee;
}

.skeleton-product-card .skeleton-product-image {
    width: 100%;
    height: 200px;
    margin-bottom: 12px;
    border-radius: 8px;
}

.skeleton-product-card .skeleton-product-brand {
    height: 16px;
    width: 60%;
    margin-bottom: 8px;
}

.skeleton-product-card .skeleton-product-title {
    height: 18px;
    width: 100%;
    margin-bottom: 6px;
}

.skeleton-product-card .skeleton-product-title-line2 {
    height: 18px;
    width: 80%;
    margin-bottom: 12px;
}

.skeleton-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.skeleton-product-footer .skeleton-product-price {
    height: 24px;
    width: 100px;
}

.skeleton-product-footer .skeleton-product-cart-btn {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

/* Pagination */
.skeleton-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.skeleton-pagination .skeleton-page-item {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

/* ==================== اسکلت تک محصول ==================== */
.single-product-skeleton {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.skeleton-product-main {
    display: flex;
    gap: 40px;
    margin-top: 30px;
}

.skeleton-product-gallery {
    flex: 1;
}

.skeleton-product-gallery .skeleton-main-image {
    width: 100%;
    height: 500px;
    margin-bottom: 15px;
}

.skeleton-thumbnails {
    display: flex;
    gap: 10px;
}

.skeleton-thumbnails .skeleton-thumb {
    width: 80px;
    height: 80px;
}

.skeleton-product-info {
    flex: 1;
}

.skeleton-product-info .skeleton-product-title-large {
    height: 60px;
    margin-bottom: 20px;
}

.skeleton-product-info .skeleton-product-rating {
    height: 30px;
    width: 150px;
    margin-bottom: 20px;
}

.skeleton-product-info .skeleton-product-price-large {
    height: 50px;
    width: 200px;
    margin-bottom: 30px;
}

.skeleton-product-info .skeleton-product-meta {
    height: 100px;
    margin-bottom: 30px;
}

.skeleton-product-info .skeleton-add-to-cart {
    height: 60px;
}

/* ==================== اسکلت سبد خرید ==================== */
.cart-skeleton {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cart-skeleton .skeleton-page-title {
    height: 50px;
    width: 200px;
    margin-bottom: 30px;
}

.skeleton-cart-wrapper {
    display: flex;
    gap: 30px;
}

.skeleton-cart-items {
    flex: 2;
}

.skeleton-cart-item {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #eee;
}

.skeleton-cart-item .skeleton-cart-image {
    width: 100px;
    height: 100px;
}

.skeleton-cart-item .skeleton-cart-details {
    flex: 1;
    height: 100px;
}

.skeleton-cart-item .skeleton-cart-price {
    width: 120px;
    height: 40px;
}

.skeleton-cart-totals {
    flex: 1;
}

.skeleton-cart-totals .skeleton-totals-box {
    height: 300px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
}

/* ==================== اسکلت صفحه اصلی ==================== */
.home-skeleton {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.home-skeleton .skeleton-slider {
    height: 400px;
    margin-bottom: 40px;
}

.skeleton-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.skeleton-categories .skeleton-category-card {
    height: 150px;
}

.skeleton-products-section {
    margin-bottom: 40px;
}

.skeleton-products-section .skeleton-section-title {
    height: 50px;
    width: 300px;
    margin-bottom: 30px;
}

/* ==================== اسکلت پیش‌فرض ==================== */
.default-skeleton {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.default-skeleton .skeleton-content-large {
    height: 200px;
    margin-bottom: 20px;
}

.default-skeleton .skeleton-content-medium {
    height: 150px;
    margin-bottom: 20px;
}

.default-skeleton .skeleton-content-small {
    height: 100px;
}

/* ==================== ریسپانسیو ==================== */
@media (max-width: 992px) {
    .skeleton-archive-wrapper {
        flex-direction: column;
    }
    
    .skeleton-sidebar {
        width: 100%;
    }
    
    .skeleton-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .skeleton-product-main {
        flex-direction: column;
    }
    
    .skeleton-cart-wrapper {
        flex-direction: column;
    }
    
    .skeleton-categories {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .skeleton-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .skeleton-product-card .skeleton-product-image {
        height: 150px;
    }
    
    .skeleton-categories {
        grid-template-columns: repeat(2, 1fr);
    }
}
