/* ================================================================
   Shopee Thanh Hóa Search — App CSS v2
   ================================================================ */

:root {
  --orange:        #ee4d2d;
  --orange-dark:   #d73211;
  --orange-light:  #fff0ec;
  --orange-2:      #ff6633;
  --bg:            #f5f5f5;
  --text:          #212529;
  --text-muted:    #6c757d;
  --text-light:    #999;
  --card-shadow:   0 2px 12px rgba(0,0,0,.08);
  --card-hover:    0 8px 28px rgba(238,77,45,.18);
  --radius:        12px;
  --radius-sm:     8px;
  --transition:    .2s ease;
  --font:          'Be Vietnam Pro', sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── NAVBAR ───────────────────────────────────────────────── */
.navbar-shopee {
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(238,77,45,.35);
  padding: .55rem 0;
}
.navbar-shopee .nav-link,
.navbar-shopee .navbar-brand { color: #fff !important; }
.navbar-shopee .nav-link:hover { opacity: .85; }

.brand-logo {
  background: #fff;
  color: var(--orange);
  width: 32px; height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}
.brand-text { font-size: 1.05rem; font-weight: 500; }
.brand-text strong { font-weight: 700; }

/* Navbar search */
.navbar-search .form-control {
  border: none;
  height: 36px;
  font-size: .88rem;
  border-radius: 4px 0 0 4px;
  color: #212529 !important;      /* ← CHỮ ĐEN */
  background: #fff !important;
}
.navbar-search .form-control:focus { box-shadow: none; color: #212529 !important; }
.btn-search {
  background: #fff; color: var(--orange);
  border: none; border-radius: 0 4px 4px 0;
  padding: 0 14px; height: 36px;
}
.btn-search:hover { background: #ffeee8; }

.btn-nav-admin {
  background: rgba(255,255,255,.18);
  border-radius: 20px;
  padding: 4px 14px !important;
  font-size: .85rem;
}
.btn-nav-admin:hover { background: rgba(255,255,255,.32) !important; }

.navbar-toggler { border-color: rgba(255,255,255,.5); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ── HERO ──────────────────────────────────────────────────── */
.hero-banner {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-2) 100%);
  padding: 52px 0 44px;
  color: #fff;
}
.hero-title { font-size: 2.1rem; font-weight: 700; line-height: 1.2; }
.hero-subtitle { font-size: 1rem; opacity: .9; }

/* Hero search box — CHỮ ĐEN */
.hero-search-box {
  background: #fff;
  border-radius: 12px;
  padding: 5px 5px 5px 14px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}
.hero-search-box input {
  border: none; outline: none;
  flex: 1; min-width: 0;
  font-size: 1rem;
  font-family: var(--font);
  color: #212529 !important;        /* ← CHỮ ĐEN */
  background: transparent;
}
.hero-search-box input::placeholder { color: #aaa; }
.hero-search-box select {
  border: none; border-left: 1px solid #eee;
  outline: none; padding: 4px 8px;
  font-size: .88rem;
  color: #555;
  font-family: var(--font);
  cursor: pointer;
  max-width: 165px;
  background: transparent;
}
.btn-hero-search {
  background: var(--orange); color: #fff;
  border: none; border-radius: 8px;
  padding: 10px 20px;
  font-size: .95rem; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}
.btn-hero-search:hover { background: var(--orange-dark); }

/* Stats bar */
.stats-bar {
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  padding: 14px 20px;
  display: flex; flex-wrap: wrap; gap: 24px;
}
.stats-number { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.stats-label  { font-size: .77rem; opacity: .8; margin-top: 2px; }

/* ── CARDS ──────────────────────────────────────────────────── */
.shop-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
}
.shop-card:hover { transform: translateY(-4px); box-shadow: var(--card-hover); }

.shop-card-header {
  background: linear-gradient(135deg, #fff5f2, #fff8f5);
  padding: 18px 18px 14px;
  display: flex; align-items: flex-start; gap: 12px;
  border-bottom: 1px solid #f0ede8;
}
.shop-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.shop-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.shop-name {
  font-size: .95rem; font-weight: 600;
  margin: 0 0 4px; line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.shop-district { font-size: .78rem; color: var(--text-muted); }
.badge-category {
  display: inline-block;
  background: var(--orange-light); color: var(--orange);
  border-radius: 20px; padding: 2px 9px;
  font-size: .73rem; font-weight: 500; margin-top: 4px;
}

.shop-card-body { padding: 14px 18px; flex: 1; }
.shop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.stat-item { text-align: center; }
.stat-value { font-size: 1.05rem; font-weight: 700; color: var(--orange); }
.stat-label { font-size: .7rem; color: var(--text-light); }

.shop-rating { display: flex; align-items: center; gap: 4px; font-size: .85rem; }
.rating-stars { color: #ffc107; font-size: .85rem; }
.rating-value { font-weight: 600; }

.shop-card-footer {
  padding: 11px 18px;
  border-top: 1px solid #f0ede8;
  display: flex; gap: 8px;
}

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn-shopee {
  background: var(--orange); color: #fff;
  border: none; border-radius: 6px;
  padding: 7px 16px; font-size: .84rem; font-weight: 600;
  cursor: pointer; transition: background var(--transition);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font);
}
.btn-shopee:hover { background: var(--orange-dark); color: #fff; }

.btn-detail {
  border: 1.5px solid var(--orange); color: var(--orange);
  background: transparent; border-radius: 6px;
  padding: 6px 14px; font-size: .84rem; font-weight: 600;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font);
}
.btn-detail:hover { background: var(--orange-light); color: var(--orange); }

/* ── SECTION HEADING ─────────────────────────────────────────── */
.section-heading { font-size: 1.25rem; font-weight: 700; margin-bottom: .2rem; }
.section-heading span { color: var(--orange); }
.section-divider { width: 38px; height: 3px; background: var(--orange); border-radius: 2px; margin-bottom: 1.4rem; }

/* ── FILTER PANEL ────────────────────────────────────────────── */
.search-filter-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--card-shadow);
  padding: 18px;
}
@media (min-width: 992px) {
  .search-filter-panel { position: sticky; top: 68px; }
}
.filter-title {
  font-size: .92rem; font-weight: 700;
  border-bottom: 1px solid #f0ede8;
  padding-bottom: 10px; margin-bottom: 14px;
}
.filter-label { font-size: .8rem; font-weight: 600; color: var(--text-muted); margin-bottom: 5px; }

/* form controls — CHỮ ĐEN */
.form-select, .form-control {
  font-size: .87rem; border-radius: 7px; border-color: #ddd;
  color: #212529 !important;
}
.form-select:focus, .form-control:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 .18rem rgba(238,77,45,.15);
  color: #212529 !important;
}
input[type="text"], input[type="search"], input[type="number"],
input[type="email"], input[type="url"], input[type="password"] {
  color: #212529 !important;
}
input::placeholder { color: #aaa !important; }

/* ── MAP ─────────────────────────────────────────────────────── */
#shopee-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.map-popup-name { font-size: .92rem; font-weight: 700; margin-bottom: 4px; }
.map-popup-meta { font-size: .78rem; color: var(--text-muted); }
.map-popup-link { color: var(--orange); font-size: .8rem; font-weight: 600; display: block; margin-top: 5px; }

/* ── PAGINATION ──────────────────────────────────────────────── */
.pagination .page-link { color: var(--orange); border-radius: 6px !important; margin: 0 2px; border-color: #e5e5e5; font-size: .86rem; }
.pagination .page-item.active .page-link { background: var(--orange); border-color: var(--orange); color: #fff; }
.pagination .page-link:hover { background: var(--orange-light); color: var(--orange); }

/* ── LOADING ──────────────────────────────────────────────────── */
.spinner-shopee {
  width: 40px; height: 40px;
  border: 4px solid var(--orange-light); border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 40px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── DISTRICT BADGE ──────────────────────────────────────────── */
.district-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1.5px solid var(--orange);
  color: var(--orange); border-radius: 20px;
  padding: 4px 13px; font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none;
}
.district-badge:hover, .district-badge.active { background: var(--orange); color: #fff; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer { background: #1a1a1a; color: #bbb; padding: 48px 0 24px; margin-top: 60px; }
.footer-brand { color: #fff; font-size: 1rem; }
.footer-heading { color: #fff; font-size: .84rem; font-weight: 700; margin-bottom: 12px; }
.footer-link { color: #bbb; font-size: .83rem; display: block; margin-bottom: 6px; transition: color var(--transition); }
.footer-link:hover { color: var(--orange); }
.text-footer-muted { color: #666 !important; }
.footer-divider { border-color: #2d2d2d; margin: 32px 0 20px; }
.badge-cat-footer {
  background: #2d2d2d; color: #bbb; border-radius: 20px;
  padding: 3px 10px; font-size: .74rem; display: inline-block;
  transition: all var(--transition);
}
.badge-cat-footer:hover { background: var(--orange); color: #fff; }

/* ── ADMIN ───────────────────────────────────────────────────── */
.admin-sidebar { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.admin-sidebar .nav-link {
  color: var(--text-muted); padding: 10px 16px; font-size: .88rem;
  border-radius: 0; display: flex; align-items: center; gap: 8px;
  border-left: 3px solid transparent;
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active {
  background: var(--orange-light); color: var(--orange); font-weight: 600;
}
.admin-sidebar .nav-link.active { border-left-color: var(--orange); }

.admin-card { background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 22px; }

.stat-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--card-shadow);
  padding: 18px; display: flex; align-items: center; gap: 14px;
}
.stat-card-icon { width: 50px; height: 50px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-card-icon.orange { background: var(--orange-light); color: var(--orange); }
.stat-card-icon.blue   { background: #e8f4ff; color: #0d6efd; }
.stat-card-icon.green  { background: #e8fff2; color: #198754; }
.stat-card-number { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-card-label  { font-size: .78rem; color: var(--text-light); margin-top: 4px; }

/* ── AUTOCOMPLETE ────────────────────────────────────────────── */
.autocomplete-box {
  position: absolute; z-index: 1050;
  background: #fff; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  max-height: 260px; overflow-y: auto;
  margin-top: 4px; width: 100%;
}
.autocomplete-item {
  padding: 10px 14px; cursor: pointer;
  font-size: .9rem; color: #212529;
  border-bottom: 1px solid #f5f5f5;
}
.autocomplete-item:hover { background: var(--orange-light); color: var(--orange); }

/* ── UTILITY ─────────────────────────────────────────────────── */
.text-shopee { color: var(--orange) !important; }
.bg-shopee   { background: var(--orange) !important; color: #fff; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.min-w-0 { min-width: 0; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
  .hero-title { font-size: 1.5rem; }
  .hero-search-box select { display: none; }
  .stats-bar { gap: 14px; }
  .stats-number { font-size: 1.25rem; }
}
