/*
Theme Name: Chăm Táo
Theme URI: https://chamtao.com
Description: Child theme Flatsome cho chamtao.com — phong cách Apple, mobile-first
Author: Chăm Táo
Template: flatsome
Version: 1.0.0
*/

/* ==========================================================================
   Design tokens — Apple-like
   ========================================================================== */
:root {
  --ct-blue: #0071e3;
  --ct-blue-hover: #0077ed;
  --ct-ink: #1d1d1f;
  --ct-sub: #6e6e73;
  --ct-gray: #f5f5f7;
  --ct-line: #d2d2d7;
  --ct-green: #34c759;
  --ct-radius: 18px;
  --ct-radius-lg: 28px;
}

/* ==========================================================================
   Base typography
   ========================================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ct-ink);
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  background: #fff;
}
h1, h2, h3, h4, h5, h6, .heading-font {
  font-family: inherit !important;
  color: var(--ct-ink);
  font-weight: 700;
  letter-spacing: -0.022em;
  text-transform: none !important;
}
p { color: var(--ct-ink); }
a { color: var(--ct-blue); }
a:hover { color: var(--ct-blue-hover); }

/* ==========================================================================
   Header — glass blur, kiểu Apple nav
   ========================================================================== */
.header-wrapper,
.header-main,
.header-bottom {
  background: rgba(255, 255, 255, 0.72) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.header-wrapper { box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }
.stuck .header-main { box-shadow: none; }
.header-main .nav > li > a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--ct-ink);
}
.header-main .nav > li > a:hover { color: var(--ct-blue); }
.nav-dropdown {
  border: 0 !important;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  padding: 14px;
}
.header .cart-item, .header .account-item, .header .wishlist-item { display: none !important; }

/* ==========================================================================
   Buttons — pill Apple
   ========================================================================== */
.button, button, input[type="submit"] {
  border-radius: 980px !important;
  text-transform: none !important;
  letter-spacing: -0.01em;
  font-weight: 500;
  box-shadow: none;
}
.button.primary, .button.checkout, .single_add_to_cart_button {
  background-color: var(--ct-blue) !important;
}
.button.primary:hover { background-color: var(--ct-blue-hover) !important; }
.button.secondary, .button.is-outline {
  border: 1px solid var(--ct-blue);
  color: var(--ct-blue) !important;
  background: transparent !important;
}

/* ==========================================================================
   Product card — tile xám kiểu Apple Store
   ========================================================================== */
.product-small .box-image {
  background: var(--ct-gray);
  border-radius: var(--ct-radius);
  padding: 18px;
}
.product-small .box-image img {
  mix-blend-mode: multiply;
  border-radius: 8px;
}
.product-small .box {
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.35s;
  border-radius: var(--ct-radius);
}
.product-small .box:hover {
  transform: translateY(-4px);
}
.product-small .box-text { padding-top: 12px; }
.product-small .name a {
  font-size: 15px;
  font-weight: 600;
  color: var(--ct-ink);
  letter-spacing: -0.016em;
  line-height: 1.35;
}
.product-small .name a:hover { color: var(--ct-blue); }
.price, .price .amount {
  color: var(--ct-ink);
  font-weight: 600;
  font-size: 15px;
}
.price del .amount { color: var(--ct-sub); font-weight: 400; }
.woocommerce-Price-currencySymbol { font-size: 0.85em; }
.badge-container .badge, .callout.badge {
  border-radius: 980px;
}

