:root {
    --primary-red: #e60012;
    --primary-hover: #cc0010;
    --bg-page: #f8fafc;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-ui: #e2e8f0;
}

body {
    background-color: var(--bg-page);
    overflow-x: hidden;
}

.hw-container {
    max-width: 1240px;
    margin: 20px auto 60px;
    padding: 0 16px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15.5px;
    line-height: 1.6;
    color: #334155;
    box-sizing: border-box;
}

.hw-breadcrumb {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.hw-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}
.hw-breadcrumb a:hover {
    color: var(--text-dark);
}

/* BỐ CỤC 2 CỘT MÀN HÌNH MÁY TÍNH */
.hw-main-grid {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 24px;
    align-items: start;
    margin-bottom: 30px;
}

.hw-left-sticky {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

/* THIẾT KẾ CARD PHẲNG MỀM MẠI */
.hw-card-flat {
    background: #ffffff;
    border: 1px solid var(--border-ui);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    box-sizing: border-box;
}

.hw-rating-box {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

/* KHỐI HIỂN THỊ GIÁ TRỌN GÓI MỀM MẠI */
.hw-price-box-soft {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 14px;
    padding: 16px;
    margin: 16px 0;
}

.hw-price-row-inner {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.hw-price-main-val {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--primary-red);
}

.hw-benefits-list {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e2e8f0;
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* CỤM NÚT THAO TÁC */
.hw-action-btns {
    display: flex !important;
    gap: 10px;
    margin-bottom: 14px;
    width: 100%;
    box-sizing: border-box;
}

.hw-btn-order {
    flex: 1.3;
    padding: 12px 18px;
    background: var(--primary-red);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(230, 0, 18, 0.25);
    transition: all 0.2s ease;
}
.hw-btn-order:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.hw-btn-zalo {
    flex: 1;
    padding: 12px 16px;
    background: #0068ff;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.hw-btn-zalo:hover {
    background: #0056d6;
    transform: translateY(-1px);
}

/* NỘI DUNG MÔ TẢ & THỤT LỀ DANH SÁCH */
.hw-article-content {
    font-size: 15.5px;
    line-height: 1.85;
    color: #334155;
}
.hw-article-content p {
    margin: 0 0 14px;
}
.hw-article-content ul, 
.hw-article-content ol {
    margin: 14px 0 18px 0;
    padding-left: 28px !important;
    box-sizing: border-box;
}
.hw-article-content li {
    margin-bottom: 8px;
    line-height: 1.75;
}
.hw-article-content li strong,
.hw-article-content li b {
    font-weight: 600;
    color: var(--text-dark);
}
.hw-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 14px 0;
}

/* KHỐI FAQ ACCORDION */
.hw-faq-item {
    background: #f8fafc;
    border: 1px solid var(--border-ui);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
    transition: all 0.2s;
}
.hw-faq-item[open] {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}
.hw-faq-summary {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 14.5px;
    cursor: pointer;
    outline: none;
    user-select: none;
}
.hw-faq-desc {
    margin: 10px 0 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

/* ============================================================== */
/* MODAL BỐ CỤC ĐẶT LỊCH HẸN SOFT UI                              */
/* ============================================================== */
.hw-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 16px;
    box-sizing: border-box;
}

.hw-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 490px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.15);
    border: 1px solid var(--border-ui);
    box-sizing: border-box;
    animation: modalFadeIn 0.22s ease-out;
}

/* HEADER MODAL SÁNG MỀM MẠI */
.hw-modal-header {
    background: #ffffff;
    padding: 16px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
}

.hw-modal-title {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
}

