/* ========================================================================== 
   Pandora Iran — Category product cards
   فایل مستقل صفحه دسته‌بندی؛ این فایل باید بعد از app.css بارگذاری شود.
   ========================================================================== */

.pi-category-page,
.pi-category-page * {
    box-sizing: border-box;
}

.pi-category-products {
    width: 100%;
}

.pi-category-products__grid {
    display: grid;
    width: 100%;
    margin-bottom: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 15px;
    direction: rtl;
}

.pi-category-products .pi-product-card {
    --pi-card-ink: #211d20;
    --pi-card-muted: #777074;
    --pi-card-rose: #8c2638;
    --pi-card-blue: #315edc;
    position: relative;
    isolation: isolate;
    display: flex;
    width: 100%;
    min-width: 0;
    height: auto;
    margin: 0;
    overflow: hidden;
    flex-direction: column;
    color: var(--pi-card-ink);
    background: linear-gradient(145deg, rgba(255,255,255,.94), rgba(247,243,246,.72));
    border: 1px solid rgba(255,255,255,.94);
    border-radius: 19px;
    box-shadow: 0 9px 25px rgba(76,58,68,.12), inset 0 1px 0 rgba(255,255,255,.95);
    -webkit-backdrop-filter: blur(16px) saturate(1.18);
    backdrop-filter: blur(16px) saturate(1.18);
    font-family: 'IRANSansWebFarsiNumbers', Tahoma, Arial, sans-serif;
    text-align: right;
}

.pi-category-products .pi-product-card::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(125deg, rgba(255,255,255,.72) 0%, rgba(255,255,255,.16) 44%, rgba(233,222,229,.22) 100%);
}

.pi-category-products .pi-product-card [hidden] {
    display: none !important;
}

.pi-category-products .pi-product-card__media {
    position: relative !important;
    display: block;
    width: calc(100% - 12px);
    aspect-ratio: 1.17 / 1;
    margin: 6px 6px 0;
    overflow: hidden;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(255,255,255,.96);
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(70,56,64,.07), inset 0 0 0 1px rgba(231,225,229,.42);
}

.pi-category-products .pi-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    padding: 2px;
    object-fit: contain;
    background: rgba(250,249,249,.68);
    border: 0;
    border-radius: inherit;
}

.pi-category-products .pi-product-card__body {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    padding: 4px 9px 8px;
    background: linear-gradient(180deg, rgba(255,255,255,.34), rgba(255,255,255,.12));
}

