/* --- 1. VARIABLES --- */
:root {
    --bg-body: #0a0a0a;
    --bg-card: #161616;
    --bg-card-hover: #1f1f1f;
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #cf3030;
    --zalo-color: #0068ff;
    --fb-color: #0084ff;
    --glass-bg: rgba(10, 10, 10, 0.95);
    --glass-border: rgba(255, 255, 255, 0.1);
    --blur: 20px;
    --radius-l: 24px; --radius-m: 16px;
    --header-height: 60px;
    --font-stack: 'Inter', sans-serif;
}

/* --- 2. BASE --- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; outline: none; }
body { margin: 0; background: var(--bg-body); color: var(--text-main); font-family: var(--font-stack); overflow-x: hidden; }
button { border: none; background: none; color: inherit; font-family: inherit; cursor: pointer; padding: 0; }
.hidden { display: none !important; }

/* --- 3. HEADER --- */
#app-header { 
    position: fixed; top: 0; left: 0; right: 0; 
    z-index: 100; height: var(--header-height); 
    background: var(--glass-bg); 
    backdrop-filter: blur(var(--blur)); 
    -webkit-backdrop-filter: blur(var(--blur)); 
    border-bottom: 1px solid var(--glass-border); 
}

.header-inner { 
    max-width: 1000px; margin: 0 auto; height: 100%; 
    padding: 0 20px; display: flex; 
    justify-content: space-between; align-items: center; 
}

.brand { display: flex; flex-direction: column; line-height: 1; cursor: pointer; z-index: 101; }
.brand-main { font-weight: 900; font-size: 1.2rem; letter-spacing: 0.5px; }
.brand-sub { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 2px; }

.header-right { display: flex; align-items: center; gap: 12px; }

