/*
Theme Name: Trong Nghia Foodking
Theme URI: https://trongnghiafoodking.com
Author: Phan Đức Huy
Author URI: https://trongnghiafoodking.com
Description: Theme thương mại điện tử chuyên dụng cho ngành thực phẩm đông lạnh thượng hạng. Tối ưu hiệu năng 100% bằng mã nguồn thuần, tích hợp cổng kép lưu trữ dữ liệu, tính giá TMĐT mỏ neo và hệ thống tra cứu vận đơn.
Version: 5.2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: trongnghia-foodking
*/

/* ==========================================================================
   1. BIẾN MÀU SẮC LUXURY CONTRAST & HỆ THỐNG PHÔNG CHỮ
   ========================================================================== */
:root {
    /* Bảng màu thương hiệu chính */
    --color-primary-dark: #7A0505;      /* Đỏ Đun hoàng gia */
    --color-primary-deep: #5E0202;      /* Đỏ đậm đổ bóng */
    --color-primary-bright: #E60000;    /* Đỏ tươi nhấn CTA */
    --color-accent-gold: #D4AF37;       /* Vàng Gold Luxury */
    --color-accent-orange: #FF9900;     /* Cam đũa ẩm thực */
    --color-brand-blue: #0055A4;        /* Xanh dương Foodking */
    
    /* Màu nền & Trung tính */
    --color-bg-light: #F8FAFC;          /* Xám sáng nền web */
    --color-bg-white: #FFFFFF;          /* Trắng tinh khiết */
    --color-dark-core: #0C0C0C;         /* Đen than cốt lõi */
    --color-text-dark: #0F172A;         /* Chữ đen đậm tương phản cao */
    --color-border-subtle: #E2E8F0;     /* Viền mờ thanh lịch */
    
    /* Phông chữ */
    --font-heading: 'Lora', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   2. THIẾT LẬP CƠ BẢN & RESET HIỂN THỊ
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-serif {
    font-family: var(--font-heading);
}

/* ==========================================================================
   3. THANH ĐIỀU HƯỚNG & MENU HEADER
   ========================================================================== */
.header-main-nav ul {
    display: flex !important;
    align-items: center !important;
    gap: 24px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header-main-nav ul li {
    display: inline-block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.header-main-nav ul li a {
    display: inline-block !important;
    color: #4B5563 !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    padding: 4px 0 !important;
}

.header-main-nav ul li a:hover {
    color: var(--color-primary-dark) !important;
}

/* ==========================================================================
   4. BỘ ĐIỀU KHIỂN CÁC THANH TRƯỢT (DRAWERS SYSTEM)
   ========================================================================== */
#mobile-menu-drawer, 
#product-filter-drawer {
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

#mini-cart-drawer {
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.drawer-open-left {
    transform: translateX(0) !important;
}

.drawer-open-right {
    transform: translateX(0) !important;
}

/* ==========================================================================
   5. TƯƠNG PHẢN CAO CHO SẢN PHẨM & ĐỊNH DẠNG GIÁ
   ========================================================================== */
h3.font-serif, 
.font-serif h3, 
.prod-card-title {
    color: var(--color-text-dark) !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

a:hover h3.font-serif, 
a:hover .prod-card-title {
    color: var(--color-primary-dark) !important;
}

.prod-card-price {
    color: var(--color-text-dark) !important;
    font-family: monospace, sans-serif !important;
    font-weight: 900 !important;
    font-size: 16px !important;
    letter-spacing: -0.02em !important;
}

/* ==========================================================================
   6. THANH CUỘN TIỆN ÍCH (SCROLLBAR & UTILITIES)
   ========================================================================== */
/* Ẩn thanh cuộn nhưng vẫn cho phép vuốt trượt ngang trên Mobile */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Thanh cuộn nhỏ cho Drawer giỏ hàng và bộ lọc */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #151515;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #333333;
    border-radius: 4px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-bright);
}

/* ==========================================================================
   7. HIỆU ỨNG CHUYỂN ĐỘNG & HOẠT ẢNH (ANIMATIONS)
   ========================================================================== */
/* Hiệu ứng rung nảy icon giỏ hàng khi sản phẩm bay vào */
@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.22); color: var(--color-accent-orange); }
}
.cart-pop-active {
    animation: cartBounce 0.4s ease-in-out;
}

/* Hiệu ứng nhấp nháy nhãn giảm giá % */
@keyframes discountPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}
.animate-discount {
    animation: discountPulse 2s infinite ease-in-out;
}

/* Hiệu ứng Glassmorphism cho Header */
.header-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==========================================================================
   8. TOAST NOTIFICATION (THÔNG BÁO NỔ ĐƠN NHANH)
   ========================================================================== */
#toast-notif {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: rgba(12, 12, 12, 0.95);
    color: #FFFFFF;
    padding: 12px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 153, 0, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   9. CHECKOUT & TÙY BIẾN FORM THANH TOÁN
   ========================================================================== */
.payment-method-card input[type="radio"]:checked ~ span {
    color: var(--color-primary-dark);
    font-weight: 700;
}