.hw-modal-back-btn {
    display: none;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.hw-modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid var(--border-ui);
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.hw-modal-close-btn:hover {
    background: #f1f5f9;
    color: var(--primary-red);
    border-color: #fecaca;
}

.hw-modal-body {
    padding: 20px 22px 24px;
}

/* KHỐI TÓM TẮT SẢN PHẨM TRÊN ĐẦU MODAL */
.hw-modal-prod-summary {
    background: #f8fafc;
    border: 1px solid var(--border-ui);
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hw-modal-thumb-box {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    border: 1px solid var(--border-ui);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 2px;
}
.hw-modal-thumb-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.hw-modal-prod-info {
    flex: 1;
    min-width: 0;
}

.hw-modal-prod-name {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.35;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hw-modal-prod-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-red);
}

/* THÔNG BÁO ĐĂNG KÝ THÀNH VIÊN */
.hw-register-lead-box {
    background: #eff6ff;
    border: 1px dashed #93c5fd;
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 13px;
    color: #1d4ed8;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hw-register-lead-box a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: underline;
}

/* KHỐI THÔNG TIN ĐỒNG BỘ */
.hw-user-synced-card {
    background: #f8fafc;
    border: 1px solid var(--border-ui);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.hw-user-synced-row {
    display: flex;
    justify-content: space-between;
    font-size: 13.5px;
    margin-bottom: 6px;
    gap: 8px;
}
.hw-user-synced-row:last-child {
    margin-bottom: 0;
}
.hw-user-synced-row span {
    color: var(--text-muted);
    flex-shrink: 0;
}
.hw-user-synced-row strong {
    color: var(--text-dark);
    font-weight: 600;
    text-align: right;
    word-break: break-word;
    max-width: 70%;
}

.hw-inline-prompt-box {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}
.hw-inline-warn-text {
    font-size: 12.5px;
    color: #b45309;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.hw-form-group {
    margin-bottom: 12px;
}
.hw-form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}
.hw-form-input, 
.hw-form-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.15s;
}
.hw-form-input:focus, 
.hw-form-textarea:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

.hw-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.btn-hw-cancel {
    padding: 9px 16px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
}
.btn-hw-submit {
    padding: 9px 22px;
    background: var(--primary-red);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-hw-submit:hover {
    background: var(--primary-hover);
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================================== */
/* TỐI ƯU GIAO DIỆN DI ĐỘNG & IPAD FULL MÀN HÌNH NHƯ APP          */
/* ============================================================== */
@media (max-width: 900px) {
    .hw-container {
        margin: 0 auto 50px;
        padding: 0;
        width: 100%;
    }
    .hw-breadcrumb {
        padding: 12px 16px;
        margin-bottom: 0;
    }
    .hw-main-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 16px;
    }
    .hw-left-sticky {
        position: static;
        gap: 12px;
    }
    .hw-card-flat {
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        box-shadow: none !important;
    }
    .hw-product-img-box {
        height: 250px !important;
        border-radius: 0 !important;
    }
    .hw-action-btns {
        flex-direction: row;
    }
    .hw-article-content ul, 
    .hw-article-content ol {
        padding-left: 20px !important;
    }

    /* FULL MÀN HÌNH CHẾ ĐỘ APP TRÊN MOBILE/IPAD */
    .hw-modal-overlay {
        padding: 0 !important;
        background: #ffffff !important;
        align-items: stretch !important;
        justify-content: stretch !important;
        bottom: 65px !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 2500 !important;
    }

    .hw-modal-box {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .hw-modal-header {
        border-radius: 0 !important;
        padding: 14px 16px !important;
        background: #ffffff !important;
        border-bottom: 1px solid var(--border-ui) !important;
        flex-shrink: 0;
    }

    .hw-modal-back-btn {
        display: inline-flex !important;
    }

    .hw-modal-close-btn {
        display: none !important;
    }

    .hw-modal-title {
        font-size: 15px !important;
    }

    .hw-modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 16px 14px 30px !important;
    }

    .hw-modal-actions .btn-hw-cancel {
        display: none !important;
    }
    .hw-modal-actions .btn-hw-submit {
        width: 100% !important;
        padding: 12px !important;
        font-size: 15px !important;
        border-radius: 10px !important;
    }
}
