/* Giải pháp máy tính tiền — Nguyễn Phan — restored stylesheet */

:root {
  --blue: #4699e5;
  --blue-light: #5ab9ef;
  --blue-link: #145cd5;
  --page-blue: #1fb4f1;
  --menu: #333;
  --red: #e00000;
  --ink: #000;
  --muted: #666;
  --line: #d4d3d3;
  --line-soft: #dfdede;
  --wrap: 1010px;
  --font: Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: url("../img/bg-main.jpg") top center repeat-x fixed var(--page-blue);
}

h1, h2, h3 { margin: 0; line-height: 1.35; }
p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-link); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }

:where(a, button):focus-visible {
  outline: 2px solid var(--blue-link);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.page {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 25px 20px;
  background: #fff;
  box-shadow: 0 0 14px rgba(0, 0, 0, .35);
}

/* ---------- header ---------- */

.banner img { width: 100%; }

.nav-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 3px 5px;
  background: var(--menu);
  border-radius: 5px;
}

.primary-nav ul { display: flex; flex-wrap: wrap; }
.primary-nav a {
  display: block;
  padding: 8px 14px;
  color: #eee;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}
.primary-nav a:hover { color: #fff; background: var(--blue); border-radius: 4px; text-decoration: none; }

.nav-toggle {
  display: none;
  position: relative;
  width: 40px; height: 34px;
  padding: 0;
  background: var(--blue);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 50%;
  width: 20px; height: 2px;
  margin-left: -10px;
  background: #fff;
  content: "";
}
.nav-toggle__bars { top: 16px; }
.nav-toggle__bars::before { top: -6px; left: 0; margin-left: 0; }
.nav-toggle__bars::after { top: 6px; left: 0; margin-left: 0; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  aspect-ratio: 960 / 300;
  margin-bottom: 12px;
  background: #0b3550;
  overflow: hidden;
}
.hero__slides, .hero__slide { position: absolute; inset: 0; }
.hero__slide { opacity: 0; transition: opacity .8s ease; }
.hero__slide.is-active { opacity: 1; }
/* contain, not cover: the slides are wide banners with text to the edges */
.hero__slide img { width: 100%; height: 100%; object-fit: contain; }

.hero__label {
  position: absolute;
  left: 0; bottom: 0;
  padding: 8px 18px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background: rgba(0, 0, 0, .6);
}

.hero__dots {
  position: absolute;
  right: 12px; bottom: 12px;
  display: flex;
  gap: 7px;
}
.hero__dots button {
  width: 11px; height: 11px;
  padding: 0;
  background: rgba(255, 255, 255, .45);
  border: 1px solid #fff;
  border-radius: 50%;
  cursor: pointer;
}
.hero__dots button[aria-selected="true"] { background: var(--blue-light); }

/* ---------- layout ---------- */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 15px;
  align-items: start;
}

.intro { margin-bottom: 12px; }
.intro h1 { font-size: 22px; color: var(--blue-link); margin-bottom: 6px; }

/* ---------- box ---------- */

.box { margin-bottom: 14px; }
.box__head {
  padding: 7px 10px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  background: var(--blue);
}
.box__body {
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-top: 0;
}
.box__body--center { text-align: center; }
.box__body--center img { margin: 0 auto; }

/* ---------- products ---------- */

.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.products > * { min-width: 0; }

.product {
  padding: 8px;
  border: 1px solid #eee;
  text-align: center;
}
.product img {
  width: 100%;
  height: 130px;
  object-fit: contain;
  margin-bottom: 8px;
}
.product__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  margin-bottom: 8px;
  color: #9a9a9a;
  font-size: 12px;
  background: #f4f4f4;
}
.product h3 {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-link);
  text-transform: uppercase;
  min-height: 3.6em;
}
.price {
  margin-top: 6px;
  color: var(--red);
  font-size: 15px;
  font-weight: 700;
}
.price .cur { font-size: 12px; }
.price--ask { color: var(--muted); font-size: 12px; font-weight: 400; }

/* ---------- news / articles ---------- */

.news {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
}
.news + .news { border-top: 1px dotted #999; }
.news--notext { grid-template-columns: minmax(0, 1fr); }
.news img { width: 100%; border-radius: 5px; }
.news h3 { font-size: 15px; margin-bottom: 6px; }
.news p { color: #333; }

/* ---------- download / prose ---------- */

.filelist { margin: 6px 0 14px; }
.filelist li {
  padding: 3px 0 3px 16px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%234699e5' d='M1 0l6 4-6 4z'/%3E%3C/svg%3E") left .55em / 7px 7px no-repeat;
}
.box__body > h3 { font-size: 14px; color: var(--blue-link); margin-top: 4px; }
.note { margin-top: 10px; padding-top: 8px; border-top: 1px dotted #999; color: var(--muted); font-style: italic; }

.prose h3 { margin: 14px 0 6px; }
.prose h3:first-child { margin-top: 0; }
.prose ul { margin-bottom: 8px; }
.prose li {
  padding: 2px 0 2px 14px;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Ccircle cx='4' cy='4' r='2.5' fill='%234699e5'/%3E%3C/svg%3E") left .55em / 7px 7px no-repeat;
}
.prose p { margin-top: 10px; }

/* ---------- sidebar ---------- */

.support li {
  padding: 5px 0;
  border-bottom: 1px dotted var(--line);
}
.support li:last-child { border-bottom: 0; }
.support__name { display: block; font-weight: 700; }

.catalog > li { margin-bottom: 8px; }
.catalog > li > strong {
  display: block;
  padding: 4px 6px;
  background: #eef6fd;
  color: var(--blue-link);
  border-left: 3px solid var(--blue);
}
.catalog ul { padding: 4px 0 0 6px; }
.catalog ul li {
  padding: 2px 0 2px 13px;
  color: #333;
  background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%234699e5' d='M1 0l6 4-6 4z'/%3E%3C/svg%3E") left .5em / 6px 6px no-repeat;
}

.promos img { width: 100%; margin-bottom: 10px; }

/* ---------- footer ---------- */

.site-footer {
  clear: both;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 3px solid var(--menu);
  text-align: center;
}
.site-footer h2 {
  font-size: 15px;
  text-transform: uppercase;
  color: var(--blue-link);
  margin-bottom: 8px;
}
.company { font-weight: 700; text-transform: uppercase; }
.footer__info li { padding: 2px 0; }
.copyright {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

/* ---------- scroll top ---------- */

.scroll-top {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 40;
  width: 40px; height: 40px;
  padding: 0;
  background: var(--blue);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.scroll-top svg { width: 24px; height: 24px; margin: 0 auto; fill: #fff; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .products { grid-template-columns: repeat(3, 1fr); }
  .promos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
}

@media (max-width: 767px) {
  .page { padding: 0 12px 16px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .promos { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: block; }
  .primary-nav { display: none; width: 100%; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav li + li { border-top: 1px solid #4a4a4a; }
  .primary-nav a { padding: 10px 8px; }

  .hero__label { font-size: 13px; padding: 6px 12px; }

  .news { grid-template-columns: minmax(0, 1fr); }
  .news img { max-width: 220px; }
}

@media (max-width: 420px) {
  .products, .promos { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
