/* ===== Nút Liên hệ đặt hàng - kế thừa font theo theme, chiều cao khớp nút "Mua ngay" (38.85px) ===== */
.lhdh-open-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38.85px;
    margin: 8px 0;
    padding: 0 18.624px;
    background: #fff;
    color: #e02020;
    border: 2px solid #e02020;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
    text-align: center;
    font: inherit;
    line-height: 1;
}

.lhdh-open-btn:hover {
    background: #e02020;
    color: #fff;
}

.lhdh-product-no-price {
    margin-top: 10px;
}

/* ===== Overlay & Modal ===== */
.lhdh-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lhdh-modal {
    background: #fff;
    width: 100%;
    max-width: 520px;
    border-radius: 10px;
    position: relative;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    animation: lhdh-pop-in 0.18s ease;
    box-sizing: border-box;
}

@keyframes lhdh-pop-in {
    from { transform: scale(0.95); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

/* ===== Header màu đỏ ===== */
.lhdh-header {
    background: #e02020;
    color: #fff;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.lhdh-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    color: #fff;
}

.lhdh-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    flex-shrink: 0;
}
.lhdh-close:hover { background: rgba(255, 255, 255, 0.3); }

/* ===== Phần thân popup (cuộn được nếu form dài) ===== */
.lhdh-body {
    padding: 20px 24px 24px;
    overflow-y: auto;
}

/* ===== Thẻ sản phẩm nổi bật ===== */
.lhdh-sp-card {
    background: #fff5f5;
    border: 1px solid #f3c4c4;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 18px;
}

.lhdh-sp-ten {
    font-weight: 700;
    font-size: 14px;
    color: #222;
    line-height: 1.4;
}

.lhdh-sp-sku {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #e02020;
}

/* ===== Form ===== */
#lhdh-form,
#lhdh-form * {
    box-sizing: border-box;
}

.lhdh-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

/* Số lượng chiếm 1 cột, để trống cột bên cạnh cho gọn */
.lhdh-grid-2 .lhdh-field:nth-child(5) {
    grid-column: 1 / 2;
}

.lhdh-field {
    margin-bottom: 12px;
}

.lhdh-field-full {
    margin-bottom: 12px;
}

#lhdh-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 5px;
}

#lhdh-form input[type="text"],
#lhdh-form input[type="tel"],
#lhdh-form input[type="email"],
#lhdh-form input[type="number"],
#lhdh-form textarea {
    display: block;
    width: 100% !important;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

#lhdh-form textarea {
    resize: vertical;
    min-height: 70px;
}

#lhdh-form input:focus,
#lhdh-form textarea:focus {
    outline: none;
    border-color: #e02020;
}

.lhdh-required { color: #e02020; }

.lhdh-form-msg {
    margin-top: 6px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}
.lhdh-form-msg.is-error { display: block; color: #e02020; }
.lhdh-form-msg.is-success { display: block; color: #1a8f3c; }

.lhdh-submit-btn {
    width: 100%;
    margin-top: 8px;
    padding: 13px;
    background: #e02020;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.lhdh-submit-btn:hover { filter: brightness(0.88); }
.lhdh-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== Hóa đơn xác nhận sau khi gửi thành công ===== */
.lhdh-hoadon {
    text-align: center;
}

.lhdh-hoadon-icon {
    width: 56px;
    height: 56px;
    line-height: 56px;
    margin: 0 auto 12px;
    background: #1a8f3c;
    color: #fff;
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
}

.lhdh-hoadon-tieude {
    margin: 0 0 6px;
    font-size: 18px;
    color: #1a8f3c;
}

.lhdh-hoadon-loicamon {
    margin: 0 0 18px;
    font-size: 14px;
    color: #555;
}

.lhdh-hoadon-box {
    text-align: left;
    background: #f8f8f8;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 18px;
}

.lhdh-hoadon-dong {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid #ebebeb;
    font-size: 13.5px;
}
.lhdh-hoadon-dong:last-child { border-bottom: none; }

.lhdh-hoadon-dong span {
    color: #777;
    flex-shrink: 0;
}

.lhdh-hoadon-dong strong {
    color: #222;
    text-align: right;
    word-break: break-word;
}

@media (max-width: 480px) {
    .lhdh-open-btn { width: 100%; }
    .lhdh-overlay { padding: 10px; align-items: flex-start; padding-top: 30px; }
    .lhdh-modal { max-width: 100%; max-height: 85vh; }
    .lhdh-header { padding: 14px 18px; }
    .lhdh-body { padding: 16px 18px 18px; }
    .lhdh-grid-2 { grid-template-columns: 1fr; gap: 0; }
    .lhdh-grid-2 .lhdh-field:nth-child(5) { grid-column: auto; }
}
