/*
Theme Name: Highlands Voucher Theme
Author: Gemini
Description: Theme clone giao diện Highlands Coffee Voucher
Version: 1.2
*/

:root {
    --primary-color: #913831; /* Màu đỏ nâu chủ đạo */
    --secondary-color: #F39223; /* Màu cam nút bấm */
    --bg-light: #FFFBE6; /* Màu nền vàng nhạt */
    --text-color: #333;
    --border-radius: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Be Vietnam Pro', sans-serif; line-height: 1.6; color: var(--text-color); background: #fff; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Buttons */
.btn { display: inline-block; padding: 10px 20px; border-radius: 30px; font-weight: bold; text-align: center; color: white; transition: 0.3s; }
.btn-primary { background: var(--primary-color); }
.btn-secondary { background: var(--secondary-color); }

/* Typography */
.text-center { text-align: center; }

/* --- FIX: Tăng khoảng cách tiêu đề Section --- */
.section-title { 
    color: var(--primary-color); 
    font-size: 28px; 
    font-weight: bold; 
    margin-top: 60px; /* Tăng khoảng cách phía trên (Fix #1) */
    margin-bottom: 30px; 
    text-align: center; 
    text-transform: uppercase; 
}

/* --- HEADER & HERO SECTION --- */
header { 
    padding: 40px 0 10px; 
    background: #fff; 
}

.hero-logo, 
.site-branding img, 
.custom-logo-link img { 
    max-width: 200px; 
    width: 100%; 
    height: auto;
    margin: 0 auto 10px; 
}

h1, 
.hero-title { 
    font-size: 36px; 
    color: var(--primary-color); 
    margin-bottom: 10px; 
    font-weight: 800; 
}

.hero-subtitle { 
    font-family: 'Dancing Script', cursive; 
    font-size: 28px; 
    color: #555; 
    margin-bottom: 20px; 
}

#voucher-list {
    margin-top: 20px; 
}

/* --- GRID LAYOUTS --- */
.grid-voucher,
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* Class chung cho Grid thanh toán (để xử lý mobile) */
.grid-payment { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; } /* Mặc định PC 2 cột */


/* Voucher Card */
.voucher-card { 
    background: #fff;
    border-radius: 8px; 
    overflow: hidden; 
    transition: transform 0.2s; 
}
.voucher-card:hover { transform: translateY(-5px); }
.voucher-btn { width: 100%; display: block; margin-top: 10px; }
/* --- FIX: Reset khoảng cách cho tiêu đề trong khung màu xám --- */
.payment-section .section-title {
    margin-top: 0 !important; /* Xóa khoảng cách thừa phía trên */
    margin-bottom: 20px;
}

