* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #222222;
  background-color: #ffffff;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.hidden {
  display: none !important;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  width: 46px;
  height: 46px;
  border-radius: 4px;
  object-fit: cover;
}

.logo-text {
  font-size: 24px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #111111;
}

.search-box {
  flex: 1;
  max-width: 520px;
  display: flex;
  background-color: #e3e3e3;
  border-radius: 2px;
  overflow: hidden;
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px;
  font-size: 14px;
  color: #111111;
  outline: none;
}

.search-box input::placeholder {
  color: #333333;
}

.search-box button {
  border: none;
  background: transparent;
  padding: 0 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  border: none;
  background-color: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: #111111;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  transition: background-color 0.2s, transform 0.2s;
}

.action-btn:hover {
  background-color: #f1f5f9;
  transform: translateY(-1px);
}

.cart-icon-box {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.cart-badge {
  position: absolute;
  top: -7px;
  right: -9px;
  background-color: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle-btn {
  display: none;
  border: none;
  background-color: transparent;
  padding: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.navbar {
  background-color: #2483ec;
  color: #ffffff;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav-menu {
  display: flex;
  flex: 1;
  justify-content: space-between;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 960px;
}

.nav-menu a {
  display: block;
  padding: 12px 10px;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s;
}

.nav-menu a:hover {
  background-color: #1971c2;
}

.hotline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 15px;
  color: #111111;
  white-space: nowrap;
}

.main-content {
  padding-top: 16px;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 26px;
}

.hero-strip-card {
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-strip-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.hero-strip-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.hero-strip-card:hover img {
  transform: scale(1.06);
}

.section-block {
  margin-bottom: 34px;
  animation: fadeUp 0.5s ease;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 15px;
  text-transform: uppercase;
}

.view-all {
  font-size: 13px;
  color: #6b7280;
}

.view-all:hover {
  color: #228be6;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.product-card {
  border: 1px solid #eeeeee;
  border-radius: 6px;
  padding: 10px 10px 14px;
  text-align: center;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.product-img-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background-color: #f9fafb;
  margin-bottom: 10px;
  cursor: pointer;
}

.product-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.product-card:hover .product-img-box img {
  transform: scale(1.08);
}

.product-cat {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.product-name {
  font-size: 13px;
  margin: 0 0 8px;
  min-height: 36px;
  line-height: 1.35;
  cursor: pointer;
}

.product-name:hover {
  color: #228be6;
}

.price-old {
  font-size: 11.5px;
  color: #9ca3af;
  text-decoration: line-through;
}

.price-red {
  color: #dc2626;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 10px;
}

.btn-buy {
  margin-top: auto;
  border: none;
  background-color: #1d4ed8;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: bold;
  padding: 8px 18px;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}

.btn-buy:hover {
  background-color: #1e40af;
  transform: scale(1.04);
}

.btn-blue {
  border: none;
  background-color: #1d4ed8;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-blue:hover {
  background-color: #1e40af;
}

.btn-red {
  border: none;
  background-color: #dc2626;
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
}

.btn-full {
  width: 100%;
}

.catalog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.catalog-sort-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.catalog-sort-box select {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  margin-bottom: 30px;
}

.sidebar h3 {
  margin: 0 0 12px;
  font-size: 14px;
}

.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-list button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  padding: 10px 6px;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}

.sidebar-list button:hover,
.sidebar-list button.active {
  color: #1d4ed8;
  font-weight: bold;
  background-color: #eff6ff;
}

.empty-msg {
  text-align: center;
  padding: 40px;
  background-color: #f8fafc;
  color: #6b7280;
}

.prefooter {
  border-top: 1px solid #e5e7eb;
  padding: 32px 0;
  margin-top: 20px;
}

.prefooter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.prefooter-title {
  margin: 0 0 14px;
  font-size: 14px;
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mini-item {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.mini-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.mini-item-name {
  font-size: 12.5px;
  margin-bottom: 3px;
}

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.blue-line {
  height: 4px;
  background-color: #228be6;
}

.footer {
  padding: 28px 0 36px;
  background-color: #ffffff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 28px;
}

.footer h4 {
  margin: 0 0 12px;
  font-size: 14px;
}

.footer p {
  margin: 0 0 6px;
  font-size: 13px;
  color: #374151;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 7px;
  font-size: 13px;
}

.footer-links a:hover {
  color: #228be6;
  text-decoration: underline;
}

.footer-logo {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.payment-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pay-tag {
  padding: 4px 10px;
  border-radius: 4px;
  color: #ffffff;
  font-size: 11px;
  font-weight: bold;
}

.momo { background-color: #ae2070; }
.vnpay { background-color: #005baa; }
.visa { background-color: #1a1f71; }
.mc { background-color: #eb001b; }

.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 440px;
  background-color: #ffffff;
  border-radius: 8px;
  padding: 24px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp 0.25s ease;
}

.detail-box {
  max-width: 720px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 20px;
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background-color: #f3f4f6;
  cursor: pointer;
}

.modal-title {
  margin: 0 0 16px;
  text-align: center;
}

.tab-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  padding: 9px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.tab-btn.active {
  background-color: #1d4ed8;
  color: #ffffff;
  border-color: #1d4ed8;
}

.modal-box label {
  display: block;
  font-size: 12.5px;
  font-weight: bold;
  margin-bottom: 4px;
}

.modal-box input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  margin-bottom: 12px;
}

.error-text {
  color: #dc2626;
  font-size: 12.5px;
  margin: 0 0 10px;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 210;
  display: flex;
  justify-content: flex-end;
}

.cart-panel {
  width: 100%;
  max-width: 390px;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  animation: slideLeft 0.25s ease;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
}

.cart-header h3 {
  margin: 0;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.cart-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.cart-row img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #e5e7eb;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.cart-qty button {
  width: 24px;
  height: 24px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  cursor: pointer;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid #e5e7eb;
  background-color: #f8fafc;
}

.voucher-box {
  display: flex;
  gap: 8px;
}

.voucher-box input {
  flex: 1;
  padding: 8px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
}

.voucher-box button {
  border: none;
  background-color: #334155;
  color: #ffffff;
  padding: 0 12px;
  border-radius: 4px;
  cursor: pointer;
}

.voucher-note {
  font-size: 12px;
  margin: 6px 0 10px;
  color: #059669;
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 12px;
}

.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #111827;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 6px;
  border-left: 4px solid #228be6;
  z-index: 300;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.top-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background-color: #1d4ed8;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  z-index: 150;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideLeft {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
  .nav-menu a {
    padding: 12px 8px;
    font-size: 13px;
  }
}

@media (max-width: 900px) {
  .hero-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .sidebar-list li {
    flex-shrink: 0;
  }
  .sidebar-list button {
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 7px 14px;
    white-space: nowrap;
  }
  .prefooter-grid,
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .header-top {
    flex-wrap: wrap;
    gap: 10px;
  }
  .search-box {
    order: 3;
    max-width: 100%;
    flex-basis: 100%;
  }
  .menu-toggle-btn {
    display: flex;
  }
  .navbar {
    display: none;
  }
  .navbar.open {
    display: block;
  }
  .nav-content {
    flex-direction: column;
    align-items: stretch;
    padding-top: 6px;
    padding-bottom: 12px;
  }
  .nav-menu {
    flex-direction: column;
  }
  .nav-menu a {
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }
  .hotline {
    padding: 10px 6px 0;
  }
}

@media (max-width: 600px) {
  .logo-text {
    font-size: 20px;
  }
  .logo-img {
    width: 38px;
    height: 38px;
  }
  #account-label {
    display: none;
  }
  .hero-strip {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .prefooter-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .cart-panel {
    max-width: 100%;
  }
  .modal-box {
    padding: 18px;
  }
}
