/* ========== Reset & Base ========== */
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* [THANH CUỘN ĐẸP] */
::-webkit-scrollbar {
    width: 8px;
    height: 6px; 
}
::-webkit-scrollbar-track {
    background: #1a1a1a; 
}
::-webkit-scrollbar-thumb {
    background: #555; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary); 
}

/* ========== LIGHT FESTIVE MODE (Giáng Sinh 2025) ========== */
:root {
  --bg: #f8f9fa; /* Nền trắng tuyết nhạt */
  --surface: #ffffff;
  --elev: #f0f0f0;
  
  --text: #1e1e1e; /* Chữ đen dễ đọc */
  --muted: #555555; 

  --primary: #c41e3a; /* Đỏ Noel */
  --accent: #15803d; /* Xanh cây thông */
  --orange-neon: #ffd700; /* Vàng gold cho đèn LED */

  --ok: #15803d; 
  --danger: #c41e3a;
  
  --border: #dee2e6;
  --shadow: 0 4px 12px rgba(0,0,0,0.1);
  --neon-glow: 0 0 10px rgba(255, 215, 0, 0.4); /* Glow vàng nhẹ */
}

/* Xóa class .light cũ nếu có, giờ :root là light luôn */
body { background: var(--bg); color: var(--text); }

.container { width: min(1160px, 92%); margin-inline: auto; }

a { color: var(--primary); text-decoration: none; transition: 0.2s; }
a:hover { 
  color: var(--accent); 
  text-shadow: 0 0 5px var(--accent); 
  text-decoration: none; 
}
img { max-width: 100%; display: block; }

.section { padding: 3rem 0; }
.section-title { 
  margin: 0 0 1rem; font-size: 1.65rem; 
  color: var(--primary); text-transform: uppercase; letter-spacing: 1px;
  border-bottom: 2px solid var(--border); display: inline-block;
}

.muted { color: var(--muted); }
.tiny { color: var(--muted); font-size: .9rem; }

/* ========== HEADER LAYOUT (GEARVN STYLE) ========== */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: none; 
}

/* --- HEADER TOP --- */
.header-top {
    padding: 15px 0; 
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 0; 
    background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* LOGO */
.logo { 
    display: flex; align-items: center; gap: 10px; 
    text-decoration: none; 
}
.logo span {
    font-size: 2.2rem; 
    margin-right: 5px;
}
.logo div {
    display: flex;
    flex-direction: column;
    line-height: 1;
    background: linear-gradient(90deg, #00ffff, #ff00ff, #ff9900, #00ffff);
    background-size: 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent; 
    animation: rainbowRun 4s linear infinite;
}
.logo strong {
    font-size: 1.5rem; 
    font-weight: 900;
    text-transform: uppercase;
    display: block;
}
.logo .accent {
    font-size: 0.8rem; 
    letter-spacing: 2px;
    font-weight: bold;
    color: inherit; 
    display: block; 
}
@keyframes rainbowRun {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Nút Danh Mục */
.header-category-btn {
    display: flex; align-items: center; gap: 10px; 
    padding: 5px 15px; cursor: pointer; 
    height: 40px;
    border: 2px solid transparent;
    border-image: linear-gradient(to right, var(--primary), var(--accent)) 1;
    color: var(--text);
    transition: 0.3s;
    font-weight: bold;
}
.header-category-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 10px var(--primary);
}

/* Thanh tìm kiếm */
.header-search {
    flex: 1;
    max-width: 450px;
    position: relative;
}
.header-search input {
    width: 100%;
    height: 40px;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 0 40px 0 15px;
    outline: none;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
}
.header-search button {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 40px;
    border: none;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}
.header-search button:hover {
    color: var(--primary);
    transform: scale(1.1);
}

/* Nhóm Action */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff; 
    text-decoration: none;
    cursor: pointer;
}
.light .action-item { color: #333; }

.action-item .icon {
    font-size: 1.6rem;
    position: relative;
}
.action-item .text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-size: 0.75rem;
}
.action-item .text .main {
    font-weight: bold;
    font-size: 0.9rem;
    color: var(--text);
}
.action-item .text .sub {
    color: var(--muted);
    font-size: 0.7rem;
}

.action-item .badge {
    position: absolute; top: -5px; right: -5px;
    background: #d32f2f; color: #fff;
    font-size: 0.7rem; font-weight: bold;
    padding: 1px 5px; border-radius: 10px;
    border: 1px solid #fff;
}

.icon-btn-simple {
    background: transparent; border: 1px solid var(--border);
    color: var(--text); padding: 5px; border-radius: 50%;
    cursor: pointer; width: 30px; height: 30px;
}

/* --- HEADER BOTTOM (MENU) --- */
.header-bottom {
    background: var(--bg); 
    border-bottom: 1px solid var(--primary); 
    height: 60px; 
    margin-top: 0; 
    position: relative;
    z-index: 990;
}

.header-bottom .container {
    height: 100%;
    display: flex;
    align-items: center;
}

#mainNav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    width: 100%;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--bg);
    padding-left: 40px; 
    padding-right: 20px;
}

