.codenoksha-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);
}

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

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

.codenoksha-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 .codenoksha-eac-widget form.codenoksha-eac-variation-form.cart,
.woocommerce-page div.product .codenoksha-eac-widget form.codenoksha-eac-variation-form.cart {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

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

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

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

.codenoksha-eac-variation-value {
    display: block;
    position: relative;
}

.codenoksha-eac-variation-value select {
    width: 100%;
    max-width: 100%;
    height: 42px;
    padding: 0 40px 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 14px center;
    background-repeat: no-repeat;
    background-size: 18px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.codenoksha-eac-variation-value select:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.codenoksha-eac-layout-swatches .codenoksha-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;
}

.codenoksha-eac-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 2px;
}

.codenoksha-eac-swatch {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 0 16px;
    min-height: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
}

.codenoksha-eac-swatch:hover:not(.is-disabled):not(:disabled) {
    border-color: #cbd5e1;
    color: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(15, 23, 42, 0.06);
}

.codenoksha-eac-swatch.swatch-clicked {
    transform: scale(0.94) translateY(0) !important;
}

.codenoksha-eac-swatch.is-active {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #f5f3ff;
    box-shadow: 0 0 0 1px #4f46e5, 0 4px 10px rgba(79, 70, 229, 0.08);
    font-weight: 600;
}

.codenoksha-eac-swatch.is-disabled,
.codenoksha-eac-swatch:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    border-color: #e2e8f0;
    color: #94a3b8;
    background: #f8fafc;
    box-shadow: none;
    pointer-events: none;
    text-decoration: line-through;
}

/* Premium Dynamic Variation Price & Info Card */
.single_variation_wrap {
    margin: 14px 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03), 0 1px 3px rgba(15, 23, 42, 0.02);
    animation: eacFadeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes eacFadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-variation-description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.5;
}

.woocommerce-variation-price {
    margin-bottom: 6px;
}

.woocommerce-variation-price .price {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.woocommerce-variation-price del {
    font-size: 15px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: line-through;
}

.woocommerce-variation-price ins {
    text-decoration: none;
    color: #10b981;
}

.woocommerce-variation-availability {
    display: flex;
    margin-top: 4px;
}

.woocommerce-variation-availability .stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 9999px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.woocommerce-variation-availability .stock.in-stock {
    color: #047857;
    background-color: #d1fae5;
}

.woocommerce-variation-availability .stock.in-stock::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.woocommerce-variation-availability .stock.out-of-stock {
    color: #b91c1c;
    background-color: #fee2e2;
}

.woocommerce-variation-availability .stock.out-of-stock::before {
    content: "";
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
}

.codenoksha-eac-variation-form .reset_variations {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #ef4444;
    text-decoration: none;
    transition: all 0.2s ease;
}

.codenoksha-eac-variation-form .reset_variations:hover {
    color: #b91c1c;
    text-decoration: underline;
}

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

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

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

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

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

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

.codenoksha-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;
}

.codenoksha-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);
}

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

.codenoksha-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);
}

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

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

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

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

.codenoksha-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;
}

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

.codenoksha-eac-spinner {
    display: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    animation: codenoksha-eac-spin 0.6s linear infinite;
}

.codenoksha-eac-btn.is-loading {
    cursor: wait;
}

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

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

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

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

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

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

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

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

@media (max-width: 767px) {
    .codenoksha-eac-actions {
        flex-wrap: nowrap;
        align-items: stretch;
    }

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

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

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

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