/* ═══════════════════════════════════════════
   LUMIÈRE — SIDE PANEL CART
   Базові стилі. Дизайн доопрацьовується пізніше.
═══════════════════════════════════════════ */

.lm-no-scroll { overflow: hidden !important; }

/* ─── Overlay ─────────────────────────────── */
.lm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.lm-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* ─── Панель ──────────────────────────────── */
.lm-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: min(480px, 100vw);
    height: 100dvh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4, 0, .2, 1);
    box-shadow: -4px 0 32px rgba(0, 0, 0, .12);
}
.lm-panel.is-open {
    transform: translateX(0);
}

/* ─── Хедер ───────────────────────────────── */
.lm-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #efefef;
    flex-shrink: 0;
}
.lm-panel__title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}
.lm-panel__close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    cursor: pointer;
    color: #1a1a1a;
    opacity: .4;
    transition: opacity .2s;
}
.lm-panel__close:hover { opacity: 1; }

/* ─── Скрол-зона ──────────────────────────── */
.lm-panel__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    overscroll-behavior: contain;
}

/* ─── Товари ──────────────────────────────── */
.lm-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f3f3f3;
}
.lm-item__img {
    width: 66px;
    height: 66px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #f5f5f5;
}
.lm-item__info { flex: 1; min-width: 0; }
.lm-item__name {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lm-item__meta {
    font-size: 12px;
    color: #888;
    line-height: 1.6;
}
.lm-item__price {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}
.lm-empty {
    text-align: center;
    color: #aaa;
    padding: 24px 0;
    font-size: 14px;
}

/* ─── Підсумок ────────────────────────────── */
.lm-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    margin-bottom: 4px;
    border-bottom: 2px solid #1a1a1a;
    font-size: 14px;
    color: #555;
}
.lm-summary strong {
    font-size: 18px;
    color: #1a1a1a;
}

/* ─── Форма ───────────────────────────────── */
.lm-section {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #aaa;
    margin: 22px 0 12px;
}
.lm-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.lm-field {
    margin-bottom: 14px;
    position: relative;
}
.lm-field > label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.lm-field > label em {
    color: #d00;
    font-style: normal;
    margin-left: 2px;
}
.lm-field input[type="text"],
.lm-field input[type="tel"],
.lm-field input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    color: #1a1a1a;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .2s;
    -webkit-appearance: none;
}
.lm-field input:focus {
    outline: none;
    border-color: #1a1a1a;
}
.lm-error {
    display: block;
    font-size: 12px;
    color: #d00;
    margin-top: 5px;
    min-height: 16px;
}

/* ─── Подарунок ───────────────────────────── */
.lm-gift-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 0;
    transition: border-color .2s;
    user-select: none;
}
.lm-gift-toggle:hover { border-color: #1a1a1a; }
.lm-gift-toggle input { flex-shrink: 0; margin: 0; cursor: pointer; }
.lm-gift-block {
    margin-top: 14px;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

/* ─── Radio ───────────────────────────────── */
.lm-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 8px;
    font-size: 14px;
    color: #1a1a1a;
    transition: border-color .2s, background .2s;
    user-select: none;
}
.lm-radio-label:has(input:checked) {
    border-color: #1a1a1a;
    background: #f9f9f9;
}
.lm-radio-label input {
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

/* ─── Autocomplete dropdown ───────────────── */
.lm-autocomplete-wrap { position: relative; }
.lm-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
    z-index: 200;
    max-height: 220px;
    overflow-y: auto;
    display: none;
}
.lm-dd-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    color: #1a1a1a;
    transition: background .15s;
    line-height: 1.4;
}
.lm-dd-item:hover { background: #f5f5f5; }

/* ─── Футер ───────────────────────────────── */
.lm-panel__foot {
    padding: 16px 24px 24px;
    border-top: 1px solid #efefef;
    flex-shrink: 0;
    background: #fff;
}
.lm-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}
.lm-total-row strong {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}
.lm-btn-submit {
    width: 100%;
    padding: 15px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    letter-spacing: .02em;
}
.lm-btn-submit:hover   { background: #333; }
.lm-btn-submit:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* ─── Мобільна адаптація ──────────────────── */
@media (max-width: 480px) {
    .lm-panel { width: 100vw; }
    .lm-row { grid-template-columns: 1fr; }
}

.lm-item__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}
.lm-item__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 14px;
    padding: 0;
    flex-shrink: 0;
    transition: color .2s;
    line-height: 1;
}
.lm-item__remove:hover { color: #d00; }

.lm-item__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
}
.lm-qty {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}
.lm-qty__btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    flex-shrink: 0;
}
.lm-qty__btn:hover { background: #f5f5f5; }
.lm-qty__num {
    min-width: 28px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 0 4px;
    line-height: 30px;
}