:root {
    --primary: #1a1a1a;
    --accent: #e67e22;
    --bg: #f5f5f7;
    --white: #ffffff;
    --gray: #666;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; }
body { background: var(--bg); color: var(--primary); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* Header */
header { background: var(--primary); color: white; padding: 15px 0; position: sticky; top: 0; z-index: 1000; }
.header-flex { display: flex; justify-content: space-between; align-items: center; }
.logo span { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 15px; }
.search-box input { padding: 8px 15px; border-radius: 20px; border: none; width: 220px; outline: none; }
.btn-icon { background: #333; border: none; color: white; padding: 8px 12px; border-radius: 5px; cursor: pointer; }

/* Category Nav */
.category-nav { background: var(--white); border-bottom: 1px solid #ddd; padding: 10px 0; }
.category-list { list-style: none; display: flex; justify-content: center; gap: 20px; }
.cat-link { background: none; border: none; font-weight: 600; cursor: pointer; color: var(--gray); padding: 5px 10px; }
.cat-link.active, .cat-link:hover { color: var(--accent); border-bottom: 2px solid var(--accent); }

/* Products */
.hero { background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1517336714481-489a2033eaf1?auto=format&fit=crop&w=1350&q=80'); background-size: cover; color: white; padding: 60px 0; text-align: center; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 25px; margin: 40px 0; }
.product-card { background: white; padding: 15px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); text-align: center; transition: 0.3s; }
.product-card:hover { transform: translateY(-5px); }
.product-card img { width: 100%; height: 160px; object-fit: contain; }
.price { color: var(--accent); font-weight: bold; display: block; margin: 10px 0; }
.btn-add { background: var(--primary); color: white; border: none; padding: 10px; border-radius: 6px; cursor: pointer; width: 100%; font-weight: bold; }

/* Sidebar Giỏ hàng */
.sidebar {
    position: fixed; top: 0; right: -400px; width: 350px; height: 100%;
    background: white; z-index: 2000; transition: 0.4s;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}
.sidebar.active { right: 0; }
.sidebar-header { padding: 20px; background: var(--primary); color: white; display: flex; justify-content: space-between; align-items: center; }
.cart-list { flex: 1; overflow-y: auto; padding: 15px; }
.cart-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee; }
.cart-item img { width: 50px; height: 50px; object-fit: contain; }
.cart-item-info { flex: 1; text-align: left; }
.cart-item-info h4 { font-size: 0.8rem; margin-bottom: 2px; }
.cart-item-info p { color: var(--accent); font-weight: bold; font-size: 0.85rem; }
.btn-remove { background: #ffeded; color: #ff4d4d; border: none; padding: 5px; border-radius: 4px; cursor: pointer; font-size: 0.7rem; }
.sidebar-footer { padding: 20px; border-top: 1px solid #eee; background: #fafafa; }
.total-flex { display: flex; justify-content: space-between; margin-bottom: 15px; }
.btn-checkout { width: 100%; padding: 12px; background: #27ae60; color: white; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; }

/* Toast Notification */
.toast {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    background: #333; color: white; padding: 12px 25px; border-radius: 30px;
    font-size: 0.9rem; opacity: 0; transition: 0.5s; z-index: 9999;
}
.toast.show { opacity: 1; bottom: 40px; }

/* Modals */
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 3000; }
.modal-content { background: white; width: 350px; margin: 100px auto; padding: 25px; border-radius: 12px; position: relative; text-align: center; }
.close { cursor: pointer; font-size: 24px; position: absolute; right: 15px; top: 10px; }
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.auth-form input { padding: 10px; border: 1px solid #ddd; border-radius: 6px; }
.tab-link { background: none; border: none; padding: 10px; cursor: pointer; font-weight: bold; color: #999; }
.tab-link.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.messenger-bubble { position: fixed; bottom: 20px; right: 20px; width: 55px; height: 55px; }

footer { background: #111; color: #999; padding: 40px 0; text-align: center; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: left; }