/* Products Grid */
.isancard-products-grid {
    display: grid;
    grid-template-columns: repeat(var(--columns, 3), 1fr);
    gap: 24px;
    padding: 20px 0;
    direction: rtl;
}

@media (max-width: 1200px) {
    .isancard-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .isancard-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .isancard-products-grid {
        grid-template-columns: 1fr;
    }
}

/* Product Card */
.isancard-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    cursor: pointer;
}

.isancard-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
}

.isancard-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.isancard-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.isancard-product-placeholder {
    color: #999;
    font-size: 14px;
}

.isancard-product-info {
    padding: 16px;
    text-align: center;
}

.isancard-product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #1f1f2c;
    line-height: 1.4;
    text-align: center;
}

.isancard-product-price {
    font-size: 18px;
    font-weight: 700;
    color: #f43f5e;
    margin-bottom: 8px;
    text-align: center;
}

.isancard-product-stock {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    text-align: center;
}

.isancard-product-purchase-limits {
    background: #f43f5e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    margin-bottom: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.isancard-product-purchase-limits .separator {
    opacity: 0.7;
}

.isancard-product-btn {
    width: 100%;
    background: linear-gradient(145deg, #a000ff, #8b00e6);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.isancard-product-btn:hover {
    background: linear-gradient(145deg, #8b00e6, #7a00cc);
    transform: scale(1.02);
}

/* Modal */
.isancard-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    direction: rtl;
}

.isancard-modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 95%;
    max-width: 900px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: modalFadeIn 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

/* پاپ‌آپ محصول کم عرض */
#isancard-product-modal .isancard-modal-content {
    max-width: 500px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.isancard-modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    color: #1f1f2c;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.isancard-modal-close:hover {
    background: #f5f5f5;
    transform: rotate(90deg);
}

/* Modal Product */
.isancard-modal-product {
    padding: 30px;
}

.isancard-modal-product-header {
    text-align: center;
    margin-bottom: 24px;
}

.isancard-modal-product-image {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 16px;
}

.isancard-modal-product-title {
    font-size: 20px;
    font-weight: 700;
    color: #1f1f2c;
    margin: 0;
}

.isancard-modal-product-body {
    margin-top: 24px;
}

.isancard-modal-product-price-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.isancard-modal-product-unit-price {
    font-size: 16px;
    color: #64748b;
    margin: 0;
    text-align: center;
}

.isancard-modal-product-quantity-section {
    margin-bottom: 20px;
}

.isancard-modal-product-quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.isancard-quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #1f1f2c;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.isancard-quantity-btn:hover {
    border-color: #a000ff;
    background: #f8f5ff;
    color: #a000ff;
}

.isancard-quantity-input {
    width: 80px;
    height: 40px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1f1f2c;
}

.isancard-quantity-input:focus {
    outline: none;
    border-color: #a000ff;
}

.isancard-modal-product-total-section {
    background: linear-gradient(145deg, #f8f5ff, #f0ebff);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.isancard-modal-product-total-label {
    font-size: 14px;
    color: #64748b;
    margin: 0 0 8px 0;
}

.isancard-modal-product-total-price {
    font-size: 24px;
    font-weight: 700;
    color: #a000ff;
    margin: 0;
}

/* Delivery Card */
.isancard-modal-product-delivery-card {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.isancard-delivery-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #5eead4;
    border-radius: 10px;
    flex-shrink: 0;
}

.isancard-delivery-info {
    flex: 1;
}

.isancard-delivery-label {
    font-size: 12px;
    color: #0f766e;
    margin: 0 0 4px 0;
    font-weight: 600;
}

.isancard-delivery-time {
    font-size: 14px;
    color: #134e4a;
    margin: 0;
    font-weight: 500;
}

/* Add to Cart Button */
.isancard-modal-product-add-btn {
    width: 100%;
    background: linear-gradient(145deg, #a000ff, #8b00e6);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.isancard-modal-product-add-btn:hover {
    background: linear-gradient(145deg, #8b00e6, #7a00cc);
    transform: scale(1.02);
}

.isancard-modal-product-add-btn:active {
    transform: scale(0.98);
}

.isancard-modal-product-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.isancard-purchase-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 16px 20px;
    color: #dc2626;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

