/*
Theme Name: Chăm Táo Clinic
Theme URI: https://chamtao.com
Description: Theme riêng cho chamtao.com — "phòng khám táo", không phụ thuộc Flatsome
Author: Chăm Táo
Version: 2.0.0
Text Domain: chamtao
*/

/* ==========================================================================
   Design tokens — "phòng khám táo"
   ========================================================================== */
:root {
  --ct-teal: #14b8a6;
  --ct-teal-dark: #0d9488;
  --ct-teal-light: #e6f7f3;
  --ct-blue: #60a5fa;
  --ct-coral: #ff6b6b;
  --ct-coral-dark: #e8534f;
  --ct-ink: #1f2937;
  --ct-sub: #6b7280;
  --ct-cream: #fffdf9;
  --ct-bg: #f4faf8;
  --ct-line: #e2e8ef;
  --ct-radius: 20px;
  --ct-radius-lg: 28px;
  --font-head: "Baloo 2", "Be Vietnam Pro", -apple-system, sans-serif;
  --font-body: "Be Vietnam Pro", -apple-system, sans-serif;
}

/* ==========================================================================
   Reset nhẹ + base
   ========================================================================== */
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ct-ink);
  background: var(--ct-bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ct-teal-dark); text-decoration: none; }
a:hover { color: var(--ct-teal); }
ul { margin: 0; padding: 0; list-style: none; }
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ct-ink);
  margin: 0 0 10px;
}
.btn {
  display: inline-block;
  border-radius: 980px;
  padding: 13px 28px;
  font-weight: 700;
  font-size: 15px;
  font-family: var(--font-head);
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--ct-teal); color: #fff !important; box-shadow: 0 8px 20px rgba(20, 184, 166, 0.28); }
.btn-primary:hover { background: var(--ct-teal-dark); color: #fff !important; }
.btn-ghost {
  background: #fff;
  color: var(--ct-teal-dark) !important;
  border: 2px solid var(--ct-teal-light);
}
.btn-ghost:hover { border-color: var(--ct-teal); }

/* ==========================================================================
   Header
   ========================================================================== */
.ct-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 249, 0.88);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--ct-line);
}
.ct-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1180px;
  margin: 0 auto;
}
.ct-logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 20px; color: var(--ct-ink); }
.ct-logo img { height: 40px; width: auto; }
.ct-nav { display: none; gap: 26px; }
.ct-nav a { font-weight: 600; font-size: 15px; color: var(--ct-ink); }
.ct-nav a:hover { color: var(--ct-teal-dark); }
.ct-header-cta { display: none; }
.ct-menu-toggle {
  background: var(--ct-teal-light);
  border: none;
  border-radius: 14px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ct-menu-toggle svg { width: 22px; height: 22px; color: var(--ct-teal-dark); }
@media (min-width: 900px) {
  .ct-nav { display: flex; }
  .ct-header-cta { display: inline-block; }
  .ct-menu-toggle { display: none; }
}

.ct-mobile-nav {
  display: none;
  position: fixed; inset: 0;
  background: var(--ct-cream);
  z-index: 200;
  padding: 20px;
  overflow-y: auto;
}
.ct-mobile-nav.is-open { display: block; }
.ct-mobile-nav-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.ct-mobile-nav a {
  display: block;
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 700;
  padding: 14px 4px;
  border-bottom: 1px solid var(--ct-line);
  color: var(--ct-ink);
}
.ct-close-toggle {
  background: var(--ct-teal-light); border: none; border-radius: 14px;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
}
.ct-close-toggle svg { width: 20px; height: 20px; color: var(--ct-teal-dark); }

/* ==========================================================================
   Hero — "phòng khám táo"
   ========================================================================== */
.ct-hero {
  background: radial-gradient(ellipse at 30% 20%, #d9f5ee 0%, var(--ct-bg) 55%);
  padding: 50px 0 10px;
  overflow: hidden;
}
.ct-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}
@media (min-width: 900px) {
  .ct-hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 40px; }
}
.ct-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: 980px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ct-teal-dark);
  margin-bottom: 18px;
}
.ct-eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ct-coral); animation: ct-pulse 1.6s infinite; }
@keyframes ct-pulse { 0%,100%{opacity:1} 50%{opacity:.3} }
.ct-hero h1 {
  font-size: clamp(32px, 6vw, 54px);
  line-height: 1.12;
  margin-bottom: 16px;
}
.ct-hero h1 .ct-accent { color: var(--ct-teal); }
.ct-hero p.lead {
  font-size: 17px;
  color: var(--ct-sub);
  max-width: 480px;
  margin-bottom: 26px;
}
.ct-hero .ct-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.ct-hero-art { text-align: center; }
.ct-hero-art img {
  max-width: 420px;
  margin: 0 auto;
  filter: drop-shadow(0 24px 40px rgba(20, 184, 166, 0.18));
}

