/* TOP HEADER BANNER */
*{
    font-family: arial;
}

/* TOP HEADER BANNER */

.top-header-banner {
  width: 100%;
  display: flex;
  justify-content: center;
  background: #fff;
  padding: 0; /* Xóa padding nếu có để ảnh sát mép nền */
}

.top-header-banner img {
  width: 100%; /* Chiều ngang ảnh bằng 100% chiều ngang của nền container */
  max-width: 100%; /* Đảm bảo không vượt quá kích thước thật */
  height: 58px; /* Giữ nguyên chiều cao cố định */
  object-fit: cover; /* Cắt và lấp đầy khung để sát mép nền, có thể mất một phần ảnh */
  display: block;
}
.header{
  width: 100%;
  background: white;
  border-top: 2px solid #333;
  border-bottom: 1px solid #ddd;
}

/* NAV - Căn chỉnh lại để bằng với Flash Sale */
.nav {
    max-width: 1300px; /* CHỈNH SỐ NÀY: Bằng với độ rộng của phần Flash Sale của bạn */
    margin: 0 auto;    /* Căn giữa toàn bộ thanh Nav */
    padding: 0 20px;   /* Khoảng cách đệm hai bên để không bị dính sát mép màn hình */
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box; /* Đảm bảo padding không làm tăng chiều rộng thực tế */
}

/* Các phần còn lại giữ nguyên như bạn đã viết */

/* LOGO */
.logo {
    display: flex;
    align-items: center;
}
.logo img {
    width: 160px;
    height: 50px;
    object-fit: contain;
    display: block;
}