#mainNav .nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    height: 40px; 
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    white-space: nowrap;
    transition: 0.2s;
    border-radius: 4px;
    border-right: none; 
}

#mainNav .nav-item:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.05); 
}

#mainNav .nav-item.highlight {
    color: var(--text);
}
#mainNav .nav-item.highlight:hover {
    color: var(--primary);
    background: rgba(255,255,255,0.05);
}

/* Mobile Hamburger */
.hamburger {
    display: none; 
    background: transparent; border: 1px solid var(--text);
    width: 40px; height: 40px; border-radius: 4px;
    place-content: center;
}
.hamburger span {
    display: block; width: 20px; height: 2px; background: var(--text); margin: 3px auto;
}

/* RESPONSIVE HEADER */
@media (max-width: 992px) {
    .header-search { display: none; }
    .header-actions-group .action-item .text { display: none; }
    .header-actions-group { gap: 15px; }
    #mainNav .nav-item { font-size: 0.75rem; padding: 0 8px; }
}

@media (max-width: 768px) {
    .header-inner { padding: 10px 0; }
    .header-actions-group { display: none; } 
    .hamburger { display: grid; margin-left: auto; }
    
    .header-bottom { display: none; } 
    
    #mainNav.open {
        display: flex; flex-direction: column;
        position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--bg); border-top: 2px solid var(--primary);
        padding: 10px;
        z-index: 9999;
        height: auto;
        justify-content: flex-start;
    }
    #mainNav.open .nav-item { 
        border: none; padding: 15px; 
        border-bottom: 1px solid #333; 
        width: 100%; height: auto;
        justify-content: flex-start;
        flex: none;
    }
}

/* ========== Banner ========== */
.banner {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  border-bottom: 2px solid var(--accent);
  position: relative;
}
.banner::before {
    content: ''; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px; pointer-events: none;
}

.banner-inner {
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; align-items: center;
  padding: 2.8rem 0; position: relative; z-index: 2;
}
.banner h1 { 
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin: 0 0 .5rem; 
  color: #ffffff; 
  text-shadow: 2px 2px 0px var(--primary);
}
.banner p { margin: 0 0 1.2rem; color: #e0e0e0; }
.banner-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.banner-art { filter: drop-shadow(0 0 15px var(--primary)); }

/* ========== Buttons ========== */
.btn {
  appearance: none; border: 2px solid transparent; cursor: pointer;
  padding: .6rem 1rem; border-radius: .65rem; font-weight: 700; text-transform: uppercase;
  transition: 0.2s;
}
.btn-primary { 
  background: transparent; border-color: var(--primary); color: var(--primary); 
}
.btn-primary:hover { 
  background: var(--primary); color: #000; box-shadow: 0 0 15px var(--primary);
}

/* Nút Khám phá Laptop */
.btn-ghost { 
  background: transparent; 
  color: var(--primary); 
  border: 2px solid var(--primary); 
}
.light .btn-ghost {
    background-color: #334155; 
    color: #ffffff;
    border: none; 
}
.btn-ghost:hover {
    background: var(--primary); 
    color: #000 !important;
    border-color: var(--primary);
}

.btn-outline { 
  background: transparent; border-color: var(--muted); color: var(--text); 
}
.btn-outline:hover {
  border-color: #fff; color: #fff;
}
.btn-sm { padding: .4rem .65rem; font-size: .9rem; }

/* ========== Categories ========== */
.category-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem;
}
.category-card {
  display: grid; gap: .5rem; place-items: center; text-align: center;
  background: var(--surface); 
  border: 1px solid var(--border);
  border-radius: .9rem;
  padding: 1rem; text-decoration: none; color: var(--text);
  transition: 0.2s;
}
.category-card:hover { 
  transform: translateY(-5px); 
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}
.category-card img { width: 64px; height: 64px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.2)); }