.pi-category-products .pi-product-card__gift {
    position: static;
    display: flex;
    width: 100%;
    min-height: 18px;
    max-width: 100%;
    margin: 0 0 2px;
    padding: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    color: #71686d;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font-size: 9.5px;
    font-weight: 400;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.pi-category-products .pi-product-card__gift svg {
    display: block;
    width: 13px;
    min-width: 13px;
    max-width: 13px;
    height: 13px;
    flex: 0 0 13px;
    fill: none;
    stroke: #756b70;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pi-category-products .pi-product-card__heading {
    margin: 0;
    padding: 0;
    font: inherit;
}

.pi-category-products .pi-product-card__title {
    display: -webkit-box;
    height: 36px;
    margin: 0 0 3px;
    overflow: hidden;
    color: var(--pi-card-ink);
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.45;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pi-category-products .pi-product-card__title:hover {
    color: var(--pi-card-rose);
}

.pi-category-products .pi-product-card__price {
    display: flex;
    min-height: 35px;
    margin: 0;
    align-items: center;
    align-content: flex-start;
    flex-flow: row wrap;
    gap: 1px 5px;
    color: var(--pi-card-ink);
    line-height: 1.4;
}

.pi-category-products .pi-product-card__current-price {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    margin-top: -1px;
    color: var(--pi-card-ink);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.pi-category-products .pi-product-card__current-price small {
    color: var(--pi-card-muted);
    font-size: 9px;
    font-weight: 400;
}

.pi-category-products .pi-product-card__old-price {
    order: 1;
    flex: 0 0 auto;
    color: #8b8588;
    font-size: 9.5px;
    font-weight: 400;
    white-space: nowrap;
}

.pi-category-products .pi-product-card__discount {
    position: static;
    z-index: auto;
    order: 2;
    display: inline-flex;
    min-width: 0;
    min-height: 18px;
    margin: 0;
    padding: 2px 6px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #ef4138, #d9272e);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 2px 5px rgba(211,35,44,.2);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
}

.pi-category-products .pi-product-card__inquiry {
    order: 3;
    flex: 0 0 100%;
    color: var(--pi-card-ink);
    font-size: 13px;
    font-weight: 600;
}

.pi-category-products .pi-product-card__outofstock {
    order: 4;
    display: inline-flex;
    flex: 0 0 auto;
    margin-top: 2px;
    padding: 2px 7px;
    align-items: center;
    justify-content: center;
    color: #8c2638;
    background: rgba(140,38,56,.08);
    border: 1px solid rgba(140,38,56,.14);
    border-radius: 999px;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.4;
}

.pi-category-products .pi-category-product-card--outofstock .pi-product-card__image {
    opacity: .68;
    filter: saturate(.72);
}

.pi-category-products .pi-product-card__installment {
    position: absolute;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    z-index: 3;
    display: flex;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-height: 25px;
    margin: 0;
    padding: 4px 8px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, rgba(62,103,227,.96), rgba(37,74,191,.96));
    border: 1px solid rgba(255,255,255,.78);
    border-radius: 999px;
    box-shadow: 0 4px 10px rgba(37,74,191,.25), inset 0 1px 0 rgba(255,255,255,.25);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    text-align: center;
}

.pi-category-products .pi-product-card__installment strong {
    display: block;
    width: 100%;
    min-width: 0;
    color: inherit;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 1.45;
    white-space: nowrap;
    text-align: center;
}

.pi-category-products .pi-product-card a:focus-visible {
    outline: 3px solid #155eef;
    outline-offset: 2px;
}

@media (hover: hover) {
    .pi-category-products .pi-product-card {
        transition: transform .22s ease, box-shadow .22s ease;
    }

    .pi-category-products .pi-product-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 13px 30px rgba(76,58,68,.15), inset 0 1px 0 rgba(255,255,255,.95);
    }
}

@media (min-width: 991px) {
    .pi-category-products__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .pi-category-products__grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1400px) {
    .pi-category-products__grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .pi-category-products__grid {
        gap: 15px 10px;
    }

    .pi-category-products .pi-product-card {
        border-radius: 17px;
    }

    .pi-category-products .pi-product-card__media {
        width: calc(100% - 10px);
        margin: 5px 5px 0;
        border-radius: 13px;
    }

    .pi-category-products .pi-product-card__body {
        padding: 4px 8px 7px;
    }

    .pi-category-products .pi-product-card__title {
        height: 35px;
        font-size: 12px;
    }

    .pi-category-products .pi-product-card__current-price {
        font-size: 13px;
    }

    .pi-category-products .pi-product-card__installment {
        top: 0;
        right: 0;
        bottom: auto;
        left: 0;
        width: 100%;
        min-height: 24px;
        max-width: none;
        padding: 4px 7px;
    }
}

@media (max-width: 360px) {
    .pi-category-products__grid {
        column-gap: 8px;
    }

    .pi-category-products .pi-product-card__body {
        padding-right: 7px;
        padding-left: 7px;
    }

    .pi-category-products .pi-product-card__gift {
        font-size: 8.5px;
    }

    .pi-category-products .pi-product-card__title {
        font-size: 11.5px;
    }

    .pi-category-products .pi-product-card__current-price {
        font-size: 12px;
    }

    .pi-category-products .pi-product-card__old-price,
    .pi-category-products .pi-product-card__discount {
        font-size: 8.5px;
    }

    .pi-category-products .pi-product-card__installment strong {
        font-size: 8.5px;
    }
}
