/* ── Full-width row above add-to-cart ── */
form.cart .jsw-cart-full-row,
.single-product form.cart .jsw-cart-full-row {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    clear: both;
    margin: 0 0 12px;
    float: none;
    box-sizing: border-box;
}

.jsw-cart-row {
    display: block;
    width: 100%;
}

.jsw-cart-row--cta {
    margin-bottom: 8px;
}

.jsw-cart-row--meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jsw-sync-fields {
    display: none !important;
}

/* ── CTA Button (compact, no heavy animation) ── */
.jsw-product-options--modal {
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    position: relative;
    z-index: 2;
}

.jsw-cta-button {
    position: relative;
    display: inline-flex;
    max-width: 100%;
    width: auto;
    min-width: min(100%, 280px);
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.jsw-cta-button * {
    pointer-events: none;
}

.jsw-cta-button__glow,
.jsw-cta-button__ring {
    display: none;
}

.jsw-cta-button__inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #6d28d9 100%);
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jsw-cta-button:hover .jsw-cta-button__inner {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.28);
}

.jsw-cta-button:active .jsw-cta-button__inner {
    transform: translateY(0);
}

.jsw-cta-button__icon {
    display: flex;
    flex-shrink: 0;
}

.jsw-cta-button__arrow {
    font-size: 1rem;
    opacity: 0.85;
}

.jsw-cta-button__text {
    white-space: nowrap;
}

/* ── Summary ── */
.jsw-selection-summary {
    margin-top: 0;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    font-size: 0.86rem;
    color: #4b5563;
    text-align: right;
    transition: background 0.2s, border-color 0.2s;
}

.jsw-selection-summary.has-selection {
    background: #ecfdf5;
    border-color: #6ee7b7;
    color: #047857;
}

.jsw-extra-total {
    margin-top: 0;
    padding: 6px 12px;
    border-radius: 6px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    font-size: 0.86rem;
    color: #92400e;
    text-align: right;
}

.jsw-extra-total-value {
    font-weight: 700;
}

/* ── Modal ── */
.jsw-modal {
    position: fixed;
    inset: 0;
    z-index: 9999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
}

.jsw-modal.is-open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.jsw-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}

.jsw-modal__panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: min(85vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.jsw-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
}

.jsw-modal__header h3 {
    margin: 0;
    font-size: 1rem;
    color: #1e293b;
}

.jsw-modal__close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.jsw-modal__body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    -webkit-overflow-scrolling: touch;
}

.jsw-modal__footer {
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
    background: #f8fafc;
}

.jsw-modal__confirm {
    width: 100%;
    padding: 12px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    background: #4f46e5 !important;
    border: none !important;
    color: #fff !important;
    cursor: pointer;
}

body.jsw-modal-open {
    overflow: hidden;
}

/* ── Sections ── */
.jsw-section-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    color: #334155;
}

.jsw-section + .jsw-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed #e2e8f0;
}

.jsw-note {
    font-size: 0.82rem;
    color: #64748b;
    margin: 0 0 10px;
}

.jsw-note--included {
    color: #047857;
}

/* ── Accordion ── */
.jsw-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.jsw-accordion-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.jsw-accordion-item.is-open {
    border-color: #a5b4fc;
}

.jsw-accordion-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 14px;
    border: none;
    background: #f8fafc;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
}

.jsw-accordion-item.is-open .jsw-accordion-head {
    background: #eef2ff;
}

.jsw-accordion-head__title {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1e293b;
}

.jsw-accordion-head__meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.jsw-accordion-head__count {
    font-size: 0.75rem;
    color: #64748b;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
}

.jsw-accordion-head__chevron {
    width: 8px;
    height: 8px;
    border-right: 2px solid #6366f1;
    border-bottom: 2px solid #6366f1;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.jsw-accordion-item.is-open .jsw-accordion-head__chevron {
    transform: rotate(-135deg);
}

.jsw-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.jsw-accordion-item.is-open .jsw-accordion-body {
    max-height: 800px;
}

.jsw-accordion-body__inner {
    padding: 6px 10px 10px;
    border-top: 1px solid #e2e8f0;
}

/* ── Options ── */
.jsw-option-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}

.jsw-option-row:hover {
    background: #f8fafc;
}

.jsw-option-row:has(input:checked) {
    background: #eef2ff;
    border-color: #a5b4fc;
}

.jsw-option-row input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    accent-color: #4f46e5;
    flex-shrink: 0;
}

.jsw-option-label {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
}

.jsw-option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.jsw-guide-toggle,
.jsw-guide-close {
    align-self: flex-start;
    margin-top: 2px;
    padding: 2px 8px;
    border: 1px solid #c7d2fe;
    border-radius: 4px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 0.75rem;
    cursor: pointer;
    pointer-events: auto;
}

.jsw-guide-close {
    margin-top: 6px;
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.jsw-option-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.45;
}

.jsw-option-price {
    color: #059669;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.85rem;
}

.jsw-warranty-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.jsw-locked-qty {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
}

/* Spacing with add-to-cart */
.single-product form.cart .quantity,
.single-product form.cart .single_add_to_cart_button {
    margin-top: 0;
}

@media (max-width: 480px) {
    .jsw-cta-button {
        width: 100%;
        min-width: 0;
    }

    .jsw-cta-button__inner {
        padding: 10px 14px;
        font-size: 0.9rem;
    }

    .jsw-modal__panel {
        max-height: 90vh;
    }
}
