
:root{
  --bg:#0b0b10;
  --card:#040724;
  --card2:#0f1017;
  --text:#ffffff;
  --muted:#f9f9f9;
  --pink:#ff7ac8;
  --pink2:#ffd1ea;
  --stroke:rgba(255,255,255,.08);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --r:18px;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(160, 77, 124, 0.25), transparent 60%),
              radial-gradient(900px 500px at 95% 0%, rgba(168,85,247,.18), transparent 55%),
              var(--bg);
}
.bg-glow{position:fixed; inset:0; pointer-events:none;}
.container{max-width:1100px; margin:0 auto; padding:18px 14px 40px;}
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding:10px 6px 16px;
}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none; color:var(--text);}
.brand-dot{width:34px; height:34px; border-radius:12px; background:var(--pink); box-shadow:0 10px 28px rgba(255,82,181,.25);}
.brand-logo{
  width:34px;
  height:34px;
  border-radius:12px;
  object-fit:cover;
  box-shadow:0 10px 28px rgba(255,82,181,.25);
}

.brand-name{font-weight:800; letter-spacing:.2px}
.nav{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.navlink{
  color:var(--muted); text-decoration:none; padding:10px 12px; border-radius:999px;
  border:1px solid transparent;
}
.navlink:hover{color:var(--text); border-color:var(--stroke); background:rgba(255,255,255,.03)}
.navlink.active{color:var(--text); border-color:var(--stroke); background:rgba(255,82,181,.08)}
.hero{padding:18px 6px 6px}
.hero h1{margin:0 0 6px; font-size:32px}
.hero p{margin:0; color:var(--muted)}
.hero-actions{display:flex; gap:10px; margin-top:14px; flex-wrap:wrap}

.filters{
  display:flex; gap:10px; align-items:center;
  padding:12px 6px; margin-top:10px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--stroke);
  border-radius:999px;
}
.input{
  flex:1;
  min-width:180px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.2);
  color:var(--text);
  outline:none;
}
.input::placeholder{color:rgba(168,169,179,.8)}
.btn{
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.03);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
}
.btn:hover{background:rgba(255,255,255,.06)}
.btn-primary{
  background:linear-gradient(180deg,
    rgba(255, 209, 234, .22),
    rgba(255, 255, 255, .02) 38%,
    rgba(255, 255, 255, .01));
  border-color:transparent;
  color:#fff;
}
.btn-primary:hover{filter:brightness(1.05)}
.meta{display:flex; gap:10px; align-items:center; padding:0 6px 10px; color:var(--muted); font-size:14px}
.muted{color:var(--muted)}
.mutedlink{color:var(--muted); text-decoration:none}
.mutedlink:hover{color:var(--text)}
.notice{
  margin:10px 6px 0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,82,181,.25);
  background:rgba(255,82,181,.08);
  color:#ffd7ef;
  font-size:14px;
}

.grid{
  margin-top:10px;
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:14px;
}
@media (max-width: 980px){ .grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width: 720px){
  .grid{grid-template-columns:repeat(2,1fr)}
  .filters{border-radius:18px; flex-wrap:wrap}
  .btn{flex:0}
}
@media (max-width: 480px){
  .grid{grid-template-columns:repeat(2, minmax(0,1fr))}
  .hero h1{font-size:28px}
}

.card{
  background:linear-gradient(180deg, rgba(255,82,181,.22), rgba(255,255,255,.02) 38%, rgba(255,255,255,.01));
  border:1px solid var(--stroke);
  border-radius:22px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
.banner{
  height:108px;
  background:#000;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
}
.banner img{width:100%; height:100%; object-fit:contain; background:#fff}
.banner-fallback{
  font-weight:900; font-size:40px; letter-spacing:2px;
}
.card-body{padding:12px}
.row-top{display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:6px}
.title{font-weight:900; font-size:18px; margin:0}
.badge{font-size:11px; color:#0b0b10; background:rgba(255,255,255,.85); padding:3px 8px; border-radius:999px}
.field{margin-top:8px}
.label{font-size:12px; color:var(--muted); margin-bottom:6px}
.select{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.18);
  color:var(--text);
  outline:none;
}
/* option styling (some browsers ignore, but helps) */
.select option{background:#11121a; color:var(--text)}
.pricebar{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px}
.price{font-weight:900; font-size:20px}
.price small{font-size:12px; color:var(--muted); font-weight:700}
.buybtn{
  padding:10px 14px;
  border-radius:12px;
  border:none;
  background:linear-gradient(135deg, #ff9ad6, #ffd1ea);
  color:#0b0b10;
  font-weight:900;
  cursor:pointer;
}
.buybtn:hover{filter:brightness(1.05)}
.footer{margin-top:20px; padding:18px 6px; color:var(--muted); font-size:13px}


.deals{
  margin-top:14px;
  padding:14px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255, 209, 234, .16), rgba(0,0,0,.35));
  border:1px solid rgba(255, 209, 234, .22);
  box-shadow:0 22px 80px rgba(0,0,0,.55);
}
.deals h2{
  margin:0 0 10px;
  font-size:20px;
}
.deals-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:12px;
}
.deal-card{
  padding:16px 18px;
  border-radius:16px;
  background:#0b0b10;
  border:1px solid rgba(255,255,255,.12);
  box-shadow:0 10px 30px rgba(0,0,0,.45);
  font-size:17px;
  font-weight:700;
  line-height:1.4;
  white-space:pre-line;
}
@media (max-width: 720px){
  .deals-grid{grid-template-columns:1fr}
}

/* Dropdown (custom) */
.dropdown{position:relative; min-width:190px}
.dropdown-btn{
  width:100%;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:12px 14px;
  border-radius:999px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.18);
  color:var(--text);
  cursor:pointer;
}
.dropdown-menu{
  position:absolute; z-index:30;
  top:calc(100% + 8px); left:0; right:0;
  background:#11121a;
  border:1px solid var(--stroke);
  border-radius:16px;
  box-shadow:0 20px 60px rgba(0,0,0,.55);
  width: 100%;
  overflow-y:auto; 
  overflow-x:hidden; 
  max-height:min(50vh,260px); 
  -webkit-overflow-scrolling:touch;
}
.dropdown-item{
  padding:10px 12px;
  font-size:14px;
  line-height:1.2;

  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;

  cursor:pointer; color:var(--text);
  border-bottom:1px solid rgba(255,255,255,.06);
}

