
/* Bukvaeshka Reserve Module Styles */
.buk-reserve-card-box {
    margin: 16px 0 18px;
    padding: 16px;
    background: #f8fafd;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
}
.buk-reserve-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff !important;
    background: #e31e24;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(227, 30, 36, 0.22);
}
.buk-reserve-main-btn:hover {
    background: #c8191e;
    color: #ffffff !important;
}
.buk-reserve-main-btn:disabled,
.buk-reserve-main-btn.is-disabled {
    background: #b0b8c4;
    box-shadow: none;
    cursor: not-allowed;
}
.buk-reserve-main-btn svg {
    margin-right: 8px;
    flex-shrink: 0;
}
.buk-reserve-subinfo {
    margin-top: 10px;
    font-size: 13px;
    color: #4a5568;
    line-height: 1.45;
}
.buk-reserve-subinfo strong {
    color: #1a202c;
}
.buk-reserve-special-hint {
    margin-top: 8px;
    padding: 7px 10px;
    background: #edf7ed;
    border: 1px solid #b7dfb9;
    border-radius: 5px;
    color: #1e6b24;
    font-size: 12.5px;
    font-weight: 600;
}

/* Store Row Button inside catalog.store.amount */
.buk-store-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.buk-store-reserve-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #e31e24 !important;
    background: #fff5f5;
    border: 1px solid #e31e24;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none !important;
}
.buk-store-reserve-btn:hover {
    color: #ffffff !important;
    background: #e31e24;
}
.buk-store-price-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: #2d3748;
    background: #edf2f7;
    border-radius: 4px;
}
.buk-store-price-tag.is-special {
    color: #1e6b24;
    background: #e6f4ea;
    border: 1px solid #a8dab5;
}

/* Modal Backdrop & Window */
.buk-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
    backdrop-filter: blur(2px);
}
.buk-modal-backdrop.is-open {
    display: flex;
}
.buk-modal-dialog {
    background: #ffffff;
    width: 100%;
    max-width: 620px;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    position: relative;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    margin: auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.buk-modal-header {
    flex-shrink: 0;
    padding: 15px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.buk-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
}
.buk-modal-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
}
.buk-modal-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}
.buk-modal-body {
    flex: 1 1 auto;
    min-height: 0; /* CRITICAL for flex child scrolling! */
    overflow-y: auto;
    padding: 16px 20px 20px;
    color: #1e293b;
    font-size: 14px;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    box-sizing: border-box;
}

/* Product Summary in Modal */
.buk-prod-summary {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #edf2f7;
    align-items: flex-start;
}
.buk-prod-img {
    width: 68px;
    height: 90px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
    flex-shrink: 0;
}
.buk-prod-details {
    flex: 1;
    min-width: 0;
}
.buk-prod-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 6px;
    line-height: 1.35;
}
.buk-prod-meta {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 10px;
}
.buk-prod-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.buk-price-current {
    font-size: 19px;
    font-weight: 700;
    color: #e31e24;
}
.buk-price-old {
    font-size: 13.5px;
    color: #94a3b8;
    text-decoration: line-through;
    margin-left: 8px;
}
.buk-price-badge-special {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    font-size: 11.5px;
    font-weight: 600;
    background: #dcfce7;
    color: #166534;
    border-radius: 4px;
}

/* Quantity Selector */
.buk-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.buk-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    font-size: 17px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}
.buk-qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
}
.buk-qty-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.buk-qty-input {
    width: 42px;
    height: 32px;
    border: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

/* Store List Selector */
.buk-field-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}
.buk-stores-list {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-bottom: 16px;
    divide-y: 1px solid #f1f5f9;
}
.buk-store-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 13px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 10px;
}
.buk-store-option:last-child {
    border-bottom: none;
}
.buk-store-option:hover:not(.is-disabled) {
    background: #f8fafc;
}
.buk-store-option.is-selected {
    background: #fff5f5;
    border-left: 4px solid #e31e24;
}
.buk-store-option.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
}
.buk-store-opt-left {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.buk-store-opt-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #0f172a;
}
.buk-store-opt-sched {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}
.buk-store-opt-right {
    text-align: right;
    flex-shrink: 0;
}
.buk-store-opt-avail {
    font-size: 12px;
    font-weight: 600;
    color: #16a34a;
}
.buk-store-opt-avail.is-out {
    color: #94a3b8;
}
.buk-store-opt-price {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
}

/* Warning Box (Clause 3.2) */
.buk-warning-box {
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    color: #92400e;
    font-size: 13px;
    line-height: 1.45;
    margin-bottom: 16px;
}

/* Customer Inputs */
.buk-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}
@media (max-width: 560px) {
    .buk-form-grid {
        grid-template-columns: 1fr;
    }
}
.buk-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    background: #fff;
    box-sizing: border-box;
}
.buk-input:focus {
    outline: none;
    border-color: #e31e24;
    box-shadow: 0 0 0 2px rgba(227, 30, 36, 0.12);
}
.buk-phone-verified-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: #15803d;
    font-weight: 600;
}

