﻿
body{
    direction:rtl;
    text-align:right;
}
.pr-filter-bar {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}
.img-wrapper {
    position: relative;
    width: 100%;
    background: #f3f4f6;
    /*border-radius: 12px;*/
    overflow: hidden;
}

.img-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hidden-product {
    display: none;
}
/* الحاوية */
.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

/* الزر */
.load-more-btn {
    position: relative;
    padding: 14px 36px;
    border-radius: 8px;
    border: none;
    background: #ff4d4f; /* لون أحمر AliExpress */
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

    /* Hover effect */
    .load-more-btn:hover {
        background: #ff7875;
        box-shadow: 0 6px 16px rgba(0,0,0,0.2);
        transform: translateY(-2px);
    }

    /* Click effect */
    .load-more-btn:active {
        transform: scale(0.97);
    }

    /* Spinner تحميل */
    .load-more-btn.loading .btn-text {
        visibility: hidden;
    }

.btn-spinner {
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.load-more-btn.loading .btn-spinner {
    display: block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 576px) {
    .load-more-btn {
        padding: 12px 28px;
        font-size: 14px;
    }
}

.pr-product-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
    .img-spinner::after {
        content: "";
        width: 32px;
        height: 32px;
        border: 3px solid #ddd;
        border-top-color: #28a745;
        border-radius:50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
    /* Input wrapper */
    .pr-filter-bar .input-wrapper {
        display: flex;
        width: 100%;
        max-width: 500px;
        background: #fff;
        border-radius: 50px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
        overflow: hidden;
        transition: box-shadow 0.3s ease;
    }

    /* Input field */
    .pr-filter-bar input {
        flex: 1;
        border: none;
        padding: 14px 20px;
        font-size: 16px;
        outline: none;
    }

        .pr-filter-bar input::placeholder {
            color: #999;
            opacity: 1;
        }

    /* Reset button */
    .pr-filter-bar .reset-btn {
        background: #0d6efd; /* Bootstrap primary color */
        border: none;
        color: #fff;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.3s ease;
        font-size: 18px;
        border-radius:50%;
    }

.pr-main-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0px;
    background: #f1f3f5;
    border-radius: 22px;
    padding: 0px 8px;
}

    .pr-main-search input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 13px;
        width: 100%;
    }
.pr-main-bar-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    padding: 10px 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,.08);
}
        .pr-filter-bar .reset-btn:hover {
            background: #0056b3;
        }

    /* Hover effect on input wrapper */
    .pr-filter-bar .input-wrapper:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    }

/* ===== GRID ===== */
.pr-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    width: 100%;
    margin: auto;
   
}

/* ===== CARD ===== */
.pr-product-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,.08);
    transition: .25s ease;
    position: relative;

}

    .pr-product-card:hover {
        transform: translateY(-5px);
    }

/* ===== DISCOUNT ===== */
.pr-discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

/* ===== IMAGE ===== */
.pr-product-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* ===== BODY ===== */
.pr-product-body {
    padding: 12px;
}

.pr-product-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* عدد الأسطر الفعلية التي تريد عرضها */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

    .pr-product-title::after {
        content: "\A"; /* سطر جديد */
        white-space: pre;
    }
.pr-product-desc {
    font-size: 12px;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== PRICE ===== */
.pr-product-price {
    margin: 8px 0;
    font-weight: 600;
    font-size: 14px;
}

.pr-price-now {
    color: #f97316;
    font-weight: 600;
}

/* ===== ADD TO CART ===== */
.pr-add-cart-btn {
    display: block;
    text-align: center;
    border-color: #f97316;
    color: #f97316;
    padding: 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

    .pr-add-cart-btn:hover {
        opacity: .9;
        color: #fff;
    }

@keyframes menuFade {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    .pr-filter-bar .input-wrapper {
        max-width: 100%;
        margin: 0 10px;
    }

    .pr-filter-bar input {
        padding: 12px 15px;
        font-size: 14px;
    }

    .pr-filter-bar .reset-btn {
        padding: 0 15px;
        font-size: 16px;
    }
}

