/*
Theme Name: Cầm Đồ Hoàng Tiến Phát
Theme URI: https://example.com/
Author: Cầm Đồ Hoàng Tiến Phát
Description: Theme website cho tiệm Cầm Đồ Hoàng Tiến Phát — trang chủ giới thiệu dịch vụ, bảng lãi suất, công cụ tính lãi, quy trình, hỏi đáp, bản đồ liên hệ, nút gọi / Zalo nổi trên điện thoại. Kết nối với plugin "Quản Lý Cầm Đồ" để lấy thông tin tiệm và vào app quản lý.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: tyly
Tags: one-column, custom-menu, custom-logo, theme-options, translation-ready
*/

:root {
  --t-bg: #fbf8f1;
  --t-surface: #ffffff;
  --t-cream: #f4ecd9;
  --t-ink: #1a2133;
  --t-ink-2: #3b4357;
  --t-muted: #6b7183;
  --t-line: #e7e0cf;
  --t-navy: #15213b;
  --t-navy-2: #1f2f52;
  --t-gold: #c08a1e;
  --t-gold-2: #e3b14b;
  --t-gold-soft: #f7ebcf;
  --t-red: #b5332a;
  --t-green: #1d7d52;
  --t-radius: 14px;
  --t-font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-display: "Lora", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --t-bg: #12151c; --t-surface: #1a1e28; --t-cream: #211f1a; --t-ink: #ece9e1; --t-ink-2: #cbc7bd; --t-muted: #9a9789;
    --t-line: #2e3240; --t-navy: #0d1424; --t-navy-2: #18233e; --t-gold: #e3b14b; --t-gold-soft: #3a3019; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --t-bg: #12151c; --t-surface: #1a1e28; --t-cream: #211f1a; --t-ink: #ece9e1; --t-ink-2: #cbc7bd; --t-muted: #9a9789;
  --t-line: #2e3240; --t-navy: #0d1424; --t-navy-2: #18233e; --t-gold: #e3b14b; --t-gold-soft: #3a3019; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--t-bg); color: var(--t-ink); font: 16px/1.65 var(--t-font); }
img { max-width: 100%; height: auto; }
a { color: var(--t-gold); }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--t-ink); }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto; clip: auto; background: #fff; color: #000; padding: 8px 14px; }
.ty-wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ty-ic { width: 20px; height: 20px; flex: none; }

