.product-card {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #e11d48;
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 4px 8px rgba(225, 29, 72, 0.3);
}

.quick-view-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s ease;
    z-index: 3;
    display: flex;
    justify-content: center;
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
    transform: translateY(0);
}

.quick-view-btn {
    background: #ffffff;
    color: #2563eb;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-view-btn:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.4;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.price {
    font-weight: 700;
    font-size: 18px;
    color: #10b981;
}

.old-price {
    font-size: 15px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-left: 8px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stars {
    color: #fbbf24;
    font-size: 16px;
}

.reviews {
    font-size: 14px;
    color: #6b7280;
}

.product-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

.qty-control {
    display: flex;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    height: 45px;
}

.qty-btn {
    width: 40px;
    background: #f9fafb;
    border: none;
    font-size: 18px;
    color: #4b5563;
    cursor: pointer;
    transition: background 0.2s;
}

.qty-btn:hover {
    background: #f3f4f6;
}

.qty-input {
    width: 50px;
    border: none;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    background: #fff;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2563eb;
    color: #2563eb;
}

.btn-outline:hover {
    background: #f0f7ff;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.total-price {
    grid-column: span 2;
    text-align: center;
    font-weight: 700;
    font-size: 17px;
    color: #10b981;
    padding: 10px 0;
    border-top: 1px solid #f3f4f6;
    margin-top: 8px;
}

.price-value {
    font-size: 20px;
}

/* استایل‌های پاپ‌آپ */
.product-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s ease;
}

.product-popup.active {
    visibility: visible;
    opacity: 1;
}

.popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.popup-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 20px;
    overflow: hidden;
    z-index: 2;
    transform: translateY(30px);
    transition: transform 0.4s ease;
}

.product-popup.active .popup-content {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: #e11d48;
    color: white;
    transform: rotate(90deg);
}

.popup-body {
    display: flex;
    flex-direction: column;
    padding: 30px;
    overflow-y: auto;
    max-height: 80vh;
}

.popup-image {
    width: 100%;
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popup-details {
    width: 100%;
}

.popup-title {
    font-size: 24px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 15px;
}

.popup-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.popup-price .price {
    font-size: 22px;
}

.popup-price .old-price {
    font-size: 18px;
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.popup-rating .stars {
    font-size: 18px;
}

.popup-rating .reviews {
    font-size: 16px;
}

.popup-description {
    margin-bottom: 25px;
    color: #4b5563;
    line-height: 1.8;
}

.popup-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.popup-actions .qty-control {
    height: 50px;
    border-radius: 15px;
}

.popup-actions .qty-input {
    font-size: 18px;
}

.popup-actions .qty-btn {
    width: 45px;
    font-size: 20px;
}

.popup-actions .btn {
    padding: 14px 25px;
    font-size: 16px;
    border-radius: 15px;
    flex-grow: 1;
}

.popup-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #4b5563;
}

.meta-item i {
    color: #2563eb;
    width: 25px;
    text-align: center;
}

/* رسپانسیو */
@media (max-width: 768px) {
    .popup-body {
        padding: 20px;
    }
    
    .popup-image {
        height: 300px;
    }
    
    .popup-actions {
        flex-direction: column;
    }
    
    .product-actions {
        grid-template-columns: 1fr;
    }
    
    .total-price {
        grid-column: 1;
    }
    
    .action-buttons {
        gap: 10px;
    }
}

@media (min-width: 992px) {
    .popup-body {
        flex-direction: row;
        gap: 30px;
    }
    
    .popup-image {
        width: 45%;
        height: auto;
        margin-bottom: 0;
    }
    
    .popup-details {
        width: 55%;
    }
}
.success-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #10b981;
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10000;
}

.success-toast.show {
    opacity: 1;
}
.pagination a {
    display: inline-block;
    margin: 0 4px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    color: #333;
    text-decoration: none;
}

.pagination a.active-page {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
