/* --- CẤU HÌNH GIAO DIỆN (CSS) --- */
:root {
    --primary: #d32f2f;
    --secondary: #fbc02d;
    --peach: #ff80ab;
    --green: #388e3c;
    --dark: #333;
    --light: #fff5f8;
    --white: #ffffff;
    --info-bg: #e3f2fd;
    --info-text: #0d47a1;
    --gold-gradient: linear-gradient(135deg, #FFD700, #FFA500);
    --momo-color: #a50064;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
    caret-color: transparent;
}

/* --- FIX TRƯỢT NGANG --- */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background-color: var(--light);
    color: var(--dark);
    position: relative;
    padding-top: 80px;
    transition: padding-top 0.3s ease;
}

/* --- TOP BAR ANNOUNCEMENT STYLE --- */
#top-announcement-bar {
    background: #fff9c4;
    color: #d32f2f;
    padding: 0 10px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: bold;
    position: fixed;
    top: 78px;
    left: 0;
    width: 100%;
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #fbc02d;
    height: 40px;
    overflow: hidden;
}

.announcement-content {
    flex: 1;
    display: flex;
    align-items: center;
    overflow: hidden;
    height: 100%;
    position: relative;
}

.announcement-content i {
    margin-right: 10px;
    animation: tada 1.5s infinite;
    flex-shrink: 0;
    z-index: 2;
    background: #fff9c4;
    padding-right: 5px;
}

/* --- STYLE CHỮ CHẠY MƯỢT --- */
.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
    position: relative;
}

.marquee-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: smoothScroll 25s linear infinite;
    font-weight: 700;
    text-transform: uppercase;
    padding-top: 3px;
    transform: translateZ(0);
    will-change: transform;
}

