/* صفحة جميع المنتجات */

.products-catalog {
    padding: 110px 0 3.5rem;
    background: #f7f9fc;
    min-height: 70vh;
}

.products-catalog .catalog-top {
    margin-bottom: 1.35rem;
}

.products-catalog .catalog-head {
    margin-bottom: 1rem;
}

.products-catalog .catalog-title {
    color: #012346;
    font-weight: 800;
    font-size: clamp(1.35rem, 2.2vw, 1.75rem);
    margin: 0 0 0.25rem;
}

.products-catalog .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    list-style: none;
    background: transparent;
    padding: 0;
    margin: 0.15rem 0 0;
    font-size: 0.86rem;
}

.products-catalog .breadcrumb-item {
    display: inline-flex;
    align-items: center;
    float: none;
    padding: 0;
}

.products-catalog .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    float: none;
    padding: 0;
    margin: 0 0.45rem;
    color: #9fb3c8;
    font-weight: 600;
}

.products-catalog .breadcrumb a {
    color: #0063A5;
    text-decoration: none;
    white-space: nowrap;
}

.products-catalog .breadcrumb-item.active {
    color: #627d98;
    padding: 0;
}

/* أقسام أفقية */
.products-catalog .catalog-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid rgba(1, 35, 70, 0.07);
    border-radius: 18px;
}

.products-catalog .cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    color: #243b53;
    font-weight: 700;
    font-size: 0.88rem;
    background: #f0f4f8;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.products-catalog .cat-chip:hover {
    background: #e4ecf5;
    color: #012346;
}

.products-catalog .cat-chip.active {
    background: #012346;
    color: #fff;
}

.products-catalog .catalog-intro {
    margin: 0.75rem 0 0;
    color: #486581;
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 720px;
}

.products-catalog .catalog-subcats {
    margin-top: 0.65rem;
    background: #f8fbfe;
}

.products-catalog .cat-chip-sub {
    background: #fff;
    border: 1px solid rgba(1, 35, 70, 0.08);
    font-weight: 600;
}

/* شبكة المنتجات */
.products-catalog .products-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.products-catalog .p-card {
    background: #fff;
    border: 1px solid rgba(1, 35, 70, 0.07);
    border-radius: 18px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.products-catalog .p-card:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 99, 165, 0.22);
}

.products-catalog .p-card-image {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eef3f8;
}

.products-catalog .p-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.products-catalog .p-card:hover .p-card-image img {
    transform: scale(1.04);
}

.products-catalog .p-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #012346;
    color: #fff;
    padding: 0.28rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    z-index: 2;
}

.products-catalog .p-badge.soldout {
    background: #6c757d;
}

.products-catalog .p-card-body {
    padding: 0.85rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.products-catalog .p-title {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
    min-height: 2.7em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.products-catalog .p-title a {
    color: #012346;
    text-decoration: none;
}

.products-catalog .p-title a:hover {
    color: #0063A5;
}

.products-catalog .p-price {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.products-catalog .p-price-old {
    color: #829ab1;
    text-decoration: line-through;
    font-size: 0.78rem;
}

.products-catalog .p-price-now {
    color: #0063A5;
    font-weight: 800;
    font-size: 0.98rem;
}

.products-catalog .product-footer {
    margin-top: auto;
}

.products-catalog .btn-buy {
    box-shadow: none !important;
}

.products-catalog .p-card.expired .p-card-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(100, 100, 110, 0.42);
}

.products-catalog .p-card.expired .p-card-image img {
    filter: grayscale(0.45);
    opacity: 0.9;
}

.products-catalog .p-card.expired .p-title a,
.products-catalog .p-card.expired .p-price-now,
.products-catalog .p-card.expired .p-price-old {
    color: #8a8f94;
}

.products-catalog .p-card.expired .btn-buy {
    background: #9aa5b1;
    pointer-events: none;
    box-shadow: none !important;
}

.products-catalog .empty-box {
    background: #fff;
    border: 1px solid rgba(1, 35, 70, 0.07);
    border-radius: 18px;
    text-align: center;
    padding: 2.75rem 1.25rem;
    color: #486581;
}

.products-catalog .empty-box h3 {
    color: #012346;
    margin: 0.5rem 0;
}

.products-catalog .empty-btn {
    display: inline-flex;
    margin-top: 0.85rem;
    padding: 0.7rem 1.2rem;
    border-radius: 12px;
    background: #012346;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

.products-catalog .catalog-pager {
    margin-top: 1.75rem;
}

.products-catalog .pagination {
    gap: 0.35rem;
}

.products-catalog .pagination .page-link {
    border-radius: 10px !important;
    border: 1px solid rgba(1, 35, 70, 0.1);
    color: #012346;
    min-width: 40px;
    text-align: center;
}

.products-catalog .pagination .page-item.active .page-link {
    background: #012346;
    border-color: #012346;
    color: #fff;
}

@media (max-width: 1199px) {
    .products-catalog .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .products-catalog {
        padding-top: 100px;
    }

    .products-catalog .catalog-cats {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .products-catalog .catalog-cats::-webkit-scrollbar {
        display: none;
    }

    .products-catalog .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .products-catalog .p-title {
        font-size: 0.84rem;
    }
}

@media (max-width: 480px) {
    .products-catalog .p-price-now {
        font-size: 0.9rem;
    }
}
