/* New Product Card Design - doesn't affect existing styles */

.product-card-v2 {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #e0e0e0;
}

.product-card-v2:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

/* Wishlist Heart Icon */
.product-card-v2 .wishlist-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.product-card-v2 .wishlist-btn:hover {
    background: #ff4444;
    border-color: #ff4444;
    transform: scale(1.1);
}

.product-card-v2 .wishlist-btn i {
    color: #666;
    font-size: 16px;
    transition: color 0.3s ease;
}

.product-card-v2 .wishlist-btn:hover i {
    color: #fff;
}

.product-card-v2 .wishlist-btn.active {
    background: #ff4444;
    border-color: #ff4444;
}

.product-card-v2 .wishlist-btn.active i {
    color: #fff;
}

/* Product Badge "سعر أقل" */
.product-card-v2 .price-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fc9905;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

.product-card-v2 .exclusive-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #4caf50;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
}

/* Discount Badge - وفر X جنيه */
.product-card-v2 .discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e53935, #c62828);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 10;
}

/* Product Image Container */
.product-card-v2 .product-img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    overflow: hidden;
    background: #fff;
}

.product-card-v2 .product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.3s ease;
}

.product-card-v2:hover .product-img-wrapper img {
    transform: scale(1.05);
}

/* Add to Cart Button - Rectangle at bottom */
.product-card-v2 .add-cart-btn {
    position: static;
    width: 100%;
    height: auto;
    background: #1c61e7;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(28, 97, 231, 0.3);
    transition: all 0.3s ease;
    z-index: 10;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.product-card-v2 .add-cart-btn:hover {
    background: #1550c8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 97, 231, 0.4);
}

.product-card-v2 .add-cart-btn i {
    color: #fff;
    font-size: 16px;
}

/* Product Info Section */
.product-card-v2 .product-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

/* Product Title */
.product-card-v2 .product-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-v2 .product-title a {
    color: inherit;
    text-decoration: none;
}

.product-card-v2 .product-title a:hover {
    color: #1c61e7;
}

/* Product Category */
.product-card-v2 .product-category {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-v2 .product-category i {
    color: #222b3b;
    font-size: 10px;
}

/* Product Brand Logo */
.product-card-v2 .product-brand-logo {
    height: 40px;
    display: flex;
    align-items: center;
}

.product-card-v2 .product-brand-logo img {
    max-height: 100%;
    max-width: 80px;
    object-fit: contain;
    filter: grayscale(20%);
    opacity: 0.85;
    transition: all 0.3s ease;
}

.product-card-v2:hover .product-brand-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Brand + Stock Row - Same Line */
.product-card-v2 .product-brand-stock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

/* Product Rating */
.product-card-v2 .product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.product-card-v2 .product-rating .stars {
    display: flex;
    gap: 2px;
}

.product-card-v2 .product-rating .stars i {
    color: #c9c9c7;
    font-size: 11px;
}

.product-card-v2 .product-rating .rating-count {
    font-size: 11px;
    color: #888;
}

/* Stock Status */
.product-card-v2 .product-stock {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-card-v2 .product-stock.in-stock {
    color: #7a857d;
}

.product-card-v2 .product-stock.in-stock i {
    color: #2f559f;
}

.product-card-v2 .product-stock.out-of-stock {
    color: #dc3545;
}

.product-card-v2 .product-stock.out-of-stock i {
    color: #dc3545;
}

/* Product Price */
.product-card-v2 .product-price-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Price Row - السعر الأصلي والفعلي في سطر واحد */
.product-card-v2 .price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
}

.product-card-v2 .original-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

.product-card-v2 .main-price {
    font-size: 16px;
    font-weight: 700;
    color: #1c61e7;
    direction: rtl;
}

.product-card-v2 .main-price .currency {
    font-size: 14px;
    font-weight: 400;
    color: #666;
    margin-right: 4px;
}

/* Payment Logo (Tabby/Tamara) */
.product-card-v2 .payment-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
}


/* Payment Monthly Amount */
.product-card-v2 .payment-monthly {
    font-weight: 600;
    color: #333;
    margin: 0 4px;
}

/* Installment Badge - Distinctive Styling */
.product-card-v2 .installment-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ff9800 0%, #ff5722 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
    margin-right: 6px;
    vertical-align: middle;
}

.product-card-v2 .installment-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

/* Product Description */
.product-card-v2 .product-description {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card-v2 .product-manufacturer {
    font-size: 12px;
    color: #888;
    font-weight: 500;
}

/* Products Grid */
.products-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin: 0 auto;
}

@media (max-width: 640px) {
    .products-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card-v2 .main-price {
        font-size: 18px;
    }

    .product-card-v2 .product-description {
        font-size: 12px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .product-card-v2 .product-content {
        padding: 12px;
        gap: 4px;
    }
}

@media (min-width: 768px) {
    .products-grid-v2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .products-grid-v2 {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* Discount Price Styles */
.product-card-v2 .price-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-card-v2 .old-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.product-card-v2 .discount-badge {
    background: #1c61e7;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}