/* ---------- buttons ---------- */
.ty-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 11px; font: 700 15.5px/1.2 var(--t-font); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .1s, filter .15s, background .15s; white-space: nowrap; }
.ty-btn:hover { filter: brightness(1.06); }
.ty-btn:active { transform: translateY(1px); }
.ty-btn-gold { background: linear-gradient(140deg, var(--t-gold-2), var(--t-gold)); color: #1c1406; box-shadow: 0 6px 18px rgba(192,138,30,.28); }
.ty-btn-navy { background: var(--t-navy); color: #fff; }
.ty-btn-line { border-color: currentColor; color: inherit; background: transparent; }
.ty-btn-zalo { background: #0068ff; color: #fff; }
.ty-btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 9px; }

/* ---------- topbar & header ---------- */
.ty-topbar { background: var(--t-navy); color: #c8cede; font-size: 13.5px; }
.ty-topbar .ty-wrap { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.ty-topbar a { color: #f1cd7d; text-decoration: none; font-weight: 600; }
.ty-topbar span { display: inline-flex; align-items: center; gap: 6px; }
.ty-topbar .ty-ic { width: 15px; height: 15px; }
.ty-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--t-bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--t-line); }
.ty-header .ty-wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.ty-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--t-ink); margin-right: auto; }
.ty-brand img { max-height: 48px; width: auto; }
.ty-mark { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(140deg, var(--t-gold-2), #a8740f); color: #1c1406; font: 700 15px/1 var(--t-display); letter-spacing: .3px; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }
.ty-brand-txt b { display: block; font: 700 19px/1.1 var(--t-display); letter-spacing: .2px; }
.ty-brand-txt small { color: var(--t-muted); font-size: 12.5px; }
.ty-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.ty-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--t-ink-2); text-decoration: none; font-weight: 600; font-size: 15px; }
.ty-nav a:hover, .ty-nav .current-menu-item > a { color: var(--t-ink); background: var(--t-gold-soft); }
.ty-head-cta { display: flex; gap: 8px; align-items: center; }
.ty-login { color: var(--t-muted); font-size: 13.5px; text-decoration: none; font-weight: 600; padding: 8px 6px; }
.ty-login:hover { color: var(--t-ink); }
.ty-burger { display: none; background: none; border: 0; padding: 8px; color: var(--t-ink); cursor: pointer; }

/* ---------- hero ---------- */
.ty-hero { position: relative; overflow: hidden; background: var(--t-navy); color: #e6e9f2; }
.ty-hero::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(800px 420px at 85% 10%, rgba(227,177,75,.22), transparent 60%),
  radial-gradient(600px 400px at 0% 100%, rgba(42,63,110,.9), transparent 70%); }
.ty-hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .18; }
.ty-hero .ty-wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 48px; align-items: center; padding: 72px 0 80px; }
.ty-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px; border-radius: 999px; background: rgba(227,177,75,.14); color: #f1cd7d; font-weight: 600; font-size: 13.5px; margin-bottom: 18px; }
.ty-hero h1 { color: #fff; font: 700 clamp(34px, 5vw, 56px)/1.08 var(--t-display); letter-spacing: -.5px; margin-bottom: 18px; }
.ty-hero h1 em { font-style: normal; color: var(--t-gold-2); }
.ty-hero-lead { font-size: 18px; color: #c9cfdd; max-width: 560px; margin-bottom: 24px; }
.ty-checks { list-style: none; padding: 0; margin: 0 0 30px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
.ty-checks li { display: flex; gap: 9px; align-items: flex-start; font-weight: 500; }
.ty-checks .ty-ic { color: var(--t-gold-2); margin-top: 3px; }
.ty-hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.ty-hero .ty-btn-line { color: #fff; border-color: rgba(255,255,255,.35); }

/* ---------- calculator card ---------- */
.ty-calc { background: var(--t-surface); color: var(--t-ink); border-radius: 18px; padding: 26px; box-shadow: 0 30px 70px rgba(0,0,0,.35); }
.ty-calc h2 { font: 700 21px/1.2 var(--t-display); margin-bottom: 4px; }
.ty-calc > p { color: var(--t-muted); font-size: 14px; margin-bottom: 18px; }
.ty-calc label { display: block; font-size: 13.5px; font-weight: 600; color: var(--t-ink-2); margin-bottom: 6px; }
.ty-calc .ty-row { margin-bottom: 14px; }
.ty-in { width: 100%; font: inherit; color: var(--t-ink); background: var(--t-bg); border: 1.5px solid var(--t-line); border-radius: 10px; padding: 11px 13px; outline: none; }
.ty-in:focus { border-color: var(--t-gold); }
.ty-in-money { font-size: 20px; font-weight: 700; }
.ty-range { width: 100%; accent-color: var(--t-gold); }
.ty-range-lbl { display: flex; justify-content: space-between; font-size: 13px; color: var(--t-muted); }
.ty-range-lbl b { color: var(--t-ink); font-size: 15px; }
.ty-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ty-chip { border: 1px solid var(--t-line); background: var(--t-surface); padding: 4px 11px; border-radius: 999px; font: 600 13px var(--t-font); color: var(--t-ink-2); cursor: pointer; }
.ty-chip:hover { border-color: var(--t-gold); }
.ty-calc-out { background: var(--t-cream); border-radius: 12px; padding: 14px 16px; margin: 16px 0; display: grid; gap: 6px; font-size: 14.5px; }
.ty-calc-out div { display: flex; justify-content: space-between; gap: 10px; }
.ty-calc-out span { color: var(--t-muted); }
.ty-calc-total { border-top: 1px dashed var(--t-line); padding-top: 8px; margin-top: 2px; }
.ty-calc-total b { font-size: 22px; color: var(--t-gold); }
.ty-note { font-size: 12.5px; color: var(--t-muted); margin: 0; }

/* ---------- sections ---------- */
.ty-sec { padding: 84px 0; }
.ty-sec-alt { background: var(--t-surface); border-block: 1px solid var(--t-line); }
.ty-sec-head { max-width: 680px; margin-bottom: 40px; }
.ty-sec-head.center { text-align: center; margin-inline: auto; }
.ty-kicker { display: inline-block; color: var(--t-gold); font-weight: 700; font-size: 13.5px; letter-spacing: 1.2px; text-transform: uppercase; margin-bottom: 10px; }
.ty-sec h2 { font: 700 clamp(28px, 3.6vw, 40px)/1.15 var(--t-display); letter-spacing: -.3px; }
.ty-sec-head p { color: var(--t-muted); font-size: 17px; }

.ty-services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ty-svc { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: 22px 20px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.ty-sec-alt .ty-svc { background: var(--t-bg); }
.ty-svc:hover { border-color: var(--t-gold); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,25,40,.08); }
.ty-svc-ic { width: 50px; height: 50px; border-radius: 13px; background: var(--t-gold-soft); color: var(--t-gold); display: grid; place-items: center; margin-bottom: 14px; }
.ty-svc-ic .ty-ic { width: 26px; height: 26px; }
.ty-svc h3 { font-size: 17.5px; margin-bottom: 6px; }
.ty-svc p { color: var(--t-muted); font-size: 14.5px; margin: 0; }

.ty-why { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.ty-why-item { border-top: 2px solid var(--t-gold); padding-top: 18px; }
.ty-why-item h3 { font-size: 18px; }
.ty-why-item p { color: var(--t-muted); font-size: 15px; margin: 0; }

.ty-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; counter-reset: step; }
.ty-step { position: relative; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: 26px 20px 22px; }
.ty-sec-alt .ty-step { background: var(--t-bg); }
.ty-step::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; font: 700 34px/1 var(--t-display); color: var(--t-gold); margin-bottom: 14px; }
.ty-step h3 { font-size: 17.5px; margin-bottom: 6px; }
.ty-step p { color: var(--t-muted); font-size: 14.5px; margin: 0; }

.ty-rates { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 32px; align-items: start; }
.ty-table { width: 100%; border-collapse: collapse; background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; }
.ty-table th, .ty-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--t-line); }
.ty-table th { background: var(--t-navy); color: #fff; font-size: 14px; font-weight: 600; }
.ty-table tr:last-child td { border-bottom: 0; }
.ty-table td:last-child { font-weight: 700; color: var(--t-gold); white-space: nowrap; }
.ty-docs { background: var(--t-navy); color: #d3d8e4; border-radius: var(--t-radius); padding: 26px; }
.ty-docs h3 { color: #fff; font-size: 19px; }
.ty-docs ul { padding-left: 0; list-style: none; margin: 0 0 18px; display: grid; gap: 10px; }
.ty-docs li { display: flex; gap: 10px; }
.ty-docs .ty-ic { color: var(--t-gold-2); margin-top: 3px; }

.ty-faq { max-width: 820px; margin-inline: auto; display: grid; gap: 10px; }
.ty-faq details { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: 12px; padding: 0 20px; }
.ty-sec-alt .ty-faq details { background: var(--t-bg); }
.ty-faq summary { cursor: pointer; list-style: none; padding: 17px 0; font-weight: 700; display: flex; justify-content: space-between; gap: 14px; }
.ty-faq summary::-webkit-details-marker { display: none; }
.ty-faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--t-gold); transition: transform .2s; }
.ty-faq details[open] summary::after { transform: rotate(45deg); }
.ty-faq details p { color: var(--t-ink-2); padding-bottom: 16px; margin: 0; }

.ty-contact { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 28px; align-items: stretch; }
.ty-contact-card { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.ty-ci { display: flex; gap: 14px; }
.ty-ci-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--t-gold-soft); color: var(--t-gold); display: grid; place-items: center; flex: none; }
.ty-ci small { display: block; color: var(--t-muted); font-size: 13px; }
.ty-ci b, .ty-ci a { font-size: 16.5px; color: var(--t-ink); text-decoration: none; font-weight: 700; }
.ty-map { border-radius: var(--t-radius); overflow: hidden; border: 1px solid var(--t-line); min-height: 360px; background: var(--t-cream); }
.ty-map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

.ty-cta-band { background: linear-gradient(120deg, var(--t-navy), var(--t-navy-2)); color: #fff; border-radius: 20px; padding: 40px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.ty-cta-band h2 { color: #fff; margin: 0 0 6px; font: 700 30px/1.15 var(--t-display); }
.ty-cta-band p { color: #c9cfdd; margin: 0; }

/* ---------- footer ---------- */
.ty-footer { background: var(--t-navy); color: #b9c0d0; padding: 56px 0 24px; margin-top: 84px; font-size: 14.5px; }
.ty-footer .ty-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.ty-footer h4 { color: #fff; font-size: 15.5px; margin-bottom: 14px; }
.ty-footer a { color: #e2c37f; text-decoration: none; }
.ty-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.ty-footer .ty-brand { color: #fff; margin-bottom: 14px; }
.ty-footer .ty-brand-txt small { color: #9aa2b5; }
.ty-copy { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: #8c94a8; }

.ty-float { display: none; }

/* ---------- content pages ---------- */
.ty-page { padding: 56px 0; }
.ty-page-head { margin-bottom: 28px; }
.ty-page-head h1 { font: 700 clamp(30px, 4vw, 44px)/1.15 var(--t-display); }
.ty-content { max-width: 780px; }
.ty-content > * { max-width: 100%; }
.ty-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ty-post { background: var(--t-surface); border: 1px solid var(--t-line); border-radius: var(--t-radius); overflow: hidden; }
.ty-post-body { padding: 18px 20px; }
.ty-post h2 { font-size: 19px; }
.ty-post h2 a { color: var(--t-ink); text-decoration: none; }
.ty-post time { color: var(--t-muted); font-size: 13px; }
.ty-pagination { margin-top: 28px; display: flex; gap: 8px; }
.ty-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--t-line); border-radius: 8px; text-decoration: none; color: var(--t-ink); }
.ty-pagination .current { background: var(--t-navy); color: #fff; }
.alignwide { max-width: 1100px; } .alignfull { width: 100vw; margin-left: calc(50% - 50vw); }
.wp-caption-text, .wp-element-caption { color: var(--t-muted); font-size: 13.5px; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .ty-services, .ty-why, .ty-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ty-hero .ty-wrap { grid-template-columns: 1fr; gap: 36px; padding: 56px 0 64px; }
  .ty-rates, .ty-contact { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .ty-burger { display: inline-grid; }
  .ty-nav { position: fixed; inset: 72px 0 auto 0; background: var(--t-surface); border-bottom: 1px solid var(--t-line); padding: 10px 16px 16px; display: none; box-shadow: 0 20px 40px rgba(0,0,0,.12); }
  .ty-nav.open { display: block; }
  .ty-nav ul { flex-direction: column; }
  .ty-nav a { padding: 12px; font-size: 16px; }
  .ty-head-cta .ty-btn { display: none; }
  .ty-footer .ty-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .ty-topbar .ty-hide-m { display: none; }
  .ty-header .ty-wrap { height: 64px; gap: 10px; }
  html { scroll-padding-top: 72px; }
  .ty-nav { inset: 64px 0 auto 0; }
  .ty-mark { width: 40px; height: 40px; font-size: 13.5px; }
  .ty-brand, .ty-brand-txt { min-width: 0; }
  .ty-brand-txt b { font-size: 16.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ty-header .ty-brand-txt small { display: none; }
  .ty-header .ty-login { display: none; }
  .ty-checks { grid-template-columns: 1fr; }
  .ty-hero-cta .ty-btn { flex: 1; }
  .ty-sec { padding: 60px 0; }
  .ty-services, .ty-why, .ty-steps { grid-template-columns: 1fr; }
  .ty-calc { padding: 20px; }
  .ty-cta-band { padding: 28px 22px; }
  .ty-float { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--t-surface); border-top: 1px solid var(--t-line); box-shadow: 0 -6px 24px rgba(0,0,0,.08); }
  .ty-float .ty-btn { padding: 12px 10px; }
  .ty-footer { padding-bottom: 96px; }
}