.dropdown-item:last-child{border-bottom:none}
.dropdown-item:hover{background:rgba(255,255,255,.06)}
.dropdown-item.active{background:rgba(255,82,181,.14)}

/* Modal */
.modal{position:fixed; inset:0; display:none; z-index:50}
.modal[aria-hidden="false"]{display:block}
.modal-backdrop{position:absolute; inset:0; background:rgba(0,0,0,.6)}
.modal-card{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:min(560px, calc(100% - 24px));
  background:#0f1017;
  border:1px solid var(--stroke);
  border-radius:18px;
  box-shadow:0 30px 90px rgba(0,0,0,.65);
  padding:14px;
}
@media (max-width:520px){
  .modal-card{top:auto; bottom:10px; transform:translate(-50%,0);}
}
.modal-head{display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:10px}
.modal-title{font-weight:900; font-size:18px}
.modal-sub{color:var(--muted); font-size:13px}
.iconbtn{border:1px solid var(--stroke); background:rgba(255,255,255,.03); color:var(--text); border-radius:12px; padding:8px 10px; cursor:pointer}
.textarea{
  width:100%;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(0,0,0,.22);
  color:var(--text);
  padding:12px;
  outline:none;
  resize:vertical;
}
.modal-actions{display:flex; gap:10px; margin-top:10px}
.modal-actions .btn{flex:1}
.hint{margin-top:10px; color:var(--muted); font-size:12px}


/* =========================
   Mobile / Responsive
   ========================= */
@media (max-width: 900px) {
  .container {
    padding-left: 14px;
    padding-right: 14px;
  }

  /* Topbar: cho xuống dòng gọn */
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
  }
  .nav {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
  }
  .navlink {
    padding: 8px 10px;
    font-size: 14px;
  }

  /* Hero */
  .hero h1 {
    font-size: 34px;
    line-height: 1.1;
  }
  .hero p {
    font-size: 14px;
  }

  /* Filters: xếp dọc */
  .filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .filters .input,
  .filters .dropdown,
  .filters .btn {
    width: 100%;
  }

   /* Dropdown menu: full width */
  .dropdown-menu{ max-height: 55vh; }


  /* Grid cards: 2 cột */
  .grid,
  .cards-grid,
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  /* Card spacing */
  .card {
    border-radius: 16px;
  }
  .card .title {
    font-size: 16px;
  }
  .card .meta,
  .card label,
  .card .small {
    font-size: 12px;
  }
  .card select,
  .card .select,
  .card .input {
    font-size: 14px;
    padding: 10px 12px;
  }
  .card .price {
    font-size: 18px;
  }
  .card .btn,
  .card button {
    padding: 10px 12px;
    font-size: 14px;
  }
}

@media (max-width: 520px) {
  /* Grid cards: 2 cột */
  .grid,
  .cards-grid,
  .products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 30px;
  }

  /* Giảm padding tổng thể */
  .container {
    padding-left: 12px;
    padding-right: 12px;
  }
  .field{
    display:flex;
    align-items:center;
    gap:10px;
  }
  .field .label{
    margin:0;
    min-width:70px;      /* chỉnh 70-90 tuỳ mày */
    white-space:nowrap;
  }
  .field .select{
    flex:1;
    width:auto;          /* ghi đè width:100% ở trên */
  }
  /* giảm font + giảm khoảng trống trong card (mobile) */
  .card-body{ padding:10px; }

  .row-top{ margin-bottom:4px; gap:8px; }
  .title{ font-size:15px; }

  .badge{ font-size:10px; padding:2px 7px; }

  .field{ margin-top:6px; gap:8px; }
  .label{ font-size:11px; }

  .select{
    font-size:13px;
    padding:8px 10px;
    border-radius:10px;
  }

  .pricebar{ margin-top:8px; gap:8px; }
  .price{ font-size:16px; }
  .price small{ font-size:11px; }

  .buybtn{
    padding:8px 10px;
    border-radius:10px;
    font-size:13px;
  }

  /* banner thấp hơn để bớt tốn chỗ */
  .banner{ height:90px; }
}

/* Contact page */
.contact{
  display:flex;
  justify-content:center;
  padding:18px 6px 40px;
}
.contact-card{
  width:min(560px, 100%);
  background:rgba(255,255,255,.03);
  border:1px solid var(--stroke);
  border-radius:22px;
  box-shadow:var(--shadow);
  padding:18px;
}
.contact-card h1{
  margin:0 0 12px;
  font-size:28px;
}
.qr-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  padding:12px;
  border-radius:18px;
  background:rgba(0,0,0,.18);
  border:1px solid var(--stroke);
}
.qr{
  width:min(280px, 82vw);
  height:auto;
  border-radius:14px;
  background:#fff;
  padding:10px;
}
.qr-note{
  margin:10px 0 0;
  color:var(--muted);
  font-size:13px;
}
.contact-links{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:14px;
}
.contact-item{
  display:block;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--stroke);
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-decoration:none;
  font-weight:700;
}
.contact-item:hover{ background:rgba(255,255,255,.06); }
