/* ============================================================
   hanghoa-muakem.css  —  Bundle / Mua Kem section (CharmeV3)
   ============================================================ */

/* === Wrapper === */
.mk-bundle {
    border: 2px solid #e8e0f5;
    border-radius: 12px;
    overflow: hidden;
    margin: 18px 0 10px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(109,63,197,.08);
}

/* === Header === */
.mk-bundle-head {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #2d1b4e 0%, #6c3fc5 100%);
    color: #fff;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .2px;
}
.mk-bundle-head .fa { font-size: 15px; color: #f4d03f; }
.mk-save-tag {
    margin-left: auto;
    background: #f4d03f;
    color: #2d1b4e;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 2px 10px;
    white-space: nowrap;
}

/* === Body: items row === */
.mk-bundle-body {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 14px 16px 10px;
    flex-wrap: wrap;
}

/* === Plus icon between items === */
.mk-plus {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    flex-shrink: 0;
    color: #9b7de0;
    font-size: 16px;
    font-weight: 700;
    padding: 0 2px;
}

/* === Single item card === */
.mk-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1;
    min-width: 0;
    background: #f9f6ff;
    border: 1px solid #ede7ff;
    border-radius: 8px;
    padding: 10px 12px;
}
.mk-item-main {
    background: #f5f5f5;
    border-color: #e5e5e5;
}
.mk-item-img { flex-shrink: 0; }
.mk-item-img img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8e0f5;
    display: block;
}
.mk-item-info { flex: 1; min-width: 0; }
.mk-item-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mk-check-label {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    cursor: pointer;
    font-weight: 600;
    margin: 0;
}
.mk-checkbox { flex-shrink: 0; margin-top: 3px; cursor: pointer; accent-color: #6c3fc5; }
.mk-item-price { font-size: 13px; margin-bottom: 4px; }
.mk-item-price strong { color: #c0392b; font-weight: 700; }
.mk-item-price del { font-size: 11px; color: #aaa; margin-left: 4px; }
.mk-change-link {
    font-size: 11px;
    color: #6c3fc5;
    text-decoration: none;
    white-space: nowrap;
}
.mk-change-link:hover { text-decoration: underline; color: #4a1d96; }
.mk-change-link .fa { font-size: 10px; }

/* === Footer: total + button === */
.mk-bundle-foot {
    background: #f9f6ff;
    border-top: 1px solid #ede7ff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.mk-total-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.mk-total-label { font-size: 13px; color: #666; white-space: nowrap; }
#mk-tongtien {
    font-size: 18px;
    font-weight: 800;
    color: #c0392b;
}
.mk-old-total {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}
.mk-saving {
    background: #fef9e7;
    color: #b7770d;
    border: 1px solid #f4d03f;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    white-space: nowrap;
}
.mk-btn-buy {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: linear-gradient(135deg, #2d1b4e 0%, #6c3fc5 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .15s, transform .1s;
    flex-shrink: 0;
}
.mk-btn-buy:hover { opacity: .88; transform: translateY(-1px); }
.mk-btn-buy .fa { font-size: 14px; }

/* === Popup overlay === */
#mk-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
#mk-popup-inner {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 540px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.mk-popup-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #f0eef8;
    background: linear-gradient(135deg, #2d1b4e 0%, #6c3fc5 100%);
    border-radius: 12px 12px 0 0;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
.mk-popup-close {
    color: rgba(255,255,255,.8);
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
}
.mk-popup-close:hover { color: #fff; }
.mk-popup-body { padding: 16px; }

/* === Popup product card === */
.mk-popup-item { margin-bottom: 16px; }
.mk-pp-card {
    text-align: center;
    border: 1px solid #ede7ff;
    border-radius: 8px;
    padding: 12px 8px;
    transition: border-color .15s, box-shadow .15s;
    height: 100%;
}
.mk-pp-card:hover { border-color: #9b7de0; box-shadow: 0 4px 14px rgba(109,63,197,.12); }
.mk-pp-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.mk-pp-name {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mk-pp-price { font-size: 12px; margin-bottom: 7px; }
.mk-pp-price strong { color: #c0392b; }
.mk-pp-price del { font-size: 11px; color: #aaa; }
.mk-pp-choose {
    display: inline-block;
    background: linear-gradient(135deg, #2d1b4e, #6c3fc5);
    color: #fff;
    border-radius: 6px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity .15s;
}
.mk-pp-choose:hover { opacity: .85; color: #fff; text-decoration: none; }

/* === Responsive === */
@media (max-width: 600px) {
    .mk-bundle-body { padding: 10px 10px 8px; gap: 6px; }
    .mk-plus { width: 24px; font-size: 13px; }
    .mk-item { padding: 8px 10px; gap: 8px; }
    .mk-item-img img { width: 56px; height: 56px; }
    .mk-bundle-foot { flex-direction: column; align-items: stretch; gap: 10px; }
    .mk-btn-buy { width: 100%; justify-content: center; }
}