/* ========== Product Grid ========== */
.product-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem;
}
.card.product {
  display: grid; gap: .6rem;
  background: var(--surface); 
  border: 1px solid var(--border);
  border-radius: .9rem;
  padding: 1rem; 
  transition: 0.2s;
}
.card.product:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), 0 0 15px rgba(0, 255, 255, 0.2);
  transform: translateY(-3px);
}

.card .label {
  position: absolute; transform: translateY(-.5rem);
  background: var(--accent); color: #fff; padding: .2rem .45rem; border-radius: .4rem;
  font-size: .85rem; font-weight: 700; border: 1px solid #fff;
}
.card h3 { margin: .2rem 0; font-size: 1.05rem; color: var(--text); }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.price { 
  font-weight: 800; font-size: 1.2rem;
  color: var(--ok); 
}
.light .price { text-shadow: none; }

.product img { 
  width: 100%; aspect-ratio: 16/10; object-fit: contain; 
  background: rgba(255,255,255,0.05); border-radius: .5rem; 
}

/* ========== Filters ========== */
.filters {
  display: grid;
  grid-template-columns: 1.2fr repeat(2, 1fr) 1fr auto;
  gap: .6rem;
  margin-bottom: 1rem;
}
.filters input, .filters select {
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text);
  padding: .55rem .7rem; border-radius: .6rem;
}
.filters input:focus, .filters select:focus {
    border-color: var(--primary); outline: none;
}

/* ========== Page hero / breadcrumb ========== */
.page-hero { border-bottom: 1px solid var(--border); background: transparent; padding: 1rem 0; text-align: center; }
.page-hero h1 { color: var(--primary); text-shadow: 0 0 10px rgba(0,255,255,0.5); }
.breadcrumb { display: flex; gap: .5rem; align-items: center; color: var(--muted); justify-content: center; }
.breadcrumb a { color: var(--muted); }

/* ========== Newsletter ========== */
.newsletter { background: linear-gradient(180deg, rgba(255, 0, 255, 0.1), transparent); border-top: 2px solid var(--accent); }
.newsletter-inner { padding: 2rem 0; display: grid; gap: .5rem; }
.newsletter-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input { 
    flex: 1 1 240px; 
    background: #ffffff; 
    border: 2px solid #ddd; 
    color: #333; 
    padding: .6rem .8rem; border-radius: .6rem; 
}
.newsletter-form input:focus { border-color: var(--accent); outline: none; }

/* ========== Footer ========== */
.site-footer { 
    border-top: 1px solid var(--border); 
    background: var(--elev); 
    padding-bottom: 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1.2fr 1fr; gap: 1rem; padding: 2rem 0; }
.footer-grid h4 { color: var(--primary); margin-bottom: 10px; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; }
.socials { display: flex; gap: .5rem; }
.socials a { 
  display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; 
  background: var(--surface); border: 1px solid var(--border); border-radius: .6rem; 
  color: var(--text);
}
.socials a:hover { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 8px var(--primary); }

/* ========== Cart panel (Nền trắng chuẩn) ========== */
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8); opacity: 0; pointer-events: none; transition: .2s;
}
.overlay.show { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed; top: 0; right: 0; width: min(420px, 92vw); height: 100vh;
  background: #ffffff !important; /* Luôn trắng */
  color: #333333 !important; /* Luôn chữ đen */
  border-left: 1px solid #ccc; 
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
  transform: translateX(100%); transition: transform .25s ease;
  display: grid; grid-template-rows: auto 1fr auto; z-index: 1100;
}
.cart-panel.open { transform: translateX(0); }

.cart-header { padding: .9rem; border-bottom: 1px solid #eee; }
.cart-header h3 { color: #0066cc; margin: 0; font-weight: 900; }

.cart-footer { 
    border-top: 1px solid #eee; 
    border-bottom: none; 
    display: grid; gap: .6rem; background: #f9f9f9; padding: .9rem; 
}

.cart-footer #cartClear {
    color: #d32f2f; 
    border: 1px solid #d32f2f;
}
.cart-footer #cartClear:hover {
    background: #d32f2f;
    color: #ffffff; 
    box-shadow: 0 0 5px #d32f2f;
}

