/**
 * NexaShop - Product Add To Cart Widget Styles
 * Pixel-perfect match for media_1792933423207_df78dae5.png
 */

.nexashop-single-add-to-cart {
    width: 100%;
    margin-bottom: 16px;
    direction: rtl;
    --nexashop-atc-primary: var(--e-global-color-primary, var(--nexashop-primary-color, var(--primary, #ef4444)));
}

/* Hide native WooCommerce variations selects & single variation price duplicate */
.nexashop-single-add-to-cart .variations,
.nexashop-single-add-to-cart .reset_variations,
.nexashop-single-add-to-cart .nexashop-hidden-variations-selects,
.nexashop-single-add-to-cart .woocommerce-variation.single_variation {
    display: none !important;
}

.nexashop-single-add-to-cart .woocommerce-variation-add-to-cart.variations_button,
.nexashop-single-add-to-cart .nexashop-add-to-cart-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

/* ==================== Main Add To Cart Button ==================== */
.nexashop-add-to-cart-btn,
.nexashop-single-add-to-cart .single_add_to_cart_button.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    flex-grow: 1;
    background-color: var(--nexashop-atc-primary, #ef4444);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease, filter 0.2s ease, opacity 0.2s ease;
    white-space: nowrap;
}

.nexashop-add-to-cart-btn:hover,
.nexashop-single-add-to-cart .single_add_to_cart_button.button:hover {
    background-color: var(--nexashop-atc-primary, #ef4444);
    filter: brightness(0.92);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.nexashop-add-to-cart-btn:active,
.nexashop-single-add-to-cart .single_add_to_cart_button.button:active {
    transform: translateY(1px);
}

/* Disabled state before picking variations ("یک گزینه را انتخاب کنید") */
.nexashop-add-to-cart-btn.is-selection-needed,
.nexashop-add-to-cart-btn.disabled,
.nexashop-single-add-to-cart .single_add_to_cart_button.disabled,
.nexashop-single-add-to-cart .single_add_to_cart_button.wc-variation-selection-needed {
    background-color: #94a3b8 !important;
    border-color: #94a3b8 !important;
    color: #ffffff !important;
    opacity: 0.8 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    transform: none !important;
}

.nexashop-add-to-cart-btn.is-selection-needed:hover,
.nexashop-single-add-to-cart .single_add_to_cart_button.disabled:hover {
    background-color: #64748b !important;
    opacity: 0.95 !important;
}

.nexashop-add-to-cart-btn.is-loading,
.nexashop-atc-in-cart-box.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.nexashop-btn-icon {
    display: inline-flex;
    align-items: center;
    font-size: 18px;
}

.nexashop-btn-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ==================== In-Cart State Component (Matching media_1792933423207_df78dae5.png) ==================== */
.nexashop-atc-in-cart-box {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    direction: rtl;
    width: auto;
    animation: nexashopFadeInScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nexashop-atc-qty-card {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    min-width: 108px;
    background-color: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 4px 10px;
    box-sizing: border-box;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nexashop-atc-qty-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

.nexashop-atc-qty-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ef4444;
    border-radius: 6px;
    transition: background-color 0.15s ease, transform 0.15s ease;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

.nexashop-atc-qty-btn:hover {
    background-color: #fef2f2;
    transform: scale(1.12);
}

.nexashop-atc-qty-btn:active {
    transform: scale(0.92);
}

.nexashop-atc-qty-plus {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    color: #ef4444;
}

.nexashop-atc-qty-plus svg {
    stroke: #ef4444;
}

.nexashop-atc-qty-value {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
    min-width: 26px;
    text-align: center;
    user-select: none;
    line-height: 1;
    font-family: inherit;
}

.nexashop-atc-qty-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
}

.nexashop-atc-qty-action svg {
    display: block;
    stroke: #ef4444;
}

.nexashop-atc-in-cart-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    text-align: right;
}

.nexashop-atc-in-cart-label {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    line-height: 1.3;
    margin: 0;
}

.nexashop-atc-view-cart-link {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.nexashop-atc-view-cart-link span {
    color: #2563eb;
    font-weight: 700;
    transition: color 0.2s ease;
}

.nexashop-atc-view-cart-link:hover span {
    text-decoration: underline;
    color: #1d4ed8;
}

/* Animations */
@keyframes nexashopFadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.94);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes nexashopShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.nexashop-shake-attention {
    animation: nexashopShake 0.45s ease-in-out;
}

/* ==================== Price Box Above Add to Cart ==================== */
.nexashop-atc-price-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
    gap: 4px;
}

.nexashop-atc-discount-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nexashop-atc-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ef394e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    line-height: 1.4;
    letter-spacing: 0;
}

.nexashop-atc-regular-price {
    font-size: 14px;
    color: #9e9fb1;
    text-decoration: line-through;
}

.nexashop-atc-regular-price .woocommerce-Price-amount {
    color: inherit;
}

.nexashop-atc-final-price-row {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.nexashop-atc-final-price {
    font-size: 22px;
    font-weight: 800;
    color: #23254e;
    line-height: 1.2;
}

.nexashop-atc-final-price.nexashop-is-free {
    color: #10b981;
    font-weight: 800;
    font-size: 20px;
}

/* ==================== Call For Price Button ==================== */
.nexashop-call-for-price-wrapper {
    width: 100%;
}

.nexashop-call-for-price-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 48px;
    background-color: #0284c7;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 700;
    transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
    box-sizing: border-box;
}

.nexashop-call-for-price-btn:hover {
    background-color: #0369a1;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
    transform: translateY(-1px);
}

.nexashop-call-for-price-btn:active {
    transform: translateY(1px);
}

.nexashop-call-for-price-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    line-height: 20px;
}

.nexashop-call-btn-tel {
    font-size: 13px;
    opacity: 0.9;
    direction: ltr;
    display: inline-block;
    font-weight: 600;
}
