/* ================= CƠ BẢN ================= */
@font-face {
    font-family: 'UTM Avo';
    src: local('UTM Avo'), local('UTMAvo');
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'UTM Avo', Arial, sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
}

.mobile-container {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    padding-bottom: 55px; 
}

/* ================= HEADER & SIDEBAR ================= */
.header {
    background-color: #29437b;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    height: 55px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;
}

.menu-toggle .icon-bars {
    font-size: 20px;
    margin-right: 5px;
}

.logo { height: 30px; }
.logo img { height: 100%; object-fit: contain; }

.phone-btn {
    border: 1px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
    font-weight: bold;
}

.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 99; display: none;
    opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.active { display: block; opacity: 1; }

.sidebar {
    position: fixed; top: 0; left: -300px; width: 80%; max-width: 300px;
    height: 100%; background: #ffffff; z-index: 100;
    transition: transform 0.3s ease; box-shadow: 2px 0 10px rgba(0,0,0,0.1); overflow-y: auto;
}
.sidebar.active { transform: translateX(300px); }

.sidebar-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px; border-bottom: 1px solid #eee;
}
.sidebar-header img { height: 30px; }
.close-btn { font-size: 24px; color: #ccc; cursor: pointer; }

.sidebar-menu { list-style: none; padding: 10px 15px; }
.sidebar-menu li { border-bottom: 1px solid #29437b; padding: 12px 0; }
.sidebar-menu li:last-child { border-bottom: none; }
.sidebar-menu li a { text-decoration: none; color: #29437b; font-size: 15px; display: block; }

/* ================= SLIDER ================= */
.slider-section {
    width: 100%;
    position: relative;
}

.main-media {
    width: 100%;
    aspect-ratio: 1/1.1;
    background: #000;
    position: relative;
    overflow: hidden; 
}

.slider-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease-in-out; 
}

.slide-item {
    flex: 0 0 100%; 
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.slide-item img, .slide-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.4);
    color: #fff;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}
.nav-prev { left: 10px; }
.nav-next { right: 10px; }

/* THUMBNAIL CONTAINER */
.thumb-container {
    background: #29437b;
    padding: 5px 30px; 
    position: relative;
    display: flex;
    align-items: center;
}

.thumb-nav-btn {
    position: absolute;
    top: 5px;
    bottom: 5px;
    width: 25px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
}
.thumb-btn-prev { left: 0; }
.thumb-btn-next { right: 0; }

.thumbnail-list {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scroll-behavior: smooth; 
    width: 100%;
}
.thumbnail-list::-webkit-scrollbar { display: none; }

.thumb-item {
    flex: 0 0 22%; 
    aspect-ratio: 1/1;
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumb-item.active { border-color: #fff; }
.thumb-item img { width: 100%; height: 100%; object-fit: cover; }

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255,255,255,0.8);
    font-size: 20px;
    pointer-events: none;
}

/* ================= PRODUCT INFO ================= */
.product-info { padding: 15px; }
.product-title { color: #29437b; font-size: 16px; font-weight: bold; line-height: 1.4; margin-bottom: 15px; }
.action-row { display: flex; justify-content: space-between; align-items: flex-end; }
.left-col { flex: 1; }
.right-col { text-align: right; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.price-new { color: #e32726; font-size: 20px; font-weight: bold; margin-bottom: 12px; }
.price-old { color: #5c7296; font-size: 16px; text-decoration: line-through; margin-bottom: 12px; }

/* SALE BADGE NHẤP NHÁY */
.sale-badge { background-color: #ff7675; color: white; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: bold; display: inline-block; }
.sale-badge span { animation: blinker 1s linear infinite; }
@keyframes blinker { 50% { opacity: 0; } }

/* NÚT MUA NGAY */
.btn-buy { background-color: #f04e36; color: white; border: none; height: 42px; width: 140px; font-size: 16px; font-weight: bold; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: flex-start; padding-left: 22px; border-radius: 4px; }
.typing-text { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid white; width: 0; animation: typing 2.5s steps(10, end) infinite, cursor-blink .5s step-end infinite alternate; }
@keyframes typing { 0%, 15% { width: 0; } 50%, 85% { width: 92px; } 100% { width: 0; } }
@keyframes cursor-blink { 50% { border-color: transparent; } }

/* ================= BẠN ĐANG GẶP VẤN ĐỀ ================= */
.section-problems {
    background-color: #ffffff; /* Mặc định trắng */
    padding: 20px 10px;
    text-align: center;
}

.title-white {
    color: #29437b; /* Mặc định chữ xanh */
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

.problems-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.problem-item img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border: 1px solid #ccc;
    margin-bottom: 6px;
    display: block;
}

.problem-item p {
    color: #29437b; /* Mặc định chữ xanh */
    font-size: 11px;
    line-height: 1.4;
}

/* ================= GIẢI PHÁP ================= */
.section-solutions {
    background-color: #ffffff;
    padding: 20px 15px;
}

.title-blue {
    color: #29437b;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.solution-list { list-style: none; }
.solution-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: #29437b;
    font-size: 14px;
    line-height: 1.4;
}

.icon-check {
    background-color: #29437b;
    color: #ffffff;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-right: 10px;
    margin-top: 3px;
    flex-shrink: 0;
    border-radius: 2px;
}

/* ================= BOTTOM BAR ================= */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    height: 55px;
    background-color: #ffffff;
    display: flex;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.countdown-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.countdown-title {
    color: #29437b;
    font-size: 11px;
    font-weight: bold;
    margin-bottom: 4px;
}

.countdown-timer { display: flex; gap: 8px; }

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.time-val {
    background-color: #e5ebf5;
    color: #29437b;
    font-size: 14px;
    font-weight: 900;
    padding: 3px 5px;
    border-radius: 4px;
}

.time-label {
    color: #29437b;
    font-size: 10px;
    font-weight: bold;
    margin-top: 3px;
}

.btn-buy-bottom {
    background-color: #f04e36;
    color: white;
    border: none;
    width: 140px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 22px;
}

/* ================= ƯU ĐIỂM SẢN PHẨM ================= */
.section-features {
    background-color: #ffffff; /* Mặc định trắng */
    padding: 25px 15px;
    text-align: center;
}

.title-features {
    color: #29437b; /* Mặc định xanh */
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 25px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 10px;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature-icon { margin-bottom: 8px; }

.feature-icon svg {
    fill: #29437b; /* SVG đổi sang màu xanh */
    transition: fill 0.3s ease;
}

.feature-title {
    color: #29437b;
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
}

.feature-desc {
    color: #29437b;
    font-size: 12px;
    line-height: 1.4;
}

/* ================= CHI TIẾT SẢN PHẨM ================= */
.section-details {
    background-color: #ffffff;
    padding: 25px 15px;
}

.title-details {
    color: #29437b;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-box {
    border: 1px solid #29437b;
    color: #5c7296;
    padding: 10px;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.detail-diagram {
    border: 1px solid #29437b;
    position: relative;
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 280px;
    background-color: #ffffff;
}

.diagram-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: #29437b;
    color: #ffffff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.detail-diagram img {
    max-width: 60%;
    height: auto;
    object-fit: contain;
}

.measure-line {
    position: absolute;
    display: flex;
    align-items: center;
    font-size: 10px;
    color: #000;
}

.dashed-vertical { border-left: 1px dashed #e32726; height: 40px; margin: 4px auto 0; }
.dashed-horizontal { border-top: 1px dashed #e32726; width: 30px; margin-right: 4px; }
.measure-top { top: 30px; left: 30%; flex-direction: column; }
.measure-right { bottom: 60px; right: 20px; }
.measure-bottom { bottom: 20px; left: 50%; transform: translateX(-50%); flex-direction: column-reverse; }
.measure-bottom .dashed-vertical { margin: 0 auto 4px; }

/* ================= LỜI BÌNH KHÁCH HÀNG ================= */
.section-testimonials {
    background-color: #ffffff; /* Mặc định trắng */
    padding: 25px 15px;
}

.title-testimonials {
    color: #29437b;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.testimonial-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 25px;
}

.testimonial-track { display: flex; transition: transform 0.4s ease-in-out; }
.testimonial-slide { flex: 0 0 100%; width: 100%; padding: 0 5px; }

.testimonial-card {
    background-color: #ffffff;
    border-radius: 4px;
    padding: 15px;
    border: 1px solid #eee; /* Thêm border nhẹ vì nền ngoài đã trắng */
}

.user-info { display: flex; align-items: center; margin-bottom: 12px; }
.avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; margin-right: 12px; }
.user-meta { display: flex; flex-direction: column; }
.user-name { font-weight: bold; font-size: 14px; color: #000; margin-bottom: 2px; }
.stars { display: flex; margin-bottom: 2px; }
.stars svg { width: 14px; height: 14px; fill: #fbc02d; }
.time { font-size: 12px; color: #888; }
.review-text { font-size: 14px; color: #333; line-height: 1.4; padding-top: 10px; border-top: 1px solid #eee; }

.nav-btn-testi {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.2);
    color: #fff;
    width: 25px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}
.nav-prev-testi { left: 5px; border-radius: 0 4px 4px 0; }
.nav-next-testi { right: 5px; border-radius: 4px 0 0 4px; }

.trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.badge-item { display: flex; align-items: center; }

.badge-icon {
    background-color: #29437b;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.badge-icon svg { width: 24px; height: 24px; fill: #ffffff; }

.badge-text { color: #29437b; font-size: 12px; line-height: 1.3; }

/* ================= FAQ - CÂU HỎI THƯỜNG GẶP ================= */
.section-faq {
    background-color: #ffffff; /* Mặc định trắng */
    padding: 25px 15px;
}

.title-faq {
    color: #29437b;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 20px;
}

.faq-details {
    border: 1px solid #29437b;
    margin-bottom: 12px;
    background-color: #ffffff;
}

.faq-summary {
    padding: 12px 15px;
    color: #29437b;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: '+'; font-size: 20px; }
.faq-details[open] .faq-summary::after { content: '-'; }

.faq-content {
    background-color: #f4f6fa;
    color: #29437b;
    padding: 15px;
    font-size: 13px;
    line-height: 1.5;
    border-top: 1px solid #29437b;
}

/* ================= PROMO ================= */
.section-promo {
    background-color: #ffffff; /* Mặc định trắng */
    padding: 25px 15px;
}

.promo-box {
    background-color: #e32726;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: #ffffff;
    margin-bottom: 25px;
}

.promo-title { font-size: 18px; font-weight: bold; margin-bottom: 10px; animation: promoBlink 0.5s linear infinite; }
.promo-original { font-size: 14px; margin-bottom: 10px; line-height: 1.4; }
.promo-original span { text-decoration: line-through; }
.promo-sale-label { font-size: 16px; font-weight: bold; margin-bottom: 5px; }
.promo-sale-price { font-size: 38px; font-weight: 900; line-height: 1; animation: promoBlink 0.5s linear infinite; }
@keyframes promoBlink { 50% { opacity: 0; } }

.promo-divider { position: relative; margin-top: 15px; }
.promo-divider::before { content: ''; position: absolute; top: 50%; left: 15%; right: 15%; height: 1px; background-color: #ffc107; z-index: 1; }
.promo-badge { background-color: #ffc107; color: #e32726; padding: 5px 15px; border-radius: 15px; font-size: 12px; font-weight: bold; position: relative; z-index: 2; display: inline-block; }

.title-countdown, .title-gifts {
    color: #29437b;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    margin-top: 20px;
}

.promo-timer { display: flex; justify-content: center; gap: 12px; }
.promo-time-box { background-color: #e5ebf5; border-radius: 8px; width: 55px; height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #ccc;}
.p-val { color: #29437b; font-size: 20px; font-weight: 900; }
.p-label { color: #29437b; font-size: 12px; margin-top: 2px; }

.gifts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.gift-card { background-color: #ffffff; border-radius: 12px; padding: 10px; text-align: center; border: 1px solid #eee; }
.gift-card img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.gift-card p { color: #000000; font-size: 13px; font-weight: bold; line-height: 1.4; }

/* ================= ĐẶT HÀNG ================= */
.section-order {
    background-color: #ffffff;
    padding: 25px 15px;
    scroll-margin-top: 55px; /* Giúp không bị header đè khi ấn MUA NGAY */
}

.title-order { color: #29437b; font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 20px; }
.form-group { margin-bottom: 12px; }
.form-control { width: 100%; border: 1px solid #29437b; color: #29437b; padding: 12px 15px; font-size: 14px; border-radius: 2px; outline: none; background-color: #ffffff; appearance: none; }
select.form-control { background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="%2329437b"><path d="M7 10l5 5 5-5z"/></svg>'); background-repeat: no-repeat; background-position: right 15px center; }
.form-control::placeholder { color: #8fa0c5; }

.quantity-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; margin-top: 5px; }
.qty-label { color: #29437b; font-size: 14px; }
.quantity-control { display: flex; border: 1px solid #29437b; border-radius: 2px; height: 36px; }
.qty-btn { background-color: #f4f6fa; color: #29437b; border: none; width: 36px; font-size: 16px; cursor: pointer; }
.qty-btn:first-child { border-right: 1px solid #29437b; }
.qty-btn:last-child { border-left: 1px solid #29437b; }
.qty-input { width: 50px; border: none; text-align: center; color: #29437b; font-size: 14px; font-family: inherit; outline: none; -moz-appearance: textfield; }
.qty-input::-webkit-outer-spin-button, .qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.subtitle-buyer { color: #29437b; font-size: 16px; font-weight: bold; margin-bottom: 15px; margin-top: 10px; }

.btn-buy-submit { background-color: #f04e36; color: white; border: none; width: 100%; height: 48px; font-size: 18px; font-weight: bold; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 4px; margin-top: 20px; }
.typing-text-center { display: inline-block; overflow: hidden; white-space: nowrap; border-right: 2px solid white; width: 0; animation: typingCenter 2.5s steps(10, end) infinite, cursor-blink .5s step-end infinite alternate; }
@keyframes typingCenter { 0%, 15% { width: 0; } 50%, 85% { width: 105px; } 100% { width: 0; } }

.order-timer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 20px; }
.order-timer-label { color: #29437b; font-size: 14px; font-weight: bold; }
.order-timer { display: flex; gap: 6px; }
.o-time-box { background-color: #e5ebf5; border-radius: 6px; width: 34px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.o-val { color: #000; font-size: 14px; font-weight: 900; line-height: 1; }
.o-label { color: #000; font-size: 9px; font-weight: bold; margin-top: 2px; }

/* ================= FOOTER ================= */
.footer {
    background-color: #ffffff; /* Đã đổi sang trắng */
    color: #29437b; /* Chữ đổi sang xanh */
    padding: 30px 15px 80px; 
    text-align: center;
}

.footer-logo { margin-bottom: 15px; }
.footer-logo img { height: 40px; object-fit: contain; border: 1px solid #29437b; padding: 5px; border-radius: 4px; }
.footer-title { font-size: 14px; font-weight: bold; margin-bottom: 25px; line-height: 1.5; color: #29437b;}
.footer-info p { font-size: 13px; margin-bottom: 15px; line-height: 1.4; color: #29437b;}
.footer-social-title { font-size: 14px; font-weight: bold; margin-top: 30px; margin-bottom: 15px; color: #29437b;}
.footer-socials { display: flex; justify-content: center; gap: 10px; }
.social-icon { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; background-color: #fff; cursor: pointer; border: 1px solid #eee; }

/* ========================================================== */
/* ================= GIAO DIỆN DARK (.black) =================*/
/* ========================================================== */
.black {
    background-color: #29437b !important;
}

/* Tiêu đề đổi thành trắng */
.black .title-white, .black .title-blue, .black .title-features, 
.black .title-details, .black .title-testimonials, .black .title-faq, 
.black .title-countdown, .black .title-gifts, .black .title-order,
.black .footer-title, .black .footer-social-title {
    color: #ffffff !important;
}

/* Các đoạn Text đổi thành trắng */
.black .problem-item p, .black .solution-list li, .black .feature-title, 
.black .feature-desc, .black .badge-text, .black .qty-label, 
.black .subtitle-buyer, .black .order-timer-label, .black .footer-info p {
    color: #ffffff !important;
}

/* Xử lý riêng Icon và SVG */
.black .feature-icon svg { fill: #ffffff !important; }
.black .icon-check { background-color: #ffffff !important; color: #29437b !important; }
.black .badge-icon { background-color: #ffffff !important; }
.black .badge-icon svg { fill: #29437b !important; }

/* Xử lý cho phần Chi tiết sản phẩm (.section-details) */
.black .detail-box { color: #ffffff !important; border-color: #ffffff !important; }

/* Xử lý cho phần FAQ (.section-faq) */
.black .faq-details { border-color: #ffffff !important; background-color: #29437b !important; }
.black .faq-summary { color: #ffffff !important; }
.black .faq-content { background-color: #ffffff !important; color: #29437b !important; border-top-color: #ffffff !important; }

/* Xử lý cho phần Footer */
.black.footer { color: #ffffff !important; }
.black .footer-logo img { border-color: #ffffff !important; }