/* ═══════════════════════════════════════════════
   Tân Dũng Mobile — Shared CSS
   Dùng chung cho tất cả các trang
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Bebas+Neue&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:       #0d0d0d;
  --surface:  #161616;
  --surface2: #1f1f1f;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.14);
  --text:     #f0f0f0;
  --muted:    #777;
  --gold:     #c8a96e;
  --gold-dim: rgba(200,169,110,0.12);
  --red:      #e05252;
  --green:    #4ade80;
}

body.light {
  --bg:       #f5f5f0;
  --surface:  #ffffff;
  --surface2: #efefea;
  --border:   rgba(0,0,0,0.08);
  --border2:  rgba(0,0,0,0.15);
  --text:     #111111;
  --muted:    #888888;
  --gold:     #a8842e;
  --gold-dim: rgba(168,132,46,0.10);
  --red:      #c0392b;
  --green:    #27ae60;
}

body.light .nav { background: rgba(245,245,240,0.92); }

body, body * { transition: background-color .3s ease, border-color .3s ease, color .2s ease; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px; min-height: 100vh; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* ── NAV ── */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; height: 58px;
  background: rgba(13,13,13,0.92); backdrop-filter: blur(12px);
  border-bottom: 0.5px solid var(--border);
  position: sticky; top: 0; z-index: 200;
}
.nav-logo { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 3px; color: var(--text); text-decoration: none; }
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 6px; }
.nav-link { padding: 6px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); background: transparent; border: none; cursor: pointer; transition: all .2s; text-decoration: none; display: inline-flex; align-items: center; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { color: var(--gold); }
.nav-right { display: flex; gap: 8px; align-items: center; }

/* Nav Search */
.nav-search-wrap { position:relative; display:flex; align-items:center; }
.nav-search-input { background: var(--surface2); border: 0.5px solid var(--border2); border-radius: 20px; padding: 5px 30px 5px 14px; color: var(--text); font-size: 12px; outline: none; width: 0; max-width: 0; opacity: 0; transition: width .3s ease, opacity .3s ease, max-width .3s ease; font-family: inherit; }
.nav-search-input.open { width: 180px; max-width: 180px; opacity: 1; }
.nav-search-input:focus { border-color: var(--gold); }
.nav-search-btn { background:transparent; border:none; color:var(--muted); cursor:pointer; font-size:15px; padding:4px 6px; transition:color .2s; }
.nav-search-btn:hover { color:var(--text); }
.nav-search-clear { position:absolute; right:6px; background:transparent; border:none; color:var(--muted); cursor:pointer; font-size:11px; display:none; padding:2px; }
@media (max-width:600px) { .nav-search-input.open { width:120px; max-width:120px; } .nav-links { display:none; } }

/* ── BUTTONS ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 7px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .2s; border: none; text-decoration: none; }
.btn-ghost { background: transparent; border: 0.5px solid var(--border2); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.btn-gold  { background: var(--gold); color: #0d0d0d; }
.btn-gold:hover { background: #d4b87a; }
.btn-danger { background: rgba(224,82,82,.15); border: 0.5px solid rgba(224,82,82,.3); color: var(--red); }
.btn-danger:hover { background: rgba(224,82,82,.25); }
.btn-sm { padding: 4px 10px; font-size: 11px; border-radius: 5px; }

/* ── SECTION ── */
.section { padding: 48px 28px; }
.section + .section { border-top: 0.5px solid var(--border); }
.section-eyebrow { font-size: 10px; letter-spacing: 3px; color: var(--gold); text-transform: uppercase; margin-bottom: 8px; }
.section-title { font-family: 'Bebas Neue', sans-serif; font-size: 28px; letter-spacing: 1px; margin-bottom: 24px; }
@media(max-width:600px) { .section { padding: 32px 16px; } }

