/*
Theme Name: Home Pharma
Theme URI: https://homepharma.vn
Author: AtinCaptain
Author URI: https://homepharma.vn
Description: Theme WordPress cho chuoi nha thuoc Home Pharma (homepharma.vn) — chuyen hoa nguyen ven tu thiet ke Claude Design: trang chu "The gioi 3D" (con duong 3D, 6 tram, nhac nen, Duoc si AI), ban "Trang chu v2" va bang 4 phuong an tham khao. Ho tro WooCommerce, Custom Post Type "Chi nhanh" (chi_nhanh) + ACF.
Version: 1.6.3
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.0
License: Proprietary
Text Domain: home-pharma
Tags: custom-menu, featured-images, e-commerce
*/

/* ==========================================================================
   Kieu chung toan site (khong anh huong toi animation trong cac trang .dc)
   Cac trang thiet ke (front-page / Trang chu v2 / Bang 4 phuong an) co CSS rieng
   trong assets/css/*.css — giu nguyen 100% tu <helmet> cua file .dc.html goc.
   ========================================================================== */

:root {
  --hp-accent: #4B5DE0;
  --hp-ink: #23262B;
  --hp-ink-2: #3B4149;
  --hp-ink-3: #585E66;
  --hp-muted: #6B7076;
  --hp-line: #E6E6E4;
  --hp-line-2: #DDE2F4;
  --hp-soft: #F7F8FE;
  --hp-green: #0B7A5B;
}

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #FFFFFF;
  color: var(--hp-ink);
  font-family: 'Jost', system-ui, sans-serif;
}

a { color: var(--hp-ink); text-decoration: none; }
a:hover { color: var(--hp-accent); }

/* Truy cap tro giup (chuan WordPress) */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; width: 1px; word-wrap: normal !important;
}

/* Khung noi dung cho cac trang thuong (bai viet, trang tinh, luu tru) */
.hp-wrap {
  max-width: 720px; margin: 0 auto; padding: 96px 20px 80px; box-sizing: border-box;
}
.hp-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 14px 18px; background: rgba(255,255,255,.9); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hp-line);
}
.hp-topbar__brand { display: flex; align-items: center; gap: 9px; }
.hp-topbar__brand img { display: block; height: 34px; width: auto; }
.hp-topbar__brand span {
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.25;
}
.hp-topbar__nav { display: flex; gap: 18px; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.hp-topbar__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }
.hp-topbar__nav a { color: var(--hp-muted); }
.hp-topbar__nav a:hover { color: var(--hp-ink); }
.hp-topbar__cta {
  display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 14px;
  background: var(--hp-accent); color: #FFFFFF !important; font-size: 11px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
}
.admin-bar .hp-topbar { top: 32px; }
@media (max-width: 782px) { .admin-bar .hp-topbar { top: 46px; } }

