﻿:root {
    --pr-primary: #0F3057;
    --pr-accent: #FF8126;
    --pr-success: #28a745;
    --pr-bg: #f4f7f6;
    --pr-white: #ffffff;
    --pr-text: #2d3436;
    --pr-text-light: #636e72;
    --pr-radius: 16px;
    --pr-shadow: 0 10px 30px rgba(0,0,0,0.05);
    --pr-hover-shadow: 0 15px 35px rgba(0,0,0,0.1);
    --pr-transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Bhoma', 'B Yekan', 'Tahoma', sans-serif;
    background-color: var(--pr-bg);
    color: var(--pr-text);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* --- هدر  --- */
.pr-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.pr-logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--pr-primary);
}

    .pr-logo span {
        color: var(--pr-accent);
    }

.pr-icons {
    display: flex;
    gap: 20px;
}

    .pr-icons a {
        position: relative;
    }

    .pr-icons i {
        font-size: 20px;
        color: var(--pr-primary);
        cursor: pointer;
        transition: 0.3s;
    }

        .pr-icons i:hover {
            color: var(--pr-accent);
            transform: scale(1.1);
        }

/* شمارنده سبد خرید */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--pr-accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

    .cart-badge.show {
        opacity: 1;
        transform: scale(1);
    }

.pr-hero {
    color: #fff;
    text-align: center;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 40px;
    position: relative;
}

    .pr-hero::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.25);
    }

    .pr-hero h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        font-weight: 900;
        text-shadow: 0 4px 15px rgba(0,0,0,0.5);
        position: relative;
    }

    .pr-hero p {
        font-size: 1.1rem;
        text-shadow: 0 2px 8px rgba(0,0,0,0.5);
        position: relative;
    }

.pr-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: block;
}

/* --- نوار مرتب‌سازی --- */
.pr-sort-bar {
    background: var(--pr-white);
    padding: 15px 20px;
    border-radius: var(--pr-radius);
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--pr-shadow);
}

    .pr-sort-bar select {
        border: none;
        background: transparent;
        font-weight: 600;
        color: var(--pr-primary);
        cursor: pointer;
        outline: none;
    }

/* --- گرید محصولات --- */
.pr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    min-height: 300px;
}

/* --- کارت محصول) --- */
.pr-card {
    background: var(--pr-white);
    border-radius: var(--pr-radius);
    overflow: hidden;
    box-shadow: var(--pr-shadow);
    transition: var(--pr-transition);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
    position: relative;
    cursor: pointer;
}

    .pr-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--pr-hover-shadow);
        border-color: rgba(255, 129, 38, 0.2);
    }

.pr-card-img {
    height: 250px;
    background: #f1f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

    .pr-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }
/* انیمیشن زوم هنگام هاور */
@keyframes zoomOutEffect {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

.pr-card:hover .pr-card-img img {
    animation: zoomOutEffect 2s ease-in-out infinite;
}

.pr-card-info {
    padding: 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pr-card-cat {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 5px;
}

.pr-card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--pr-accent);
}

.pr-card-price {
    font-size: 18px;
    color: var(--pr-text);
    font-weight: 900;
    margin-top: 10px;
}

.pr-old-price {
    text-decoration: line-through;
    color: #ccc;
    font-size: 13px;
    margin-left: 8px;
    font-weight: normal;
}

.pr-new-price {
    color: var(--pr-text);
}

.pr-btn-cart {
    width: 100%;
    background: var(--pr-accent);
    border: none;
    color: #fff;
    padding: 12px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--pr-transition);
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

    .pr-btn-cart:hover {
        background: var(--pr-primary);
        color: #fff;
        transform: translateY(-2px);
    }

    .pr-btn-cart.added {
        background-color: var(--pr-success) !important;
        cursor: default;
    }

/* --- حالت‌های لودینگ و خطا --- */
.pr-loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    font-size: 18px;
    color: var(--pr-text-light);
}

.pr-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px;
    color: #dc3545;
}

/* --- ریسپانسیو --- */
@media (max-width: 768px) {
    .pr-hero h1 {
        font-size: 22px;
    }

    .pr-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pr-card-img {
        height: 150px;
    }

    .pr-card-info {
        padding: 11px;
    }

    .pr-card-title {
        font-size: 12px;
    }

    .pr-card-price {
        font-size: 10px;
    }
}