/* --- CODE CŨ CỦA BẠN (GIỮ NGUYÊN) --- */
.menu {
    display: flex;
    align-items: center;
    gap: 35px;
}
.menu a {
    text-decoration: none;
    color: #C92127;
    font-size: 13px;
    font-weight: bold;
    transition: 0.3s;
}
.menu button{
    text-decoration: none;
    color: #C92127;
    font-size: 13px;
    font-weight: bold;
    transition: 0.3s;
}
/* Container tổng của các icon (để chúng nằm hàng ngang) */
.icons {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Định dạng chung cho icon */
.icons .icon {
    color: #C92127;
    font-size: 20px;
    cursor: pointer;
}

/* KHU VỰC GIỎ HÀNG - QUAN TRỌNG NHẤT */
.cart-box {
    position: relative; /* Làm gốc tọa độ chuẩn */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Vòng tròn xanh số 0 */
.cart-box .badge {
    position: absolute; /* Ép số 0 bay lên trên */
    top: -6px;         /* Nhích lên trên icon */
    right: -8px;       /* Nhích sang phải icon */
    
    width: 14px;       /* Kích thước nhỏ gọn */
    height: 14px;
    background-color: #397CFE;
    color: white;
    
    border-radius: 50%;
    border: 1.5px solid white; /* Viền trắng bao quanh */
    
    font-size: 9px;
    font-weight: bold;
    font-style: normal; /* Chống bị nghiêng theo icon */
    
    /* Căn giữa số 0 tuyệt đối */
    display: flex;
    align-items: center;
    justify-content: center;
    
    line-height: 0;
    pointer-events: none; /* Tránh cản trở việc click vào giỏ hàng */
}
/* Gộp chung hiệu ứng Dropdown */
.dropdown-wrapper { position: relative; display: inline-block; }

.dropdown-btn {
    display: flex; align-items: center; gap: 6px;
    background: none; border: none; cursor: pointer;
    font-weight: bold; color: #C92127;
}

/* Vẽ tam giác & hiệu ứng xoay */
.dropdown-btn::after {
    content: ""; border: 5px solid transparent; 
    border-top-color: currentColor; transition: 0.3s;
}

.dropdown-wrapper:hover .dropdown-btn::after { transform: rotate(180deg); }

/* Menu con: Tự nở theo chữ, không xuống dòng */
.dropdown-menu {
    display: none; position: absolute; z-index: 100;
    background: #fff; box-shadow: 0 20px 25px rgba(0,0,0,0.1);
    padding: 10px 0; list-style: none;
    width: 200px;
    border-radius: 6px;
}

.dropdown-wrapper:hover .dropdown-menu { display: block; }

.dropdown-menu p{
    color: #616161;
    display: flex; align-items: center;
    font-size: 13px;
    margin-left: 20px;
}
.dropdown-menu li a {
    display: block; padding: 8px 20px; color: #616161;
    text-decoration: none; white-space: nowrap; /* Cấm xuống dòng */
    font-size: 12px;
}

.dropdown-menu li a:hover { background: #f5f5f5; color: #C92127; }
/* RIGHT */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* SEARCH BOX */
.search-box {
    width: 250px;
    height: 36px;
    display: flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}
.search-box input {
    flex: 1;
    height: 100%;
    border: none;
    outline: none;
    padding: 0 12px;
    font-size: 13px;
}
.search-btn {
    width: 42px;
    height: 100%;
    border: none;
    background: #C92127;
    color: white;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.search-btn:hover { background: #C92127; }

/* Căn hàng ngang cho toàn bộ cụm bên phải */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-circle {
    width: 25px;
    height: 25px;
    background-color: #C92127; 
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 15px;
    cursor: pointer;
}
/* 2. Style cho nút Login màu hồng đất */
.btn-login {
    background-color: #C92127; 
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 12px; /* Bo góc mịn */
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.btn-login:hover {
    background-color: #C92127; 
}

/* --- Giữ nguyên phần giỏ hàng đã fix cho bạn --- */
.icons {
    display: flex;
    align-items: center;
    gap: 15px;
}
.icons .icon {
    color: #C92127;
}
.cart-box {
    position: relative;
}
.cart-box .badge {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 14px;
    height: 14px;
    background-color: #4285F4;
    color: white;
    border-radius: 50%;
    border: 1.5px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

/* SLIDESHOW CONTAINER */
.slideshow {
  width: 100%;
  margin-top: 20px; 
}

.slider {
  max-width: 1300px; 
  width: 100%;
  height: 350px;
  margin: 0 auto;   
  position: relative;
  overflow: hidden;
  border-radius: 12px; 
  background: #f5f5f5; /* Để màu nền sáng để dễ kiểm tra */
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* IMAGE STYLE */
.slide {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  object-fit: fill; 
  opacity: 0;
  transition: opacity 2s ease-in-out;
  border-radius: 12px;
}

/* ACTIVE IMAGE */
.slide.active {
  opacity: 1;
  z-index: 1; /* Đảm bảo ảnh đang chạy nằm trên cùng */
}
/* SALE BANNERS */

.sale-banners{
  width: 100%;
  max-width: 1300px;
  margin: 20px auto 0;
}

.sale-banner-grid{
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 15px;
}

.sale-banner-grid img{
  width: 100%;
  object-fit: fill;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.sale-banner-grid img:hover{
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
/* Container tổng thể */
.flash-sale-section {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 15px;
    font-family: Arial, sans-serif;
}

/* PHẦN 1: HEADER MÀU NÂU CAM */
.section-header {
    background-color: #FCDAB0; /* Màu nâu nhạt/cam đúng theo ảnh */
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 30px; /* Tạo khoảng cách tách biệt với phần sách */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.section-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0;
}

.divider {
    width: 1px;
    height: 14px;
    background-color: #FCDAB0;
    margin: 0 15px;
}

.countdown-wrapper {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.countdown-timer {
    display: flex;
    align-items: center;
    margin-left: 6px;
    gap: 4px;
}

.time-box {
    background-color: #FFFFFF;
    color: #000000;
    font-size: 13px;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

.colon { margin: 0 3px; font-weight: bold; }

/* PHẦN 2: LƯỚI SẢN PHẨM (5 CỘT) */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 cột đều nhau */
    gap: 20px;
    margin-bottom: 35px;
}

.product-item {
    text-align: left;
}

.product-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 12px;
}

.product-image img { width: 100%; display: block; }

/* Nhãn giảm giá tròn đỏ */
.discount-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #C92127;
    color: #FFFFFF;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.product-rating { 
    color: #F6A443; 
    font-size: 10px; 
    display: flex;
    gap: 2px; }

.product-title {
    font-size: 18px;
    font-weight: bold;
    height: 36px; /* Giới hạn chiều cao tiêu đề cho đều */
    overflow: hidden;
    margin-bottom: 1px;
}
.product-author{
    color: #818181;
    font-size: 14px;
    margin-top: 0px;
}

.price { color: #C92127; font-weight: bold; font-size: 14px; }

.original-price { color: #333333; text-decoration: line-through; font-size: 11px; margin-left: 5px; }

/* PHẦN 3: CỤM NÚT BẤM (ĐỎ & XANH) */
.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.btn-buy-now {
    background-color: #C92127; /* Màu đỏ nút Mua ngay */
    color: #FFFFFF;
    border: none;
    padding: 8px 0;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    flex: 1; /* Nút đỏ dài hơn */
    cursor: pointer;
}

.btn-cart-icon {
    background-color: #397CFE; /* Màu xanh giỏ hàng */
    color: #FFFAFA;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* PHẦN 4: NÚT XEM THÊM DƯỚI CÙNG */
.view-more-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 30px;
    clear: both;
}
.btn-view-more {
    display: inline-block;
    white-space: nowrap;
    background-color: #F86E55;
    color: #FFFFFF;
    padding: 10px 80px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: 0.3s;
}
.btn-view-more:hover {
    background-color: #F86E55;
}

.category-section {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 15px;
}

.category-section .section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 22px;
    font-weight: bold;
    text-transform: none;
    margin-bottom: 10px;
}

.category-section .section-title i {
    font-size: 24px;
    color: #000000;
}

.divider-full {
    width: 100%;
    height: 1px;
    background-color: #FFFFFF;
    margin-bottom: 25px;
}

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

.category-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-image {
    width: 100%;
    aspect-ratio: 3/4;
    background-color: #FFFFFF;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.category-name {
    font-size: 12px;
    font-weight: bold;
    color: #000000;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.trending-section {
    max-width: 1300px;
    margin: 40px auto;
    background: #FFFFFF;
}

/* Header màu cam nhạt */
.trending-header {
    background-color: #FCDAB0;
    padding: 12px 20px;
    border-radius: 4px 4px 0 0;
}

.trending-title {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #000000;
}

/* Thanh Tabs */
.trending-tabs {
    display: flex;
    gap: 20px;
    padding: 15px 20px;
    align-items: center;
}

.tab-item {
    background: none;
    border: none;
    font-size: 13px;
    color: #3D3D3D;
    cursor: pointer;
    padding: 8px 15px;
    transition: 0.3s;
}

.tab-item.active {
    border: 1px solid #F6A443;
    color: #F6A443;
    border-radius: 8px;
    font-weight: bold;
}

.divider-line {
    height: 1px;
    background-color: #FFFFFF;
    margin: 0 20px 25px 20px;
}

/* Bố cục giá và giỏ hàng mới */
.price-container {
    background-color: #FCDAB0; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 20px;
    margin-top: 10px;
}

.price-block {
    display: flex;
    flex-direction: column;
}

.price {
    font-weight: bold;
    color: #000000;
    font-size: 14px;
}

.original-price {
    font-size: 11px;
    color: #333333;
    text-decoration: line-through;
}

.btn-cart-blue {
    background-color: #397CFE;
    color: #FFFAFA;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(68, 138, 255, 0.3);
}

/* Nút Xem Thêm viền đỏ */
.btn-outline-viewmore {
    background: #FFFFFF;
    color: #C92127;
    border: 1px solid #C92127;
    padding: 10px 60px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-outline-viewmore:hover {
    background: #C92127;
    color: #FFFFFF;
}

.newsletter-section {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 15px;
}

.newsletter-container {
    background-color: #9FA7AB; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    border-radius: 8px;
    gap: 40px;
}

.newsletter-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFFFFF;
    font-weight: bold;
    font-size: 16px;
    white-space: nowrap;
}

.newsletter-title i {
    font-size: 22px;
}

.newsletter-form {
    display: flex;
    background-color: #FFFFFF;
    padding: 4px;
    border-radius: 4px;
    flex: 1;
    max-width: 600px;
}

.newsletter-form input {
    flex: 1;
    border: none;
    padding: 10px 15px;
    font-size: 14px;
    outline: none;
    color: #A7A7A7;
}

.newsletter-form button {
    background-color: #F6A443; 
    color: #FFFFFF;
    border: none;
    padding: 8px 25px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter-form button:hover {
    background-color: #F6A443;
}

/* ============== FOOTER CHÍNH ============== */

.footer-content {
    max-width: 1300px;
    margin: 0 auto 40px;
    padding: 0 20px;
    
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Ép tất cả các cột lên trên cùng */
    
    box-sizing: border-box;
}

/* Cột đầu tiên chứa Logo và thông tin */
.brand-info {
    flex: 1.5; 
    display: flex;
    flex-direction: column;
}

.footer-logo {
    color: #C92127; 
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    
    /* QUAN TRỌNG: Loại bỏ khoảng trống thừa phía trên của font chữ lớn */
    line-height: 0.8; 
    margin-top: 0;
}

/* Các cột danh mục bên cạnh */
.footer-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000000;
    text-transform: uppercase;
    
    /* CHỈNH Ở ĐÂY: Đưa tiêu đề nhỏ lên cao để ngang bằng đỉnh chữ M của MOT */
    line-height: 1;
    margin-top: 5px; 
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.disclaimer {
    font-size: 11px;
    font-style: italic;
    color: #000000;
}

.footer-column h4 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #000000;
    text-transform: uppercase;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #000000;
    text-decoration: none;
    transition: 0.3s;
}

.footer-column ul li a:hover {
    color: #C92127;
}

.footer-socials {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-socials a {
    width: 32px;
    height: 32px;
    background: #000000;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    transition: transform 0.3s;
}

.footer-socials a:hover {
    transform: translateY(-3px);
}

/* ============== LIÊN HỆ & ĐỐI TÁC ============== */
/* Layout chính chứa Liên hệ và Đối tác */
.footer-bottom-layout {
    max-width: 1300px;
    margin: 30px auto 0;
    padding: 30px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Ép cả 2 cột húc đỉnh lên để thẳng hàng tiêu đề */
    border-top: 1px solid #FFFFFF;
    gap: 60px;
    box-sizing: border-box;
}

/* Căn chỉnh chung cho cả 2 cột */
.footer-contact-column, 
.footer-partners-column {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Giảm kích thước chữ tiêu đề (Liên hệ & Đối tác) */
.contact-title {
    font-size: 22px; /* Giảm từ 35px xuống 22px cho gọn */
    font-weight: bold;
    margin-bottom: 20px;
    color: #000000;
    line-height: 1.2;
}

/* Phần Liên hệ */
.contact-methods-row {
    display: flex;
    align-items: center;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.contact-item i {
    font-size: 20px;
    color: #000000;
}

/* Thanh gạch dọc ở giữa */
.vertical-divider {
    width: 1px;
    height: 100px; /* Tăng độ cao một chút để cân bằng với 2 khối chữ */
    background-color: #FFFFFF;
    align-self: center;
}

/* Phần Đối tác */
.footer-partners-column {
    align-items: flex-start; /* Căn lề trái cho đồng bộ với cột liên hệ */
}

.partner-image-container {
    width: 100%;
}

.partner-image-container img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* ============== BẢN QUYỀN (DƯỚI CÙNG) ============== */
.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    text-align: center;
    padding: 20px 20px;
    border-top: 1px solid #FFFFFF;
    font-size: 11px;
    color: #4B4B4B;
    line-height: 1.5;
    box-sizing: border-box;
}
/* Nền tối phủ toàn màn hình */
.modal-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Khung Auth chính */
.auth-container {
    position: relative;
    width: 420px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 24px 30px;
    box-sizing: border-box;
}

/* Header Tabs */
.auth-tabs-wrapper {
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.auth-tabs {
    display: flex;
    justify-content: space-around;
}

.auth-tabs .tab-item {
    font-size: 15px;
    font-weight: 500;
    color: #999999;
    padding-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 50%;
    text-align: center;
    position: relative;
    bottom: -2px;
}

.auth-tabs .tab-item.active {
    color: #c92127;
    border-bottom: 2px solid #c92127;
    font-weight: bold;
}

/* Carousel Slider hiệu ứng */
.auth-carousel-container {
    width: 100%;
    overflow: hidden; /* Cắt bỏ phần thừa nếu có */
    position: relative;
}
.auth-carousel {
    display: flex;
    width: 300%; /* Tổng cộng 3 slide */
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-sizing: border-box;
}

.auth-slide {
    width: 33.333%;
    flex-shrink: 0;
    box-sizing: border-box;
    /* Thêm padding nhẹ 2 bên để các nút không bao giờ bị dính sát viền carousel */
    padding: 0 4px; 
}

/* Input Fields */
.input-group {
    margin-bottom: 16px;
    text-align: left;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: #4f4f4f;
    margin-bottom: 6px;
    font-weight: 500;
}

.pwd-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pwd-wrapper input, .input-group input[type="text"] {
    width: 100%;
    height: 40px;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 0 12px;
    font-size: 14px;
    box-sizing: border-box;
    outline: none;
    color: #333;
}

.pwd-wrapper input::placeholder, .input-group input::placeholder {
    color: #bfaaaa;
    opacity: 0.7;
}

.toggle-pwd {
    position: absolute;
    right: 12px;
    font-size: 13px;
    color: #4285f4;
    cursor: pointer;
    user-select: none;
}

.btn-send-otp {
    font-weight: 500;
}

/* Khối link quên mật khẩu bên trong slide login */
.forgot-link-container {
    text-align: right;
    margin-bottom: 20px;
}

.link-red {
    font-size: 12px;
    color: #c92127;
    text-decoration: none;
}

/* Hệ thống Button */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-primary-gray {
    width: 100%;
    height: 42px;
    background-color: #cccccc;
    color: #333333;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.btn-primary-gray:hover {
    background-color: #bfbfbf;
}

.btn-outline-red {
    width: 100%;
    height: 42px;
    background: transparent;
    border: 1px solid #c92127;
    color: #c92127;
    border-radius: 8px;
    font-size: 15px;
    font-weight: bold;
    box-sizing: border-box;
    cursor: pointer;
}

/* Facebook login */
.auth-footer {
    margin-top: 15px;
}

.btn-facebook {
    width: 100%;
    height: 42px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

/* Ghi chú điều khoản slide Đăng ký */
.terms-note {
    font-size: 11px;
    color: #666;
    text-align: center;
    line-height: 1.5;
    margin-top: 15px;
}

.terms-note a {
    color: #2f80ed;
    text-decoration: none;
}

/* --- POPUP ERROR ALERT BOX --- */
.error-alert-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: 20px;
    text-align: center;
    z-index: 10;
    box-sizing: border-box;
}

.error-square-icon {
    width: 70px;
    height: 70px;
    background-color: #c92127;
    color: white;
    font-size: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin: 0 auto 15px auto;
}

.error-txt {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    line-height: 1.4;
    margin-bottom: 20px;
}

.error-btns {
    display: flex;
    gap: 10px;
}

.error-btns button {
    flex: 1;
    height: 34px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    border: none;
}

.btn-retry {
    background-color: #dcdcdc;
    color: #333333;
}

.btn-to-reg {
    background-color: #c92127;
    color: white;
}
.modal-overlay-bg.show { display: flex !important; }


/* ==== RESPONSIVE PATCH - tránh vỡ layout trên màn nhỏ ==== */
html, body { max-width: 100%; overflow-x: hidden; }
img { max-width: 100%; }
.sale-banner-grid { width: 100%; }
@media (max-width: 900px) {
  .nav { height: auto; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .menu { flex-wrap: wrap; gap: 16px; }
  .header-right { flex-wrap: wrap; gap: 12px; }
  .search-box { width: min(100%, 280px); }
  .sale-banner-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .sale-banner-grid, .products-grid { grid-template-columns: 1fr; }
  .auth-container { width: 94vw; padding: 20px 18px; }
}

/* ================= V3 FUNCTIONAL FIXES ================= */
body { margin: 0; background: #f6f6f6; color: #333; }
.container { max-width: 1300px; margin: 0 auto; }
.header { position: sticky; top: 0; z-index: 1000; }
.menu a, .dropdown-btn { cursor: pointer; }
.dropdown-wrapper { position: relative; padding: 25px 0; }
.dropdown-menu { top: 66px; left: 0; z-index: 2000; min-width: 250px; }
.dropdown-wrapper:hover .dropdown-menu, .dropdown-wrapper.open .dropdown-menu { display: block; }
.dropdown-menu::before { content: ""; position: absolute; top: -18px; left: 0; right: 0; height: 18px; }
.dropdown-menu li a { font-size: 14px; padding: 12px 22px; }
.dropdown-title { font-weight: 700; }
.user-circle, .cart-box, .search-btn, .btn-login { cursor: pointer; }
.icons .fa-user.icon { background:#C92127; color:#fff; width:25px; height:25px; display:flex; align-items:center; justify-content:center; border-radius:50%; }

.products-grid { align-items: stretch; }
.product-item.functional-card { cursor: pointer; background: #fff; border-radius: 14px; padding: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.06); transition: .2s; }
.product-item.functional-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.12); }
.product-item .product-author { font-size: 12px; color: #666; min-height: 18px; margin: 4px 0; }
.product-rating { color: #f6b01e; font-size: 13px; letter-spacing: 1px; }
.product-actions { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.btn-buy-now, .btn-cart-icon, .btn-add-cart { border: none; cursor: pointer; border-radius: 18px; font-weight: 700; }
.btn-buy-now, .btn-add-cart { background: #C92127; color: #fff; padding: 8px 14px; }
.btn-cart-icon { background: #1e88ff; color: #fff; width: 34px; height: 34px; }
.category-grid a.category-item { text-decoration: none; color: inherit; cursor: pointer; }
.category-grid a.category-item:hover .category-name { color:#C92127; font-weight:700; }
.trending-tabs button { border: none; background: transparent; padding: 12px 20px; cursor: pointer; font-weight: 700; }
.trending-tabs button.active { color:#C92127; border-bottom: 2px solid #C92127; }
.newsletter { max-width: 1300px; margin: 24px auto 0; padding: 14px 28px; background: #9ea9aa; color:#fff; display:flex; gap:14px; align-items:center; border-radius: 8px 8px 0 0; }
.newsletter input { flex:1; padding:10px; border:0; border-radius:4px; }
.newsletter button { background:#f5a623; color:#fff; border:0; padding:10px 22px; border-radius:4px; cursor:pointer; font-weight:700; }
.footer { background:#fff; max-width:1300px; margin:0 auto 20px; border-top:1px solid #eee; }
.footer-content { display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap:28px; padding:30px; }
.footer-col { display:flex; flex-direction:column; gap:8px; }
.footer-col a { color:#333; text-decoration:none; font-size:14px; }
.footer-col a:hover { color:#C92127; }
.footer-brand img { width:160px; object-fit:contain; }
.footer-bottom { text-align:center; padding:16px; border-top:1px solid #eee; font-size:13px; color:#666; }
.page-hero { max-width:1300px; margin:24px auto; background:#fff; padding:28px; border-radius:14px; }
.product-toolbar { max-width:1300px; margin:0 auto 20px; display:flex; gap:12px; }
.product-toolbar input, .product-toolbar select { padding:14px; border:1px solid #ddd; border-radius:10px; background:#fff; }
.product-toolbar input { flex:1; }
.products-page-grid { max-width:1300px; margin:0 auto 30px; display:grid; grid-template-columns:repeat(5,1fr); gap:18px; }
.empty-state { grid-column:1/-1; background:#fff; padding:30px; border-radius:12px; text-align:center; }
.product-detail-page, .cart-page-main, .blog-page-main, .contact-page-main { max-width:1300px; margin:24px auto; }
.product-detail-card { display:grid; grid-template-columns: 360px 1fr; gap:32px; background:#fff; padding:28px; border-radius:16px; }
.detail-image img { width:100%; max-height:520px; object-fit:contain; border-radius:12px; background:#f6f6f6; }
.detail-info h1 { color:#C92127; margin-top:6px; }
.breadcrumb a { color:#C92127; text-decoration:none; }
.detail-price { display:flex; gap:14px; align-items:center; margin:18px 0; }
.detail-price span { color:#C92127; font-size:28px; font-weight:800; }
.detail-price del { color:#777; }
.detail-price b { background:#C92127; color:#fff; padding:4px 8px; border-radius:8px; }
.detail-actions { display:flex; gap:12px; }
.detail-buy { border-radius:22px; padding:11px 24px; }
.related-section { background:#fff; padding:24px; border-radius:16px; margin-top:24px; }
.cart-layout { display:grid; grid-template-columns: 1fr 340px; gap:24px; }
.cart-list-card, .cart-summary-card { background:#fff; padding:24px; border-radius:16px; }
.cart-row { display:grid; grid-template-columns: 80px 1fr 130px 110px 42px; gap:18px; align-items:center; padding:18px 0; border-bottom:1px solid #eee; }
.cart-row img { width:70px; height:95px; object-fit:cover; border-radius:8px; }
.cart-row h3 { margin:0 0 6px; }
.qty-control { display:flex; align-items:center; border:1px solid #ddd; border-radius:8px; overflow:hidden; }
.qty-control button { width:34px; height:34px; border:0; background:#f4f4f4; cursor:pointer; }
.qty-control input { width:44px; border:0; text-align:center; }
.item-remove { border:0; background:#fff; color:#888; cursor:pointer; font-size:18px; }
.item-remove:hover { color:#C92127; }
.cart-summary-card div { display:flex; justify-content:space-between; padding:12px 0; border-bottom:1px solid #eee; }
.summary-total strong { color:#C92127; font-size:22px; }
.btn-checkout { width:100%; border:0; background:#C92127; color:#fff; padding:14px; font-weight:800; border-radius:10px; margin-top:18px; cursor:pointer; }
.btn-checkout:disabled { opacity:.5; cursor:not-allowed; }
.empty-cart { padding:30px; text-align:center; }
.empty-cart a { color:#C92127; font-weight:700; }
.blog-layout { display:grid; grid-template-columns: 1fr 300px; gap:24px; }
.blog-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.blog-card, .blog-sidebar, .contact-card { background:#fff; padding:18px; border-radius:14px; box-shadow:0 4px 12px rgba(0,0,0,.05); }
.blog-card { cursor:pointer; }
.blog-card img { width:100%; height:130px; object-fit:cover; border-radius:8px; }
.blog-sidebar { display:flex; flex-direction:column; gap:12px; align-self:start; }
.blog-sidebar a { color:#333; text-decoration:none; }
.blog-sidebar a:hover { color:#C92127; }
.sidebar-search { width:100%; }
.contact-layout { display:grid; grid-template-columns: 1fr 1.3fr; gap:24px; }
.contact-card input, .contact-card textarea { width:100%; box-sizing:border-box; padding:12px; margin:8px 0; border:1px solid #ddd; border-radius:8px; }
.contact-card textarea { min-height:140px; }
.user-menu-popover { position:absolute; z-index:5000; width:230px; background:#fff; border:1px solid #eee; box-shadow:0 16px 36px rgba(0,0,0,.18); border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:8px; }
.user-menu-popover span { color:#666; font-size:13px; }
.user-menu-popover a, .user-menu-popover button { text-align:left; background:#f7f7f7; border:0; color:#333; padding:10px; border-radius:8px; text-decoration:none; cursor:pointer; }
.user-menu-popover a:hover, .user-menu-popover button:hover { background:#C92127; color:#fff; }
.mot-toast { position:fixed; right:24px; bottom:24px; z-index:7000; background:#222; color:#fff; padding:12px 18px; border-radius:10px; transform:translateY(80px); opacity:0; transition:.25s; }
.mot-toast.show { transform:translateY(0); opacity:1; }

@media (max-width: 1100px) {
  .nav { height:auto; flex-wrap:wrap; padding:12px; gap:12px; }
  .header-right { flex-wrap:wrap; }
  .products-page-grid, .products-grid { grid-template-columns:repeat(3,1fr) !important; }
  .footer-content, .blog-layout, .contact-layout, .cart-layout, .product-detail-card { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  .menu { gap:14px; flex-wrap:wrap; }
  .search-box { width:100%; }
  .products-page-grid, .products-grid, .blog-grid { grid-template-columns:1fr 1fr !important; }
  .cart-row { grid-template-columns:70px 1fr; }
  .cart-row .qty-control, .cart-row .cart-subtotal, .cart-row .item-remove { grid-column:auto; }
}

/* ================= V4 UI POLISH ================= */
.product-image { height: 230px; display: flex; align-items: center; justify-content: center; background: #f8f8f8; }
.product-image img { width: 100%; height: 100%; object-fit: contain; padding: 8px; box-sizing: border-box; }
.product-title { min-height: 42px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-actions { justify-content: space-between; }
.btn-buy-now { min-width: 72px; padding: 8px 16px; border-radius: 999px; }
.btn-cart-icon { flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; }
.product-detail-card { align-items: start; }
.detail-actions { align-items: center; flex-wrap: wrap; }
.detail-actions .btn-add-cart { min-width: 142px; padding: 12px 18px; border-radius: 999px; }
.detail-actions .detail-buy { min-width: 132px; max-width: 210px; flex: 0 0 auto; padding: 12px 24px; border-radius: 999px; }
.detail-image { background:#f7f7f8; border-radius:18px; padding:16px; }
.user-menu-popover { position:absolute; z-index:7000; width:220px; background:#fff; border-radius:14px; box-shadow:0 16px 40px rgba(0,0,0,.16); padding:14px; display:flex; flex-direction:column; gap:8px; }
.user-menu-popover strong { color:#c92127; }
.user-menu-popover span { font-size:12px; color:#777; word-break:break-word; }
.user-menu-popover a { text-decoration:none; color:#222; padding:8px; border-radius:8px; }
.user-menu-popover a:hover { background:#fff2f2; color:#c92127; }
.user-menu-popover button { border:0; background:#c92127; color:#fff; border-radius:8px; padding:10px; font-weight:800; cursor:pointer; }
@media(max-width: 900px) {
  .products-page-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-card { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
}


/* ===== V5 FIXES: footer thống nhất, ảnh fallback, detail buttons cân hơn ===== */
.newsletter { max-width: 1300px; min-height: auto; margin: 24px auto 0; padding: 12px 28px; background: #9ea9aa; color:#fff; display:flex; gap:14px; align-items:center; border-radius: 8px 8px 0 0; box-sizing:border-box; }
.newsletter input { flex:1; min-height: 40px; padding:10px 14px; border:0; border-radius:4px; font-size:14px; }
.newsletter button { background:#f5a623; color:#fff; border:0; padding:10px 22px; border-radius:4px; cursor:pointer; font-weight:700; }
.footer { background:#fff; max-width:1300px; margin:0 auto 20px; border-top:1px solid #eee; border-radius:0 0 8px 8px; overflow:hidden; }
.footer .footer-content { display:grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap:28px; padding:30px; min-height: 230px; box-sizing:border-box; }
.footer-col { display:flex; flex-direction:column; gap:8px; }
.footer-col a { color:#333; text-decoration:none; font-size:14px; }
.footer-col a:hover { color:#C92127; }
.footer-brand img { width:160px; object-fit:contain; margin-bottom: 14px; }
.footer-bottom { text-align:center; padding:16px; border-top:1px solid #eee; font-size:13px; color:#666; }
.detail-actions { display:flex; gap:12px; align-items:center; flex-wrap:wrap; max-width: 520px; }
.detail-actions .btn-add-cart, .detail-actions .detail-buy { width:auto !important; min-width: 150px !important; max-width: 180px !important; flex:0 0 auto !important; padding: 11px 18px !important; border-radius: 999px !important; text-align:center; justify-content:center; }
.detail-actions .detail-buy { min-width: 135px !important; }
@media (max-width: 768px) { .footer .footer-content { grid-template-columns: 1fr; min-height:auto; } .newsletter { flex-wrap:wrap; } }


/* ================= V7 EXPERIENCE ENHANCEMENTS ================= */
:root{
  --page-max: 1180px;
  --mot-red: #c92127;
  --mot-soft-bg: #f5f6f8;
}

html, body, button, input, select, textarea{
  font-family: "Be Vietnam Pro", "Inter", "Segoe UI", Arial, sans-serif !important;
}

body{
  background: var(--mot-soft-bg);
  cursor: url("assets/images/cursor-pen.png") 4 28, auto;
}

a, button, .product-item, .category-item, .cart-box, .user-circle, .nav-item, .wishlist-btn, .btn-buy-now, .btn-add-cart{
  cursor: url("assets/images/cursor-pen-pointer.png") 4 28, pointer !important;
}

.top-header-banner img,
.nav,
.slideshow,
.sale-banners,
.flash-sale-section,
.category-section,
.trending-section,
.products-page-main,
.product-detail-page,
.checkout-container,
.footer,
.newsletter,
.blog-page-main,
.contact-page-main,
.cart-layout,
.profile-dashboard-container{
  max-width: var(--page-max) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.top-header-banner{ background:#fff; }
.top-header-banner img{ border-radius:0 0 10px 10px; }
.header{ background:#fff; }
main{ padding-left:16px; padding-right:16px; }
.footer, .newsletter{ border-radius:14px; overflow:hidden; }
.flash-sale-section, .category-section, .trending-section, .page-hero, .product-toolbar, .product-detail-card, .cart-list-card, .cart-summary-card{
  box-shadow: 0 8px 28px rgba(16,24,40,.06);
}

/* Toast */
.mot-toast-container{ position:fixed; top:18px; right:18px; z-index:20000; display:flex; flex-direction:column; gap:10px; pointer-events:none; }
.mot-toast-item{ min-width:260px; max-width:360px; background:#fff; color:#1f2937; border-left:5px solid var(--mot-red); border-radius:14px; padding:12px 14px; box-shadow:0 18px 45px rgba(15,23,42,.18); display:flex; gap:10px; align-items:flex-start; transform:translateX(110%); opacity:0; transition:.25s ease; pointer-events:auto; }
.mot-toast-item.show{ transform:translateX(0); opacity:1; }
.mot-toast-item.success{ border-left-color:#16a34a; }
.mot-toast-item.error{ border-left-color:#dc2626; }
.mot-toast-item.info{ border-left-color:#2563eb; }
.mot-toast-item.warning{ border-left-color:#f59e0b; }
.mot-toast-item i{ margin-top:2px; color:var(--mot-red); }
.mot-toast-item.success i{ color:#16a34a; }
.mot-toast-item.error i{ color:#dc2626; }
.mot-toast-item.info i{ color:#2563eb; }
.mot-toast-item.warning i{ color:#f59e0b; }

/* Fly to cart animation */
.fly-cart-img{ position:fixed; z-index:19999; width:64px; height:84px; object-fit:cover; border-radius:10px; pointer-events:none; box-shadow:0 18px 45px rgba(0,0,0,.25); transition: transform .75s cubic-bezier(.2,.85,.25,1), opacity .75s ease; }
.cart-box.cart-pulse{ animation: cartPulse .55s ease; }
@keyframes cartPulse{ 0%{transform:scale(1)} 45%{transform:scale(1.22)} 100%{transform:scale(1)} }

/* Search suggestions */
.search-box{ position:relative; }
.search-suggest{ position:absolute; top:calc(100% + 8px); left:0; right:0; background:#fff; border-radius:16px; box-shadow:0 18px 45px rgba(15,23,42,.16); padding:8px; display:none; z-index:10010; border:1px solid #eef0f4; }
.search-suggest.show{ display:block; }
.search-suggest-item{ display:flex; align-items:center; gap:10px; padding:9px; border-radius:12px; text-decoration:none; color:#111827; }
.search-suggest-item:hover{ background:#fff3f3; color:var(--mot-red); }
.search-suggest-item img{ width:38px; height:50px; object-fit:cover; border-radius:7px; background:#f3f4f6; }
.search-suggest-item strong{ display:block; font-size:13px; line-height:1.25; }
.search-suggest-item span{ display:block; font-size:12px; color:#8a94a6; margin-top:3px; }
.search-suggest-empty{ padding:12px; font-size:13px; color:#667085; }

/* Wishlist */
.product-image{ position:relative; }
.wishlist-btn{ position:absolute; top:10px; left:10px; z-index:3; width:34px; height:34px; border:0; border-radius:999px; background:rgba(255,255,255,.92); color:#c4c4c4; box-shadow:0 8px 18px rgba(0,0,0,.12); display:flex; align-items:center; justify-content:center; transition:.2s; }
.wishlist-btn:hover, .wishlist-btn.active{ color:#c92127; transform:translateY(-1px) scale(1.05); }
.wishlist-btn.active{ background:#fff0f1; }
.btn-wishlist-detail{ border:1px solid #f1b7bb; color:#c92127; background:#fff; border-radius:999px; padding:12px 18px; font-weight:800; min-width:128px; }
.btn-wishlist-detail.active{ background:#fff0f1; }

.detail-actions{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.detail-actions .btn-add-cart, .detail-actions .btn-buy-now, .detail-actions .btn-wishlist-detail{ width:auto !important; min-width:130px; flex:0 0 auto; padding:12px 18px !important; }
.detail-actions .detail-buy{ min-width:150px !important; }

@media (max-width: 900px){
  :root{ --page-max: calc(100vw - 20px); }
  main{ padding-left:10px; padding-right:10px; }
  .mot-toast-container{ left:12px; right:12px; }
  .mot-toast-item{ max-width:none; min-width:0; }
}


/* ================= V8 BUSINESS + ADMIN POLISH ================= */
html, body, button, input, select, textarea,
.admin-container, .admin-table, .admin-section, .modal-content{
  font-family: "Be Vietnam Pro", "Inter", "Segoe UI", Arial, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.admin-main{ padding:34px 40px; }
.admin-section{ margin-bottom:34px; }
.admin-mini-grid, .admin-chart-grid{ gap:30px; align-items:start; }
.admin-chart-grid{ display:grid; grid-template-columns:1fr 1fr .85fr; margin-bottom:30px; }
.chart-card{ min-height:310px; }
.dashboard-chart-bars{ display:flex; flex-direction:column; gap:13px; }
.chart-bar-row{ display:grid; grid-template-columns:150px 1fr 42px; gap:12px; align-items:center; font-size:13px; color:#475467; }
.chart-bar-row span{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chart-track{ height:12px; background:#f1f5f9; border-radius:999px; overflow:hidden; }
.chart-track i{ display:block; height:100%; min-width:6px; background:linear-gradient(90deg,#c92127,#f97316); border-radius:999px; }
.chart-bar-row.status-completed .chart-track i{ background:linear-gradient(90deg,#16a34a,#86efac); }
.chart-bar-row.status-cancelled .chart-track i,
.chart-bar-row.status-return .chart-track i{ background:linear-gradient(90deg,#be123c,#fb7185); }
.chart-bar-row.status-shipping .chart-track i{ background:linear-gradient(90deg,#2563eb,#60a5fa); }
.low-stock-list{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:10px; }
.low-stock-list li{ display:grid; grid-template-columns:42px 1fr auto; gap:10px; align-items:center; padding:10px; background:#fff7ed; border:1px solid #fed7aa; border-radius:14px; }
.low-stock-list img{ width:42px; height:56px; object-fit:cover; border-radius:8px; }
.low-stock-list span{ font-weight:700; font-size:13px; line-height:1.35; }
.low-stock-list b{ color:#ea580c; }
.warning-card strong{ color:#ea580c !important; }
.stock-pill{ display:inline-flex; align-items:center; justify-content:center; min-width:48px; border-radius:999px; padding:7px 10px; background:#ecfdf3; color:#039855; font-weight:800; }
.stock-pill.low{ background:#fff7ed; color:#ea580c; }
.product-toolbar-v8{ display:grid !important; grid-template-columns:1.4fr .8fr .55fr .55fr .8fr; gap:12px; }
.product-toolbar-v8 input, .product-toolbar-v8 select{ width:100%; min-width:0; }
.stock-line{ margin:4px 0 0; font-size:12px; color:#039855; font-weight:700; }
.stock-line.out, .detail-stock.out{ color:#be123c; }
.detail-stock{ display:inline-flex; align-items:center; gap:8px; background:#ecfdf3; color:#039855; font-weight:800; padding:10px 14px; border-radius:999px; margin:8px 0 16px; }
button:disabled{ opacity:.55; cursor:not-allowed !important; }
.cart-stock{ display:block; color:#667085; margin-top:4px; }
.blog-hero .eyebrow{ color:#c92127; text-transform:uppercase; font-weight:800; letter-spacing:.08em; margin:0 0 8px; }
.blog-layout-v8 .blog-card h2{ font-size:18px; line-height:1.35; margin:12px 0 8px; }
.blog-layout-v8 .blog-card p{ color:#475467; line-height:1.55; }
.blog-tag{ display:inline-flex; margin-top:12px; background:#fff1f2; color:#c92127; border-radius:999px; padding:6px 10px; font-size:12px; font-weight:800; }
.social-row{ display:flex; gap:16px; font-size:26px; color:#c92127; }
.sidebar-search{ padding:12px; border:1px solid #ddd; border-radius:10px; }
@media(max-width:1200px){ .admin-chart-grid{ grid-template-columns:1fr; } .product-toolbar-v8{ grid-template-columns:1fr 1fr; } }
@media(max-width:700px){ .product-toolbar-v8{ grid-template-columns:1fr; } }

/* ================= V9 FIX: font ổn định, blog sidebar gọn, card bài viết clickable ================= */
html, body, button, input, select, textarea,
.blog-page-main, .blog-page-main *,
.blog-sidebar, .blog-sidebar *,
.blog-card, .blog-card * {
  font-family: "Segoe UI", Arial, Helvetica, sans-serif !important;
}
.blog-layout-v8 {
  grid-template-columns: minmax(0, 1fr) 300px !important;
  align-items: start;
}
.blog-layout-v8 .blog-grid {
  min-width: 0;
}
.blog-layout-v8 .blog-sidebar {
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  overflow: hidden;
}
.blog-layout-v8 .sidebar-search {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: block;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 12px;
  outline: none;
}
.blog-layout-v8 .sidebar-search:focus {
  border-color: #c92127;
  box-shadow: 0 0 0 3px rgba(201,33,39,.08);
}
.blog-card.real-blog {
  transition: transform .2s ease, box-shadow .2s ease;
}
.blog-card.real-blog:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(16,24,40,.12);
}
.blog-readmore {
  display: inline-flex;
  margin-top: 12px;
  color: #c92127;
  font-weight: 800;
  text-decoration: none;
}
.blog-detail-card {
  background: #fff;
  border-radius: 22px;
  padding: 28px;
  box-shadow: 0 12px 32px rgba(16,24,40,.08);
}
.blog-detail-card img {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border-radius: 18px;
  margin: 18px 0 22px;
}
.blog-detail-card h1 {
  color: #c92127;
  line-height: 1.25;
  margin: 10px 0 8px;
}
.blog-detail-meta {
  color: #667085;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.blog-detail-content p {
  font-size: 17px;
  line-height: 1.75;
  color: #344054;
}
.blog-back-link {
  color: #c92127;
  font-weight: 800;
  text-decoration: none;
}
@media(max-width: 1100px){
  .blog-layout-v8 { grid-template-columns: 1fr !important; }
  .blog-layout-v8 .blog-sidebar { max-width: none; }
}


/* ================= V10 QUICK UI FIXES ================= */
/* Banner đầu trang trải full chiều ngang trình duyệt */
.top-header-banner,
.top-header-banner img{
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
  border-radius:0 !important;
}
.top-header-banner img{
  height:64px !important;
  object-fit:cover !important;
}

/* Bộ lọc sản phẩm gọn hơn, không chen nhau trên màn laptop */
.product-toolbar-v8{
  max-width:var(--page-max) !important;
  grid-template-columns:minmax(240px,1.1fr) minmax(160px,.72fr) minmax(105px,.45fr) minmax(105px,.45fr) minmax(155px,.68fr) !important;
  gap:10px !important;
  padding:14px !important;
}
.product-toolbar-v8 input,
.product-toolbar-v8 select{
  min-width:0 !important;
  font-size:14px !important;
  padding:12px 14px !important;
}
.product-toolbar-v8 input::placeholder{
  color:#667085 !important;
}

/* Bỏ icon mũi tên nếu FontAwesome chưa load để tránh hiện ô vuông */
.blog-back-link i{
  display:none !important;
}

@media(max-width:1050px){
  .product-toolbar-v8{
    grid-template-columns:1fr 1fr !important;
  }
}
@media(max-width:680px){
  .product-toolbar-v8{
    grid-template-columns:1fr !important;
  }
}


/* ================= V11 FINAL UI FIXES: no broken icons + compact controls ================= */
.product-toolbar-v8{
  display:grid !important;
  grid-template-columns:minmax(220px,1fr) 170px 120px 120px 155px !important;
  gap:8px !important;
  align-items:center !important;
  padding:12px !important;
  overflow:visible !important;
}
.product-toolbar-v8 input,
.product-toolbar-v8 select{
  height:48px !important;
  min-width:0 !important;
  max-width:100% !important;
  padding:10px 14px !important;
  font-size:14px !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
}
@media(max-width:1180px){
  .product-toolbar-v8{ grid-template-columns:1fr 1fr 1fr !important; }
}
@media(max-width:760px){
  .product-toolbar-v8{ grid-template-columns:1fr !important; }
}
.blog-card small{ display:block; margin-top:12px; color:#475467; }
.blog-readmore{ margin-left:0 !important; white-space:nowrap; }
.blog-readmore i,
.blog-card small i,
.blog-back-link i{ display:none !important; }
.social-text-row{ display:flex; gap:12px; align-items:center; }
.social-text-row a{
  width:34px; height:34px; border-radius:999px;
  background:#c92127; color:#fff !important; text-decoration:none;
  display:inline-flex; align-items:center; justify-content:center;
  font-weight:900; font-size:14px; text-transform:uppercase;
}
.social-text-row a:nth-child(3){ font-size:18px; }
.blog-sidebar{ overflow:visible !important; }
.blog-layout-v8 .blog-sidebar{ padding:24px !important; }
.newsletter strong{ white-space:nowrap; }
.voucher-ticket-text{ font-size:30px; font-weight:900; color:#fff; line-height:1; }
.voucher-card .voucher-left{ min-height:132px; }
.voucher-right{ padding-top:10px !important; padding-bottom:10px !important; }
.voucher-footer{ margin-top:16px !important; gap:12px !important; align-items:center !important; }
.voucher-footer small{ display:block; margin-top:5px; line-height:1.45; }


/* ================= V12 FINAL CLEANUP: compact filters, safe header icons, blog cards ================= */
/* Toolbar sản phẩm: dùng flex rõ ràng để không còn chồng ô trên màn laptop */
.product-toolbar-v8{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:center !important;
  gap:10px !important;
  width:min(100% - 32px, 1260px) !important;
  max-width:1260px !important;
  margin:0 auto 22px !important;
  padding:12px 14px !important;
  box-sizing:border-box !important;
  overflow:visible !important;
}
.product-toolbar-v8 > *{
  box-sizing:border-box !important;
  flex:none !important;
  min-width:0 !important;
  height:46px !important;
  border-radius:12px !important;
}
.product-toolbar-v8 #searchInput{
  flex:1 1 360px !important;
  width:auto !important;
  min-width:260px !important;
}
.product-toolbar-v8 #categoryFilter{
  width:190px !important;
}
.product-toolbar-v8 #minPriceFilter,
.product-toolbar-v8 #maxPriceFilter{
  width:120px !important;
}
.product-toolbar-v8 #sortFilter{
  width:170px !important;
}
@media(max-width:980px){
  .product-toolbar-v8{ flex-wrap:wrap !important; }
  .product-toolbar-v8 #searchInput{ flex:1 1 100% !important; width:100% !important; }
  .product-toolbar-v8 #categoryFilter,
  .product-toolbar-v8 #minPriceFilter,
  .product-toolbar-v8 #maxPriceFilter,
  .product-toolbar-v8 #sortFilter{ flex:1 1 160px !important; width:auto !important; }
}
@media(max-width:640px){
  .product-toolbar-v8 > *{ flex:1 1 100% !important; width:100% !important; }
}

/* Fallback icon không phụ thuộc FontAwesome để tránh ô vuông/mất icon */
.search-btn{ position:relative !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; }
.search-btn i{ display:none !important; }
.search-btn::before{ content:'🔍'; font-family:'Segoe UI Emoji','Apple Color Emoji','Segoe UI',Arial,sans-serif !important; font-size:18px; line-height:1; }
.icons{ display:flex; align-items:center; gap:14px; }
.icons > .fa-bell.icon{ font-size:0 !important; width:24px; height:24px; display:inline-flex !important; align-items:center; justify-content:center; }
.icons > .fa-bell.icon::before{ content:'🔔' !important; font-family:'Segoe UI Emoji','Apple Color Emoji','Segoe UI',Arial,sans-serif !important; font-size:20px !important; color:#c92127; }
.cart-box{ position:relative; width:32px; height:32px; display:inline-flex !important; align-items:center; justify-content:center; }
.cart-box i{ display:none !important; }
.cart-box::before{ content:'🛒'; font-family:'Segoe UI Emoji','Apple Color Emoji','Segoe UI',Arial,sans-serif !important; font-size:22px; line-height:1; }
.user-circle{ width:34px !important; height:34px !important; display:inline-flex !important; align-items:center !important; justify-content:center !important; }
.user-circle i{ display:none !important; }
.user-circle::before{ content:'👤'; font-family:'Segoe UI Emoji','Apple Color Emoji','Segoe UI',Arial,sans-serif !important; font-size:20px; line-height:1; }
.cart-box .badge{ position:absolute !important; top:-7px !important; right:-8px !important; z-index:2 !important; }

/* Blog: các card cao đều, nút Đọc tiếp cố định góc dưới trái */
.blog-grid{ align-items:stretch !important; }
.blog-card.real-blog{
  display:flex !important;
  flex-direction:column !important;
  min-height:480px !important;
}
.blog-card.real-blog img{
  flex:0 0 auto !important;
}
.blog-card.real-blog h2{
  min-height:72px;
}
.blog-card.real-blog p{
  flex:1 1 auto !important;
}
.blog-card.real-blog small{
  margin-top:12px !important;
}
.blog-card.real-blog .blog-readmore{
  margin-top:auto !important;
  align-self:flex-start !important;
  position:static !important;
  display:inline-flex !important;
}
.blog-sidebar .social-text-row a{ font-family:'Segoe UI',Arial,sans-serif !important; }

/* Admin: không hiện icon lỗi ô vuông trong nút và sidebar */
.admin-sidebar i,
.admin-main .btn-admin i,
.admin-main button i,
.admin-page i.fa-solid,
.admin-page i.fa-regular{
  display:none !important;
}
.admin-sidebar .nav-item{ gap:0 !important; }
.admin-main .btn-admin{ gap:0 !important; }

/* Blog/detail: link quay lại chỉ dùng chữ */
.blog-back-link::before{ content:'' !important; }
.blog-back-link i{ display:none !important; }

/* V12: product action icon fallback */
.wishlist-btn i,
.btn-cart-icon i,
.btn-add-cart i,
.btn-wishlist-detail i,
.item-remove i{ display:none !important; }
.wishlist-btn::before{ content:'♥'; font-family:Arial,sans-serif; font-size:18px; line-height:1; }
.btn-cart-icon::before{ content:'🛒'; font-family:'Segoe UI Emoji','Apple Color Emoji',Arial,sans-serif; font-size:17px; line-height:1; }
.btn-add-cart::before{ content:'🛒'; font-family:'Segoe UI Emoji','Apple Color Emoji',Arial,sans-serif; margin-right:6px; }
.btn-wishlist-detail::before{ content:'♥'; font-family:Arial,sans-serif; margin-right:6px; }
.item-remove::before{ content:'×'; font-family:Arial,sans-serif; font-size:20px; line-height:1; }

/* ================= V13 FIX: restore v11-style icons + no overlap toolbar ================= */
/* Product filter: grid layout, no overlap between search/category/price/sort */
.product-toolbar.product-toolbar-v8{
  display:grid !important;
  grid-template-columns:minmax(260px, 1fr) 180px 140px 140px 180px !important;
  gap:16px !important;
  align-items:center !important;
  width:min(100% - 32px, 1260px) !important;
  max-width:1260px !important;
  margin:0 auto 26px !important;
  padding:14px !important;
  overflow:visible !important;
  box-sizing:border-box !important;
}
.product-toolbar.product-toolbar-v8 > *{
  position:static !important;
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  height:48px !important;
  flex:unset !important;
  box-sizing:border-box !important;
  margin:0 !important;
}
.product-toolbar.product-toolbar-v8 input,
.product-toolbar.product-toolbar-v8 select{
  padding:0 16px !important;
  border:1px solid #d9dde5 !important;
  border-radius:12px !important;
  background:#fff !important;
  font-size:15px !important;
  line-height:48px !important;
  white-space:nowrap !important;
  text-overflow:ellipsis !important;
}
.product-toolbar.product-toolbar-v8 #searchInput,
.product-toolbar.product-toolbar-v8 #categoryFilter,
.product-toolbar.product-toolbar-v8 #minPriceFilter,
.product-toolbar.product-toolbar-v8 #maxPriceFilter,
.product-toolbar.product-toolbar-v8 #sortFilter{
  width:100% !important;
  min-width:0 !important;
  flex:unset !important;
}
@media(max-width:1180px){
  .product-toolbar.product-toolbar-v8{ grid-template-columns:1fr 1fr 1fr !important; }
  .product-toolbar.product-toolbar-v8 #searchInput{ grid-column:1 / -1 !important; }
}
@media(max-width:760px){
  .product-toolbar.product-toolbar-v8{ grid-template-columns:1fr !important; }
  .product-toolbar.product-toolbar-v8 #searchInput{ grid-column:auto !important; }
}

/* Restore FontAwesome icons like v11/index. Disable emoji fallback from v12. */
.search-btn::before,
.cart-box::before,
.user-circle::before,
.icons > .fa-bell.icon::before{
  content:normal !important;
}
.search-btn i,
.cart-box i,
.user-circle i{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  font-family:"Font Awesome 6 Free" !important;
  font-weight:900 !important;
}
.search-btn{
  width:54px !important;
  min-width:54px !important;
  height:46px !important;
  background:#c92127 !important;
  color:#fff !important;
  border:0 !important;
  border-radius:0 8px 8px 0 !important;
}
.search-btn i{ color:#fff !important; font-size:18px !important; }
.icons{
  display:flex !important;
  align-items:center !important;
  gap:16px !important;
}
.icons > .fa-bell.icon{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:26px !important;
  height:26px !important;
  font-size:20px !important;
  color:#c92127 !important;
  font-family:"Font Awesome 6 Free" !important;
  font-weight:900 !important;
}
.cart-box{
  position:relative !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:32px !important;
  height:32px !important;
  color:#c92127 !important;
  background:transparent !important;
  border-radius:0 !important;
}
.cart-box i{ color:#c92127 !important; font-size:22px !important; }
.cart-box .badge{
  position:absolute !important;
  top:-7px !important;
  right:-8px !important;
  width:18px !important;
  height:18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:50% !important;
  background:#2f80ed !important;
  color:#fff !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1 !important;
}
.user-circle{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  border-radius:50% !important;
  background:#c92127 !important;
  color:#fff !important;
}
.user-circle i{ color:#fff !important; font-size:17px !important; }

/* Blog cards: fixed bottom-left read more */
.blog-card.real-blog{
  display:flex !important;
  flex-direction:column !important;
  min-height:520px !important;
}
.blog-card.real-blog p{ flex:1 1 auto !important; }
.blog-card.real-blog small{
  display:block !important;
  width:100% !important;
  margin-top:14px !important;
  color:#475467 !important;
}
.blog-card.real-blog .blog-readmore{
  display:block !important;
  align-self:flex-start !important;
  margin-top:16px !important;
  margin-left:0 !important;
  color:#c92127 !important;
  font-weight:900 !important;
  position:static !important;
}

/* Blog social icons: FontAwesome brands, stable and not emoji. */
.social-text-row{ display:flex !important; gap:14px !important; align-items:center !important; }
.social-text-row a{
  width:38px !important;
  height:38px !important;
  border-radius:50% !important;
  background:#c92127 !important;
  color:#fff !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-decoration:none !important;
  font-size:18px !important;
}
.social-text-row a i{ display:inline-flex !important; font-family:"Font Awesome 6 Brands" !important; color:#fff !important; }

/* Account sidebar: restore FontAwesome icons instead of text/emoji fallback. */
.user-profile-dashboard .profile-sidebar i{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:26px !important;
  min-width:26px !important;
  color:#667085 !important;
  font-size:18px !important;
}
.user-profile-dashboard .menu-item-header i.arrow-icon{
  width:auto !important;
  min-width:0 !important;
  color:#c92127 !important;
  font-size:14px !important;
}
.user-profile-dashboard .menu-label::before{
  content:none !important;
  display:none !important;
}
.user-profile-dashboard .menu-label{
  gap:14px !important;
}
.user-profile-dashboard .menu-item.active i,
.user-profile-dashboard .menu-item-group.active i,
.user-profile-dashboard .menu-item:hover i,
.user-profile-dashboard .menu-item-header:hover i{
  color:#c92127 !important;
}

/* Product/detail action icons: keep FontAwesome when available; no emoji-cart fallback. */
.btn-cart-icon::before,
.btn-add-cart::before,
.btn-wishlist-detail::before,
.item-remove::before{
  content:none !important;
  display:none !important;
}
.btn-cart-icon i,
.btn-add-cart i,
.btn-wishlist-detail i,
.item-remove i,
.wishlist-btn i{
  display:inline-flex !important;
}


/* ================= V14 HEADER ICONS: use provided PNG icons, no CDN dependency ================= */
.header .icons{
  display:flex !important;
  align-items:center !important;
  gap:14px !important;
}
.header .icons .header-icon-img{
  display:block !important;
  object-fit:contain !important;
  flex:0 0 auto !important;
}
.header .icons .notification-icon{
  width:28px !important;
  height:28px !important;
}
.header .cart-box{
  position:relative !important;
  width:34px !important;
  height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
}
.header .cart-box::before,
.header .user-circle::before{
  content:none !important;
}
.header .cart-box i,
.header .user-circle i{
  display:none !important;
}
.header .cart-box .cart-icon-img{
  width:30px !important;
  height:30px !important;
}
.header .cart-box .badge{
  position:absolute !important;
  top:-7px !important;
  right:-7px !important;
  width:18px !important;
  height:18px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  border-radius:50% !important;
  background:#2f80ed !important;
  color:#fff !important;
  font-size:11px !important;
  font-weight:800 !important;
  line-height:1 !important;
}
.header .user-circle{
  width:34px !important;
  height:34px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  background:transparent !important;
  border-radius:0 !important;
  padding:0 !important;
}
.header .user-circle .user-icon-img{
  width:32px !important;
  height:32px !important;
}
.header .icons > .fa-bell.icon{
  display:none !important;
}

.header .search-btn .search-icon-svg{ width:22px !important; height:22px !important; display:block !important; color:#fff !important; }


/* ================= V15 HEADER NOTIFICATION LINK ================= */
.header .icons .header-icon-link{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  text-decoration:none !important;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
}
.header .icons .header-icon-link .notification-icon{
  width:28px !important;
  height:28px !important;
}
.header .icons .header-icon-link:hover,
.header .cart-box:hover,
.header .user-circle:hover{
  transform:translateY(-1px);
  transition:.18s ease;
}