.btn-lang-header {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    height: 34px; padding: 0 14px;
    background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: #fff;
    cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.btn-lang-header:active { background: rgba(255, 255, 255, 0.3); transform: scale(0.96); }
.lang-flag { font-size: 1rem; line-height: 1; }

.icon-btn { position: relative; padding: 8px; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; cursor: pointer; }
#cart-badge { position: absolute; top: 2px; right: 2px; background: var(--accent); color: white; font-size: 10px; font-weight: bold; height: 16px; min-width: 16px; padding: 0 4px; border-radius: 10px; display: flex; justify-content: center; align-items: center; border: 2px solid var(--bg-body); }

#progress-track { height: 2px; background: transparent; width: 100%; position: absolute; bottom: 0; left: 0; }
#progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width 0.3s; }

/* --- 4. LAYOUT --- */
#main-view { padding-top: calc(var(--header-height) + 20px); padding-bottom: 120px; max-width: 1000px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.loading-state { text-align: center; margin-top: 100px; color: var(--text-muted); }
.spinner { width: 40px; height: 40px; margin: 0 auto 15px; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- 5. HOME --- */
.section-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 20px 0; display: flex; align-items: center; gap: 10px; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 15px; margin-top: 40px; }
.see-more { font-size: 0.9rem; color: var(--accent); font-weight: 600; }
.grid-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; }
.menu-card { background: #1e2123; border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: row; align-items: center; text-align: left; gap: 10px; cursor: pointer; transition: 0.2s; min-height: auto; justify-content: flex-start; }
.menu-card:active { transform: scale(0.98); background: #25282a; }
.icon-box { width: 38px; height: 38px; border-radius: 10px; display: flex; justify-content: center; align-items: center; color: white; font-size: 1rem; margin-bottom: 0; flex-shrink: 0; }
.menu-card div { display: flex; flex-direction: column; justify-content: center; }
.menu-card h3 { margin: 0; font-size: 0.85rem; font-weight: 700; color: #fff; line-height: 1.2; }
.menu-card p { margin: 2px 0 0; font-size: 0.65rem; color: #888; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- 6. PRODUCT GRID --- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (min-width: 768px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.product-card { background: var(--bg-card); border-radius: var(--radius-m); overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: 0.2s; border: 1px solid transparent; position: relative; }
.product-card:hover { border-color: #333; transform: translateY(-4px); }
.p-img-wrap { aspect-ratio: 1/1; background: #222; position: relative; overflow: hidden; padding: 15px; display: flex; align-items: center; justify-content: center; }
.p-img-wrap img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5)); transition: transform 0.4s ease; }
.product-card:hover img { transform: scale(1.05); }
.p-id-tag { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); font-size: 0.7rem; padding: 2px 8px; border-radius: 6px; font-weight: bold; color: #fff; border: 1px solid rgba(255,255,255,0.1); }
.p-info { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.p-name { font-size: 0.9rem; font-weight: 600; margin: 0 0 8px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #eee; height: 38px; }
.p-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.p-price { font-weight: 700; color: white; font-size: 1rem; }
.btn-add-mini { width: 32px; height: 32px; border-radius: 50%; background: #333; color: white; display: flex; justify-content: center; align-items: center; transition: 0.2s; font-size: 0.9rem; }
.btn-add-mini:hover { background: var(--accent); }
.btn-add-mini:active { transform: scale(0.9); }

/* --- CONTACT --- */
.contact-section { margin-top: 40px; padding: 25px; background: #111; border-radius: var(--radius-l); border: 1px solid var(--glass-border); }
.contact-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 20px; color: var(--accent); }
.contact-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 15px; font-size: 0.95rem; line-height: 1.5; }
.contact-item i { width: 20px; text-align: center; color: var(--text-muted); margin-top: 3px; }
.contact-link { color: white; text-decoration: none; transition: 0.2s; }
.contact-link:hover { color: var(--accent); }

/* --- 7. MODALS --- */
.modal-container { z-index: 200; position: relative; }
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 201; backdrop-filter: blur(8px); }
.modal-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 202; background: #141414; border: 1px solid #333; border-radius: 24px; width: 90%; max-width: 420px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.7); animation: popIn 0.3s forwards; }
@keyframes popIn { from { transform: translate(-50%, -40%) scale(0.95); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; border-bottom: 1px solid #333; flex-shrink: 0; }
.modal-header h3 { margin: 0; font-size: 1.2rem; font-weight: 800; display: flex; align-items: center; }
.close-btn { font-size: 1.8rem; line-height: 1; padding: 0 5px; color: var(--text-muted); cursor: pointer; }
.modal-body { flex: 1; overflow-y: auto; padding: 15px 20px; -webkit-overflow-scrolling: touch; }
.cart-item { display: flex; gap: 12px; margin-bottom: 12px; background: #1f1f1f; padding: 10px; border-radius: 12px; align-items: center; border: 1px solid rgba(255,255,255,0.05); }
.cart-img { width: 50px; height: 50px; border-radius: 8px; object-fit: contain; background: #2a2a2a; padding: 2px; }
.cart-info { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.cart-title { font-weight: 700; font-size: 0.9rem; margin-bottom: 3px; color: #fff; line-height: 1.2; }
.cart-price { color: var(--text-muted); font-size: 0.8rem; font-weight: 500; }
.cart-actions { display: flex; align-items: center; background: #2a2a2a; border-radius: 8px; height: 32px; border: 1px solid rgba(255,255,255,0.1); }
.qty-btn { width: 32px; height: 100%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1rem; color: #ccc; cursor: pointer; }
.qty-display { width: 24px; text-align: center; font-weight: 700; font-size: 0.9rem; color: #fff; }
.remove-btn { width: 32px; height: 32px; display: flex; justify-content: center; align-items: center; color: #555; margin-left: 5px; cursor: pointer; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #333; background: #181818; flex-shrink: 0; border-radius: 0 0 24px 24px; }
.total-row { display: flex; justify-content: space-between; margin-bottom: 15px; font-weight: 800; font-size: 1.1rem; color: #fff; border-bottom: 1px dashed #333; padding-bottom: 10px; }
.copy-area { background: #111; padding: 12px; border-radius: 8px; border: 1px solid #333; margin-bottom: 12px; max-height: 120px; overflow-y: auto; font-family: monospace; }
.copy-line { font-size: 0.75rem; color: #ccc; line-height: 1.5; white-space: pre-wrap; }
.btn-copy-large { width: 100%; background: #333; color: white; padding: 12px; border-radius: 10px; font-weight: 700; font-size: 0.9rem; display: flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,0.1); margin-bottom: 12px; cursor: pointer; }
.btn-copy-large.copied { background: #10b981; border-color: #10b981; color: #fff; }
.tools-grid { display: flex; margin-bottom: 15px; }
.btn-tool { width: 100%; background: #222; color: #bbb; padding: 8px; border-radius: 8px; font-size: 0.8rem; border: 1px solid #333; display: flex; justify-content: center; align-items: center; gap: 6px; cursor: pointer; }
.guide-text { text-align: center; font-size: 0.75rem; color: #666; margin-bottom: 10px; position: relative; }
.guide-text::before, .guide-text::after { content: ""; position: absolute; top: 50%; width: 30%; height: 1px; background: #333; }
.guide-text::before { left: 0; } .guide-text::after { right: 0; }
.action-grid { display: flex; gap: 10px; }
.btn-social { flex: 1; padding: 10px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; border: 1px solid transparent; }
.btn-social-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; }
.btn-main-text { font-weight: 700; font-size: 0.85rem; }
.btn-social.zalo { background: rgba(0, 104, 255, 0.15); color: #0068ff; border-color: rgba(0, 104, 255, 0.3); }
.btn-social.fb { background: rgba(0, 132, 255, 0.15); color: #0084ff; border-color: rgba(0, 132, 255, 0.3); }

/* --- FILTER --- */
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 0px; }
.filter-card { background: #1e2123; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 12px; display: flex; align-items: center; position: relative; cursor: pointer; transition: all 0.2s ease; user-select: none; min-height: 72px; }
.filter-card.active { background: #2a2e31; border-color: rgba(255,255,255,0.4); box-shadow: 0 4px 12px rgba(0,0,0,0.0); }
.f-img { width: 44px; height: 44px; border-radius: 10px; background: #33333300; overflow: hidden; flex-shrink: 0; margin-right: 12px; }
.f-img img { width: 100%; height: 100%; object-fit: cover; }
.f-info { flex: 1; display: flex; flex-direction: column; justify-content: center; margin-right: 20px; }
.f-name { font-size: 13px; font-weight: 800; color: #fff; line-height: 1.2; margin-bottom: 2px; }
.f-sub { font-size: 11px; color: #888; font-weight: 500; }
.filter-card.active .f-sub { color: #ccc; }
.f-check { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #666; display: flex; align-items: center; justify-content: center; background: transparent; transition: 0.2s; }
.filter-card.active .f-check { background: var(--accent); border-color: var(--accent); }
.f-check i { font-size: 9px; color: #fff; display: none; }
.filter-card.active .f-check i { display: block; }
.filter-fieldset { border: none; padding: 0; margin: 0 0 20px 0; }
.filter-toggle-btn { display: flex; align-items: center; gap: 6px; background: #1e2123; border: 1px solid rgba(255,255,255,0.1); padding: 6px 12px; border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-weight: 700; color: #ccc; transition: all 0.2s; width: fit-content; margin: 0; }
.filter-toggle-btn:hover { background: #2a2e31; border-color: rgba(255,255,255,0.3); color: #fff; }
.filter-toggle-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.filter-icon { transition: transform 0.3s; font-size: 0.7rem; }
.filter-toggle-btn.active .filter-icon { transform: rotate(180deg); }
.filter-collapse { max-height: 0; overflow: hidden; transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s, margin 0.4s; opacity: 0; margin-top: 0; }
.filter-collapse.show { max-height: 500px; opacity: 1; margin-top: 15px; margin-bottom: 20px; }
.filter-legend { position: absolute; top: -10px; left: 15px; background: var(--bg-body); padding: 0 8px; color: var(--text-muted); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; display: flex; align-items: center; gap: 5px; }

/* --- 8. MEMBERSHIP (Mobile View) --- */
.membership-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 40px;
}

/* Card Mobile */
.mem-card-simple {
    background: #141414;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.1);
    transition: 0.2s;
    position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* GRADIENT CHO MOBILE (Giống Desktop) */
.mem-card-simple.peak-card {
    background: linear-gradient(180deg, #121212 0%, #081016 100%);
    border-color: rgba(100, 200, 255, 0.15);
}
.mem-card-simple.life-card {
    background: linear-gradient(180deg, #121212 0%, #08120f 100%);
    border-color: rgba(100, 255, 150, 0.15);
}

.mem-card-simple:hover { transform: translateY(-4px); }

.mem-simple-img {
    width: 100%; aspect-ratio: 1/1; object-fit: contain;
    background: transparent; /* Để hiện màu nền gradient */
    padding: 15px;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

.mem-simple-info { padding: 12px; display: flex; flex-direction: column; flex: 1; }
.mem-simple-name { font-size: 0.85rem; font-weight: 800; color: #fff; margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.mem-view-detail { font-size: 0.7rem; color: var(--text-muted); text-decoration: underline; cursor: pointer; margin-bottom: 10px; display: inline-block; }
.mem-simple-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }
.mem-simple-price { font-size: 0.9rem; font-weight: 700; color: #fff; }

/* --- POPUP CHI TIẾT MEMBERSHIP (DARK MODE) --- */
.mem-modal-content {
    padding: 20px;
    background: #121212; /* Nền tối */
    color: #fff;         /* Chữ trắng */
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1);
}

.mem-header-title {
    font-size: 1.4rem; font-weight: 900; text-transform: uppercase;
    text-align: center; margin-bottom: 15px; letter-spacing: 1px; color: #fff;
}

.mem-carousel-wrapper {
    width: 100%; position: relative; margin-bottom: 20px;
    background: rgba(255,255,255,0.03); /* Nền mờ */
    border-radius: 12px; padding: 10px;
}
.mem-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.mem-slides::-webkit-scrollbar { display: none; }
.mem-slide-img { 
    width: 100%; height: auto; aspect-ratio: 4/3; object-fit: contain; 
    flex-shrink: 0; scroll-snap-align: center; mix-blend-mode: normal;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}
.mem-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.mem-dot { width: 6px; height: 6px; border-radius: 50%; background: #333; }
.mem-dot.active { background: #fff; }

/* Feature List trong Popup */
.mem-features { margin-bottom: 20px; }
.mem-features-head { 
    font-weight: 700; font-size: 0.9rem; margin-bottom: 12px; color: #eee; 
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px;
}
.mem-feat-item { 
    display: flex; gap: 10px; margin-bottom: 10px; 
    font-size: 0.85rem; line-height: 1.4; color: #ccc; align-items: flex-start; 
}
/* Icon trắng */
.mem-feat-item img { width: 18px; height: 18px; filter: invert(1); opacity: 0.9; margin-top: 2px; }

/* Nút Popup */
.mem-modal-btn {
    width: 100%; background: #fff; color: #000;
    padding: 14px; border-radius: 30px; font-weight: 800; font-size: 1rem;
    cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px;
    box-shadow: 0 5px 20px rgba(255,255,255,0.15);
}

.access-note { color: #ffcdcd; font-size: 0.75rem; font-style: italic; margin-top: 4px; font-weight: 500; }

/* --- 2. DESKTOP MEMBERSHIP (COMPACT 200PX) --- */
.mem-card-desktop { display: none; }
.mem-card-simple { display: flex; }

@media (min-width: 900px) {
    .mem-card-simple { display: none; }
    .mem-card-desktop { display: flex; }

    /* GRID: 2 Cột */
    .membership-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        max-width: 900px;
        margin: 0 auto 40px auto;
        gap: 20px;
    }

    /* CARD: Cao 200px */
    .mem-card-desktop {
        background: #0f0f0f;
        border: 1px solid rgba(255,255,255,0.08);
        color: #fff;
        border-radius: 16px;
        padding: 0;
        display: flex;
        flex-direction: row;
        height: 200px; /* CHIỀU CAO CỐ ĐỊNH 200PX */
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
        position: relative; overflow: hidden;
        transition: transform 0.3s ease;
    }

    .mem-card-desktop:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.25); }
    .mem-card-desktop.peak-card { background: linear-gradient(90deg, #121212 0%, #081016 100%); border-color: rgba(100, 200, 255, 0.1); }
    .mem-card-desktop.life-card { background: linear-gradient(90deg, #121212 0%, #08120f 100%); border-color: rgba(100, 255, 150, 0.1); }

    /* CỘT TRÁI: ẢNH (35%) */
    .mem-desktop-left {
        width: 35%;
        background: rgba(255,255,255,0.02);
        display: flex; align-items: center; justify-content: center;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding: 10px; position: relative;
    }
    .mem-carousel-wrapper { width: 100%; height: 100%; display:flex; align-items:center; }
    .mem-slide-img { 
        width: 100%; height: 100%; object-fit: contain; 
        mix-blend-mode: normal; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.6)); 
    }
    .carousel-nav-btn { 
        width: 20px; height: 20px; font-size: 0.5rem; 
        position: absolute; top: 50%; transform: translateY(-50%); 
        background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; 
        display: flex; align-items: center; justify-content: center; 
        cursor: pointer; z-index: 10; opacity: 0; transition: 0.2s; 
    }
    .mem-desktop-left:hover .carousel-nav-btn { opacity: 1; }
    .nav-prev { left: 5px; } .nav-next { right: 5px; }

    /* CỘT PHẢI: THÔNG TIN (65%) */
    .mem-desktop-right {
        width: 65%;
        padding: 15px 20px;
        display: flex; flex-direction: column;
        justify-content: space-between; /* Dàn đều trên dưới */
        text-align: left;
    }

    /* Header: Tên nằm trên, Giá nằm dưới, Căn trái */
    .mem-info-top { 
        display: flex; 
        flex-direction: column; 
        align-items: flex-start;
        margin-bottom: 5px; 
    }
    .mem-header-title { 
        font-size: 1.1rem; 
        font-weight: 800; 
        letter-spacing: 1px; 
        text-transform: uppercase; 
        margin: 0 0 4px 0;
        color: #fff;
    }
    .mem-current-price { 
        font-size: 1.1rem; 
        font-weight: 700; 
        color: #eee; 
    }

    /* 3 Dòng tính năng */
    .mem-features-short { 
        font-size: 0.75rem; color: #bbb; line-height: 1.4; margin-bottom: 5px; 
        text-align: left;
    }
    .mem-feat-short-item { 
        display: flex; align-items: center; gap: 6px; 
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    }
    .mem-feat-short-item::before {
        content: "•"; color: var(--accent); font-weight: bold;
    }

    /* Link So sánh */
    .mem-compare-link {
        font-size: 0.7rem; 
        color: var(--accent); 
        text-decoration: none; 
        font-weight: 600;
        margin-bottom: auto; 
        display: inline-block;
        transition: 0.2s;
    }
    .mem-compare-link:hover { text-decoration: underline; color: #fff; }

    /* Nút Mua */
    .mem-btn-v2 { 
        width: 100%;
        padding: 8px; font-size: 0.85rem; border-radius: 6px; 
        background: #fff; color: #000; 
        font-weight: 800; text-transform: uppercase; 
        cursor: pointer; box-shadow: 0 0 10px rgba(255,255,255,0.1); 
        text-align: center;
    }
    .mem-btn-v2:hover { background: #e0e0e0; }
}

/* FIX HÌNH ẢNH POPUP */
.pd-image-container { width: 100%; height: 350px; background: #111; display: flex; align-items: center; justify-content: center; padding: 20px; flex-shrink: 0; }
.pd-image { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.0)); }
.pd-scroll-area { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
.pd-footer { padding: 15px 20px; background: #181818; border-top: 1px solid #333; flex-shrink: 0; z-index: 10; }
.pd-info-container { padding: 20px 25px; flex: 1; }
.pd-sku { color: var(--accent); font-size: 0.9rem; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.pd-title { font-size: 1.5rem; font-weight: 800; margin: 0 0 10px 0; line-height: 1.3; }
.pd-price { font-size: 1.4rem; font-weight: 700; margin-bottom: 10px; color: #fff; }
.pd-add-btn { width: 100%; background: white; color: black; padding: 14px; border-radius: 12px; font-weight: 800; font-size: 1rem; display: flex; justify-content: center; align-items: center; gap: 10px; transition: 0.2s; cursor: pointer; }
.pd-add-btn:active { transform: scale(0.98); background: #eee; }
.btn-group-success { display: flex; gap: 10px; width: 100%; }
.btn-secondary { flex: 1; background: #333; color: white; padding: 14px; border-radius: 12px; font-weight: 700; border: 1px solid #444; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem; }
.btn-primary { flex: 1; background: var(--accent); color: white; padding: 14px; border-radius: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.9rem; }
.close-btn-floating { position: absolute; top: 10px; right: 10px; z-index: 20; background: rgba(30,30,30,0.8); color: white; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; display: flex; justify-content: center; align-items: center; cursor: pointer; border: 1px solid rgba(255,255,255,0.1); }
.product-details-panel { padding: 0 !important; overflow: hidden; }

/* --- 1. TOAST NOTIFICATION --- */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; pointer-events: none; width: 90%; max-width: 350px; }
.toast-item { background: rgba(20, 20, 20, 0.95); border: 1px solid rgba(255, 255, 255, 0.2); backdrop-filter: blur(10px); color: #fff; padding: 12px; border-radius: 12px; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); margin-bottom: 10px; animation: toastFadeInOut 1.5s ease-in-out forwards; }
.toast-img { width: 40px; height: 40px; object-fit: contain; background: #333; border-radius: 8px; padding: 2px; }
.toast-content { flex: 1; font-size: 0.85rem; }
.toast-title { font-weight: 700; margin-bottom: 2px; font-size: 0.8rem; color: var(--accent); }
.toast-msg { font-size: 0.75rem; color: #ddd; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes toastFadeInOut { 0% { opacity: 0; transform: translateY(-20px); } 15% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-20px); } }

/* --- 2. DESKTOP MEMBERSHIP (COMPACT 200PX) --- */
.mem-card-desktop { display: none; }
.mem-card-simple { display: flex; }

@media (min-width: 900px) {
    .mem-card-simple { display: none; }
    .mem-card-desktop { display: flex; }
    .mobile-compare-wrapper { display: none !important; }
    /* GRID: 2 Cột */
    .membership-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        max-width: 900px;
        margin: 0 auto 40px auto;
        gap: 20px;
    }

    /* CARD: Cao 200px */
    .mem-card-desktop {
        background: #0f0f0f;
        border: 1px solid rgba(255,255,255,0.08);
        color: #fff;
        border-radius: 16px;
        padding: 0;
        display: flex;
        flex-direction: row;
        height: 200px; /* CHIỀU CAO CỐ ĐỊNH 200PX */
        box-shadow: 0 10px 20px rgba(0,0,0,0.4);
        position: relative; overflow: hidden;
        transition: transform 0.3s ease;
    }

    .mem-card-desktop:hover { transform: translateY(-4px); border-color: rgba(255,255,255,0.25); }
    .mem-card-desktop.peak-card { background: linear-gradient(90deg, #121212 0%, #081016 100%); border-color: rgba(100, 200, 255, 0.1); }
    .mem-card-desktop.life-card { background: linear-gradient(90deg, #121212 0%, #08120f 100%); border-color: rgba(100, 255, 150, 0.1); }

    /* CỘT TRÁI: ẢNH (35%) */
    .mem-desktop-left {
        width: 35%;
        background: rgba(255,255,255,0.02);
        display: flex; align-items: center; justify-content: center;
        border-right: 1px solid rgba(255,255,255,0.05);
        padding: 0px; position: relative;
    }
    .mem-carousel-wrapper { width: 100%; height: 100%; display:flex; align-items:center; }
    .mem-slide-img { 
        width: 100%; height: 100%; object-fit: contain; 
        mix-blend-mode: normal; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.0)); 
    }
    .carousel-nav-btn { 
        width: 20px; height: 20px; font-size: 0.5rem; 
        position: absolute; top: 50%; transform: translateY(-50%); 
        background: rgba(0,0,0,0.6); color: #fff; border-radius: 50%; 
        display: flex; align-items: center; justify-content: center; 
        cursor: pointer; z-index: 10; opacity: 0; transition: 0.2s; 
    }
    .mem-desktop-left:hover .carousel-nav-btn { opacity: 1; }
    .nav-prev { left: 0px; } .nav-next { right: 0px; }

    /* CỘT PHẢI: THÔNG TIN (65%) */
    .mem-desktop-right {
        width: 65%;
        padding: 15px 20px;
        display: flex; flex-direction: column;
        justify-content: space-between; /* Dàn đều trên dưới */
        text-align: left; /* Căn trái */
    }

    /* [ĐÃ SỬA] Header: Tên nằm trên, Giá nằm dưới, Căn trái */
    .mem-info-top { 
        display: flex; 
        flex-direction: column; /* Xếp dọc */
        align-items: flex-start; /* Căn trái */
        margin-bottom: 5px; 
    }
    .mem-header-title { 
        font-size: 1.1rem; 
        font-weight: 800; 
        letter-spacing: 1px; 
        text-transform: uppercase; 
        margin: 0 0 4px 0; /* Khoảng cách dưới tên */
        color: #fff;
    }
    .mem-current-price { 
        font-size: 1.1rem; 
        font-weight: 700; 
        color: #e3d3d3; 
    }

    /* 3 Dòng tính năng */
    .mem-features-short { 
        font-size: 0.75rem; color: #bbb; line-height: 1.4; margin-bottom: 5px; 
        text-align: left;
    }
    .mem-feat-short-item { 
        display: flex; align-items: center; gap: 6px; 
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    }
    .mem-feat-short-item::before {
        content: "•"; color: var(--accent); font-weight: bold;
    }

    /* Link So sánh */
    .mem-compare-link {
        font-size: 0.7rem; 
        color: var(--accent); 
        text-decoration: none; 
        font-weight: 600;
        margin-bottom: auto; 
        display: inline-block;
        transition: 0.2s;
    }
    .mem-compare-link:hover { text-decoration: underline; color: #fff; }

    /* Nút Mua */
    .mem-btn-v2 { 
        width: 100%;
        padding: 8px; font-size: 0.85rem; border-radius: 6px; 
        background: #fff; color: #000; 
        font-weight: 800; text-transform: uppercase; 
        cursor: pointer; box-shadow: 0 0 10px rgba(255,255,255,0.1); 
        text-align: center;
    }
    .mem-btn-v2:hover { background: #e0e0e0; }
}
/* --- NÚT SO SÁNH MOBILE (MỚI) --- */
.mobile-compare-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 0px;
    margin-bottom: -10px;
}

.btn-mobile-compare {
    background: transparent;
    border: none;
    color: #cf3030;
    font-size: 0.8rem;
    font-weight: 700;
    
    text-decoration: underline; /* <--- Sửa thành underline để gạch chân */
    
    padding: 5px 10px;
    text-transform: uppercase;
    cursor: pointer;
    transition: 0.2s;
}

/* Hiệu ứng khi bấm/di chuột */
.btn-mobile-compare:hover, 
.btn-mobile-compare:active {
    background: transparent;
    color: #ff6666;
    text-decoration: underline; /* Giữ nguyên gạch chân */
    transform: none;
}