/* ── PRODUCT GRID ── */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.prod-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; transition: all .2s; text-decoration: none; display: block; }
.prod-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.prod-img { width: 100%; height: 180px; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 44px; position: relative; overflow: hidden; }
.prod-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 12px 14px 8px; }
.prod-name { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 3px; line-height: 1.35; }
.prod-spec { font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.prod-price { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: .5px; color: var(--gold); }
.prod-old   { font-size: 11px; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.prod-actions { display: flex; gap: 6px; padding: 8px 14px 12px; }
.prod-btn { flex: 1; padding: 7px; border-radius: 6px; font-size: 11px; font-weight: 700; cursor: pointer; border: none; transition: all .2s; }
.prod-btn-buy { background: var(--gold); color: #0d0d0d; }
.prod-btn-buy:hover { background: #d4b87a; }
.prod-btn-info { background: var(--surface2); color: var(--muted); border: 0.5px solid var(--border); text-decoration: none; display: flex; align-items: center; justify-content: center; }
.prod-btn-info:hover { color: var(--text); }

/* Badge */
.badge { position: absolute; top: 8px; left: 8px; font-size: 9px; font-weight: 800; padding: 2px 8px; border-radius: 3px; text-transform: uppercase; letter-spacing: .8px; }
.badge-new  { background: rgba(74,222,128,.12); color: var(--green); border: 0.5px solid rgba(74,222,128,.2); }
.badge-used { background: var(--gold-dim); color: var(--gold); border: 0.5px solid rgba(200,169,110,.2); }
.badge-sale { background: rgba(224,82,82,.12); color: var(--red); border: 0.5px solid rgba(224,82,82,.2); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-btn { padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 500; cursor: pointer; border: 0.5px solid var(--border2); background: transparent; color: var(--muted); transition: all .2s; }
.filter-btn.active, .filter-btn:hover { background: var(--gold); border-color: var(--gold); color: #0d0d0d; font-weight: 700; }

/* ── BRAND FILTER BAR ── */
#brand-filter-bar { position: sticky; top: 58px; z-index: 99; background: var(--bg); border-bottom: 0.5px solid var(--border); padding: 0 16px; display: none; align-items: center; gap: 6px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; min-height: 44px; }
#brand-filter-bar.show { display: flex; }
#brand-filter-bar::-webkit-scrollbar { display: none; }
.brand-filter-btn { display: inline-flex; align-items: center; gap: 5px; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600; cursor: pointer; border: 0.5px solid var(--border2); background: transparent; color: var(--muted); transition: all .2s; white-space: nowrap; flex-shrink: 0; }
.brand-filter-btn:hover { color: var(--text); border-color: rgba(255,255,255,.3); }
.brand-filter-btn.active { background: var(--gold); border-color: var(--gold); color: #0d0d0d; font-weight: 700; }

/* ── BANNER SLIDESHOW ── */
#banner-top { position: sticky; top: 58px; z-index: 98; background: var(--bg); padding: 8px 16px 0; }
.banner-slideshow { position: relative; overflow: hidden; border-radius: 14px; }
.banner-track { display: flex; width: 100%; transition: transform .5s cubic-bezier(.4,0,.2,1); will-change: transform; }
.banner-item { min-width: 100%; width: 100%; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; overflow: hidden; position: relative; flex-shrink: 0; min-height: 80px; box-sizing: border-box; }
.banner-gold  { background: linear-gradient(135deg,#c8a96e,#a8842e); color: #0d0d0d; }
.banner-red   { background: linear-gradient(135deg,#e05252,#a32d2d); color: #fff; }
.banner-green { background: linear-gradient(135deg,#27ae60,#1a7a42); color: #fff; }
.banner-blue  { background: linear-gradient(135deg,#2980b9,#1a5c8a); color: #fff; }
.banner-dark  { background: linear-gradient(135deg,#2a2a2a,#1a1a1a); color: #f0f0f0; border: 0.5px solid rgba(200,169,110,.25); }
.banner-left { flex: 1; min-width: 0; overflow: hidden; }
.banner-title { font-family: 'Bebas Neue', sans-serif; font-size: 22px; letter-spacing: 1px; margin-bottom: 2px; line-height: 1.15; }
.banner-desc  { font-size: 11px; opacity: .9; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.banner-img { width: 72px; height: 72px; object-fit: cover; object-position: center; border-radius: 8px; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.25); }
.banner-cta-btn { padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 800; border: none; cursor: pointer; white-space: nowrap; background: rgba(0,0,0,.2); color: inherit; transition: background .2s; }
.banner-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.25); border: none; color: #fff; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.banner-arrow-left { left: 6px; }
.banner-arrow-right { right: 6px; }
.banner-dots { display: flex; justify-content: center; gap: 5px; padding: 5px 0 3px; background: var(--bg); }
.banner-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border2); border: none; cursor: pointer; transition: all .2s; padding: 0; }
.banner-dot.active { width: 16px; border-radius: 3px; background: var(--gold); }
@media(max-width:480px) { .banner-item { padding: 10px 12px; } .banner-img { width: 60px; height: 60px; } .banner-title { font-size: 17px; } }

/* ── MODAL ── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.75); display: none; align-items: center; justify-content: center; z-index: 500; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--surface); border: 0.5px solid var(--border2); border-radius: 14px; padding: 28px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 16px; font-weight: 800; margin-bottom: 20px; color: var(--text); }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* ── FORM ── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { margin-bottom: 12px; }
.form-lbl { font-size: 10px; color: var(--muted); letter-spacing: .8px; text-transform: uppercase; display: block; margin-bottom: 5px; }
.form-ctrl { width: 100%; background: var(--surface2); border: 0.5px solid var(--border2); border-radius: 7px; padding: 9px 12px; color: var(--text); font-size: 13px; outline: none; transition: border-color .2s; font-family: inherit; }
.form-ctrl:focus { border-color: var(--gold); }
textarea.form-ctrl { resize: vertical; min-height: 90px; }
select.form-ctrl { appearance: none; }
@media(max-width:600px) { .form-row { grid-template-columns: 1fr; } }

/* ── SERVICES ── */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.svc-card { background: var(--surface); border: 0.5px solid var(--border); border-radius: 12px; padding: 18px 20px; transition: border-color .2s; cursor: pointer; }
.svc-card:hover { border-color: rgba(200,169,110,.4); }
.svc-card.open { border-color: rgba(200,169,110,.5); }
.svc-icon-wrap { width: 40px; height: 40px; border-radius: 9px; background: var(--gold-dim); border: 0.5px solid rgba(200,169,110,.25); display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 14px; }
.svc-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.svc-header { display: flex; align-items: center; justify-content: space-between; }
.svc-chevron { font-size: 12px; color: var(--muted); transition: transform .25s; }
.svc-card.open .svc-chevron { transform: rotate(180deg); }
.svc-desc { font-size: 12px; color: var(--muted); line-height: 1.65; }
.svc-price { font-size: 12px; color: var(--gold); font-weight: 600; margin-top: 10px; }
.svc-items { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.svc-card.open .svc-items { max-height: 600px; }
.svc-items-inner { padding-top: 12px; border-top: 0.5px solid var(--border); margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.svc-item-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 7px; background: var(--surface2); }
.svc-item-label { font-size: 12px; color: var(--text); font-weight: 500; }
.svc-item-price { font-size: 12px; color: var(--gold); font-weight: 700; white-space: nowrap; }
.svc-item-warranty { font-size: 10px; color: var(--muted); }
.svc-items-empty { font-size: 12px; color: var(--muted); padding: 8px 0; text-align: center; }

/* ── FOOTER ── */
.footer { padding: 28px; border-top: 0.5px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 18px; letter-spacing: 2px; color: var(--muted); text-decoration: none; }
.footer-logo span { color: var(--gold); }
.footer-copy { font-size: 11px; color: var(--muted); }

/* ── ZALO FLOAT ── */
.zalo-float { position: fixed; bottom: 28px; right: 28px; width: 54px; height: 54px; border-radius: 50%; background: #06c755; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 998; box-shadow: 0 4px 16px rgba(6,199,85,.4); transition: transform .2s; }
.zalo-float:hover { transform: scale(1.1); }
.zalo-pulse { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(6,199,85,.5); animation: zalo-ring 2s ease-out infinite; }
@keyframes zalo-ring { 0%{transform:scale(1);opacity:.8} 100%{transform:scale(1.5);opacity:0} }
.zalo-float img { width: 30px; height: 30px; }

/* ── EMPTY STATE ── */
.empty-state { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

/* ── LIGHT MODE ── */
body.light .prod-btn-info { background: #efefea; }
body.light .svc-card:hover { border-color: rgba(168,132,46,.3); }
