/* ============================================
   VietPlace Directory - Main Stylesheet
   ============================================ */

:root {
  --vpd-primary: #2563eb;
  --vpd-text: #1f2937;
  --vpd-text-light: #6b7280;
  --vpd-bg: #f9fafb;
  --vpd-card-bg: #ffffff;
  --vpd-border: #e5e7eb;
  --vpd-radius: 12px;
  --vpd-shadow: 0 2px 8px rgba(0,0,0,.08);
  --vpd-shadow-hover: 0 8px 24px rgba(0,0,0,.14);
  --hero-color: var(--vpd-primary);
}

/* ── Grid ──────────────────────────────── */
.vpd-grid { display: grid; gap: 20px; }
.vpd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.vpd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.vpd-cols-4 { grid-template-columns: repeat(4, 1fr); }
@media(max-width:900px){ .vpd-cols-3,.vpd-cols-4 { grid-template-columns:repeat(2,1fr); } }
@media(max-width:560px){ .vpd-grid { grid-template-columns:1fr; } }

/* ── Card ──────────────────────────────── */
.vpd-card {
  background: var(--vpd-card-bg);
  border: 1px solid var(--vpd-border);
  border-radius: var(--vpd-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  box-shadow: var(--vpd-shadow);
}
.vpd-card:hover { transform: translateY(-4px); box-shadow: var(--vpd-shadow-hover); }
.vpd-card-img-wrap { position: relative; display: block; aspect-ratio: 4/3; overflow: hidden; background: #f3f4f6; }
.vpd-card-img-wrap img { width:100%; height:100%; object-fit:cover; transition: transform .3s; }
.vpd-card:hover .vpd-card-img-wrap img { transform: scale(1.05); }
.vpd-card-img-placeholder { display:flex; align-items:center; justify-content:center; height:100%; font-size:48px; background: linear-gradient(135deg,#f3f4f6,#e5e7eb); }
.vpd-card-type-badge { position:absolute; top:10px; left:10px; padding:4px 10px; border-radius:20px; font-size:11px; font-weight:600; color:#fff; }
.vpd-card-featured-badge { position:absolute; top:10px; right:10px; background:#f59e0b; color:#fff; padding:3px 8px; border-radius:20px; font-size:11px; font-weight:600; }
.vpd-card-body { padding: 14px 16px; flex:1; }
.vpd-card-title { margin:0 0 6px; font-size:16px; font-weight:700; line-height:1.3; }
.vpd-card-title a { color:var(--vpd-text); text-decoration:none; }
.vpd-card-title a:hover { color:var(--vpd-primary); }
.vpd-card-address { color:var(--vpd-text-light); font-size:13px; margin:0 0 8px; }
.vpd-card-meta { display:flex; flex-wrap:wrap; gap:8px; font-size:12px; color:var(--vpd-text-light); }
.vpd-card-rating { color:#f59e0b; font-weight:600; }
.vpd-card-price { background:#f3f4f6; padding:2px 6px; border-radius:4px; font-weight:600; }
.vpd-card-btn { display:block; text-align:center; padding:10px; background:var(--vpd-primary); color:#fff; text-decoration:none; font-size:13px; font-weight:600; transition:background .2s; }
.vpd-card-btn:hover { background:#1d4ed8; color:#fff; }

/* ── Listing wrap ──────────────────────── */
.vpd-listing-wrap { max-width:1200px; margin:0 auto; padding:20px 16px; }
.vpd-type-header { display:flex; align-items:center; gap:12px; padding:16px 0; border-bottom:3px solid var(--vpd-type-color,var(--vpd-primary)); margin-bottom:20px; }
.vpd-type-header .vpd-type-icon { font-size:32px; }
.vpd-type-header h2 { margin:0; font-size:24px; color:var(--vpd-type-color,var(--vpd-text)); }
.vpd-count { margin-left:auto; background:var(--vpd-type-color,var(--vpd-primary)); color:#fff; padding:4px 12px; border-radius:20px; font-size:13px; font-weight:600; }

/* ── Filter bar ────────────────────────── */
.vpd-filter-bar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; padding:12px 16px; background:#fff; border:1px solid var(--vpd-border); border-radius:8px; flex-wrap:wrap; }
.vpd-live-search { border:1px solid var(--vpd-border); border-radius:6px; padding:8px 12px; font-size:14px; min-width:200px; outline:none; }
.vpd-live-search:focus { border-color:var(--vpd-primary); }
.vpd-sort-btns { display:flex; gap:6px; align-items:center; font-size:13px; }
.vpd-sort { padding:5px 12px; border:1px solid var(--vpd-border); border-radius:6px; background:#fff; cursor:pointer; font-size:13px; transition:.2s; }
.vpd-sort.active, .vpd-sort:hover { background:var(--vpd-primary); color:#fff; border-color:var(--vpd-primary); }

/* ── Search box ────────────────────────── */
.vpd-search-box { padding:30px 20px; background:linear-gradient(135deg,var(--vpd-primary),#7c3aed); border-radius:var(--vpd-radius); color:#fff; text-align:center; }
.vpd-search-form { display:flex; justify-content:center; }
.vpd-search-row { display:flex; gap:8px; max-width:700px; width:100%; flex-wrap:wrap; }
.vpd-search-input { flex:1; min-width:200px; padding:12px 16px; border:none; border-radius:8px; font-size:15px; outline:none; }
.vpd-search-type { padding:12px 12px; border:none; border-radius:8px; font-size:14px; cursor:pointer; outline:none; min-width:140px; }
.vpd-search-btn { padding:12px 24px; background:#f59e0b; color:#fff; border:none; border-radius:8px; font-size:15px; font-weight:700; cursor:pointer; transition:.2s; white-space:nowrap; }
.vpd-search-btn:hover { background:#d97706; }
.vpd-quick-cats { display:flex; flex-wrap:wrap; gap:8px; justify-content:center; margin-top:16px; }
.vpd-quick-cat { padding:6px 14px; background:rgba(255,255,255,.2); color:#fff; border-radius:20px; text-decoration:none; font-size:13px; font-weight:600; transition:.2s; border:1px solid rgba(255,255,255,.3); }
.vpd-quick-cat:hover { background:rgba(255,255,255,.35); color:#fff; }

/* ── Pagination ────────────────────────── */
.vpd-pagination { text-align:center; margin-top:32px; }
.vpd-pagination .page-numbers { display:inline-block; padding:8px 14px; margin:2px; border:1px solid var(--vpd-border); border-radius:6px; text-decoration:none; color:var(--vpd-text); transition:.2s; }
.vpd-pagination .page-numbers.current, .vpd-pagination .page-numbers:hover { background:var(--vpd-primary); color:#fff; border-color:var(--vpd-primary); }
.vpd-empty { text-align:center; padding:60px 20px; color:var(--vpd-text-light); }
.vpd-empty span { font-size:48px; display:block; margin-bottom:12px; }

/* ── Single / Hero ─────────────────────── */
.vpd-single-wrap { max-width:1200px; margin:0 auto; padding:0 16px 40px; }
.vpd-hero { position:relative; min-height:380px; display:flex; align-items:flex-end; border-radius:var(--vpd-radius); overflow:hidden; background:linear-gradient(135deg, var(--hero-color,#2563eb), #1a1a2e); margin-bottom:32px; }
.vpd-hero-img { position:absolute; inset:0; }
.vpd-hero-img img { width:100%; height:100%; object-fit:cover; }
.vpd-hero-overlay { position:absolute; inset:0; background:linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%, transparent 100%); }
.vpd-hero-content { position:relative; z-index:2; padding:32px; color:#fff; width:100%; }
.vpd-type-pill { display:inline-block; padding:5px 14px; border-radius:20px; font-size:13px; font-weight:700; color:#fff; margin-bottom:10px; }
.vpd-hero-title { font-size:clamp(24px,4vw,40px); margin:0 0 12px; font-weight:800; text-shadow:0 2px 8px rgba(0,0,0,.4); }
.vpd-hero-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:14px; align-items:center; }
.vpd-hero-meta span { background:rgba(255,255,255,.2); padding:4px 10px; border-radius:6px; backdrop-filter:blur(4px); }
.vpd-price-badge { background:#f59e0b!important; font-weight:700; }
.vpd-verified-badge { font-size:20px; }
.vpd-badge-emergency { background:#ef4444!important; font-weight:700; }
.vpd-btn-hero { display:inline-block; margin-top:14px; padding:12px 24px; background:#fff; color:var(--hero-color,#2563eb); border-radius:8px; text-decoration:none; font-weight:700; font-size:15px; transition:.2s; }
.vpd-btn-hero:hover { background:#f3f4f6; }

/* ── Content grid ──────────────────────── */
.vpd-content-grid { display:grid; grid-template-columns:1fr 320px; gap:28px; align-items:start; }
@media(max-width:900px){ .vpd-content-grid { grid-template-columns:1fr; } .vpd-sidebar { order:-1; } }
.vpd-main-col > * + * { margin-top:28px; }
.vpd-main-col h2 { font-size:20px; font-weight:700; margin:0 0 14px; padding-bottom:8px; border-bottom:2px solid var(--vpd-border); }

/* ── Gallery ───────────────────────────── */
.vpd-gallery-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.vpd-gallery-item { display:block; border-radius:8px; overflow:hidden; aspect-ratio:4/3; }
.vpd-gallery-item img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.vpd-gallery-item:hover img { transform:scale(1.05); }

/* ── Highlights grid ───────────────────── */
.vpd-highlights-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; }
.vpd-highlight-card { display:flex; flex-direction:column; align-items:center; gap:6px; padding:16px 10px; border:2px solid var(--vpd-border); border-radius:10px; text-align:center; font-size:13px; color:var(--vpd-text-light); background:#f9fafb; transition:.2s; }
.vpd-highlight-card.active { border-color:var(--vpd-primary); background:#eff6ff; color:var(--vpd-primary); }
.vpd-highlight-card .icon { font-size:24px; }

/* ── Info table ────────────────────────── */
.vpd-info-table { width:100%; border-collapse:collapse; border-radius:8px; overflow:hidden; border:1px solid var(--vpd-border); }
.vpd-info-table tr:nth-child(even) { background:#f9fafb; }
.vpd-info-table td { padding:10px 14px; border-bottom:1px solid var(--vpd-border); font-size:14px; }
.vpd-info-table td:first-child { font-weight:600; width:45%; color:var(--vpd-text-light); }

/* ── Specialty box ─────────────────────── */
.vpd-specialty-box { background:#fffbeb; border:1px solid #fde68a; border-radius:10px; padding:18px 20px; }
.vpd-specialty-box h3 { margin:0 0 8px; font-size:17px; }
.vpd-specialty-box p { margin:0; font-size:14px; line-height:1.7; }

/* ── Map ───────────────────────────────── */
.vpd-map-section iframe { width:100%; border-radius:10px; border:1px solid var(--vpd-border); display:block; }
.vpd-map-actions { margin-top:12px; }
.vpd-btn-map { display:inline-block; padding:10px 20px; background:var(--vpd-primary); color:#fff; text-decoration:none; border-radius:8px; font-weight:600; font-size:14px; transition:.2s; }
.vpd-btn-map:hover { background:#1d4ed8; color:#fff; }

/* ── Sidebar widgets ───────────────────── */
.vpd-sidebar { display:flex; flex-direction:column; gap:16px; }
.vpd-widget { background:#fff; border:1px solid var(--vpd-border); border-radius:var(--vpd-radius); padding:18px; }
.vpd-widget h3 { margin:0 0 12px; font-size:16px; font-weight:700; }
.vpd-info-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:8px; font-size:14px; }
.vpd-info-list a { color:var(--vpd-primary); text-decoration:none; }
.vpd-feature-tags { display:flex; flex-wrap:wrap; gap:6px; }
.vpd-tag { padding:4px 10px; background:#eff6ff; color:var(--vpd-primary); border-radius:20px; font-size:12px; font-weight:600; }
.vpd-share-btns { display:flex; gap:8px; flex-wrap:wrap; }
.vpd-share-fb { display:inline-block; padding:8px 16px; background:#1877f2; color:#fff; border-radius:6px; text-decoration:none; font-size:13px; font-weight:600; }
.vpd-btn-primary { display:inline-block; padding:12px 20px; background:var(--vpd-primary); color:#fff!important; border-radius:8px; text-decoration:none; font-weight:700; font-size:14px; transition:.2s; }
.vpd-btn-primary:hover { background:#1d4ed8; }
.vpd-price-big { font-size:28px; font-weight:800; color:var(--vpd-primary); }
.vpd-price-big small { font-size:14px; font-weight:400; color:var(--vpd-text-light); }
.vpd-price-row { display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--vpd-border); font-size:14px; }
.vpd-pricing-widget .vpd-price-row:last-of-type { border-bottom:none; }

/* ── Stars ─────────────────────────────── */
.vpd-stars .star { font-size:16px; }
.vpd-stars .full { color:#f59e0b; }
.vpd-stars .half { color:#f59e0b; }
.vpd-stars .empty { color:#d1d5db; }

/* ── Archive ───────────────────────────── */
.vpd-archive-wrap { max-width:1280px; margin:0 auto; padding:0 16px 40px; }
.vpd-archive-hero { background:linear-gradient(135deg,var(--hero-color,var(--vpd-primary)),#1a1a2e); color:#fff; padding:48px 32px; border-radius:var(--vpd-radius); margin-bottom:28px; text-align:center; }
.vpd-archive-icon { font-size:48px; margin-bottom:12px; }
.vpd-archive-hero h1 { font-size:clamp(24px,4vw,36px); margin:0 0 8px; }
.vpd-archive-hero p { opacity:.85; margin:0 0 12px; }
.vpd-result-count { background:rgba(255,255,255,.2); padding:5px 14px; border-radius:20px; font-size:13px; }
.vpd-archive-layout { display:grid; grid-template-columns:240px 1fr; gap:24px; align-items:start; }
@media(max-width:768px){ .vpd-archive-layout { grid-template-columns:1fr; } }
.vpd-filter-sidebar { background:#fff; border:1px solid var(--vpd-border); border-radius:var(--vpd-radius); padding:18px; position:sticky; top:20px; }
.vpd-filter-group { margin-bottom:20px; }
.vpd-filter-group h3 { font-size:13px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--vpd-text-light); margin:0 0 10px; }
.vpd-filter-link { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-radius:7px; text-decoration:none; font-size:13px; color:var(--vpd-text); margin-bottom:3px; transition:.2s; }
.vpd-filter-link:hover, .vpd-filter-link.active { background:var(--vpd-primary); color:#fff!important; }
.vpd-filter-count { font-size:11px; background:rgba(0,0,0,.1); padding:1px 6px; border-radius:10px; }
.vpd-archive-toolbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:16px; gap:12px; flex-wrap:wrap; }
.vpd-sort-select { padding:8px 12px; border:1px solid var(--vpd-border); border-radius:6px; font-size:13px; cursor:pointer; outline:none; }

/* ── Map popup ─────────────────────────── */
.vpd-map-popup strong { display:block; margin-bottom:4px; }
.vpd-map-popup p { margin:0; font-size:12px; color:#666; }

/* ── Verified ──────────────────────────── */
.vpd-verified { font-size:14px; }