/* [QUAN TRỌNG] Căn chỉnh sản phẩm lên đầu */
.cart-items { 
    padding: .9rem; 
    overflow: auto; 
    display: grid; 
    gap: .75rem; 
    align-content: start; /* Đẩy sản phẩm lên trên */
    height: 100%;
}
.cart-item { 
    display: grid; grid-template-columns: 64px 1fr auto; gap: .6rem; align-items: center; 
    border-bottom: 1px solid #eee; padding-bottom: 10px; 
    color: #333; 
}
.cart-item img { 
    width: 64px; height: 48px; object-fit: contain; 
    background: #fff; border-radius: .35rem; border: 1px solid #ddd; 
}
.qty { display: inline-grid; grid-template-columns: repeat(3, auto); align-items: center; gap: .35rem; }
.qty button { padding: .25rem .5rem; background: #eee; color: #333; border: none; }
.cart-total-row { display: flex; align-items: center; justify-content: space-between; font-size: 1.2rem; color: #16a34a; font-weight: bold; }

/* ========== Forms (contact) ========== */
.contact-section { display: grid; grid-template-columns: 1.5fr .9fr; gap: 1rem; }
.contact-form .field { display: grid; gap: .25rem; margin-bottom: .7rem; }
.contact-form input, .contact-form textarea {
  background: #ffffff; 
  border: 1px solid #ccc; 
  color: #333; 
  padding: .65rem .8rem; border-radius: .6rem;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.contact-form .actions { display: flex; gap: .6rem; }

.map-placeholder { 
  height: 220px; border: 1px dashed var(--primary); border-radius: .6rem; 
  display: grid; place-items: center; color: var(--primary); background: rgba(0,255,255,0.05); 
}

/* ========== Toast ========== */
.toast {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%) translateY(120%);
  background: #fff; color: #333;
  border: 2px solid var(--ok); border-radius: .65rem; font-weight: bold;
  padding: .6rem .9rem; box-shadow: 0 0 15px rgba(0,0,0,0.2); z-index: 1200;
  transition: transform .25s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ========== Responsive ========== */
@media (max-width: 980px) {
  .banner-inner { grid-template-columns: 1fr; text-align: center; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-section { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { grid-template-columns: auto auto auto; }
  .hamburger { display: grid; border-color: var(--text); }
  nav#mainNav {
    position: fixed; inset: 64px 0 auto 0;
    background: var(--bg); border-top: 2px solid var(--primary);
    transform: translateY(-120%); transition: transform .2s ease;
    display: grid; gap: .25rem; padding: .6rem; z-index: 1001;
  }
  nav#mainNav.open { transform: translateY(0); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; grid-auto-rows: auto; }
}

/* --- Assistant Widget --- */
#assistantFab, #chatBtn {
  position: fixed; right: 16px; bottom: 16px; z-index: 1200;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid #fff; background: var(--primary); color: #000;
  font-size: 24px; cursor: pointer; box-shadow: 0 0 15px var(--primary);
  display: flex; align-items: center; justify-content: center;
}
#assistantFab:hover, #chatBtn:hover {
    background: #fff; color: var(--primary);
}

.assistant-panel {
  position: fixed; right: 16px; bottom: 84px; width: min(420px, 92vw);
  background: #ffffff !important; 
  color: #333333 !important; 
  border: 1px solid #ccc; 
  border-radius: .9rem;
  box-shadow: 0 5px 20px rgba(0,0,0,0.3); overflow: hidden; z-index: 1200; display: none;
}
.assistant-panel.open { display: grid; grid-template-rows: auto 1fr auto; max-height: 70vh; }

/* Header Chat: Màu đậm, rõ ràng */
.assistant-header { 
    padding: .7rem .9rem; border-bottom: 1px solid #eee; 
    display: flex; align-items: center; justify-content: space-between; 
    color: #0066cc; font-weight: bold; 
}

/* Nút thu nhỏ/đóng trong Chat AI */
.assistant-header button {
    background: transparent; 
    border: 1px solid #ccc;
    color: #333;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: 0.2s;
}
.assistant-header button:hover {
    background-color: #eee !important;
    color: #000 !important;
    border-color: #999;
}

.assistant-input { padding: .7rem .9rem; border-bottom: 1px solid #eee; }
.assistant-body { padding: .7rem .9rem; overflow: auto; display: grid; gap: .6rem; background: #fafafa; }

.msg { display: grid; gap: .25rem; }
.msg.user { justify-items: end; }
.bubble {
  background: #eee; 
  border: 1px solid #ddd; padding: .55rem .7rem; border-radius: .7rem;
  max-width: 92%; color: #333;
}
.msg.user .bubble { 
    background: var(--primary); color: #000; 
    border-color: transparent; font-weight: bold; 
}

.chips { display: flex; gap: .4rem; flex-wrap: wrap; }
.chip {
  background: #fff; border: 1px solid var(--primary); color: var(--primary);
  padding: .35rem .6rem; border-radius: 999px; cursor: pointer; font-size: .92rem;
}
.chip:hover { background: var(--primary); color: #000; }

.assistant-input form { display: grid; grid-template-columns: 1fr auto; gap: .5rem; }
.assistant-input input {
  background: #fff; border: 1px solid #ccc; color: #333;
  padding: .55rem .7rem; border-radius: .6rem;
}
.assistant-input button { 
    white-space: nowrap; background: var(--primary); color: #000; 
    border:none; padding: 0 15px; border-radius: 0.5rem; font-weight: bold; 
}

/* Thẻ đề xuất trong Chat */
.rec-card {
  border: 1px solid #ddd; border-radius: .6rem; padding: .6rem; 
  display: grid; gap: .4rem; background: #fff;
}
.rec-card h4 { margin: 0; font-size: 1rem; color: #0066cc; }
.rec-card .muted { font-size: .9rem; color: #666; }
.rec-card .row { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }

/* ========== PRODUCT DETAIL PAGE (TRANG CHI TIẾT) ========== */
.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.main-image-frame {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.05); 
}

.detail-info h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}
.light .detail-info h1 {
    color: #111;
    text-shadow: none;
}

.price-box .current-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ok);
}

.specs-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}
.specs-box h3 {
    color: var(--text);
    border-bottom: 1px dashed var(--border);
    padding-bottom: 10px;
    margin-bottom: 15px;
}
.specs-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.specs-box ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    color: var(--muted);
}
.specs-box ul li::before {
    content: '⚡';
    position: absolute;
    left: 0;
    color: var(--primary);
}

@media (max-width: 768px) {
    .detail-container { grid-template-columns: 1fr; }
    .main-image-frame img { max-height: 300px; }
}

/* ========== CHECKOUT PAGE (TRANG THANH TOÁN) ========== */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 30px;
    align-items: start;
}

