/* RTL Support */
body {
    direction: rtl;
}

/* Product List Container */
#product-list .col-md-3 {
    flex: 0 0 calc(25% - 20px);
    max-width: calc(25% - 20px);
    padding: 0 10px;
}

/* Product Card Styling */
.product-card {
    width: 220px;
    height: 320px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
    border-radius: 10px;
    background-color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin: 10px 0;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(106, 13, 173, 0.2);
}

/* Image Styling */
.product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

/* Card Body */
.product-card .card-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    height: calc(100% - 120px);
}

/* Product Info */
.product-title {
    font-size: 0.9rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
    text-align: center;
}

.product-description {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.product-price {
    font-size: 0.9rem;
    font-weight: bold;
    color: green;
    margin: 4px 0;
    text-align: center;
}

/* Badge Styling */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--theme-color);
    color: white;
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
    z-index: 1;
}

/* Quantity Selector Styling */
.quantity-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    flex-direction: row-reverse; /* Adjusted for RTL layout */
}

.quantity-input {
    width: 30px;
    height: 25px;
    text-align: center;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    direction: ltr; /* Ensures the number appears in left-to-right for better readability */
}

.btn-increment, .btn-decrement {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    border-radius: 50%;
    background-color: var(--theme-color);
    color: white;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-increment:hover, .btn-decrement:hover {
    background-color: var(--hover-color);
}


/* View Details Button */
.btn-view-details-round {
    background-color: white;
    color: var(--theme-color);
    font-size: 0.8rem;
    font-weight: bold;
    border: 1px solid var(--theme-color);
    padding: 4px 8px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
}

.btn-view-details-round:hover {
    background-color: var(--theme-color);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #product-list .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .product-card {
        width: 100%;
        height: 340px;
        margin: 10px auto;
    }
}

@media (max-width: 576px) {
    #product-list .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .product-card {
        width: 100%;
        height: 340px;
        margin: 10px auto;
    }
}
/* Add to Cart Button */
.add-to-cart-btn {
    background-color: white;
    color: var(--theme-color);
    font-size: 0.9rem;
    font-weight: bold;
    border: 1px solid var(--theme-color);
    padding: 5px 10px;
    transition: background-color 0.3s;
    border-radius: 20px;
    width: 100%;
    margin-top: 6px;
    text-align: center;
    direction: rtl; /* Ensures button text follows RTL */
    display: flex;
    justify-content: center;
    align-items: center;
}

.add-to-cart-btn:hover {
    background-color: var(--theme-color);
    color: white;
}