@keyframes smoothScroll {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.announcement-close {
    background: #fff9c4;
    border: none;
    font-size: 1.5rem;
    color: #d32f2f;
    cursor: pointer;
    padding: 0 0 0 15px;
    line-height: 1;
    z-index: 2;
}

body.has-announcement {
    padding-top: 120px;
}

header.has-announcement {
    top: 0;
}

@keyframes tada {
    0% {
        transform: scale(1);
    }

    10%,
    20% {
        transform: scale(0.9) rotate(-3deg);
    }

    30%,
    50%,
    70%,
    90% {
        transform: scale(1.1) rotate(3deg);
    }

    40%,
    60%,
    80% {
        transform: scale(1.1) rotate(-3deg);
    }

    100% {
        transform: scale(1) rotate(0);
    }
}

img {
    max-width: 100%;
    display: block;
    border-radius: 8px;
}

button {
    cursor: pointer;
    transition: 0.3s;
}

a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

/* Góc hoa văn trang trí */
.tet-corner-left,
.tet-corner-right {
    position: fixed;
    top: 0;
    width: 140px;
    z-index: 50;
    pointer-events: none;
    filter: hue-rotate(300deg) saturate(1.2);
}

.tet-corner-left {
    left: -10px;
}

.tet-corner-right {
    right: -10px;
    transform: scaleX(-1);
}

/* --- HEADER (CỐ ĐỊNH) --- */
header {
    background: #b71c1c;
    padding: 10px 15px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: top 0.3s ease;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-logo {
    max-height: 55px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

.header-title {
    font-family: 'Dancing Script', cursive;
    color: var(--secondary);
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-header {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 8px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: 0.3s;
}

.btn-header:hover {
    background: var(--secondary);
    color: var(--primary);
    border-color: var(--secondary);
}

.user-info {
    color: var(--secondary);
    font-weight: bold;
    font-size: 0.9rem;
    display: none;
}

.loyalty-badge {
    background: #fbc02d;
    color: #d32f2f;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 5px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* --- HERO BANNER --- */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('background.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    transition: background 0.5s ease-in-out;
}

.hero h2 {
    color: var(--secondary);
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px #000;
    font-family: 'Dancing Script', cursive;
    line-height: 1.2;
}

.hero p {
    color: var(--peach);
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* --- BRAND STORY --- */
.brand-story {
    background: #fff8e1;
    padding: 50px 20px;
    position: relative;
    z-index: 20;
    border-bottom: 2px dashed #ffcdd2;
}

.story-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.story-img {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.story-img img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 10px 10px 0px rgba(211, 47, 47, 0.1);
    border: 2px solid #d32f2f;
}

.story-tagline {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: #d32f2f;
    color: #fbc02d;
    padding: 8px 16px;
    font-family: 'Dancing Script';
    font-size: 1.4rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.story-content {
    flex: 1;
    min-width: 300px;
}

.story-content h2 {
    font-family: 'Dancing Script';
    font-size: 2.5rem;
    color: #b71c1c;
    margin-bottom: 15px;
    line-height: 1.2;
}

.story-quote {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    border-left: 4px solid #fbc02d;
    padding-left: 15px;
    background: rgba(251, 192, 45, 0.1);
    padding: 10px;
    border-radius: 0 8px 8px 0;
}

.story-text {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 1.05rem;
    color: #333;
    text-align: justify;
}

.story-badge {
    display: inline-block;
    background: #ffebee;
    color: #b71c1c;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: bold;
    border: 1px dashed #b71c1c;
    margin-top: 10px;
}

/* --- CSS TIÊU ĐỀ MỤC --- */
.section-header {
    text-align: center;
    margin: 0 0 20px 0;
    position: relative;
}

.section-header h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8rem;
    color: var(--primary);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    display: inline-block;
    background: var(--light);
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.section-header::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: #ffcdd2;
    z-index: 1;
}

/* --- STYLE CHO THANH TRƯỢT NGANG --- */
.horizontal-scroll {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 10px 5px 25px 5px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.horizontal-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
    background: #ffcdd2;
    border-radius: 4px;
}

.horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: #d32f2f;
}

.horizontal-scroll .product-card {
    min-width: 260px;
    max-width: 260px;
    flex-shrink: 0;
}

/* --- DANH SÁCH SẢN PHẨM (GRID) --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 15px;
    position: relative;
    z-index: 10;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #fff0f3;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(211, 47, 47, 0.12);
    border-color: #ffcdd2;
}

.product-img-wrapper {
    position: relative;
    width: 100%;
    height: 170px;
    overflow: hidden;
    border-bottom: 1px solid #fff5f8;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.weight-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #b71c1c;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ffcdd2;
}

.badge-best-seller {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #ff5252, #d32f2f);
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 6;
    box-shadow: 0 3px 8px rgba(211, 47, 47, 0.25);
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #fff;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.wholesale-badge {
    display: inline-block;
    background: var(--secondary);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.product-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    color: #333;
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: 0.3s;
}

.product-card:hover .product-name {
    color: #d32f2f;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #d32f2f;
    margin-bottom: 12px;
}

.btn-add {
    width: 100%;
    background: #fff;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    padding: 8px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.btn-add:hover {
    background: #d32f2f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

.btn-direct-add {
    background: #fff5f8;
}

/* --- BLOG MỚI THÊM --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 0 10px;
    margin-top: 20px;
}

.blog-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: 0.3s;
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #ffcdd2;
}

.blog-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-title {
    font-size: 1.15rem;
    color: #b71c1c;
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-readmore {
    color: #d32f2f;
    font-weight: bold;
    font-size: 0.9rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-readmore:hover {
    color: #b71c1c;
    text-decoration: underline;
}

#blog-modal-content p {
    margin-bottom: 15px;
}

#blog-modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

#blog-modal-content li {
    margin-bottom: 8px;
}

/* ================================================================= */
/* --- [FIX LỖI] CẬP NHẬT LẠI VỊ TRÍ & ẨN NÚT KHI CÓ POPUP --- */
/* ================================================================= */

.float-cart {
    position: fixed;
    bottom: 20px !important;
    right: 20px !important;
    background: #d32f2f;
    color: #fff;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 991 !important;
    cursor: pointer;
    border: 2px solid #ffcdd2;
    animation: bounce 2s infinite;
}
.cart-count { position: absolute; top: -5px; right: -5px; background: #fbc02d; color: #d32f2f; font-size: 0.8rem; font-weight: 900; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid white; }

.zalo-chat-widget {
    bottom: 90px !important;
    right: 20px !important;
    left: auto !important;   
    width: auto !important;  
    height: auto !important;
    position: fixed !important;
    z-index: 992 !important;
}

.zalo-chat-widget iframe {
    right: 0 !important;     
    left: auto !important;   
    position: absolute !important;
    bottom: 0 !important;
}

.float-call {
    position: fixed;
    bottom: 160px !important; 
    right: 20px !important;
    background: #2e7d32;
    color: #fff;
    width: 60px; height: 60px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 993 !important;
    cursor: pointer;
    border: 2px solid #a5d6a7;
    text-decoration: none;
    animation: pulse-green 2s infinite;
}
.float-call:hover { transform: scale(1.1); background: #1b5e20; }

body.popup-open .float-cart,
body.popup-open .float-call,
body.popup-open .zalo-chat-widget { 
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- CSS GIỎ HÀNG (MODAL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.3s ease-out;
}

.cart-modal {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 16px;
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    transform: translateY(0);
    animation: slideInModal 0.3s ease-out;
}

@keyframes fadeInOverlay { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideInModal { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.cart-header {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

.cart-header h3 {
    margin: 0;
    line-height: 1;
    padding-top: 5px;
}

.cart-body {
    padding: 0;
    overflow-y: auto;
    background: #f9f9f9;
}

#cart-items {
    padding: 15px 20px;
    background: #fff;
    margin-bottom: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.qty-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: #b71c1c;
}

.customer-info {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #eee;
}

.checkout-step { display: none; }
.checkout-step.active { display: block; }

.voucher-box {
    background: #fff;
    border-top: 1px dashed #e0e0e0;
    padding: 15px 20px;
}

.voucher-input-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.voucher-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    text-transform: uppercase;
    font-weight: bold;
    outline: none;
}

.voucher-input:focus { border-color: var(--secondary); }

.btn-apply {
    background: var(--dark);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.summary-section {
    background: #fff3e0;
    padding: 15px 20px;
    border-top: 1px dashed #ffb74d;
}

.price-row {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.95rem;
    color: #555;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: #d32f2f;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group { margin-bottom: 15px; }

.form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: 0.3s;
    background: #fafafa;
}

.form-input:focus {
    background: #fff;
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    outline: none;
}

.btn-action {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.05rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: 0.2s;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #d32f2f, #b71c1c);
    color: white;
    border: 1px solid #ffcdd2;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.4);
}

.btn-success {
    background: #2e7d32;
    color: white;
}

.btn-secondary {
    background: #757575;
    color: white;
    margin-top: 10px;
}

.quick-pickup {
    background: #fff8e1;
    border: 1px solid #ffe082;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.quick-pickup h4 {
    color: #f57f17;
    margin-bottom: 5px;
}

.bank-info {
    background: #e3f2fd;
    padding: 15px;
    border-radius: 8px;
    border: 1px dashed #2196f3;
    margin-bottom: 15px;
}

.qr-wrapper {
    text-align: center;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 5px;
    background: white;
}

/* --- STYLE CHO PHƯƠNG THỨC THANH TOÁN --- */
.payment-section {
    margin-top: 20px;
    border-top: 1px dashed #eee;
    padding-top: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

.payment-option.selected {
    background: #fff8e1;
    border-color: #fbc02d;
    box-shadow: 0 0 0 1px #fbc02d inset;
}

.payment-option.disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #eee;
}

.payment-option.disabled:hover { transform: none; box-shadow: none; }

.payment-option input[type="radio"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #d32f2f;
    cursor: pointer;
    flex-shrink: 0;
}

.payment-option.disabled input[type="radio"] { cursor: not-allowed; }

.payment-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.payment-label {
    font-weight: 700;
    color: #333;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.payment-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.3;
}

.payment-icon { font-size: 1.2rem; width: 24px; text-align: center; }
.payment-icon-img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }

.badge-recommend {
    background: #a50064;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: normal;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.badge-soon {
    background: #95a5a6;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
    font-weight: normal;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* --- STYLE CHO HỖ TRỢ --- */
.support-list { list-style: none; margin-top: 10px; }

.support-step {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: flex-start;
}

.step-icon {
    width: 30px;
    height: 30px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h4 { color: #333; font-weight: 700; margin-bottom: 4px; }
.step-content p { color: #555; font-size: 0.9rem; line-height: 1.4; }

.support-note {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--secondary);
    margin-bottom: 15px;
}

.support-contact {
    background: var(--info-bg);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px dashed var(--info-text);
    color: var(--info-text);
}

.support-contact strong { display: block; font-size: 1.2rem; margin: 5px 0; }

.policy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.policy-item {
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.policy-item i { font-size: 1.5rem; color: var(--green); margin-bottom: 5px; }
.policy-item h5 { margin-bottom: 5px; color: var(--dark); }

/* --- STYLE MỚI CHO POPUP KHUYẾN MÃI --- */
.promo-content {
    text-align: center;
    padding: 0 !important;
    background: transparent;
    max-width: 900px;
    width: 90%;
    border: none;
    box-shadow: none;
    overflow: visible;
}

.promo-img {
    width: 100%;
    border-radius: 12px;
    display: block;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px #fbc02d, 0 20px 50px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: transform 0.3s;
}

.promo-img:hover { transform: scale(1.01); }

.promo-close {
    position: absolute;
    top: -20px;
    right: -20px;
    background: #d32f2f;
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 3px solid #fff;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.promo-close:hover {
    background: #b71c1c;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 15px rgba(211, 47, 47, 0.4);
}

/* Success & Lookup */
.search-result-box {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.success-box { text-align: center; padding: 20px; }
.success-icon { font-size: 4rem; color: #2e7d32; margin-bottom: 15px; animation: bounce 1s; }

.order-code-box {
    background: #ffebee;
    border: 2px dashed #d32f2f;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.order-code-text {
    font-size: 2.2rem;
    font-weight: 900;
    color: #d32f2f;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.btn-copy {
    background: #fff;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 5px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.3s;
}

.btn-copy:hover { background: #d32f2f; color: white; }

/* Auth/Login Style */
.login-container { padding: 0; overflow: hidden; }

.login-header-decor {
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
    padding: 20px;
    text-align: center;
    color: #fbc02d;
    position: relative;
}

.login-header-decor h3 {
    margin: 0;
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.login-body-content { padding: 25px 20px; }

.input-group { position: relative; margin-bottom: 15px; }

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.input-login {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    transition: 0.3s;
    font-size: 1rem;
}

.input-login:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    outline: none;
}

.btn-login-submit {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: none;
    background: linear-gradient(to right, #d32f2f, #ef5350);
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
    transition: 0.3s;
    margin-top: 10px;
}

.auth-switch {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

.auth-switch a {
    color: #d32f2f;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.auth-form.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- FOOTER CHUYÊN NGHIỆP --- */
footer {
    background: #222;
    color: #bbb;
    padding-top: 60px;
    margin-top: 0;
    border-top: 4px solid var(--secondary);
    font-size: 0.95rem;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 15px;
    text-align: left;
}

.footer-col h3 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-family: 'Dancing Script';
    font-size: 1.8rem;
    letter-spacing: 1px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--primary);
    padding-left: 10px;
}

.footer-desc { line-height: 1.6; margin-bottom: 20px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 12px; }

.footer-links a {
    color: #bbb;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover { color: var(--secondary); padding-left: 5px; }

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 15px;
    line-height: 1.5;
    justify-content: flex-start;
}

.contact-item i { color: var(--primary); margin-top: 4px; }

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-start;
}

.social-btn {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
}

.social-btn:hover { background: var(--primary); transform: translateY(-3px); }

/* FOOTER BOTTOM */
.footer-bottom {
    background: #1a1a1a;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #333;
    font-size: 0.85rem;
}

.footer-bottom span { color: #777; }

/* --- LOGO BỘ CÔNG THƯƠNG --- */
.bct-img {
    max-width: 220px;
    height: auto;
    transition: max-width 0.3s ease;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* --- STYLE CHO PRODUCT DETAIL POPUP --- */
.product-detail-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.pd-image {
    width: 35%;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.pd-image img {
    max-height: 250px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pd-info {
    width: 65%;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.pd-title {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #b71c1c;
    margin-bottom: 5px;
    line-height: 1.2;
}

.pd-price {
    font-size: 1.3rem;
    color: #2e7d32;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 5px;
}

.pd-section-title {
    font-weight: bold;
    color: #333;
    margin-top: 10px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.pd-section-title i { color: var(--secondary); }

.pd-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 5px;
    text-align: justify;
}

.pd-quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 8px;
    width: fit-content;
}

.pd-qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    border: 1px solid #ddd;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.pd-qty-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pd-qty-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.pd-actions {
    margin-top: auto;
    padding-top: 10px;
}

/* --- STYLE CHO PHẦN REVIEW KHÁCH HÀNG --- */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding: 0 10px;
}

.review-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    transition: 0.3s;
    position: relative;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--peach);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #f0f0f0;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #999;
}

.review-info h4 { margin: 0; color: var(--dark); font-size: 1rem; }
.review-stars { color: #fbc02d; font-size: 0.8rem; margin-top: 4px; }
.review-text { font-style: italic; color: #555; line-height: 1.5; font-size: 0.95rem; }
.quote-icon { position: absolute; top: 20px; right: 20px; font-size: 2rem; color: rgba(211, 47, 47, 0.08); }


/* ========================================================= */
/* --- RESPONSIVE ĐÃ ĐƯỢC FIX LỖI KHOẢNG TRẮNG --- */
/* ========================================================= */

@media (max-width: 1024px) {
    .hero { padding: 60px 15px; }
    .hero h2 { font-size: 2rem; }
    .hero p { font-size: 1.2rem; }
    .brand-story { padding: 40px 15px; }
    .story-container { gap: 20px; flex-direction: column; }
    .story-img { min-width: auto; }
    .story-content h2 { font-size: 2rem; }
    .product-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
    .product-img-wrapper { height: 160px; }
    .product-name { font-size: 1rem; }
    .product-price { font-size: 1.1rem; }
    .footer-container { gap: 30px; }

    .blog-grid, .review-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 20px;
        padding-bottom: 20px;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding-left: 5px;
        padding-right: 5px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .blog-grid::-webkit-scrollbar, .review-grid::-webkit-scrollbar { display: none; }
    .blog-card, .review-card { min-width: 320px; max-width: 320px; flex-shrink: 0; }
}

@media (max-width: 768px) {
    /* FIX KHOẢNG TRẮNG HEADER CHO TABLET/MOBILE LỚN */
    body { padding-top: 60px; }
    #top-announcement-bar { top: 59px; }
    body.has-announcement { padding-top: 100px; }
    /* END FIX */

    .bct-img { max-width: 130px; }
    .product-detail-container { flex-direction: column; overflow-y: auto; }
    .pd-image { width: 100%; height: 180px; padding: 10px; flex-shrink: 0; }
    .pd-info { width: 100%; padding: 15px; overflow-y: visible; }
    .pd-title { font-size: 1.4rem; }
    
    header { padding: 8px 10px; flex-wrap: nowrap; justify-content: space-between; }
    .brand-wrapper { flex: 0 1 auto; justify-content: flex-start; margin-bottom: 0; }
    .header-logo { max-height: 40px; }
    .header-title { font-size: 1.2rem; margin-left: 5px; }
    .header-right { gap: 5px; }
    .btn-header { padding: 6px 10px; font-size: 0.8rem; }
    
    .hero { padding: 40px 10px; }
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .brand-story { padding: 30px 10px; }
    .story-content h2 { font-size: 1.8rem; }
    .story-text { font-size: 1rem; }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .product-card { padding: 0; border-radius: 8px; }
    .product-img-wrapper { height: 140px; }
    .weight-tag { font-size: 0.7rem; padding: 2px 8px; top: 5px; right: 5px; }
    .badge-best-seller { font-size: 0.7rem; padding: 3px 8px; top: 5px; left: 5px; }
    
    .product-info { padding: 10px; }
    .product-name { font-size: 0.9rem; min-height: 38px; margin-bottom: 4px; -webkit-line-clamp: 2; }
    .product-price { font-size: 1rem; margin-bottom: 8px; }
    .btn-add { font-size: 0.8rem; padding: 6px; }
    
    .float-cart { width: 50px; height: 50px; font-size: 1.4rem; bottom: 15px; right: 15px; }
    .float-call { width: 50px; height: 50px; font-size: 1.4rem; bottom: 145px; right: 15px; }
    .zalo-chat-widget { bottom: 80px !important; right: 15px !important; }
    
    .cart-modal { max-width: 90%; }
    .modal-overlay { padding: 5px; }
    .footer-container { grid-template-columns: 1fr; text-align: left; }
    .contact-item { justify-content: flex-start; text-align: left; }
    .social-links { justify-content: flex-start; }
    .policy-grid { grid-template-columns: 1fr; }
    
    .blog-card, .review-card { min-width: 280px; max-width: 280px; }
    .blog-grid, .review-grid { gap: 15px; }
}

@media (max-width: 480px) {
    /* FIX KHOẢNG TRẮNG HEADER CHO MOBILE NHỎ */
    body { padding-top: 54px; }
    #top-announcement-bar { top: 53px; }
    body.has-announcement { padding-top: 93px; }
    /* END FIX */

    .bct-img { max-width: 110px; }
    .header-logo { max-height: 35px; }
    
    .header-title { font-size: 1.1rem; }
    .btn-header span { display: none !important; }
    .btn-header { font-size: 0.7rem; padding: 6px 8px; }
    
    .hero h2 { font-size: 1.5rem; }
    .hero p { font-size: 0.9rem; }
    .story-content h2 { font-size: 1.6rem; }
    .story-quote { font-size: 0.9rem; }
    
    .cart-header h3 { font-size: 1.3rem; }
    .total-row { font-size: 1.1rem; }
    .form-input { font-size: 0.9rem; padding: 8px; }
    .btn-action { font-size: 0.9rem; padding: 10px; }
    .qr-img { max-width: 250px; }
    
    .footer-col h3 { font-size: 1.5rem; }
    .footer-desc { font-size: 0.9rem; }
}

/* --- STYLE RIÊNG CHO MODAL TRA CỨU --- */
#lookup-modal .cart-modal {
    max-width: 350px;
    width: 90%;
    margin: auto;
    border-radius: 12px;
    height: auto;
    display: flex;
    flex-direction: column;
    position: relative;
    left: unset;
    top: unset;
    transform: unset;
}

#lookup-modal .cart-header {
    padding: 8px 15px;
    background: linear-gradient(135deg, #b71c1c, #d32f2f);
}

#lookup-modal .cart-header h3 { font-size: 1.1rem !important; }
#lookup-modal .cart-body { padding: 15px; }
#lookup-modal .form-input { padding: 6px 10px; font-size: 0.9rem; height: 36px; }
#lookup-modal .btn-add { height: 36px; width: auto; padding: 0 15px; font-size: 0.9rem; margin-top: 0; background: var(--primary); }
#lookup-modal .btn-add i { margin-left: 0; }
#lookup-modal p { font-size: 0.85rem; margin-bottom: 8px; }
#lookup-result { padding: 10px; font-size: 0.85rem; margin-top: 10px; }

/* --- MAP STYLE --- */
.map-responsive {
    position: relative;
    overflow: hidden;
    padding-bottom: 40%;
    height: 0;
    margin-top: 0;
}
.map-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 768px) {
    .map-responsive { padding-bottom: 75%; }
}