/* OTP Step Box */
.buk-otp-box {
    margin: 14px 0;
    padding: 14px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
}
.buk-otp-test-hint {
    margin-bottom: 10px;
    padding: 8px 11px;
    background: #fef3c7;
    border: 1px dashed #d97706;
    border-radius: 6px;
    font-size: 13px;
    color: #92400e;
    cursor: pointer;
}
.buk-otp-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.buk-otp-input {
    width: 140px;
    letter-spacing: 5px;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

/* Consent Checkbox */
.buk-consent-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 12px 0 16px;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
    cursor: pointer;
}
.buk-consent-row input[type="checkbox"] {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #e31e24;
    flex-shrink: 0;
}
.buk-consent-row a {
    color: #e31e24;
    text-decoration: underline;
}
.buk-consent-required {
    color: #e31e24;
    font-weight: 700;
}
.buk-consent-row.is-invalid {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px 10px;
    color: #991b1b;
}

/* Error / Alert */
.buk-error-alert {
    padding: 10px 13px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}

/* Success Screen */
.buk-success-box {
    text-align: center;
    padding: 10px 6px;
}
.buk-success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}
.buk-success-num {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}
.buk-success-summary {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin: 14px 0;
    font-size: 13.5px;
    line-height: 1.6;
}

/* Floating Test Mode Indicator */
.buk-testmode-bar {
    position: fixed;
    bottom: 14px;
    left: 14px;
    z-index: 9998;
    background: #1e293b;
    color: #f8fafc;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.buk-testmode-bar a {
    color: #38bdf8 !important;
    text-decoration: underline !important;
    font-weight: 600;
}


/* Reserve Cart Floating Badge */
.buk-cart-floating-badge {
    position: fixed;
    right: 22px;
    bottom: 58px;
    z-index: 9998;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    background: #ffffff;
    border: 2px solid #e31e24;
    border-radius: 30px;
    box-shadow: 0 6px 24px rgba(227, 30, 36, 0.28), 0 2px 6px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.2s ease;
}
.buk-cart-floating-badge:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 28px rgba(227, 30, 36, 0.38), 0 3px 8px rgba(0, 0, 0, 0.12);
    background: #fff5f5;
}
.buk-cart-floating-badge:active {
    transform: translateY(0) scale(0.98);
}
.buk-cart-badge-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: #e31e24;
    color: #ffffff;
    border-radius: 50%;
    flex-shrink: 0;
}
.buk-cart-badge-counter {
    position: absolute;
    top: -5px;
    right: -7px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #e31e24;
    background: #ffffff;
    border: 2px solid #e31e24;
    border-radius: 10px;
}
.buk-cart-badge-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.buk-cart-badge-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.buk-cart-badge-subtitle {
    font-size: 11.5px;
    font-weight: 600;
    color: #e31e24;
    line-height: 1.2;
    margin-top: 2px;
}

/* Toast Notifications */
.buk-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100000;
    max-width: 400px;
    padding: 12px 18px;
    background: #0f172a;
    color: #ffffff;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.4;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.buk-toast.is-show {
    opacity: 1;
    transform: translateY(0);
}
.buk-toast-success {
    border-left: 4px solid #22c55e;
}
.buk-toast-warning {
    border-left: 4px solid #f59e0b;
}

/* Modal Cart Items Styles */
.buk-cart-items-wrap {
    margin-bottom: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 14px;
    max-height: 240px;
    overflow-y: auto;
}
.buk-cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f7;
}
.buk-cart-item-row:last-child {
    border-bottom: none;
}
.buk-cart-item-thumb {
    width: 42px;
    height: 56px;
    object-fit: contain;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 2px;
    flex-shrink: 0;
}
.buk-cart-item-details {
    flex: 1;
    min-width: 0;
}
.buk-cart-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}
.buk-cart-item-sub {
    font-size: 11px;
    color: #64748b;
    margin-top: 2px;
}
.buk-cart-item-price {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    text-align: right;
}
.buk-cart-item-remove-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px 8px;
    font-size: 18px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.15s ease, background 0.15s ease;
}
.buk-cart-item-remove-btn:hover {
    color: #ef4444;
    background: #fee2e2;
}

/* Store Option in Cart */
.buk-store-card-full {
    border: 2px solid #22c55e !important;
    background: #f0fdf4 !important;
}
.buk-store-card-partial {
    opacity: 0.60;
    cursor: not-allowed;
    background: #f8fafc !important;
}
.buk-badge-full-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dcfce7;
    color: #15803d;
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
.buk-badge-partial-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}
.buk-cart-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0 12px;
    font-size: 12.5px;
}
.buk-cart-actions-bar a {
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
}
.buk-cart-actions-bar a:hover {
    color: #0f172a;
}
.buk-cart-actions-bar .buk-link-clear {
    color: #ef4444;
}
.buk-cart-actions-bar .buk-link-clear:hover {
    color: #dc2626;
}