/* Instructions Box */
.instruction-box { background: var(--bg-light); border: 2px dashed #333; border-radius: var(--border-radius); padding: 30px; margin: 40px 0; }
.instruction-box ul { list-style: disc; padding-left: 20px; }
.instruction-box li { margin-bottom: 10px; }

/* Product/Shopee Card */
.product-card { border: 1px solid #eee; border-radius: var(--border-radius); padding: 15px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.product-price { color: #d0021b; font-weight: bold; font-size: 18px; margin: 10px 0; }

/* Community Box */
.comm-box { background: #fff; border-radius: var(--border-radius); box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 20px; text-align: center; }
.comm-img { border-radius: 10px; margin-bottom: 15px; height: 180px; object-fit: cover; width: 100%; }

/* FAQ */
.faq-item { border-bottom: 1px solid #eee; padding: 15px 0; }
.faq-question { 
    font-weight: bold; 
    cursor: pointer; 
    display: flex; 
    justify-content: flex-start; /* Căn tất cả về bên trái thay vì space-between */
    align-items: center; 
    color: var(--primary-color);
    gap: 15px; /* Tạo khoảng cách giữa mũi tên và chữ */
    text-align: left; /* Đảm bảo chữ luôn căn trái */
}
.faq-answer { display: none; margin-top: 10px; padding-left: 20px; color: #555; }
.faq-item.active .faq-answer { display: block; }

/* Blog Grid (Index) */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 40px; }
.post-item { margin-bottom: 30px; }
.post-title a { color: var(--primary-color); font-size: 20px; font-weight: bold; }
/* --- STYLE CHO NỘI DUNG BÀI VIẾT (ĐÃ SỬA LỖI GIÃN CHỮ) --- */

.entry-content {
    /* Xóa dòng text-align: justify ở đây đi */
    font-size: 16px; 
    line-height: 1.6; 
    color: #333; 
}

/* CHỈ căn đều 2 bên cho các đoạn văn thường */
.entry-content p { 
    text-align: justify; 
    text-justify: inter-word;
    margin-bottom: 15px; 
}

/* Các tiêu đề thì CĂN TRÁI để không bị lỗi giãn chữ */
.entry-content h1, 
.entry-content h2, 
.entry-content h3, 
.entry-content h4 { 
    text-align: left; /* Quan trọng: Giữ tiêu đề nằm bên trái */
    line-height: 1.4; /* Khoảng cách dòng của tiêu đề khít hơn chút */
}

/* --- CÁC PHẦN TRANG TRÍ DƯỚI ĐÂY GIỮ NGUYÊN --- */

/* H2: Tiêu đề lớn - Màu nâu đỏ */
.entry-content h2 { 
    margin-top: 35px; 
    margin-bottom: 20px;
    font-size: 24px; 
    font-weight: bold;
    color: #8a3c32; 
    border-bottom: 2px solid #eee; 
    padding-bottom: 10px;
}

/* H3: Tiêu đề nhỏ - Có vạch kẻ dọc */
.entry-content h3 { 
    margin-top: 30px; 
    margin-bottom: 15px;
    font-size: 20px; 
    font-weight: 600;
    color: #444;
    border-left: 4px solid #8a3c32; 
    padding-left: 12px; 
}

/* Ảnh */
.entry-content img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
    margin: 20px auto; 
    border-radius: 4px; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}

/* Danh sách */
.entry-content ul, .entry-content ol { 
    margin-left: 25px; 
    margin-bottom: 20px; 
    text-align: left; /* Đảm bảo danh sách cũng căn trái cho đẹp */
}

.entry-content ul li, .entry-content ol li {
    margin-bottom: 8px; 
}

/* Footer */
footer { background: #f9f9f9; padding: 20px 0; margin-top: 50px; font-size: 14px; color: #666; }
/* Style cho nút Nhận Mã Ưu Đãi */
.btn-uu-dai {
    background-color: #8a3c32; /* Màu nâu đỏ giống ảnh */
    color: #ffffff !important; /* Chữ màu trắng */
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    padding: 12px 35px;
    border-radius: 50px; /* Bo tròn 2 đầu */
    display: inline-block;
    border: 1px solid #a34e43; /* Viền nhẹ để tạo khối */
    box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* Đổ bóng nhẹ phía dưới */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Đổ bóng chữ để nổi bật */
    transition: all 0.3s ease;
    text-align: center;
}

/* Hiệu ứng khi di chuột vào */
.btn-uu-dai:hover {
    background-color: #a64d42; /* Màu sáng hơn chút khi hover */
    transform: translateY(-2px); /* Nút nảy lên nhẹ */
    box-shadow: 0 6px 8px rgba(0,0,0,0.25);
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    /* Các lưới Voucher và sản phẩm vẫn giữ 2 cột */
    .grid-voucher, 
    .grid-5, 
    .grid-4 { 
        grid-template-columns: repeat(2, 1fr); 
    }

    .grid-voucher {
        gap: 10px; 
    }
    .grid-3 {
        grid-template-columns: 1fr !important; /* Ép về 1 cột */
    }

    /* --- FIX: Phần thanh toán chuyển về 1 cột (Fix #2) --- */
    /* Bạn nhớ thêm class "grid-payment" vào thẻ div chứa phần thanh toán nhé */
    .grid-payment {
        grid-template-columns: 1fr !important; /* Ép về 1 cột */
    }
    
    .voucher-btn {
        font-size: 13px; 
        padding: 8px 4px; 
        width: 100%; 
        box-sizing: border-box; 
    }
}