/* استایل صفحه لیست محصولات — منتقل‌شده از <style> داخل قالب برای کش بهتر */

.products-page {
    max-width: 1280px;
    margin: 30px auto;
    padding: 0 20px;
    direction: rtl;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 20px;
}

.breadcrumb a { color: #5459e0; }
.breadcrumb a:hover { text-decoration: underline; }

.products-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.filters-sidebar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
    position: sticky;
    top: 90px;
}

.filters-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
}

.filter-search input,
.filter-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.88rem;
}

.filter-input:focus {
    outline: none;
    border-color: #5459e0;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 0.88rem;
    color: #374151;
    cursor: pointer;
}

.filter-checkbox input { width: 16px; height: 16px; cursor: pointer; }

.price-range {
    display: flex;
    gap: 8px;
}

.price-range input {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.85rem;
}

.products-main {
    min-width: 0;
}

.products-toolbar {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.products-count { font-size: 0.88rem; color: #6b7280; }
.products-count strong { color: #1f2937; }

.sort-select {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Vazir', sans-serif;
    font-size: 0.88rem;
    background: #fff;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #5459e0;
}

.product-card__image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f9fafb;
    position: relative;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-card__image img { transform: scale(1.05); }

.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #dc2626;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

.product-card__body {
    padding: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__brand {
    font-size: 0.78rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.product-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.5em;
}

.product-card__price {
    margin-top: auto;
}

.product-card__price-original {
    font-size: 0.78rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 2px;
}

.product-card__price-current {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
}

.product-card__price-current small { font-size: 0.75rem; font-weight: 400; color: #6b7280; }

.product-card__actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-view {
    flex: 1;
    padding: 8px 12px;
    background: #eff6ff;
    color: #5459e0;
    border: 1px solid #d3dcfb;
    border-radius: 6px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-view:hover {
    background: #5459e0;
    color: #fff;
}

.btn-cart-add {
    padding: 8px 12px;
    background: #5459e0;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-cart-add:hover { background: #1d4ed8; }

.btn-cart-add svg { width: 18px; height: 18px; }

.products-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    color: #6b7280;
}

.products-empty svg {
    width: 60px;
    height: 60px;
    color: #d1d5db;
    margin-bottom: 12px;
}

.filter-btn-mobile {
    display: none;
    padding: 8px 16px;
    background: #5459e0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-family: 'Vazir', sans-serif;
    cursor: pointer;
}

@media (max-width: 992px) {
    .products-layout { grid-template-columns: 1fr; }
    .filters-sidebar {
        position: static;
        display: none;
    }
    .filters-sidebar.open { display: block; }
    .filter-btn-mobile { display: block; }
}

@media (max-width: 576px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card__image { height: 160px; }
    .product-card__title { font-size: 0.82rem; }
    .product-card__actions { flex-direction: column; }
}
/* ===== بنر سه‌گانه ویژگی‌ها ===== */
.features-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 24px 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(226, 232, 240, 0.6);
    border-radius: 20px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px -5px rgba(15, 23, 42, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--feat-color, #6366f1), var(--feat-color-dark, #4f46e5));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px -8px rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.2);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.feature-card__icon svg {
    width: 32px;
    height: 32px;
    transition: all 0.4s ease;
}

.feature-card:hover .feature-card__icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card:hover .feature-card__icon svg {
    transform: scale(1.1);
}

.feature-card__icon--delivery {
    background: linear-gradient(135deg, #dbeafe 0%, #d3dcfb 100%);
    color: #5459e0;
    --feat-color: #3b82f6;
    --feat-color-dark: #1d4ed8;
}

.feature-card__icon--delivery svg {
    animation: delivery-truck 3s ease-in-out infinite;
}

@keyframes delivery-truck {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-3px); }
}

.feature-card__icon--support {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #d97706;
    --feat-color: #f59e0b;
    --feat-color-dark: #b45309;
}

.feature-card__icon--support svg {
    animation: support-pulse 2s ease-in-out infinite;
}

@keyframes support-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
}

.feature-card__icon--guarantee {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #059669;
    --feat-color: #10b981;
    --feat-color-dark: #047857;
}

.feature-card__icon--guarantee svg {
    animation: guarantee-shield 2.5s ease-in-out infinite;
}

@keyframes guarantee-shield {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

.feature-card__content {
    flex: 1;
    min-width: 0;
}

.feature-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.feature-card__subtitle {
    font-size: 0.85rem;
    color: #64748b;
}

@media (max-width: 768px) {
    .features-banner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 16px;
    }

    .feature-card__icon {
        width: 52px;
        height: 52px;
    }

    .feature-card__icon svg {
        width: 26px;
        height: 26px;
    }

    .feature-card__title {
        font-size: 0.95rem;
    }

    .feature-card__subtitle {
        font-size: 0.78rem;
    }
}

/* تصویر کارت محصول اکنون یک لینک به صفحه محصول است (بدون زوم) */
.product-card {
    position: relative;
    overflow: visible;
}

.product-card__image {
    display: block;
    position: relative;
}