/* USP strip */
.ct-usp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 30px 0 10px;
}
@media (min-width: 900px) { .ct-usp { grid-template-columns: repeat(4, 1fr); } }
.ct-usp-item {
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  padding: 18px;
  text-align: center;
}
.ct-usp-item svg { width: 28px; height: 28px; color: var(--ct-teal); margin-bottom: 8px; }
.ct-usp-item strong { display: block; font-family: var(--font-head); font-size: 14px; margin-bottom: 3px; }
.ct-usp-item span { font-size: 12.5px; color: var(--ct-sub); }

/* ==========================================================================
   Section chung
   ========================================================================== */
.ct-sec { padding: 46px 0; }
.ct-sec-head { margin-bottom: 22px; }
.ct-sec-head h2 { font-size: clamp(24px, 4vw, 34px); }
.ct-sec-head p { color: var(--ct-sub); font-size: 15.5px; margin: 0; }

/* Lưới "khoa khám" = danh mục */
.ct-depts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 900px) { .ct-depts { grid-template-columns: repeat(3, 1fr); } }
.ct-dept {
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: 22px;
  display: block;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.ct-dept:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(20,184,166,0.14); border-color: var(--ct-teal-light); }
.ct-dept .ico {
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--ct-teal-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.ct-dept .ico svg { width: 24px; height: 24px; color: var(--ct-teal-dark); }
.ct-dept strong { display: block; font-family: var(--font-head); font-size: 16px; }
.ct-dept span { font-size: 12.5px; color: var(--ct-sub); }

/* Bác sĩ táo — về chúng tôi mini */
.ct-doctor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: 28px;
}
@media (min-width: 900px) { .ct-doctor { grid-template-columns: 220px 1fr; padding: 34px; } }
.ct-doctor img { border-radius: var(--ct-radius); }
.ct-doctor h3 { font-size: 22px; }
.ct-doctor p { color: var(--ct-sub); font-size: 15px; }

/* ==========================================================================
   Sản phẩm — card + loop
   ========================================================================== */
ul.products {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (min-width: 700px) { ul.products { grid-template-columns: repeat(3, 1fr) !important; } }
@media (min-width: 1000px) { ul.products { grid-template-columns: repeat(4, 1fr) !important; } }
ul.products li.product {
  list-style: none;
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius);
  padding: 14px;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  /* đè mọi width/float/margin cũ WooCommerce có thể chèn qua class columns-N */
  width: auto !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
}
ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(20,184,166,0.12); }
ul.products li.product a.woocommerce-LoopProduct-link { display: block; }
ul.products li.product img {
  border-radius: 14px;
  background: var(--ct-teal-light);
  aspect-ratio: 1/1;
  object-fit: contain;
  padding: 10px;
  mix-blend-mode: multiply;
}
ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--font-head);
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ct-ink);
  margin: 10px 0 4px;
  line-height: 1.3;
}
ul.products li.product .price {
  font-weight: 800;
  color: var(--ct-teal-dark);
  font-size: 15px;
}
ul.products li.product .price del { color: var(--ct-sub); font-weight: 400; opacity: .7; }
.ct-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 980px;
  background: var(--ct-teal-light);
  color: var(--ct-teal-dark);
  margin-bottom: 6px;
}
.ct-status.ct-status-new { background: #e6f9ec; color: #1d9d4e; }
.ct-status.ct-status-cu { background: #fff3e0; color: #b26a00; }
.woocommerce-loop-product__link .button,
ul.products li.product .add_to_cart_button,
ul.products li.product .added_to_cart { display: none !important; }

/* ==========================================================================
   Trang sản phẩm đơn
   ========================================================================== */
.woocommerce-breadcrumb {
  font-size: 12.5px;
  color: var(--ct-sub);
  padding: 16px 0 6px;
}
.woocommerce-breadcrumb a { color: var(--ct-sub); }
.product_title {
  font-size: clamp(22px, 4vw, 30px);
  line-height: 1.2;
}
.woocommerce div.product .price {
  font-size: 24px;
  font-weight: 800;
  color: var(--ct-teal-dark);
  font-family: var(--font-head);
}
.woocommerce div.product .woocommerce-product-gallery {
  background: var(--ct-teal-light);
  border-radius: var(--ct-radius-lg);
  padding: 20px;
}
.woocommerce div.product .woocommerce-product-gallery img { mix-blend-mode: multiply; }
.single_add_to_cart_button, a.add_to_cart_button, a.ajax_add_to_cart { display: none !important; }

.ct-colors { margin: 16px 0 6px; }
.ct-colors .ct-colors-label { font-size: 13px; font-weight: 700; margin-right: 10px; }
.ct-swatch {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  margin: 0 6px 6px 0; vertical-align: middle;
  border: 1px solid rgba(0,0,0,.12); box-shadow: inset 0 0 0 2px #fff;
}

.ct-specs {
  background: #fff;
  border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius-lg);
  padding: 22px;
  margin: 28px 0;
}
.ct-specs h3 { font-size: 18px; margin-bottom: 12px; }
.ct-specs table { width: 100%; border: 0; }
.ct-specs td { border: 0; border-bottom: 1px solid var(--ct-line); padding: 11px 6px; font-size: 14px; }
.ct-specs tr:last-child td { border-bottom: 0; }
.ct-specs td:first-child { color: var(--ct-sub); width: 38%; font-weight: 600; }

.ct-buy { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 6px; }
.ct-buy a { flex: 1 1 150px; text-align: center; }
.ct-note { font-size: 13px; color: var(--ct-sub); }

.ct-mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99;
  display: flex; gap: 10px; align-items: center;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,253,249,.92);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--ct-line);
}
.ct-mobile-bar .price { flex: 1; font-family: var(--font-head); font-weight: 800; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 900px) { .ct-mobile-bar { display: none; } }

