/* ==========================================================================
   1. ГЛОБАЛЬНІ СТИЛІ, БАЗОВІ ЕЛЕМЕНТИ ТА АНІМАЦІЇ
   ========================================================================== */

#ac-custom-checkout-wrapper,
.ac-address-manager {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--global-bg, #fff);
}

.ac-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
.ac-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.ac-radio-group,
.ac-radio-group-inline { display: flex; gap: 15px; }
.ac-radio-group-vertical { display: flex; flex-direction: column; gap: 10px; }

.ac-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    font-size: 14px;
    transition: border-color 0.2s;
}
.ac-input:focus { border-color: var(--global-accent, #007cba); outline: none; }
textarea.ac-input { resize: vertical; }
select.ac-input { height: 42px; }

.ac-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Кнопка відправки */
.ac-submit-btn,
.ac-address-manager .button-primary {
    width: 100%;
    padding: 15px;
    background-color: var(--btn-bg, #007cba) !important;
    color: var(--btn-text, #fff) !important;
    border: none;
    font-size: 1.05rem;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    transition: all 0.25s ease;
    border-radius: 8px;
}
.ac-submit-btn:hover,
.ac-address-manager .button-primary:hover {
    background-color: var(--btn-bg-hover, #005a8c) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,124,186,0.25);
}
.ac-submit-btn:disabled,
.ac-btn-disabled {
    background-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.ac-error-msg {
    margin-top: 10px;
    font-weight: 500;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
}

/* Анімації */
.ac-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ac-spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

.ac-input-error {
    border-color: #ef4444 !important;
    background-color: #fff5f5 !important;
}
.ac-shake {
    animation: ac-shake-anim 0.45s cubic-bezier(.36,.07,.19,.97);
    border: 1px solid #ef4444 !important;
    padding: 5px;
    border-radius: 4px;
}
@keyframes ac-shake-anim {
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-5px); }
    40%, 60% { transform: translateX(5px); }
}

/* ==========================================================================
   2. B2B CHECKOUT LAYOUT
   ========================================================================== */

.ac-b2b-columns {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.ac-b2b-left-col {
    flex: 0 0 calc(60% - 14px);
    max-width: calc(60% - 14px);
    /* Ліва колонка скролиться всередині якщо потрібно */
}

.ac-b2b-right-col {
    flex: 0 0 calc(40% - 14px);
    max-width: calc(40% - 14px);
    position: sticky;
    /*top: 20px;*/
    top: var(--header-height);
    align-self: flex-start;
}

.ac-b2b-footer-block {
    background: #fdfdfd;
    border: 1px solid #e8ecf0;
    padding: 18px;
    border-radius: 10px;
    margin-top: 16px;
}

/* ==========================================================================
   3. SMART CARD V2 — основна картка зліва
   ========================================================================== */

.ac-smart-card-v2 {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    overflow: visible;
}

.ac-field-group {
    padding: 18px 20px;
}

.ac-card-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #e2e8f0 20%, #e2e8f0 80%, transparent);
    margin: 0 14px;
}

/* ==========================================================================
   4. ЛЕЙБЛ ПОЛЯ
   ========================================================================== */

.ac-select-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.ac-select-icon { font-size: 15px; line-height: 1; }
.ac-select-label-text {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: #64748b;
    flex: 1;
}

/* ==========================================================================
   5. КАСТОМНИЙ SELECT
   ========================================================================== */

.ac-custom-select-wrap { position: relative; }
.ac-custom-select { position: relative; outline: none; }

.ac-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 13px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 9px;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s, background 0.15s;
    user-select: none;
    min-height: 48px;
}
.ac-custom-select.ac-select-open .ac-select-trigger,
.ac-select-trigger:hover {
    border-color: #007cba;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.09);
}

.ac-select-trigger-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.ac-select-trigger-icon { font-size: 17px; flex-shrink: 0; }
.ac-select-trigger-text {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-select-trigger-placeholder { font-size: 14px; color: #94a3b8; }
.ac-select-meta { font-size: 12px; color: #94a3b8; margin-left: 5px; }

.ac-select-chevron {
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.22s cubic-bezier(.4,0,.2,1), color 0.18s;
    display: flex;
    align-items: center;
}
.ac-custom-select.ac-select-open .ac-select-chevron {
    transform: rotate(180deg);
    color: #007cba;
}

/* Dropdown */
.ac-select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0; right: 0;
    background: #fff;
    border: 1.5px solid #007cba;
    border-radius: 10px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.13);
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px) scaleY(0.97);
    transform-origin: top;
    pointer-events: none;
    transition: opacity 0.18s cubic-bezier(.4,0,.2,1), transform 0.18s cubic-bezier(.4,0,.2,1);
}
.ac-custom-select.ac-select-open .ac-select-dropdown {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

/* Опції */
.ac-select-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    cursor: pointer;
    transition: background 0.1s;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
.ac-select-option:last-child { border-bottom: none; }
.ac-select-option:hover { background: #f0f7ff; }
.ac-select-option.ac-option-selected { background: #e8f4fd; }
.ac-select-option.ac-option-selected:hover { background: #d6edf9; }

.ac-option-icon { font-size: 17px; flex-shrink: 0; width: 22px; text-align: center; }
.ac-option-body { flex: 1; min-width: 0; }
.ac-option-title {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-option-sub {
    display: block;
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-option-check {
    color: #007cba;
    opacity: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    transition: opacity 0.13s;
}
.ac-select-option.ac-option-selected .ac-option-check { opacity: 1; }
.ac-option-new-np .ac-option-title { color: #007cba; }
.ac-option-rec {
    display: block;
    font-size: 10.5px;
    color: #64748b;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ac-option-new-np { border-top: 1px dashed #e2e8f0 !important; }

.ac-select-hint {
    padding: 7px 13px;
    font-size: 11px;
    color: #94a3b8;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-style: italic;
}
.ac-select-empty {
    padding: 14px 13px;
    font-size: 13px;
    color: #d63638;
    text-align: center;
}

/* Email row */
.ac-payer-email-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 9px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 12px;
    color: #64748b;
}
.ac-payer-email-row strong { color: #334155; }

/* ==========================================================================
   6. EXPANDABLE ZONES — КОМПАКТНІ, зі скролом у блоці НП
   ========================================================================== */

.ac-expandable-zone { overflow: hidden; }

.ac-zone-inner {
    padding: 13px 14px;
    background: linear-gradient(135deg, #f0f7ff 0%, #f8fafc 100%);
    border: 1.5px solid #bde0f5;
    border-radius: 9px;
    margin-top: 9px;
    animation: ac-zone-appear 0.22s cubic-bezier(.4,0,.2,1);
}

@keyframes ac-zone-appear {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ac-zone-header {
    font-size: 12px;
    font-weight: 700;
    color: #0369a1;
    margin-bottom: 10px;
    letter-spacing: 0.03em;
}
.ac-zone-sub-label { font-size: 12px; font-weight: 600; color: #475569; }

/* Компактні відступи всередині зон */
.ac-zone-inner .ac-row-2 { gap: 10px; }
.ac-zone-inner .ac-form-field + .ac-form-field { margin-top: 0; }

/* --- ЗОНА НП: внутрішній скрол щоб не скролилась вся сторінка --- */
/*.ac-zone-inner--np-scroll {*/
/*    max-height: 340px;*/
/*    overflow-y: auto;*/
/*    overscroll-behavior: contain;*/
/*    scrollbar-width: thin;*/
/*    scrollbar-color: #cbd5e1 transparent;*/
/*}*/
/*.ac-zone-inner--np-scroll::-webkit-scrollbar {*/
/*    width: 4px;*/
/*}*/
/*.ac-zone-inner--np-scroll::-webkit-scrollbar-thumb {*/
/*    background: #cbd5e1;*/
/*    border-radius: 4px;*/
/*}*/

/* ==========================================================================
   7. КНОПКА OK / ПІДТВЕРДИТИ
   ========================================================================== */

.ac-zone-ok-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px dashed #bde0f5;
}

.ac-zone-ok-hint {
    font-size: 12px;
    color: #ef4444;
    font-weight: 500;
    flex: 1;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.25s, transform 0.25s;
}
.ac-zone-ok-hint.ac-zone-hint-visible {
    opacity: 1;
    transform: translateX(0);
}

.ac-zone-ok-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s;
    flex-shrink: 0;
}
.ac-zone-ok-btn:hover {
    background: #005a8c;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,124,186,0.3);
}
.ac-zone-ok-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Пульсація кнопки OK якщо намагаються сабмітити без підтвердження */
@keyframes ac-ok-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,124,186,0.5); transform: scale(1); }
    50%       { box-shadow: 0 0 0 6px rgba(0,124,186,0); transform: scale(1.04); }
}
.ac-zone-ok-btn-pulse {
    animation: ac-ok-pulse 0.6s ease 2;
}

/* ==========================================================================
   8. INPUT V2
   ========================================================================== */

.ac-input-v2 {
    background: #fff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 7px !important;
    padding: 9px 11px !important;
    font-size: 13.5px !important;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.18s, box-shadow 0.18s !important;
}
.ac-input-v2:focus {
    border-color: #007cba !important;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1) !important;
    outline: none !important;
}
.ac-input-v2[readonly] {
    background: #f5f7fa !important;
    color: #94a3b8 !important;
    cursor: not-allowed;
}

.ac-form-field { display: flex; flex-direction: column; }
.ac-form-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    letter-spacing: 0.03em;
}
.ac-req { color: #ef4444; }

/* ==========================================================================
   9. CHIP SELECTOR
   ========================================================================== */

.ac-chip-selector { display: flex; flex-wrap: wrap; gap: 7px; }

.ac-chip-radio,
.ac-radio-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    transition: all 0.14s;
    user-select: none;
}
.ac-chip-radio:hover { border-color: #007cba; color: #007cba; background: #f0f7ff; }
.ac-chip-radio input { display: none; }
.ac-chip-radio.ac-chip-radio-selected,
.ac-chip-radio:has(input:checked) {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
}

.ac-radio-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 500;
    color: #475569;
    background: #fff;
    transition: all 0.14s;
}
.ac-radio-label:hover { border-color: #007cba; color: #007cba; background: #f0f7ff; }
.ac-radio-label input { display: none; }
.ac-radio-label:has(input:checked) {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
}

.ac-checkbox-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12.5px;
    color: #475569;
    background: #fff;
    transition: all 0.14s;
    width: 100%;
    box-sizing: border-box;
}
.ac-checkbox-chip:hover { border-color: #007cba; background: #f0f7ff; }
.ac-checkbox-chip input { accent-color: #007cba; }

/* NP type toggle */
.ac-np-type-toggle { display: flex; gap: 7px; margin-bottom: 9px; }
.ac-toggle-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.14s;
    color: #475569;
    background: #fff;
}
.ac-toggle-chip:hover { border-color: #007cba; color: #007cba; }
.ac-toggle-chip input { display: none; }
.ac-toggle-chip:has(input:checked) {
    border-color: #007cba;
    background: #007cba;
    color: #fff;
}

/* ==========================================================================
   10. RETAIL CONTACT CARD
   ========================================================================== */

.ac-contact-view-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
}
.ac-contact-view-name { font-size: 14px; font-weight: 600; color: #1e293b; flex: 1; }
.ac-contact-view-phone { font-size: 12.5px; color: #64748b; }

.ac-inline-edit-btn {
    margin-left: auto;
    background: none;
    border: 1.5px solid #007cba;
    color: #007cba;
    padding: 4px 11px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.14s;
    flex-shrink: 0;
}
.ac-inline-edit-btn:hover { background: #007cba; color: #fff; }

.ac-expandable-form {
    overflow: hidden;
    animation: ac-zone-appear 0.2s ease;
}

.ac-form-actions-inline {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.ac-btn-inline-save {
    background: #007cba;
    color: #fff;
    border: none;
    padding: 7px 18px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}
.ac-btn-inline-save:hover { background: #005a8c; }

/* ==========================================================================
   11. SUMMARY ZONE — замінює повністю секцію 11 в checkout.css
   ========================================================================== */

/* Базовий стиль — збережена адреса (зелена, read-only) */
.ac-zone-inner--summary {
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    border-color: #86efac;
    position: relative;
}

/* Editable — незбережена адреса (синя рамка, pointer, "Змінити") */
/* ВАЖЛИВО: клас ac-summary-editable на .ac-zone-inner--summary, не на wrapper */
.ac-zone-inner--summary.ac-summary-editable {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    border-color: #93c5fd;
    cursor: pointer;
}

.ac-zone-inner--summary.ac-summary-editable::after {
    content: '✎ Змінити';
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 11px;
    color: #64748b;
    opacity: 0;
    transition: opacity 0.18s;
    pointer-events: none;
}

.ac-zone-inner--summary.ac-summary-editable:hover::after {
    opacity: 1;
}

.ac-address-summary-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.ac-summary-row {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    font-size: 13px;
    color: #334155;
    line-height: 1.5;
}

.ac-summary-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.ac-summary-contact { color: #475569; }
.ac-summary-meta { color: #64748b; font-size: 12px; }

/* ==========================================================================
   12. CART UI
   ========================================================================== */

.ac-cart-flex-container { width: 100%; }
.ac-cart-actions { text-align: right; margin-bottom: 12px; }
.ac-btn-back-to-cart {
    display: inline-block;
    padding: 5px 11px;
    font-size: 12.5px;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.15s;
}
.ac-btn-back-to-cart:hover { background: #e5e5e5; color: #333; }

.ac-cart-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    max-height: 350px;
    overflow-y: auto;
}

.ac-order-item-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 9px;
    /*overflow: hidden;*/
}

.ac-card-top {
    display: flex;
    padding: 11px 13px;
    align-items: center;
}
.ac-card-thumb {
    width: 52px;
    margin-right: 12px;
    position: relative;
    flex-shrink: 0;
}
.ac-checkout-thumb {
    width: 52px; height: 52px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #eee;
}
.ac-card-info { flex-grow: 1; }
.ac-card-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 4px;
}
.ac-card-name a { color: #333; text-decoration: none; }
.ac-card-name a:hover { color: #007cba; }

.ac-card-sku {
    font-size: 11.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
}
.ac-card-sku:hover { background: #e2e8f0; }
.ac-copy-icon { margin-left: 4px; color: #007cba; }

.ac-card-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}
.ac-card-bottom-grid > div {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    font-size: 12.5px;
    border-right: 1px solid #e2e8f0;
}
.ac-card-bottom-grid > div:last-child { border-right: none; }
.ac-card-bottom-grid span {
    font-size: 10.5px;
    color: #64748b;
    margin-bottom: 3px;
}
.ac-grid-qty { text-align: center; align-items: center; }
.ac-grid-total {
    text-align: right;
    align-items: flex-end;
    font-weight: 700;
    color: #007cba;
}

.ac-cart-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding: 14px 16px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    font-size: 16px;
}
.ac-cart-totals strong { color: #0369a1; font-size: 20px; }

/* Акордеон кошика */
.ac-item-hidden { display: none; }
.ac-cart-list.ac-has-accordion { padding-bottom: 38px; }
.ac-accordion-fade {
    display: none;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 90%);
    pointer-events: none;
    z-index: 1;
}
.ac-btn-toggle-cart {
    width: 100%;
    background: #fff;
    border: 1px dashed #ccc;
    color: #555;
    padding: 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12.5px;
    position: relative;
    z-index: 2;
    margin-top: 8px;
    transition: 0.18s;
}
.ac-btn-toggle-cart:hover { background: #f9f9f9; border-color: #aaa; color: #333; }
.ac-cart-list.ac-expanded { padding-bottom: 0; }
.ac-cart-list.ac-expanded .ac-item-hidden { display: flex; }
.ac-cart-list.ac-expanded .ac-accordion-fade { display: none; }

/* ==========================================================================
   13. ORDER REVIEW / PAYMENT BLOCK
   ========================================================================== */

.ac-order-review-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 12px;
}

.ac-payment-method-block h4 {
    font-size: 13px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}
.ac-radio-group-vertical label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.14s, background 0.14s;
}
.ac-radio-group-vertical label:hover { border-color: #007cba; background: #f0f7ff; }
.ac-radio-group-vertical label:has(input:checked) {
    border-color: #007cba;
    background: #e8f4fd;
}

.ac-terms-wrapper {
    margin: 12px 0;
}
.ac-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    line-height: 1.5;
}
.ac-checkbox-label input { accent-color: #007cba; flex-shrink: 0; margin-top: 2px; }
.ac-checkbox-label a { color: #007cba; }

/* ==========================================================================
   14. NOVA POSHTA FLY-DROPDOWN
   ========================================================================== */

.ac-np-fly-dropdown {
    display: none;
    background: #fff;
    border: 1.5px solid #007cba;
    border-radius: 0 0 9px 9px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    max-height: 200px;
    overflow-y: auto;
    z-index: 99999;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.ac-np-fly-dropdown::-webkit-scrollbar { width: 4px; }
.ac-np-fly-dropdown::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.ac-np-fly-dropdown .ac-np-item,
.ac-np-fly-dropdown .ac-np-branch-item {
    padding: 9px 13px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f0f5fa;
    transition: background 0.1s;
}
.ac-np-fly-dropdown .ac-np-item:last-child,
.ac-np-fly-dropdown .ac-np-branch-item:last-child { border-bottom: none; }
.ac-np-fly-dropdown .ac-np-item:hover,
.ac-np-fly-dropdown .ac-np-branch-item:hover { background: #f0f7ff; color: #007cba; }
.ac-np-fly-dropdown .ac-np-item-sub {
    display: block;
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.ac-np-fly-dropdown .ac-np-loading,
.ac-np-fly-dropdown .ac-np-no-result {
    padding: 11px 13px;
    font-size: 12.5px;
    color: #94a3b8;
}

/* Старий inline NP dropdown (для зворотньої сумісності, прихований) */
.ac-np-dropdown { display: none !important; }

/* ==========================================================================
   15. ADDRESS MANAGER (в особистому кабінеті)
   ========================================================================== */

.ac-address-card {
    border: 1px solid #eee;
    padding: 14px;
    margin-bottom: 13px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
}
.ac-address-radio-list,
.ac-contractor-list { display: flex; flex-direction: column; }
.ac-is-default { border-color: #4ab866; background: #f0f9f2; }
.ac-badge-default {
    background: #4ab866;
    color: #fff;
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
    flex-shrink: 0;
}

.ac-addr-actions { display: flex; flex-direction: column; gap: 7px; }
.ac-btn-edit {
    background: #eee; border: none; padding: 6px 12px;
    cursor: pointer; border-radius: 5px; font-size: 12.5px;
}
.ac-btn-edit:hover { background: #ddd; }
.ac-btn-remove {
    background: #ffecec; border: 1px solid #ffcccc;
    color: #d63638; padding: 6px 12px; cursor: pointer;
    border-radius: 5px; font-size: 12.5px;
}
.ac-btn-remove:hover { background: #ffcccc; }

/* ==========================================================================
   16. ПРИХОВУВАННЯ СТАНДАРТНИХ БЛОКІВ WOOCOMMERCE
   ========================================================================== */

section.woocommerce-customer-details { display: none !important; }
.woocommerce-order-details .woocommerce-columns--addresses,
.woocommerce-order-details .col2-set.addresses,
.woocommerce-order-details address:not(.ac-custom-address) { display: none !important; }
section.woocommerce-order-details .ac-cart-list.ac-has-accordion {
    width: 90%;
    margin: 0 auto;
    max-height: unset;
}

section.ac-custom-order-details {
    display: block !important;
    width: 100%;
    margin-top: 28px;
    margin-bottom: 28px;
}
section.ac-custom-order-details address.ac-custom-address {
    display: block !important;
    font-style: normal;
    border: 1px solid #e5e5e5;
    background: #f9f9f9;
    padding: 18px;
    border-radius: 8px;
}

/* Ховаємо старі стилі щоб не конфліктували */
.ac-smart-card-v2 .ac-smart-block,
.ac-smart-card-v2 .ac-smart-view-layer,
.ac-smart-card-v2 .ac-smart-edit-layer { display: none !important; }

/* ==========================================================================
   17. АДАПТИВНІСТЬ
   ========================================================================== */

@media (max-width: 960px) {
    .ac-b2b-columns { flex-direction: column; gap: 18px; }
    .ac-b2b-left-col,
    .ac-b2b-right-col { flex: 100%; max-width: 100%; align-self: center; }
    .ac-b2b-right-col { position: static; }
    .ac-row-2 { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .ac-field-group { padding: 14px 15px; }
    .ac-select-trigger { min-height: 44px; }
    .ac-chip-selector { gap: 5px; }
    .ac-chip-radio, .ac-radio-label { padding: 5px 10px; font-size: 12px; }
    .ac-cart-totals { font-size: 14px; }
    .ac-cart-totals strong { font-size: 18px; }
    .ac-address-card { flex-direction: column; }
    .ac-addr-actions { width: 100%; flex-direction: row; margin-top: 12px; }
    .ac-addr-actions button { flex: 1; }
    .ac-zone-ok-wrap { flex-direction: column; align-items: stretch; }
    .ac-zone-ok-btn { text-align: center; justify-content: center; }
}