.hp-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .24em; color: var(--hp-ink-3); text-transform: uppercase; }
.hp-title { margin: 8px 0 18px; font-size: clamp(26px, 5vw, 38px); font-weight: 700; line-height: 1.05; letter-spacing: -.015em; text-transform: uppercase; }
.hp-entry { font-size: 15px; line-height: 1.7; color: var(--hp-ink-2); }
.hp-entry img { max-width: 100%; height: auto; }
.hp-entry h2, .hp-entry h3 { text-transform: uppercase; letter-spacing: -.01em; line-height: 1.15; }
.hp-list { display: flex; flex-direction: column; gap: 0; }
.hp-list__item { padding: 18px 0; border-top: 1px solid var(--hp-line); }
.hp-list__item:last-child { border-bottom: 1px solid var(--hp-line); }
.hp-list__item h2 { margin: 0 0 6px; font-size: 18px; text-transform: uppercase; }
.hp-list__meta { font-size: 11px; font-weight: 600; letter-spacing: .16em; color: var(--hp-ink-3); text-transform: uppercase; }
.hp-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px;
  border: 1px solid var(--hp-ink); background: #FFFFFF; color: var(--hp-ink);
  font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; cursor: pointer;
}
.hp-btn:hover { background: var(--hp-ink); color: #FFFFFF; }
.hp-btn--accent { background: var(--hp-accent); border-color: var(--hp-accent); color: #FFFFFF; }
.hp-btn--accent:hover { background: #3546C4; border-color: #3546C4; color: #FFFFFF; }

.hp-footer {
  max-width: 720px; margin: 0 auto; padding: 0 20px 40px; box-sizing: border-box;
}
.hp-footer__box {
  background: #FFFFFF; border: 1px solid var(--hp-line); padding: 32px 22px;
  display: flex; flex-direction: column; gap: 20px;
}
.hp-footer__brand { font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.hp-footer__rows { display: flex; flex-direction: column; gap: 10px; font-size: 11px; font-weight: 500; line-height: 1.7; letter-spacing: .08em; color: var(--hp-muted); text-transform: uppercase; }
.hp-footer__rows span { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #EDEDEB; }
.hp-footer__rows span:last-child { border-bottom: 0; padding-bottom: 0; }
.hp-footer__rows b { color: var(--hp-ink); font-weight: 600; }
.hp-footer__copy { font-size: 10px; font-weight: 500; letter-spacing: .14em; color: #9AA0A8; text-transform: uppercase; }
.hp-footer__legal { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 11px; }
.hp-legal-links a, .hp-legal-row a { color: var(--hp-accent); text-decoration: underline; text-underline-offset: 2px; }
.hp-bct img { display: block; width: 120px; height: auto; }
.hp-legal-missing { background: #FFF3B0; color: #5C4A00; padding: 0 4px; border-radius: 3px; }
.hp-entry table { width: 100%; border-collapse: collapse; margin: 12px 0 18px; font-size: 14px; }
.hp-entry th, .hp-entry td { border: 1px solid #E3E5E8; padding: 8px 10px; text-align: left; vertical-align: top; }
.hp-entry th { background: #F4F5F7; font-weight: 600; }
.hp-entry a { color: var(--hp-accent); }

/* Thanh goi co dinh dung chung cho trang thuong */
.hp-callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-top: 1px solid #EDEDEB;
}
.hp-callbar a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 56px; background: var(--hp-accent); color: #FFFFFF; font-size: 14px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* FAQ (AEO/VSO) */
.hp-faq { margin-top: 40px; }
.hp-faq__item { border-top: 1px solid var(--hp-line); }
.hp-faq__item:last-child { border-bottom: 1px solid var(--hp-line); }
.hp-faq__q { cursor: pointer; padding: 16px 0; font-size: 16px; font-weight: 700; line-height: 1.35; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.hp-faq__q::-webkit-details-marker { display: none; }
.hp-faq__q::after { content: '+'; color: var(--hp-accent); font-weight: 700; flex: none; }
.hp-faq__item[open] .hp-faq__q::after { content: '−'; }
.hp-faq__a { padding: 0 0 18px; font-size: 15px; line-height: 1.7; color: var(--hp-ink-2); }
.hp-faq__a p { margin: 0 0 8px; }

/* Trang chi nhanh (Local SEO) */
.hp-branch__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 26px; margin-top: 8px; }
.hp-branch__info { display: flex; flex-direction: column; gap: 14px; }
.hp-branch__row { display: flex; flex-direction: column; gap: 4px; }
.hp-branch__label { font-size: 11px; font-weight: 700; letter-spacing: .2em; color: var(--hp-ink-3); text-transform: uppercase; }
.hp-branch__val { font-size: 17px; font-weight: 600; line-height: 1.5; }
.hp-branch__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.hp-branch__media { display: flex; flex-direction: column; gap: 12px; }
.hp-branch__photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hp-branch__photos img:first-child { grid-column: 1 / -1; aspect-ratio: 16/10; }
.hp-branch__photos img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--hp-line); }
.hp-branch__products { margin-top: 36px; }
.leaflet-container { font-family: 'Jost', system-ui, sans-serif; }

/* Trang chu 3D: cum nut goc phai — mobile xep doc de chu khong bi ep */
@media (max-width: 600px) {
  .hp-3d-actions { flex-direction: column !important; align-items: flex-end !important; gap: 6px !important; }
}
