/* ================= 1. CORE & VARIABLES ================= */
:root {
    --primary: #2d6a4f; 
    --primary-light: #40916c;
    --secondary: #52b788; 
    --accent: #e63946;
    --bg: #f1fcf5; 
    --white: #ffffff; 
    --text: #1b4332; 
    --border: #d8f3dc;
    --font-head: 'Playfair Display', serif; 
    --font-body: 'Inter', sans-serif;
    --radius: 16px;
    --shadow: 0 8px 24px rgba(45, 106, 79, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- DARK MODE VARIABLES --- */
body.dark-mode {
    --bg: #050a07;           
    --white: #111f18;        
    --text: #d8f3dc;         
    --border: #2d4a3e;       
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    --primary: #52b788;      
}

/* Fix màu chữ Dark Mode chung */
body.dark-mode .card-title { color: #fff; }
body.dark-mode .nav-header-mobile { background: #111f18; color: #e0e0e0; }

/* Menu chính Dark Mode */
body.dark-mode .main-nav { background: transparent; }
body.dark-mode .main-nav a { color: #d8f3dc; border-bottom-color: #2d4a3e; }
body.dark-mode .main-nav a:hover { color: #ffffff; background: transparent; }
body.dark-mode header.scrolled { background: rgba(17, 31, 24, 0.95); border-bottom: 1px solid #2d4a3e; }

/* Các thành phần khác trong Dark Mode */
body.dark-mode .cart-sidebar { background: #111f18; }
body.dark-mode .cart-header, body.dark-mode .cart-footer, body.dark-mode .cart-address-section { background: #0b1410; border-color: #2d4a3e; }
body.dark-mode .qty-btn-mini, body.dark-mode .qty-box button { background: #2d4a3e; color: white; }
body.dark-mode .search-box { background: #1a2e25; border-color: #2d4a3e; }
body.dark-mode .search-input { color: white; }
body.dark-mode .modal-box, body.dark-mode .profile-content, body.dark-mode .profile-sidebar { background: #111f18; border-color: #2d4a3e; }
body.dark-mode .input-group { background: #0b1410; border-color: #2d4a3e; }
body.dark-mode .input-group input { color: white; }
body.dark-mode .profile-sidebar { background: #0b1410; }
body.dark-mode .main-nav a:hover, body.dark-mode .p-tab-btn:hover { background: rgba(255,255,255,0.05); }

/* Global Reset */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; font-family: var(--font-body); -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body { 
    background-color: var(--bg); 
    color: var(--text); 
    overflow-x: hidden; 
    line-height: 1.5; 
    display: flex; flex-direction: column; min-height: 100vh;
    transition: background-color 0.5s ease, color 0.5s ease;
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: linear-gradient(to bottom, #2d6a4f, #52b788); border-radius: 10px; }

/* Utils & Animations */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 40px; width: 100%; }
.fade-in-up { animation: fadeInUp 0.8s ease forwards; opacity: 0; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.ripple { position: relative; overflow: hidden; }
.pulse-anim { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(82, 183, 136, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(0,0,0,0); } 100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); } }
.scroll-fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.scroll-fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- [NEW] COMMON UTILITIES --- */
/* Nút hành động chính (dùng chung cho Checkout, Add Address, Detail) */
.btn-primary-action {
    width: 100%;
    padding: 14px;
    background: var(--primary); 
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600; font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 4px 10px rgba(45, 106, 79, 0.2);
}
.btn-primary-action:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}
.btn-primary-action:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Khung nội dung trắng (dùng chung cho Checkout section, Address form) */
.section-box {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}

/* ================= 2. HEADER ================= */
header { background: transparent; padding: 12px 0; position: fixed; width: 100%; top: 0; z-index: 1000; transition: var(--transition); }
header.scrolled { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(216, 243, 220, 0.5); box-shadow: 0 2px 10px rgba(0,0,0,0.05); }

.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--primary); z-index: 1002; }
.logo-icon { font-size: 1.8rem; }
.logo-text span { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; }

.main-nav { display: flex; gap: 30px; }
.main-nav a { text-decoration: none; color: var(--text); font-weight: 500; transition: var(--transition); position: relative; }
.main-nav a:hover { color: var(--primary); }

.header-actions { display: flex; gap: 10px; align-items: center; z-index: 1002; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: none; background: var(--white); font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.05); position: relative; color: var(--text); transition: 0.2s; }
.cart-count { position: absolute; top: -5px; right: -5px; background: var(--accent); color: white; width: 20px; height: 20px; border-radius: 50%; font-size: 0.75rem; display: flex; align-items: center; justify-content: center; font-weight: bold; border: 2px solid white; }

.mobile-menu-btn, .close-menu-btn, .nav-header-mobile, .mobile-search-trigger { display: none; }
#scrollTopBtn { position: fixed; bottom: 100px; right: 20px; z-index: 999; width: 50px; height: 50px; border-radius: 50%; border: none; background: var(--accent); color: white; font-size: 1.4rem; cursor: pointer; opacity: 0; visibility: hidden; transition: all 0.3s; }
#scrollTopBtn.show { opacity: 1; visibility: visible; }

/* ================= 3. GRID & PRODUCTS ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 30px; justify-content: center; }
.card { background: var(--white); border-radius: 20px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,0.03); transition: all 0.3s ease; border: 1px solid var(--border); display: flex; flex-direction: column; position: relative; height: 100%; }
.card-thumb { position: relative; width: 100%; height: 280px; background: transparent !important; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-real-img { position: relative; width: 100%; height: 100%; object-fit: cover; padding: 0 !important; z-index: 1; transition: transform 0.3s ease; }
.card:hover .product-real-img { transform: scale(1.05); }
.card-body { padding: 15px; flex: 1; display: flex; flex-direction: column; background: var(--white); position: relative; z-index: 2; border-top: 1px solid #f0f0f0; }
.card-title { font-size: 1.2rem; font-weight: 700; margin: 5px 0; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price { color: var(--accent); font-weight: 800; font-size: 1.15rem; margin-bottom: 15px; }
.btn-add { margin-top: auto; width: 100%; padding: 12px; border: none; background: rgba(45, 106, 79, 0.1); color: var(--primary); border-radius: 12px; cursor: pointer; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.badge-overlay { position: absolute; top: 12px; left: 12px; background: #e63946; color: white; padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 700; z-index: 10; box-shadow: 0 2px 5px rgba(0,0,0,0.2); animation: popIn 0.5s; }
@keyframes popIn { from {transform: scale(0);} to {transform: scale(1);} }

/* Loader Animation Custom */
.thumb-loader { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f1fcf5; transition: opacity 0.5s ease; }
.loader-bg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 90%; height: 90%; z-index: 2; background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(24px); border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.5); }
.loader-blob { position: absolute; z-index: 1; top: 50%; left: 50%; width: 150px; height: 150px; border-radius: 50%; background-color: var(--primary); opacity: 0.8; filter: blur(12px); animation: blob-bounce 5s infinite ease; transform: translate(-50%, -50%); }
@keyframes blob-bounce { 0% { transform: translate(-50%, -50%) translate(0, 0) scale(1); } 33% { transform: translate(-50%, -50%) translate(30px, -50px) scale(1.1); } 66% { transform: translate(-50%, -50%) translate(-20px, 20px) scale(0.9); } 100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); } }
.thumb-loader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

/* ================= 4. CART & MODALS ================= */
.flying-img-clone { position: fixed; z-index: 10000; border-radius: 50%; object-fit: cover; opacity: 0.9; pointer-events: none; transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1); box-shadow: 0 5px 15px rgba(45, 106, 79, 0.5); }
.cart-shake { animation: cartShake 0.5s ease-in-out; }
@keyframes cartShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-15deg) scale(1.2); } 75% { transform: rotate(15deg) scale(1.2); } }

.cart-sidebar { position: fixed; top: 0; right: -400px; width: 360px; height: 100vh; background: var(--white); box-shadow: -5px 0 30px rgba(0,0,0,0.1); z-index: 9999; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); display: flex; flex-direction: column; visibility: hidden; }
.cart-sidebar.active { right: 0; visibility: visible; }
.cart-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: var(--white); }
.cart-header h2 { font-size: 1.4rem; font-family: var(--font-head); color: var(--primary); }
.close-cart-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }
.cart-body { flex: 1; overflow-y: auto; padding: 20px; }
.cart-footer { padding: 20px; border-top: 1px solid var(--border); background: var(--bg); }
.cart-item { display: flex; gap: 15px; margin-bottom: 20px; animation: fadeInUp 0.3s; }
.cart-img { width: 70px; height: 70px; border-radius: 12px; background: #f1f1f1; display: flex; align-items: center; justify-content: center; font-size: 2rem; }
.cart-qty-control { display: flex; align-items: center; background: var(--white); border: 1px solid var(--border); border-radius: 8px; }
.qty-btn-mini { width: 25px; height: 25px; background: none; border: none; cursor: pointer; }
.qty-val-mini { padding: 0 8px; font-weight: 600; }

/* Nút thanh toán trong giỏ hàng (Override bằng class chung nếu cần, nhưng giữ riêng để custom màu đỏ) */
.btn-checkout { 
    width: 100%; padding: 15px; 
    background: #e63946; 
    color: white; border: none; border-radius: 12px; 
    font-weight: 600; font-size: 1.1rem; cursor: pointer; margin-top: 15px; position: relative; z-index: 10;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.3);
    transition: transform 0.2s;
}
.btn-checkout:hover { background: #d62828; transform: translateY(-2px); }

/* Cart Address */
.cart-address-section { padding: 15px 20px; background: #f8f9fa; border-bottom: 1px solid #eee; display: block; }
.cart-addr-header { display: flex; justify-content: space-between; font-size: 0.9rem; color: #666; margin-bottom: 5px; }
.cart-addr-header span i { color: #2d6a4f; margin-right: 5px; }
.edit-addr-link { color: #007bff; text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.cart-addr-display { font-weight: 600; color: #1b4332; font-size: 0.95rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Empty Cart State */
.cart-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; text-align: center; height: 100%; }
.cart-empty-icon { font-size: 6rem; color: #e0e0e0; margin-bottom: 20px; animation: pulse 2s infinite; }
.cart-empty-state p { font-size: 1.2rem; font-weight: 600; color: #999; margin: 0; }

/* --- MODAL CHUNG (Login, Profile) --- */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); z-index: 10000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-box { background: var(--white); width: 400px; max-width: 90%; padding: 30px; border-radius: 24px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); position: relative; transform: translateY(20px); transition: 0.4s; z-index: 10001; }
.modal-overlay.active .modal-box { transform: translateY(0); }
.close-modal-btn { position: absolute; top: 15px; right: 15px; background: transparent; border: none; color: #999; width: 36px; height: 36px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; z-index: 10; }
.close-modal-btn:hover { color: #e63946; background-color: #f1f3f5; transform: rotate(90deg); }
.overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 9998; opacity: 0; visibility: hidden; transition: 0.3s; }
.overlay.active { opacity: 1; visibility: visible; }

/* Auth Forms */
.auth-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.auth-tab { flex: 1; padding: 10px; background: none; border: none; font-weight: 600; cursor: pointer; color: #999; border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.auth-form { display: none; }
.auth-form.active { display: block; animation: fadeInUp 0.4s; }
.input-wrapper { margin-bottom: 15px; }
.input-group { display: flex; align-items: center; border: 1px solid var(--border); padding: 10px 15px; border-radius: 12px; background: var(--bg); }
.input-group input { border: none; background: none; flex: 1; margin-left: 10px; font-size: 1rem; }
.btn-submit { width: 100%; padding: 12px; background: var(--secondary); color: white; border: none; border-radius: 12px; font-weight: 600; cursor: pointer; margin-top: 10px; }

/* --- [NEW] CUSTOM ALERT & CONFIRM MODAL (Hợp nhất từ Address/Checkout) --- */
.center-box { text-align: center; width: 380px; max-width: 90%; }

.icon-box-alert {
    width: 70px; height: 70px;
    background: #e3f2fd; color: #2196f3;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; margin: 0 auto 15px;
}
.icon-box-alert.success { background: #d1e7dd; color: #198754; }
.icon-box-alert.warning { background: #fff3cd; color: #ffc107; }
.icon-box-alert.error { background: #ffebee; color: #e63946; }

.btn-confirm-alert {
    width: 100%; padding: 12px;
    background: var(--primary); color: white;
    border: none; border-radius: 8px;
    font-weight: 600; cursor: pointer; transition: 0.2s;
    margin-top: 20px;
}
.btn-confirm-alert:hover { background: var(--primary-light); }

.modal-actions { display: flex; gap: 15px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 8px; font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.btn-modal-outline { background: transparent; border-color: #ddd; color: #666; }
.btn-modal-outline:hover { background: #f8f9fa; }
.btn-modal-primary { background: var(--primary); color: white; }
.btn-modal-primary:hover { background: var(--primary-light); }


/* ================= 5. PROFILE STYLES ================= */
.profile-box { width: 700px; max-width: 95%; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.profile-layout { display: flex; min-height: 400px; }
.profile-sidebar { width: 220px; background: #f8f9fa; padding: 30px 20px; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; }
.user-summary { text-align: center; margin-bottom: 30px; width: 100%; }
.avatar-large { width: 80px; height: 80px; background: var(--white); border: 2px solid var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; color: var(--primary); margin: 0 auto 15px; box-shadow: 0 5px 15px rgba(45, 106, 79, 0.15); }
.user-name { font-weight: 700; font-size: 1.1rem; color: var(--text); word-break: break-word; }
.profile-nav { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.p-tab-btn { display: flex; align-items: center; width: 100%; padding: 12px 15px; border: none; background: transparent; cursor: pointer; color: #666; font-weight: 500; border-radius: 12px; transition: all 0.2s ease; text-align: left; }
.p-tab-btn i { margin-right: 10px; font-size: 1.2rem; }
.p-tab-btn:hover { background: rgba(0,0,0,0.03); color: var(--primary); }
.p-tab-btn.active { background: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(45, 106, 79, 0.2); }
.logout-btn { margin-top: auto; color: var(--accent) !important; background: rgba(230, 57, 70, 0.05); }
.logout-btn:hover { background: rgba(230, 57, 70, 0.1); }
.profile-content { flex: 1; padding: 30px; background: var(--white); overflow-y: auto; }
.p-title { font-size: 1.5rem; margin-bottom: 25px; padding-bottom: 10px; border-bottom: 1px solid #eee; color: var(--primary); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 0.9rem; }
.form-group input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 1rem; transition: 0.3s; background: var(--bg); color: var(--text); }
.form-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1); }
.p-tab-content { display: none; animation: fadeInUp 0.3s; }
.p-tab-content.active { display: block; }
.btn-save { padding: 10px 20px; background: var(--primary); color: white; border: none; border-radius: 8px; cursor: pointer; margin-top: 15px; }

/* Danh sách địa chỉ trong Profile */
.address-list-container { display: flex; flex-direction: column; gap: 15px; padding-bottom: 20px; }
.address-card-item { background: var(--white); border: 1px solid var(--border); border-radius: 12px; padding: 15px; position: relative; cursor: pointer; transition: all 0.2s ease; padding-bottom: 40px; }
.address-card-item:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.address-card-item.is-default { border: 1px solid var(--primary); background-color: #f1fcf5; }
.addr-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.addr-name { font-weight: 700; color: var(--text); font-size: 1rem; }
.addr-phone { color: #666; font-size: 0.9rem; border-left: 1px solid #ddd; padding-left: 8px; margin-left: 8px; }
.addr-text { color: #555; font-size: 0.95rem; line-height: 1.4; margin-bottom: 10px; }
.addr-tags { display: flex; gap: 8px; }
.tag-default { font-size: 0.75rem; color: var(--primary); border: 1px solid var(--primary); padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.tag-type { font-size: 0.75rem; background: #eee; color: #666; padding: 2px 8px; border-radius: 4px; }
/* Nút thêm mới trong Profile */
.btn-add-sticky { width: 100%; margin-top: 15px; padding: 14px; background: var(--white); color: var(--primary); border: 1px dashed var(--primary); border-radius: 12px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.2s; }
.btn-add-sticky:hover { background: var(--primary); color: white; }

/* Nút xóa địa chỉ (Animation) */
.delete-action-box { position: absolute; bottom: 10px; right: 10px; width: 36px; height: 36px; background: #fff; border-radius: 4px; overflow: hidden; transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border: 1px solid #eee; z-index: 10; }
.delete-action-box.active { width: 90px; background: #fff0f0; border-color: #ffcccc; }
.btn-trash-trigger { position: absolute; top: 0; left: 0; width: 36px; height: 36px; border: none; background: transparent; color: #dc3545; font-size: 1.2rem; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; transition: 0.2s; }
.delete-action-box.active .btn-trash-trigger { transform: scale(0); opacity: 0; }
.confirm-group { position: absolute; top: 0; right: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-evenly; transform: translateX(100%); transition: transform 0.3s ease; }
.delete-action-box.active .confirm-group { transform: translateX(0); }
.confirm-group button { border: none; background: none; cursor: pointer; font-size: 1.2rem; width: 40px; height: 36px; display: flex; align-items: center; justify-content: center; }
.btn-yes { color: #28a745; } .btn-no { color: #6c757d; }
.btn-yes:hover { background: #e6ffea; } .btn-no:hover { background: #f8f9fa; }

/* ================= 6. TOAST & FOOTER ================= */
#toast-container { position: fixed; top: 90px; right: 20px; z-index: 999999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast-item { background: rgba(20, 50, 30, 0.95); color: white; padding: 12px 20px; border-radius: 8px; backdrop-filter: blur(5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); display: flex; align-items: center; gap: 12px; font-size: 0.95rem; min-width: 280px; max-width: 350px; border-left: 4px solid #4cd137; pointer-events: auto; animation: slideInRight 0.4s forwards; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }

#footer { background: #1b4332; color: #d8f3dc; padding: 70px 0 30px; margin-top: auto; position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; margin-bottom: 50px; }
.social-links { display: flex; gap: 15px; margin-top: 25px; }
.social-links a { width: 40px; height: 40px; background: #2d6a4f; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: 0.3s; border: 1px solid #40916c; }
.copyright { border-top: 1px solid #2d6a4f; padding-top: 20px; text-align: center; font-size: 0.9rem; opacity: 0.7; }

/* Extras: Scroll Progress, Switch Toggle */
#scrollProgress { position: fixed; top: 0; left: 0; width: 0%; height: 4px; background: linear-gradient(to right, #2d6a4f, #52b788, #b7e4c7); z-index: 99999; transition: width 0.1s; box-shadow: 0 0 10px rgba(82, 183, 136, 0.5); }
.switch { font-size: 12px; position: relative; display: inline-block; width: 4em; height: 2.2em; border-radius: 30px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); margin-right: 10px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #2a2a2a; transition: 0.4s; border-radius: 30px; overflow: hidden; }
.slider:before { position: absolute; content: ""; height: 1.2em; width: 1.2em; border-radius: 20px; left: 0.5em; bottom: 0.5em; transition: 0.4s; box-shadow: inset 8px -4px 0px 0px #fff; }
.switch input:checked + .slider { background-color: #00a6ff; }
.switch input:checked + .slider:before { transform: translateX(1.8em); box-shadow: inset 15px -4px 0px 15px #ffcf48; }
.star { background-color: #fff; border-radius: 50%; position: absolute; width: 5px; height: 5px; }
.star_1 { left: 2.5em; top: 0.5em; } .star_2 { left: 2.2em; top: 1.2em; } .star_3 { left: 3em; top: 0.9em; }
.switch input:checked ~ .slider .star { opacity: 0; }

/* ================= BASE RESPONSIVE ================= */
@media (max-width: 768px) {
    .main-nav { position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; background: var(--white); flex-direction: column; padding: 20px; box-shadow: 5px 0 30px rgba(0,0,0,0.1); z-index: 1001; transition: 0.4s ease; }
    .main-nav.active { left: 0; }
    .mobile-menu-btn { display: block; background: none; border: none; font-size: 1.5rem; color: var(--primary); }
    .mobile-search-trigger { display: flex; }
    .nav-header-mobile { display: flex; justify-content: space-between; width: 100%; margin-bottom: 20px; align-items: center; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
    .close-menu-btn { display: block; background: none; border: none; font-size: 1.5rem; color: var(--text); }
    .main-nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--border); }
    .cart-sidebar { width: 100%; right: -100%; }
    .flying-img-clone { display: none; }
    
    .profile-layout { flex-direction: column; height: auto; }
    .profile-sidebar { width: 100%; border-right: none; border-bottom: 1px solid #eee; padding: 20px; flex-direction: row; gap: 15px; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
    .user-summary { width: auto; margin: 0; display: flex; align-items: center; gap: 15px; text-align: left; }
    .avatar-large { width: 50px; height: 50px; font-size: 1.5rem; margin: 0; }
    .profile-nav { display: flex; flex-direction: row; overflow-x: auto; padding: 10px 0; gap: 10px; width: 100%; }
    .p-tab-btn { width: auto; white-space: nowrap; }

    #toast-container { top: auto !important; bottom: 20px !important; left: 20px !important; right: 20px !important; width: auto !important; transform: none !important; align-items: center; }
    .toast-item { width: 100%; max-width: 100%; animation: slideInUpMobile 0.4s forwards; }
    @keyframes slideInUpMobile { from { opacity: 0; transform: translateY(50px); } to { opacity: 1; transform: translateY(0); } }
}

/* [MỚI] Style cho thông báo lỗi Inline (Dùng chung) */
.inline-msg {
    display: block;
    font-size: 0.85rem;
    color: #e63946; /* Màu đỏ báo lỗi */
    margin-top: 5px;
    height: 0;
    overflow: hidden;
    transition: 0.3s;
    opacity: 0;
}

.inline-msg.show {
    height: auto;
    opacity: 1;
    padding-left: 5px;
}

.input-error {
    border-color: #e63946 !important;
    background-color: #fff5f5 !important;
}