/* ============================================================
   Design System — Linh Kiện ĐTDĐ Nguyễn Cần Thơ
   Colors: Blue (#1d4ed8), Navy (#0f172a), Red (#dc2626)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', Arial, sans-serif; margin: 0; }
a { text-decoration: none; }

/* ---- Announcement bar ---- */
.announcement-bar {
  background: #0f172a;
  color: #cbd5e1;
  padding: 6px 0;
  font-size: 12px;
}

/* ---- Header ---- */
.logo-box {
  width: 48px; height: 48px;
  background: #1d4ed8;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  flex-shrink: 0;
}
.logo-name { font-size: 15px; font-weight: 700; color: #1d4ed8; line-height: 1.2; }
.logo-sub  { font-size: 11px; color: #6b7280; }

.search-input {
  flex: 1;
  border: 1.5px solid #d1d5db;
  border-right: none;
  border-radius: 10px 0 0 10px;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
  font-family: inherit;
}
.search-input:focus { border-color: #1d4ed8; }
.search-btn {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 0 10px 10px 0;
  padding: 0 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.search-btn:hover { background: #1e40af; }

.nav-link {
  display: inline-block;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover { color: #1d4ed8; border-bottom-color: #1d4ed8; }

/* ---- Hero banner ---- */
.hero-banner {
  background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 55%, #4338ca 100%);
  position: relative;
  overflow: hidden;
}
.hero-banner::after {
  content: '';
  position: absolute;
  right: 0; top: 0;
  width: 40%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; }
.hero-text { max-width: 580px; }
.hero-btn-primary {
  display: inline-block;
  background: #fff;
  color: #1d4ed8;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  transition: background .15s, transform .1s;
}
.hero-btn-primary:hover { background: #dbeafe; transform: translateY(-1px); }
.hero-btn-outline {
  display: inline-block;
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 10px;
  font-size: 14px;
  transition: background .15s, border-color .15s;
}
.hero-btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; }

/* ---- Category icon cards ---- */
.cat-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px 8px;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .1s;
  text-decoration: none;
}
.cat-icon-card:hover {
  border-color: #1d4ed8;
  box-shadow: 0 4px 12px rgba(29,78,216,0.12);
  transform: translateY(-2px);
}
.cat-icon { font-size: 28px; line-height: 1; }
.cat-label { font-size: 12px; font-weight: 600; color: #374151; text-align: center; }
.cat-icon-card:hover .cat-label { color: #1d4ed8; }

/* ---- Sidebar ---- */
.sidebar-heading {
  background: #1d4ed8;
  color: #fff;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.sidebar-group-btn:hover { background: #f9fafb; }
.sidebar-dot {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.5;
  flex-shrink: 0;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 24px;
  font-size: 13px;
  color: #4b5563;
  border-bottom: 1px solid #f3f4f6;
  transition: color .1s, background .1s;
}
.sidebar-item:hover { color: #1d4ed8; background: #eff6ff; }
.sidebar-dot-sm {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #9ca3af;
  flex-shrink: 0;
}
.sidebar-item:hover .sidebar-dot-sm { background: #1d4ed8; }

/* ---- Section title ---- */
.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  border-left: 4px solid #1d4ed8;
  margin: 0;
}

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

/* ---- Product card ---- */
.product-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transform: translateY(-3px);
}
.product-img-area {
  position: relative;
  background: #f8fafc;
}
.product-img-wrap {
  position: relative;
  padding-bottom: 100%;
  overflow: hidden;
}
.product-img-wrap img {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform .25s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

/* Badges */
.badge-stack {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.badge-new {
  background: #16a34a;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}
.badge-disc {
  position: absolute;
  top: 8px; right: 8px;
  background: #dc2626;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  z-index: 5;
}

.product-info { padding: 12px; flex: 1; display: flex; flex-direction: column; }
.product-cat-label {
  font-size: 11px;
  color: #2563eb;
  font-weight: 600;
  margin-bottom: 4px;
}
.product-name {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  margin-bottom: 8px;
}
.product-price-row { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.product-price     { font-size: 16px; font-weight: 800; color: #dc2626; }
.product-price-old { font-size: 11px; color: #9ca3af; text-decoration: line-through; }

/* ---- Empty state ---- */
.empty-state {
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  padding: 60px 24px;
  text-align: center;
  color: #6b7280;
}

/* ---- Product Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none !important; }
.modal-box {
  position: relative;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  max-width: 640px;
  width: 100%;
  display: flex;
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  max-height: 90vh;
}
.modal-close-btn {
  position: absolute;
  top: 12px; right: 12px;
  z-index: 10;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  cursor: pointer;
  font-size: 18px;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.modal-close-btn:hover { background: #f3f4f6; }
.modal-img-panel {
  width: 42%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  flex-shrink: 0;
}
.modal-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
}
.modal-info-panel {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.modal-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.modal-tag-blue  { background: #dbeafe; color: #1d4ed8; }
.modal-tag-green { background: #dcfce7; color: #16a34a; }
.modal-price-box {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.modal-price { font-size: 26px; font-weight: 800; color: #dc2626; }
.modal-disc-badge {
  background: #fee2e2;
  color: #dc2626;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}
.modal-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  transition: background .15s, transform .1s;
  text-align: center;
}
.modal-btn:hover { transform: translateY(-1px); }
.modal-btn-primary { background: #1d4ed8; color: #fff; }
.modal-btn-primary:hover { background: #1e40af; }
.modal-btn-zalo    { background: #0068ff; color: #fff; }
.modal-btn-zalo:hover { background: #0052cc; }

/* Mobile modal */
@media (max-width: 540px) {
  .modal-box { flex-direction: column; }
  .modal-img-panel { width: 100%; padding: 20px; max-height: 180px; }
}

/* ---- Pagination ---- */
table.PageNavigator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
table.PageNavigator td { padding: 0; vertical-align: middle; }
table.PageNavigator a {
  display: inline-block;
  padding: 6px 12px;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 13px;
  color: #374151;
  text-decoration: none;
  background: #fff;
  transition: background .12s, color .12s, border-color .12s;
  font-weight: 500;
}
table.PageNavigator a:hover { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
table.PageNavigator a b { color: #1d4ed8; font-weight: 700; }

/* ---- Footer ---- */
.site-footer { background: #1e293b; color: #fff; margin-top: 40px; }
.footer-heading { font-size: 13px; font-weight: 700; color: #60a5fa; margin-bottom: 12px; }
.footer-list { list-style: none; padding: 0; margin: 0; font-size: 13px; color: #94a3b8; line-height: 1.7; }
.footer-link { color: #94a3b8; transition: color .12s; }
.footer-link:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #334155;
  margin-top: 24px;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; } }

/* ---- Contact form ---- */
.contact-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.contact-input {
  display: block;
  width: 100%;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.contact-input:focus {
  border-color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(29,78,216,0.1);
}
.contact-submit-btn {
  width: 100%;
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}
.contact-submit-btn:hover { background: #1e40af; transform: translateY(-1px); }
