.subhan-eac-widget {
    --seac-border-color: #d9dde3;
    --seac-muted-bg: #f7f8fa;
    --seac-success-bg: #ecfdf3;
    --seac-success-text: #146c43;
    --seac-error-bg: #fff1f2;
    --seac-error-text: #9f1239;
    --seac-chip-bg: #f4f6f8;
    --seac-chip-border: #d6dbe2;
    --seac-chip-text: #1f2937;
    --seac-chip-radius: 10px;
    --seac-chip-height: 42px;
    --seac-chip-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --seac-fly-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
    --seac-fly-radius: 18px;
    --seac-brand: #008445;
}

.subhan-eac-widget,
.subhan-eac-widget * {
    box-sizing: border-box;
}

.subhan-eac-widget-inner {
    width: 100%;
}

.subhan-eac-variation-form {
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid var(--seac-border-color);
    border-radius: 10px;
    background: var(--seac-muted-bg);
}

.woocommerce div.product .subhan-eac-widget form.subhan-eac-variation-form.cart,
.woocommerce-page div.product .subhan-eac-widget form.subhan-eac-variation-form.cart {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.subhan-eac-variation-rows {
    display: grid;
    gap: 10px;
}

.subhan-eac-variation-row {
    margin: 0;
}

.subhan-eac-variation-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    line-height: 1.2;
}

.subhan-eac-variation-value {
    display: block;
}

.subhan-eac-variation-value select {
    width: 100%;
    max-width: 100%;
}

.subhan-eac-layout-swatches .subhan-eac-variation-value > select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.subhan-eac-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subhan-eac-swatch {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--seac-chip-border);
    background: var(--seac-chip-bg);
    color: var(--seac-chip-text);
    border-radius: var(--seac-chip-radius);
    box-shadow: var(--seac-chip-shadow);
    padding: 0 12px;
    min-height: var(--seac-chip-height);
    height: var(--seac-chip-height);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subhan-eac-swatch:hover {
    border-color: #bcc4cf;
}

.subhan-eac-swatch.is-active {
    border-color: #0f766e;
    color: #0f766e;
    background: #f0fdfa;
}

.subhan-eac-swatch.is-disabled,
.subhan-eac-swatch:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #d1d5db;
    color: #9ca3af;
    background: #f9fafb;
}

.subhan-eac-variation-form .reset_variations {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
}

.subhan-eac-actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
}

.subhan-eac-buttons {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.subhan-eac-buttons .subhan-eac-btn {
    flex: 1 1 0;
    min-width: 0;
}

.subhan-eac-widget--product-actions.subhan-eac-buy-now-left .subhan-eac-buy-now {
    order: -1;
}

.subhan-eac-widget--product-actions .subhan-eac-buy-now-bottom-wrap {
    margin-top: 10px;
    width: 100%;
}

.subhan-eac-widget--product-actions .subhan-eac-buy-now-bottom-wrap .subhan-eac-btn {
    width: 100%;
}

.subhan-eac-qty-control {
    display: inline-flex;
    align-items: stretch;
    border: 0;
    border-radius: var(--seac-chip-radius);
    box-shadow: none;
    overflow: hidden;
    min-width: 0;
    min-height: var(--seac-chip-height);
    background: transparent;
}

.subhan-eac-qty-btn {
    width: 34px;
    min-width: 34px;
    border: 0;
    border-right: 0;
    background: var(--seac-chip-bg);
    color: var(--seac-chip-text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    min-height: var(--seac-chip-height);
}

.subhan-eac-qty-plus {
    border-right: 0;
    border-left: 0;
}

.subhan-eac-qty-input {
    width: 42px;
    border: 0;
    border-left: 0;
    border-right: 0;
    text-align: center;
    outline: none;
    appearance: textfield;
    padding: 6px;
    min-height: var(--seac-chip-height);
    background: #fff;
    color: var(--seac-chip-text);
}

.subhan-eac-widget input.subhan-eac-qty-input[type="number"] {
    border: 0;
    box-shadow: none;
    background: #fff;
}

.subhan-eac-widget input.subhan-eac-qty-input[type="number"]:focus {
    border: 0;
    box-shadow: none;
    outline: none;
    background: #fff;
}

.subhan-eac-widget button.subhan-eac-qty-btn,
.subhan-eac-widget button.subhan-eac-qty-btn:focus {
    border: 0;
    box-shadow: none;
}

.subhan-eac-qty-input::-webkit-outer-spin-button,
.subhan-eac-qty-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.subhan-eac-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.subhan-eac-btn.is-full-width,
.subhan-eac-has-full-width .subhan-eac-btn {
    width: 100%;
}

.subhan-eac-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-top-color: currentColor;
    border-right-color: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    animation: subhan-eac-spin 0.82s linear infinite;
}

.subhan-eac-btn.is-loading {
    cursor: wait;
    position: relative;
}

.subhan-eac-btn.is-loading.show-spinner .subhan-eac-spinner {
    display: inline-block;
}

.subhan-eac-btn.is-loading .subhan-eac-btn-label {
    transform: translateX(-2px);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.add_to_cart_button.subhan-eac-is-loading,
.ajax_add_to_cart.subhan-eac-is-loading,
.single_add_to_cart_button.subhan-eac-is-loading {
    position: relative;
    pointer-events: none;
}

.add_to_cart_button.subhan-eac-is-loading::after,
.ajax_add_to_cart.subhan-eac-is-loading::after,
.single_add_to_cart_button.subhan-eac-is-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 14px;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-right-color: currentColor;
    animation: subhan-eac-spin 0.82s linear infinite;
}

.subhan-eac-icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.subhan-eac-icon svg {
    width: 1em;
    height: 1em;
}

.subhan-eac-message {
    display: none;
    margin-top: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    line-height: 1.45;
}

.subhan-eac-message.is-visible {
    display: block;
}

.subhan-eac-message.is-success {
    background: var(--seac-success-bg);
    border-color: #bbf7d0;
    color: var(--seac-success-text);
}

.subhan-eac-message.is-error {
    background: var(--seac-error-bg);
    border-color: #fecdd3;
    color: var(--seac-error-text);
}

.woocommerce a.added_to_cart.wc-forward,
.woocommerce-page a.added_to_cart.wc-forward,
.subhan-eac-widget a.added_to_cart.wc-forward {
    display: none !important;
}

.woocommerce a.subhan-eac-view-cart,
.woocommerce-page a.subhan-eac-view-cart,
.subhan-eac-btn.subhan-eac-view-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.subhan-eac-flyer {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    pointer-events: none;
    border-radius: var(--seac-fly-radius);
    overflow: hidden;
    box-shadow: var(--seac-fly-shadow);
    background: #ffffff;
    transition: transform 1.08s cubic-bezier(0.16, 0.84, 0.22, 1), opacity 1.08s ease;
    will-change: transform, opacity;
}

.subhan-eac-flyer--image {
    border: 1px solid rgba(255, 255, 255, 0.85);
}

.subhan-eac-flyer--image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.subhan-eac-flyer--label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    min-height: 48px;
    padding: 0 10px;
    background: linear-gradient(135deg, var(--seac-brand), #10b66d);
    color: #ffffff;
}

.subhan-eac-flyer__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    font-weight: 700;
    white-space: nowrap;
}

