/* =====================================================
   MEI BEDDING — content.css
   Styles for content pages (About / Contact / Policy / FAQ).
   Ported from hifi-v2.css sections 38, 39, 40 + about-hero/about-section/about-* + .input/.select/.textarea form basics.
   Loaded conditionally by enqueue.php khi is_page_template('page-templates/template-{about,contact,policy,faq}.php').
   ===================================================== */

/* ---------- Form basics (input/select/textarea) — for contact form ---------- */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color var(--t-fast) var(--ease);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.textarea { resize: vertical; min-height: 80px; }

/* ---------- About — hero / story / commitments / CTA ---------- */
.about-hero {
  background: var(--bone-soft);
  padding: var(--sp-8) 0;
  margin-bottom: var(--sp-7);
}
.about-hero-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.about-hero-eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--ink-soft);
  display: inline-block;
  margin-bottom: var(--sp-3);
}
.about-hero-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
}
@media (min-width: 1024px) {
  .about-hero-title { font-size: 44px; }
}
.about-hero-sub {
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 560px;
  margin: 0 auto;
}
.about-section {
  padding: var(--sp-7) var(--gutter);
}
.about-section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  text-align: center;
  margin-bottom: var(--sp-6);
  color: var(--ink);
}
.about-story {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: center;
}
@media (min-width: 1024px) {
  .about-story { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
}
.about-story-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bone-soft);
}
.about-story-img img { width: 100%; height: 100%; object-fit: cover; }
.about-story-text h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: var(--sp-4);
  color: var(--ink);
}
.about-story-text p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: var(--sp-3);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}
@media (min-width: 768px) {
  .about-grid { grid-template-columns: repeat(3, 1fr); }
}
.about-card {
  text-align: center;
  padding: var(--sp-6) var(--sp-4);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.about-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--sp-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bone-soft);
  color: var(--ink);
}
.about-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: var(--sp-2);
  color: var(--ink);
}
.about-card p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.about-cta {
  background: var(--ink);
  color: var(--white);
  padding: var(--sp-8) 0;
  text-align: center;
  margin-top: var(--sp-7);
}
.about-cta h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 400;
  margin-bottom: var(--sp-3);
  color: var(--white);
}
.about-cta p {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin-bottom: var(--sp-5);
}
.about-cta-actions {
  display: inline-flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  justify-content: center;
}
/* FIX: :visited state từ base.css (a.btn--filled:visited spec 0,0,2,1) đè color
   của .about-cta .btn--filled (spec 0,0,2,0) → text invisible. Phải dùng selector
   cùng spec hoặc cao hơn. */
.about-cta .btn--filled,
.about-cta a.btn--filled,
.about-cta a.btn--filled:visited {
  background: var(--white);
  color: var(--ink);
}
.about-cta .btn--filled:hover,
.about-cta a.btn--filled:hover { background: var(--bone-soft); color: var(--ink); }
.about-cta .btn--outline,
.about-cta a.btn--outline,
.about-cta a.btn--outline:visited {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.about-cta .btn--outline:hover,
.about-cta a.btn--outline:hover {
  background: var(--white);
  color: var(--ink);
}

/* ---------- Page hero (small banner used across content pages) ---------- */
/* Already in cart-checkout.css; duplicate here so pages not loading cart-checkout get them. */
.page-hero {
  background: var(--bone-soft);
  padding: var(--sp-7) 0 var(--sp-6);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  margin-bottom: var(--sp-3);
}
.page-hero p {
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 auto;
}
@media (min-width: 1024px) {
  .page-hero { padding: var(--sp-8) 0 var(--sp-7); }
  .page-hero h1 { font-size: 40px; }
}
.page-section { padding: var(--sp-7) 0; }
@media (min-width: 1024px) { .page-section { padding: var(--sp-8) 0; } }
.page-section h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  margin-bottom: var(--sp-4);
}
.page-section h3 {
  font-size: 16px;
  margin: var(--sp-5) 0 var(--sp-3);
}
.page-section p, .page-section li { color: var(--ink-soft); line-height: 1.7; }
.page-section p { margin-bottom: var(--sp-4); }
.page-section ul { padding-left: var(--sp-5); margin-bottom: var(--sp-4); }
.page-section ul li { list-style: disc; margin-bottom: var(--sp-2); }

/* Form layout helpers — for contact form */
.form-row { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: var(--sp-4); }
@media (min-width: 640px) {
  .form-row--2 { grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
}
.form-label { display: block; font-size: 12px; font-weight: 500; margin-bottom: var(--sp-2); color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 1024px) {
  .contact-layout { grid-template-columns: 1fr 1.4fr; gap: var(--sp-6); }
}
.contact-info-list { display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-info-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.contact-info-item svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--ink); }
.contact-info-item h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; color: var(--muted); }
.contact-info-item p, .contact-info-item a { font-size: 14px; color: var(--ink); }
.contact-map { margin-top: var(--sp-6); border-radius: var(--radius-lg); overflow: hidden; background: var(--bone-soft); aspect-ratio: 21/9; }
.contact-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Toast notification — fixed top-right, slide-in, auto-dismiss qua JS */
.mei-toast {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 420px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
  font-size: 14px;
  line-height: 1.4;
  animation: meiToastSlideIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mei-toast--hide {
  animation: meiToastSlideOut 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
.mei-toast--success { border-left: 4px solid #2e7d32; }
.mei-toast--success .mei-toast-icon { color: #2e7d32; }
.mei-toast--error   { border-left: 4px solid #c62828; }
.mei-toast--error .mei-toast-icon { color: #c62828; }
.mei-toast-icon {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mei-toast-message { flex: 1; color: var(--ink); }
.mei-toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--t-fast) var(--ease);
}
.mei-toast-close:hover { background: var(--bone-soft); color: var(--ink); }

@keyframes meiToastSlideIn {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes meiToastSlideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(120%); opacity: 0; }
}

/* Mobile: full-width toast trên đỉnh */
@media (max-width: 600px) {
  .mei-toast {
    top: 12px;
    right: 12px;
    left: 12px;
    min-width: auto;
    max-width: none;
  }
}

/* ---------- Policy (tabs) ---------- */
.policy-tabs {
  display: flex;
  gap: var(--sp-3);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-5);
  overflow-x: auto;
}
.policy-tab {
  padding: var(--sp-3) var(--sp-4);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.policy-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.policy-panel { display: none; }
.policy-panel.active { display: block; }
.policy-panel table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-4) 0;
  font-size: 13px;
}
.policy-panel th, .policy-panel td {
  padding: var(--sp-3);
  text-align: left;
  border: 1px solid var(--line);
}
.policy-panel th { background: var(--bone-soft); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-chips {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.faq-chip {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-soft);
  background: var(--white);
  cursor: pointer;
  font-family: inherit;
}
.faq-chip:hover { border-color: var(--ink); }
.faq-chip.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq-list { display: flex; flex-direction: column; gap: var(--sp-2); max-width: 880px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  padding: var(--sp-4);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  background: var(--white);
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.faq-q:hover { background: var(--bone-soft); }
.faq-q-arrow { transition: transform var(--t-fast) var(--ease); }
.faq-item.open .faq-q-arrow { transform: rotate(180deg); }
.faq-a {
  padding: 0 var(--sp-4) var(--sp-4);
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.7;
  display: none;
}
.faq-item.open .faq-a { display: block; }
.faq-item.hidden-by-filter { display: none; }
.faq-footer {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--bone-soft);
  border-radius: var(--radius-lg);
  text-align: center;
}