.checkout-box {
    background: #ffffff;
    color: #333;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #ddd;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.checkout-box h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
    color: #0066cc; 
    font-weight: 800;
}

.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
}
.form-group input:focus { border-color: var(--primary); outline: none; }

.payment-method label {
    display: flex; align-items: center; gap: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: 0.2s;
}
.payment-method label:hover { background: #f0f9ff; border-color: var(--primary); }
.payment-method input:checked + span { font-weight: bold; color: #0066cc; }

.summary-item {
    display: flex; gap: 15px; align-items: center;
    border-bottom: 1px dashed #eee; padding-bottom: 15px; margin-bottom: 15px;
}
.summary-item img {
    width: 60px; height: 60px; object-fit: contain;
    border: 1px solid #eee; border-radius: 6px;
}
.summary-info h4 { margin: 0 0 5px 0; font-size: 0.95rem; }
.summary-price { font-weight: bold; color: #16a34a; }

.total-row {
    display: flex; justify-content: space-between;
    font-size: 1.3rem; font-weight: 900; color: #d32f2f;
    margin-top: 20px; padding-top: 20px; border-top: 2px solid #eee;
}

@media (max-width: 768px) {
    .checkout-grid { grid-template-columns: 1fr; }
}

/* ========== ORDER PAGE (TRANG QUẢN LÝ ĐƠN HÀNG) ========== */
/* Thêm phần này vào cuối file style.css */

/* Tabs trạng thái đơn hàng */
.order-tabs {
    display: flex;
    border-bottom: 1px solid #ccc;
    margin-bottom: 20px;
    background: #fff; /* Nền trắng để dễ đọc */
    border-radius: 8px 8px 0 0;
    overflow-x: auto; /* Cuộn ngang trên mobile */
}

.order-tabs div {
    padding: 12px 20px;
    cursor: pointer;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: 0.2s;
}

.order-tabs div:hover {
    color: var(--primary);
    background: #f9f9f9;
}

/* Tab đang chọn */
.order-tabs div.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Khung từng đơn hàng */
.order-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Header của đơn hàng (Mã đơn, ngày đặt, trạng thái) */
.order-header {
    background: #f9fafb;
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-id {
    color: #0066cc;
    font-weight: bold;
    font-size: 1.1rem;
}

.order-date {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 2px;
}

/* Badge trạng thái */
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: capitalize;
}
/* Màu sắc từng trạng thái */
.status-pending { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; } /* Chờ xác nhận (Cam) */
.status-shipping { background: #eff6ff; color: #1d4ed8; border: 1px solid #93c5fd; } /* Đang giao (Xanh dương) */
.status-completed { background: #f0fdf4; color: #15803d; border: 1px solid #86efac; } /* Hoàn thành (Xanh lá) */
.status-cancelled { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; } /* Hủy (Đỏ) */

/* Nội dung đơn hàng */
.order-body {
    padding: 15px;
}

.order-product {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.order-product img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
}

.order-product-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.order-product-meta {
    color: #666;
    font-size: 0.9rem;
}

/* Chi tiết mở rộng (Details/Summary) */
details {
    margin-top: 10px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

summary {
    cursor: pointer;
    color: #0066cc;
    font-size: 0.9rem;
    font-weight: 600;
    outline: none;
}

.order-details-content {
    background: #f8fafc;
    padding: 15px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: #4b5563;
}

/* Tổng tiền */
.order-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    margin-top: 10px;
}

.order-total-price {
    font-size: 1.3rem;
    font-weight: 900;
    color: #d32f2f; /* Đỏ đậm cho giá tiền */
}

/* Footer đơn hàng (Nút Mua lại / Liên hệ) */
.order-footer {
    padding: 12px 15px;
    border-top: 1px solid #e5e7eb;
    text-align: right;
    background: #fff;
}

.order-footer .btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* Responsive cho trang đơn hàng */
@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .status-badge {
        align-self: flex-start; /* Căn trái badge trên mobile */
    }
    .order-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    .order-footer .btn {
        width: 100%;
        margin-left: 0;
    }
}

/* --- CSS CHO DANH MỤC SẢN PHẨM (DROPDOWN) --- */
.category-wrapper {
    position: relative;
    display: inline-block;
}

/* Ẩn menu mặc định */
.category-dropdown {
    display: none; /* Mặc định ẩn */
    position: absolute;
    top: 100%;
    left: 0;
    width: 250px;
    background: var(--surface); /* Dùng màu nền theme */
    border: 1px solid var(--primary); /* Viền màu neon */
    border-top: 3px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 2000;
    border-radius: 0 0 8px 8px;
    padding: 10px 0;
}

/* Hiển thị menu khi Hover vào nút danh mục (Desktop) */
.category-wrapper:hover .category-dropdown {
    display: block;
    animation: slideUp 0.2s ease-out;
}

/* Hiển thị menu khi có class .show (Dùng cho click mobile) */
.category-dropdown.show {
    display: block;
    animation: slideUp 0.2s ease-out;
}

/* Style cho từng mục trong menu */
.category-dropdown a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.category-dropdown a:last-child {
    border-bottom: none;
}

/* Icon trong menu */
.category-dropdown a .menu-icon {
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

/* Hiệu ứng Hover vào từng mục */
.category-dropdown a:hover {
    background: rgba(0, 255, 255, 0.1); /* Màu primary nhạt */
    color: var(--primary);
    padding-left: 25px; /* Hiệu ứng đẩy nhẹ sang phải */
}

/* Hiệu ứng xuất hiện */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive cho menu */
@media (max-width: 768px) {
    .category-dropdown {
        position: fixed; /* Full màn hình hoặc popup giữa */
        top: auto; 
        left: 10px; right: 10px;
        width: auto;
        margin-top: 10px;
    }
}


/* CSS riêng cho trang Login nằm gọn ở đây hoặc chuyển sang style.css đều được */
.auth-container {
    max-width: 450px;
    margin: 50px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid #ddd;
}
.auth-tabs {
    display: flex;
    border-bottom: 1px solid #eee;
}
.auth-tab {
    flex: 1;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    font-weight: bold;
    background: #f8f9fa;
    color: #666;
    transition: 0.2s;
}
.auth-tab.active {
    background: #fff;
    color: var(--primary); /* Màu xanh T&J */
    border-bottom: 2px solid var(--primary);
}
.auth-body {
    padding: 30px;
}
.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-title {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.news-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: 0.3s; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 5px 15px rgba(0, 255, 255, 0.15); border-color: var(--primary); }
.news-img { width: 100%; height: 200px; object-fit: cover; background: #222; }
.news-body { padding: 20px; }
.news-date { color: var(--primary); font-size: 0.85rem; margin-bottom: 5px; display: block; }
.news-title { font-size: 1.2rem; margin: 0 0 10px; color: var(--text); line-height: 1.4; }
.news-desc { color: var(--muted); font-size: 0.95rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.read-more { display: inline-block; margin-top: 15px; color: var(--accent); font-weight: bold; text-decoration: none; }


.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.service-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 30px; text-align: center; transition: 0.3s;
    position: relative; overflow: hidden;
}
.service-card:hover { transform: translateY(-10px); border-color: var(--primary); box-shadow: 0 0 20px rgba(0,255,255,0.1); }
.service-card h3 { color: var(--primary); font-size: 1.5rem; margin-bottom: 10px; }
.service-price { font-size: 2rem; font-weight: bold; color: var(--ok); margin-bottom: 20px; }
.service-features { list-style: none; padding: 0; margin-bottom: 30px; text-align: left; }
.service-features li { padding: 10px 0; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.service-features li:before { content: '✔'; color: var(--accent); margin-right: 10px; }

.booking-form { background: var(--sur
    face); padding: 30px; border-radius: 12px; border: 1px solid var(--border); max-width: 600px; margin: 50px auto; }
@media(max-width: 768px) { .service-grid { grid-template-columns: 1fr; } }



.warranty-box {
    max-width: 600px; margin: 0 auto;
    background: var(--surface); border: 1px solid var(--border);
    padding: 40px; border-radius: 16px; text-align: center;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}
.warranty-input {
    width: 100%; padding: 15px 20px; font-size: 1.1rem;
    border: 2px solid var(--border); border-radius: 50px;
    background: rgba(255,255,255,0.05); color: var(--text);
    margin-bottom: 20px; text-align: center; outline: none; transition: 0.3s;
}
.warranty-input:focus { border-color: var(--primary); box-shadow: 0 0 15px rgba(0,255,255,0.2); }
.warranty-result { display: none; margin-top: 30px; text-align: left; animation: fadeIn 0.5s; }
@keyframes fadeIn { from{opacity:0; transform:translateY(10px);} to{opacity:1; transform:translateY(0);} }

/* --- CẬP NHẬT BANNER MỚI (MÀU TÍM/ĐEN CYBERPUNK) --- */
.banner {
    /* Màu cũ là xanh, đổi sang màu tối pha tím hồng hiện đại */
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e); 
    border-bottom: 2px solid var(--accent);
    position: relative;
    overflow: hidden;
}

/* --- CẬP NHẬT ICON MẠNG XÃ HỘI (Footer) --- */
.socials a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background: #fff; /* Nền trắng để logo nổi bật */
    border: none;
    border-radius: 50%; /* Bo tròn */
    transition: 0.3s;
}
.socials a svg {
    width: 20px;
    height: 20px;
}
/* Màu sắc thương hiệu khi hover */
.socials a:hover { transform: translateY(-3px); box-shadow: 0 0 10px rgba(255,255,255,0.5); }
.socials a.fb-icon { color: #1877F2; } /* Màu Facebook */
.socials a.yt-icon { color: #FF0000; } /* Màu Youtube */
.socials a.tt-icon { color: #000000; } /* Màu Tiktok */

/* --- ICON CHAT MỚI --- */
#assistantFab {
    font-size: 0; /* Ẩn text cũ nếu có */
    padding: 10px;
}
#assistantFab svg {
    width: 32px;
    height: 32px;
    fill: #000; /* Màu icon bên trong */
}
#assistantFab:hover svg {
    fill: var(--primary); /* Đổi màu khi hover */
}

/* =========================================
   RESPONSIVE MOBILE & TABLET (THÊM MỚI)
   ========================================= */

/* --- 1. Màn hình Tablet & Mobile lớn (Dưới 1024px) --- */
@media (max-width: 1024px) {
    .container {
        width: 95%; /* Mở rộng lề cho thoáng */
    }
    
    /* Header: Ẩn thanh tìm kiếm to, chỉ hiện icon hoặc thu nhỏ */
    .header-search {
        display: none; /* Tạm ẩn tìm kiếm trên mobile để đỡ chật */
    }
    
    /* Grid sản phẩm: 3 cột */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- 2. Màn hình Mobile (Dưới 768px) --- */
@media (max-width: 768px) {
    
    /* --- HEADER --- */
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }
    
    .logo strong { font-size: 1.2rem; }
    .logo .accent { font-size: 0.65rem; }
    
    /* Ẩn chữ của các nút Action (Giỏ hàng, Tài khoản...), chỉ hiện Icon */
    .header-actions-group .text {
        display: none;
    }
    .header-actions-group {
        gap: 15px;
    }
    
    /* Nút danh mục: Ẩn trên mobile vì đã có Menu dưới */
    .category-wrapper {
        display: none;
    }

    /* Hiện nút Hamburger */
    .hamburger {
        display: flex;
        margin-left: auto;
    }

    /* Menu chính (Navigation) chuyển thành dạng dọc */
    .header-bottom {
        display: none; /* Ẩn thanh ngang mặc định */
    }
    
    /* Khi bấm menu (JS thêm class .open) */
    #mainNav {
        position: fixed;
        top: 60px; left: 0; right: 0; bottom: 0;
        background: var(--bg);
        flex-direction: column;
        justify-content: flex-start;
        padding: 20px;
        z-index: 9999;
        overflow-y: auto;
        display: none; /* Mặc định ẩn */
        border-top: 1px solid var(--border);
    }
    #mainNav.open {
        display: flex; /* Hiện khi có class open */
    }
    #mainNav .nav-item {
        width: 100%;
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 1.1rem;
        justify-content: flex-start;
    }

    /* --- BANNER --- */
    .banner-inner {
        grid-template-columns: 1fr; /* Xếp chồng dọc */
        text-align: center;
        padding-top: 2rem;
    }
    .banner h1 {
        font-size: 2rem;
    }
    .banner-art {
        display: none; /* Ẩn ảnh trang trí banner trên mobile cho gọn */
    }
    .banner-ctas {
        justify-content: center;
    }

    /* --- GRID SẢN PHẨM --- */
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 cột sản phẩm */
        gap: 10px;
    }
    .card.product {
        padding: 10px;
    }
    .card h3 {
        font-size: 0.9rem;
    }
    .price {
        font-size: 1rem;
    }

    /* --- DANH MỤC --- */
    .category-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 cột danh mục */
        gap: 10px;
    }
    .category-card img {
        width: 40px; height: 40px;
    }
    .category-card h3 {
        font-size: 0.9rem;
    }

    /* --- TRANG CHI TIẾT (DETAIL) --- */
    .detail-container {
        grid-template-columns: 1fr; /* Ảnh trên, thông tin dưới */
        gap: 20px;
    }
    .content-wrapper {
        grid-template-columns: 1fr; /* Mô tả trên, bảng thông số dưới */
        gap: 20px;
    }
    .product-specs-table, .specs-container {
        position: static; /* Bỏ dính */
    }
    /* Bảng thông số có thanh cuộn nếu tràn */
    .specs-container {
        overflow-x: auto;
    }
    .tech-table {
        min-width: 100%;
    }

    /* --- FOOTER --- */
    .footer-grid {
        grid-template-columns: 1fr; /* Xếp chồng footer */
        text-align: center;
        gap: 30px;
    }
    .contact-list {
        justify-items: center;
    }
    .socials {
        justify-content: center;
    }

    /* --- CART & MODAL --- */
    .cart-panel {
        width: 100%; /* Giỏ hàng full màn hình trên mobile */
    }
    
    /* --- THANH TOÁN --- */
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    /* --- DỊCH VỤ / TIN TỨC --- */
    .service-grid, .news-grid {
        grid-template-columns: 1fr;
    }
}

/* --- 3. Màn hình siêu nhỏ (Dưới 375px - iPhone SE cũ) --- */
@media (max-width: 375px) {
    .product-grid {
        grid-template-columns: 1fr; /* 1 cột cho dễ nhìn */
    }
    .header-actions-group {
        gap: 10px;
    }
}
/* === GIẢM GIÁ BADGE & PRICE === */
.card.product {
  position: relative; /* Để badge absolute đúng vị trí */
}

.sale-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #c41e3a;
  color: white;
  padding: 6px 12px;
  font-size: 0.9rem;
  font-weight: bold;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(196,30,58,0.4);
  text-transform: uppercase;
}

.old-price {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 1rem;
  margin-right: 8px;
}

.new-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 1.35rem;
}