/* ═══════════════════════════════════════════════════════════
   UpMobile Theme - Archive Product (Shop)
   ═══════════════════════════════════════════════════════════ */

html, body {
    overflow-x: clip !important;
    max-width: 100vw !important;
}

.up-shop-wrapper {
    width: 100%;
    background: #f4f6f9;
    padding: 25px 0 50px;
    direction: rtl;
}

/* فاصله در موبایل برای منوی پایین */
@media (max-width: 768px) {
    .up-shop-wrapper {
        padding-bottom: 90px !important; 
    }
}

.up-shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 25px;
    box-sizing: border-box;
}

/* Breadcrumb */
.up-shop-breadcrumb {
    margin-bottom: 20px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    font-size: 12.5px;
    color: #777;
}
.up-shop-breadcrumb a { color: #4837F3; text-decoration: none; }
.up-shop-breadcrumb .sep { color: #ccc; margin: 0 5px; }
.up-breadcrumb-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }

/* بخش‌بندی */
.up-shop-section-title {
    margin: 25px 0 15px;
    padding-right: 12px;
    border-right: 4px solid #4837F3;
}
.up-shop-section-title h2 { font-size: 18px; font-weight: 900; color: #222; margin: 0; }

/* اسلایدرها */
.up-shop-slider-wrap {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.up-shop-slider {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    scrollbar-width: none;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
.up-shop-slider::-webkit-scrollbar { display: none; }
.up-shop-slider:active { cursor: grabbing; }

/* آیتم دسته‌بندی */
.up-shop-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    width: 90px;
    transition: transform 0.3s;
}
.up-shop-cat-item:hover { transform: translateY(-4px); }

.up-shop-cat-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #f0f0f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s;
}
.up-shop-cat-item:hover .up-shop-cat-img { border-color: #4837F3; box-shadow: 0 6px 15px rgba(72,55,243,0.15); }
.up-shop-cat-img img { width: 100%; height: 100%; object-fit: contain; }
.up-shop-cat-name { font-size: 12px; font-weight: 700; color: #333; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* آیتم برند */
.up-shop-brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    flex-shrink: 0;
    width: 90px;
    transition: transform 0.3s;
}
.up-shop-brand-item:hover { transform: translateY(-4px); }
.up-shop-brand-img {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: all 0.3s;
}
.up-shop-brand-item:hover .up-shop-brand-img { border-color: #4837F3; }
.up-shop-brand-img img { width: 100%; height: 100%; object-fit: contain; }
.up-shop-brand-img.no-logo::before { content: attr(data-initial); font-size: 24px; font-weight: 900; color: #4837F3; }
.up-shop-brand-name { font-size: 12px; font-weight: 700; color: #333; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }

/* فیلترها */
.up-shop-filters-bar {
    background: #fff;
    padding: 15px 20px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    margin-bottom: 25px;
}
.up-shop-filter-form { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.up-shop-filter-group { display: flex; align-items: center; gap: 10px; }
.up-shop-filter-group label { font-size: 13px; font-weight: 700; color: #555; white-space: nowrap; }
.up-shop-filter-group select {
    padding: 8px 15px;
    border: 1.5px solid #e6e8f5;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    color: #333;
    background: #f9fafc;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}
.up-shop-filter-group select:focus { border-color: #4837F3; background: #fff; }
.up-shop-filter-reset { font-size: 12px; color: #e63946; text-decoration: none; font-weight: 700; margin-right: auto; }
.up-shop-filter-reset:hover { text-decoration: underline; }

/* هدر محصولات */
.up-shop-products-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}
.up-shop-title { font-size: 22px; font-weight: 900; color: #222; margin: 0; }
.up-shop-count { font-size: 13px; color: #777; font-weight: 600; }

/* گرید محصولات */
.woocommerce ul.products, ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 15px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product, ul.products li.product {
    width: 100% !important; margin: 0 !important; padding: 0 !important;
    float: none !important; clear: none !important;
}

/* کارت محصول */
.up-uni-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1.5px solid #f0f0f5;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}
.up-uni-card:hover { transform: translateY(-5px); box-shadow: 0 12px 28px rgba(72, 55, 243, 0.12); border-color: rgba(72, 55, 243, 0.2); }
.up-uni-percent { position: absolute; top: 12px; right: 12px; background: linear-gradient(145deg, #FF6B35, #e85a2a); color: #fff; font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 8px; z-index: 3; box-shadow: 0 4px 12px rgba(255,107,53,0.4); }
.up-uni-img { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1; background: #f9fafc; border-radius: 12px; overflow: hidden; margin-bottom: 12px; padding: 10px; text-decoration: none; }
.up-uni-img img { width: 100% !important; height: 100% !important; object-fit: contain !important; transition: transform 0.4s ease; }
.up-uni-card:hover .up-uni-img img { transform: scale(1.08); }
.up-uni-info { display: flex; flex-direction: column; gap: 8px; flex: 1; }
.up-uni-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.up-uni-badge-installment { display: inline-flex; align-items: center; background: linear-gradient(135deg, #e8f5e9, #d4edda); color: #2e7d32; font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 6px; border: 1px solid #c8e6c9; }
.up-uni-title { display: -webkit-box; font-size: 13px; font-weight: 700; color: #222 !important; line-height: 1.5; text-decoration: none; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 39px; margin: 0; }
.up-uni-title:hover { color: #4837F3 !important; }
.up-uni-price { margin-top: auto; padding-top: 10px; border-top: 1px dashed #eee; font-size: 14.5px; font-weight: 900; color: #222; }
.up-uni-price ins, .up-uni-price .woocommerce-Price-amount { color: #222 !important; text-decoration: none !important; font-weight: 900 !important; }
.up-uni-price del { font-size: 11px; color: #999; font-weight: 500; text-decoration: line-through; display: block; margin-bottom: 2px; }
.up-uni-btn-wrap { margin-top: 10px; }
.up-uni-btn-wrap .button { display: flex !important; align-items: center !important; justify-content: center !important; width: 100% !important; padding: 10px 15px !important; background: linear-gradient(135deg, #4837F3, #6b5bff) !important; color: #fff !important; border-radius: 10px !important; font-size: 13px !important; font-weight: 700 !important; text-decoration: none !important; border: none !important; margin: 0 !important; transition: all 0.3s ease !important; box-shadow: 0 4px 12px rgba(72,55,243,0.2) !important; cursor: pointer; }
.up-uni-btn-wrap .button:hover { box-shadow: 0 6px 18px rgba(72,55,243,0.4) !important; transform: translateY(-2px); }

/* صفحه‌بندی (اصلاح شده برای دسکتاپ و موبایل) */
.woocommerce-pagination, .up-shop-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    width: 100%;
}
.woocommerce-pagination ul.page-numbers {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-wrap: wrap;
}
.woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
}
.woocommerce-pagination ul.page-numbers li .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1.5px solid #e6e8f5;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}
.woocommerce-pagination ul.page-numbers li .page-numbers.current, 
.woocommerce-pagination ul.page-numbers li .page-numbers:hover {
    background: #4837F3;
    color: #fff;
    border-color: #4837F3;
    box-shadow: 0 4px 12px rgba(72,55,243,0.3);
}

/* ═══════════════════════════════════════════════════════════
   ریسپانسیو
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
    .woocommerce ul.products, ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}

@media (max-width: 992px) {
    .up-shop-filter-form { flex-direction: column; align-items: stretch; }
    .up-shop-filter-group { justify-content: space-between; }
    .up-shop-filter-group select { flex: 1; }
    .up-shop-filter-reset { text-align: center; margin-top: 10px; }
    .up-shop-slider { padding: 10px 0; gap: 12px; }
}

@media (max-width: 768px) {
    .up-shop-container { padding: 0 15px; }
    .up-shop-wrapper { padding: 15px 0 30px; }

    /* فیلترها در موبایل */
    .up-shop-filters-bar {
        padding: 15px;
    }
    .up-shop-filter-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        width: 100%;
    }
    .up-shop-filter-group select {
        width: 100%;
        padding: 12px;
    }

    /* گرید ۲ ستونه در موبایل */
    .woocommerce ul.products, ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .up-shop-title { font-size: 18px; }

    /* کوچک‌تر کردن اسلایدرها */
    .up-shop-cat-item, .up-shop-brand-item { width: 75px; }
    .up-shop-cat-img, .up-shop-brand-img { width: 65px; height: 65px; }
    .up-shop-cat-name, .up-shop-brand-name { font-size: 11px; }
    
    /* اصلاح کارت محصول در موبایل */
    .up-uni-card { padding: 10px; border-radius: 12px; }
    .up-uni-title { font-size: 12px; min-height: 36px; }
    .up-uni-price { font-size: 13.5px; }
    .up-uni-btn-wrap .button { font-size: 11.5px !important; padding: 8px !important; }
    .up-uni-badge-installment { font-size: 9px; padding: 3px 6px; }

    /* صفحه‌بندی در موبایل - اصلاح شده */
    .woocommerce-pagination ul.page-numbers li .page-numbers {
        width: 34px;
        height: 34px;
        font-size: 13px;
        border-radius: 8px;
    }
}






/* ═══════════════════════════════════════════════════════════
   استایل پاپ‌آپ اعلان موجودی
   ═══════════════════════════════════════════════════════════ */
.up-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 40, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.up-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.up-modal-content {
    background: #fff;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 30px 25px;
    position: relative;
    text-align: center;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}

.up-modal-overlay.is-active .up-modal-content {
    transform: translateY(0);
}

.up-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f4f6f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: #777;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}
.up-modal-close:hover { background: #e63946; color: #fff; }

.up-modal-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.up-icon-success { background: #e8f5e9; color: #2e7d32; }

.up-modal-title { font-size: 18px; font-weight: 900; color: #222; margin: 0 0 10px; }
.up-modal-desc { font-size: 13.5px; color: #666; margin: 0 0 20px; line-height: 1.6; }

.up-input {
    width: 100%;
    padding: 12px 15px;
    border: 1.5px solid #e6e8f5;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    outline: none;
    transition: 0.2s;
    direction: ltr;
}
.up-input:focus { border-color: #4837F3; box-shadow: 0 0 0 3px rgba(72,55,243,0.1); }

.up-modal-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4837F3, #6b5bff);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.up-modal-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(72,55,243,0.3); }
.up-modal-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.up-otp-msg { font-size: 13px; color: #555; margin-bottom: 15px; }
.up-otp-msg span { font-weight: 800; color: #4837F3; direction: ltr; display: inline-block; }