.subhan-eac-flyer__icon {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 15px;
    line-height: 1;
}

.subhan-eac-flyer__text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.subhan-eac-cart-bump {
    animation: subhan-eac-cart-bump 0.65s ease;
    transform-origin: center;
}

.subhan-eac-cart-count-bump {
    animation: subhan-eac-cart-count-bump 0.65s ease;
    transform-origin: center;
}

.single-product div.product form.cart {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 12px;
}

.single-product div.product form.cart .quantity {
    margin: 0;
}

.single-product div.product form.cart .single_add_to_cart_button,
.single-product div.product form.cart .single_buy_now_button {
    min-height: 52px;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    flex: 1 1 220px;
    margin: 0;
    border-width: 1px;
    border-style: solid;
    color: #ffffff !important;
    background: var(--e-global-color-accent, #008445) !important;
    border-color: var(--e-global-color-accent, #008445) !important;
}

.single-product div.product form.cart .single_add_to_cart_button:hover,
.single-product div.product form.cart .single_add_to_cart_button:focus,
.single-product div.product form.cart .single_buy_now_button:hover,
.single-product div.product form.cart .single_buy_now_button:focus {
    background: var(--e-global-color-accent, #008445) !important;
    border-color: var(--e-global-color-accent, #008445) !important;
    filter: brightness(0.92);
    color: #ffffff !important;
}

@keyframes subhan-eac-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes subhan-eac-cart-bump {
    0% { transform: scale(1); }
    30% { transform: scale(1.14); }
    55% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes subhan-eac-cart-count-bump {
    0% { transform: scale(1); }
    35% { transform: scale(1.18); }
    60% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

@media (max-width: 767px) {
    .single-product div.product form.cart .quantity,
    .single-product div.product form.cart .single_add_to_cart_button,
    .single-product div.product form.cart .single_buy_now_button {
        width: 100%;
        flex: 1 1 100%;
    }

    .subhan-eac-actions {
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .subhan-eac-buttons {
        flex-wrap: nowrap;
        width: auto;
        flex: 1 1 auto;
        min-width: 0;
    }

    .subhan-eac-qty-control {
        width: auto;
        flex: 0 0 auto;
    }

    .subhan-eac-buttons .subhan-eac-btn {
        width: auto;
        min-width: 0;
    }

    .subhan-eac-widget--product-actions .subhan-eac-buy-now-bottom-wrap .subhan-eac-btn {
        width: 100%;
    }

    .subhan-eac-flyer {
        border-radius: 14px;
    }

    .subhan-eac-flyer__text {
        max-width: 84px;
    }
}