/* Badge tình trạng máy (NEW / Like New / Openbox) */
.ct-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 980px;
  background: #e8f2ff;
  color: var(--ct-blue);
  margin-bottom: 6px;
}
.ct-status.ct-status-new { background: #e6f9ec; color: #1d9d4e; }
.ct-status.ct-status-cu { background: #fff3e0; color: #b26a00; }

/* ==========================================================================
   Trang sản phẩm
   ========================================================================== */
.product-title {
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.product-info .price {
  font-size: 24px;
  font-weight: 700;
}
.product-info { padding-top: 8px; }
.woocommerce-breadcrumb {
  font-size: 12px;
  color: var(--ct-sub);
  text-transform: none;
}
.woocommerce-breadcrumb a { color: var(--ct-sub); }

/* Swatch màu */
.ct-colors { margin: 14px 0 6px; }
.ct-colors .ct-colors-label {
  font-size: 13px;
  font-weight: 600;
  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, 0.12);
  box-shadow: inset 0 0 0 2px #fff;
}

/* Bảng thông số kỹ thuật */
.ct-specs {
  background: var(--ct-gray);
  border-radius: var(--ct-radius-lg);
  padding: 22px;
  margin: 30px 0;
}
.ct-specs h3 {
  font-size: 19px;
  margin-bottom: 14px;
}
.ct-specs table { margin: 0; border: 0; background: transparent; }
.ct-specs td {
  border: 0;
  border-bottom: 1px solid var(--ct-line);
  padding: 11px 8px;
  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: 500;
}

/* CTA liên hệ trên trang sản phẩm */
.ct-buy {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}
.ct-buy a {
  flex: 1 1 140px;
  text-align: center;
  padding: 13px 22px;
  border-radius: 980px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}
.ct-buy .ct-buy-call { background: var(--ct-blue); color: #fff; }
.ct-buy .ct-buy-call:hover { background: var(--ct-blue-hover); color: #fff; }
.ct-buy .ct-buy-zalo {
  border: 1px solid var(--ct-blue);
  color: var(--ct-blue);
}
.ct-note {
  font-size: 13px;
  color: var(--ct-sub);
  margin-top: 4px;
}

/* Thanh CTA dính đáy — mobile */
.ct-mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99;
  display: flex;
  gap: 8px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.08);
}
.ct-mobile-bar .ct-mb-price {
  flex: 1;
  font-weight: 700;
  font-size: 16px;
  align-self: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-mobile-bar a {
  background: var(--ct-blue);
  color: #fff;
  border-radius: 980px;
  padding: 11px 22px;
  font-weight: 600;
  font-size: 15px;
}
@media (min-width: 850px) { .ct-mobile-bar { display: none; } }

/* ==========================================================================
   Trang chủ — hero + sections (class ct-*)
   ========================================================================== */
.ct-hero {
  text-align: center;
  padding: 84px 22px 72px;
  color: #f5f5f7;
  position: relative;
  overflow: hidden;
}
.ct-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 120%;
  background: radial-gradient(ellipse at 50% 100%,
    rgba(0, 113, 227, 0.55) 0%, rgba(94, 92, 230, 0.35) 35%, rgba(0, 0, 0, 0) 70%);
  pointer-events: none;
}
.ct-hero > * { position: relative; }
.ct-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #86868b;
  margin-bottom: 14px;
}
.ct-hero h1 {
  color: #f5f5f7;
  font-size: clamp(40px, 9vw, 84px);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}
.ct-grad {
  background: linear-gradient(90deg, #0a84ff, #64d2ff 55%, #30d158);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.ct-hero .ct-sub {
  color: #a1a1a6;
  font-size: clamp(17px, 2.6vw, 22px);
  max-width: 620px;
  margin: 0 auto 30px;
  line-height: 1.45;
}
.ct-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.ct-hero-img {
  display: block;
  width: min(880px, 94%);
  margin: 46px auto -16px;
  filter: drop-shadow(0 30px 60px rgba(10, 132, 255, 0.22));
}
.ct-btn {
  display: inline-block;
  background: var(--ct-blue);
  color: #fff !important;
  border-radius: 980px;
  padding: 14px 30px;
  font-size: 16px;
  font-weight: 600;
}
.ct-btn:hover { background: var(--ct-blue-hover); }
.ct-btn-ghost {
  background: transparent;
  border: 1px solid #86868b;
  color: #f5f5f7 !important;
}
.ct-btn-ghost:hover { border-color: #f5f5f7; background: transparent; }

/* Section chung */
.ct-sec { padding: 56px 0 30px; }
.ct-sec h2, .ct-h2 {
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: -0.025em;
  margin-bottom: 8px;
}
.ct-sec .ct-lead { color: var(--ct-sub); font-size: 17px; margin-bottom: 26px; }

/* Lưới danh mục */
.ct-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 850px) { .ct-cats { grid-template-columns: repeat(3, 1fr); } }
.ct-cat {
  background: var(--ct-gray);
  border-radius: var(--ct-radius-lg);
  padding: 26px 22px;
  display: block;
  color: var(--ct-ink) !important;
  transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.35s;
}
.ct-cat:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
}
.ct-cat svg { width: 34px; height: 34px; margin-bottom: 14px; color: var(--ct-blue); }
.ct-cat strong { display: block; font-size: 17px; letter-spacing: -0.02em; }
.ct-cat span { font-size: 13px; color: var(--ct-sub); }

/* USP strip */
.ct-usp {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  padding: 10px 0 20px;
}
@media (min-width: 850px) { .ct-usp { grid-template-columns: repeat(4, 1fr); } }
.ct-usp div { text-align: center; padding: 8px; }
.ct-usp svg { width: 30px; height: 30px; color: var(--ct-blue); margin-bottom: 10px; }
.ct-usp strong { display: block; font-size: 15px; margin-bottom: 4px; letter-spacing: -0.01em; }
.ct-usp span { font-size: 13px; color: var(--ct-sub); line-height: 1.4; }

/* Dark CTA cuối trang */
.ct-dark {
  background: #000;
  border-radius: var(--ct-radius-lg);
  color: #f5f5f7;
  text-align: center;
  padding: 56px 26px;
}
.ct-dark h2 { color: #f5f5f7; }
.ct-dark p { color: #a1a1a6; max-width: 560px; margin: 8px auto 24px; }

/* Reveal on scroll */
.ct-reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.1, 0.25, 1), transform 0.7s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.ct-reveal.ct-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ct-reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Footer tối
   ========================================================================== */
.footer-wrapper, .absolute-footer, footer.footer {
  background-color: #f5f5f7 !important;
}
.absolute-footer, .absolute-footer.dark {
  color: var(--ct-sub);
  font-size: 12px;
  padding: 18px 0;
}
.footer-widgets { border-top: 1px solid var(--ct-line); }
.footer-widgets, .footer-widgets p, .footer-widgets li a { color: var(--ct-sub); font-size: 13px; }
.footer-widgets .widget-title { color: var(--ct-ink); font-size: 13px; text-transform: none; }

/* ==========================================================================
   Woo tinh chỉnh nhỏ
   ========================================================================== */
.woocommerce-result-count, .woocommerce-ordering select { font-size: 13px; color: var(--ct-sub); }
.shop-page-title.featured-title { display: none; }
.page-title-inner h1 { letter-spacing: -0.025em; }
ul.page-numbers .page-number, .page-numbers > li > * {
  border-radius: 980px !important;
}
.widget_price_filter, .woocommerce-tabs .tabs { text-transform: none; }
img { max-width: 100%; height: auto; }
