/* Farad Custom Add to Cart Widget Styles */

.farad-custom-add-to-cart {
    width: 100%;
    direction: rtl;
}

.farad-atc-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    flex-wrap: nowrap;
}

/* Button Section */
.farad-atc-button-wrapper {
    flex-shrink: 0;
}

.farad-add-to-cart-btn {
    width: 320px;
    height: 52px;
    background-color: #0CB5A7;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.farad-add-to-cart-btn:hover:not(:disabled) {
    background-color: #0aa396;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(12, 181, 167, 0.3);
}

.farad-add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.farad-add-to-cart-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.farad-add-to-cart-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.farad-add-to-cart-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Quantity Section */
.farad-atc-quantity-wrapper {
    flex-shrink: 0;
}

.farad-atc-quantity-wrapper .farad-qty-field {
    position: relative;
    width: 132px;
    height: 52px;
    border-radius: 32px;
    background: #02b5ac;
    box-shadow: 0 12px 24px rgba(2, 181, 172, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

.farad-atc-quantity-wrapper .farad-qty-field::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    pointer-events: none;
}

.farad-atc-quantity-wrapper .farad-qty-field input.qty,
.farad-atc-quantity-wrapper .farad-qty-field input[type="number"] {
    width: 100%;
    height: 100%;
    text-align: center;
    border: none;
    font-weight: 700;
    background: transparent;
    color: #111;
    font-size: 18px;
    margin: 0;
    padding: 0 48px;
    border-radius: 32px;
}

.farad-atc-quantity-wrapper .farad-qty-field input.qty:focus,
.farad-atc-quantity-wrapper .farad-qty-field input[type="number"]:focus {
    outline: none;
}

.farad-atc-quantity-wrapper .farad-qty-field button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    z-index: 2;
}

.farad-atc-quantity-wrapper .farad-qty-field button:hover {
    background: #fff;
    color: #02b5ac;
}

.farad-atc-quantity-wrapper .farad-qty-field .farad-qty-decrease {
    right: 18px;
}

.farad-atc-quantity-wrapper .farad-qty-field .farad-qty-increase {
    left: 18px;
}

/* Price Section */
.farad-atc-price-wrapper {
    flex-shrink: 0;
}

.farad-product-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    direction: rtl;
}

.farad-product-price .price-amount {
    font-size: 18px;
    font-weight: 700;
    color: #1E1E1E;
    line-height: 1;
}

.farad-product-price .price-currency {
    font-size: 14px;
    font-weight: 500;
    color: #929CA1;
    line-height: 1;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .farad-atc-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .farad-atc-button-wrapper,
    .farad-atc-quantity-wrapper,
    .farad-atc-price-wrapper {
        width: 100%;
    }

    .farad-add-to-cart-btn {
        width: 100%;
    }

    .farad-atc-quantity-wrapper {
        display: flex;
        justify-content: center;
    }

    .farad-atc-price-wrapper {
        text-align: center;
    }
}

/* RTL Support */
.rtl .farad-custom-add-to-cart {
    direction: rtl;
}

.rtl .farad-atc-container {
    direction: rtl;
}