/* ==========================================================================
   Danh mục / shop archive
   ========================================================================== */
.woocommerce-products-header__title { font-size: 26px; }
.woocommerce-result-count { font-size: 13px; color: var(--ct-sub); margin: 0 0 16px; }
.woocommerce-ordering { margin: 0 0 20px; }
.woocommerce-ordering select {
  font-size: 13px; color: var(--ct-ink); background: #fff;
  border: 1px solid var(--ct-line); border-radius: 12px; padding: 8px 12px;
}
.woocommerce-products-header {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 10px; margin-bottom: 6px;
}

/* Phân trang — WooCommerce mặc định đã bị gỡ (theme tự lo toàn bộ), cần layout riêng */
nav.woocommerce-pagination { margin: 34px 0 10px; }
nav.woocommerce-pagination ul.page-numbers {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 8px; list-style: none; margin: 0; padding: 0;
}
nav.woocommerce-pagination .page-numbers li { list-style: none; }
nav.woocommerce-pagination .page-numbers li span,
nav.woocommerce-pagination .page-numbers li a {
  display: flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 8px;
  border: 1px solid var(--ct-line); border-radius: 980px !important;
  font-size: 13.5px; font-weight: 600; color: var(--ct-ink); background: #fff;
}
nav.woocommerce-pagination .page-numbers li a:hover { border-color: var(--ct-teal); color: var(--ct-teal-dark); }
nav.woocommerce-pagination .page-numbers li .current {
  background: var(--ct-teal) !important; border-color: var(--ct-teal) !important; color: #fff;
}
nav.woocommerce-pagination .page-numbers li .dots { border: none; background: none; }

/* Dark CTA cuối trang */
.ct-dark {
  background: linear-gradient(135deg, #0f766e, #134e4a);
  border-radius: var(--ct-radius-lg);
  color: #f0fdfa;
  text-align: center;
  padding: 50px 24px;
}
.ct-dark h2 { color: #f0fdfa; }
.ct-dark p { color: #99f6e4; max-width: 520px; margin: 8px auto 22px; }

/* Reveal khi cuộn */
.ct-reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.ct-reveal.ct-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ct-reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.ct-footer { background: #fff; border-top: 1px solid var(--ct-line); margin-top: 50px; padding: 40px 0 20px; }
.ct-footer-grid { display: grid; grid-template-columns: 1fr; gap: 26px; margin-bottom: 26px; }
@media (min-width: 700px) { .ct-footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.ct-footer h4 { font-family: var(--font-head); font-size: 14px; margin-bottom: 12px; }
.ct-footer a, .ct-footer p { font-size: 13.5px; color: var(--ct-sub); }
.ct-footer li { margin-bottom: 8px; }
.ct-footer-bottom { border-top: 1px solid var(--ct-line); padding-top: 16px; font-size: 12px; color: var(--ct-sub); text-align: center; }
