/*
Theme Name:   Flatsome Chill
Description:  Child theme cho Flatsome – tông sương sớm, xanh rêu nhạt, nhịp chậm và thoáng.
Author:       You
Template:     flatsome
Version:      1.0.3
Text Domain:  flatsome-chill
*/

/* ========== 1. Token màu & chữ ========== */
:root {
  --chill-mist:    #EEF3F1; /* nền sương sớm */
  --chill-surface: #FFFFFF;
  --chill-ink:     #1F3238; /* chữ xanh hồ sâu */
  --chill-muted:   #5E7378;
  --chill-moss:    #E31E24; /* màu chính - đỏ thương hiệu Tony English */
  --chill-moss-dk: #B8171C;
  --chill-leaf:    #F6D9D9; /* viền, nền nhẹ */
  --chill-sun:     #F0C27B; /* điểm nắng: badge, sale */
  --chill-radius-lg: 22px;
  --chill-radius-sm: 10px;
  --chill-font: "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Ghi đè biến màu của Flatsome 3.15+ */
  --fs-color-primary:   var(--chill-moss);
  --fs-color-secondary: var(--chill-sun);
  --fs-color-success:   var(--chill-moss);
  --primary-color:      var(--chill-moss);
}

/* ========== 2. Nền & typography ========== */
body {
  background: var(--chill-mist);
  color: var(--chill-ink);
  font-family: var(--chill-font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6,
.heading-font, .nav > li > a, .button, .price {
  font-family: var(--chill-font);
  color: var(--chill-ink);
  letter-spacing: -0.01em;
}
h1 { font-weight: 300; font-size: clamp(2rem, 4.5vw, 3.4rem); line-height: 1.15; }
h2 { font-weight: 400; font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.25; }
h3 { font-weight: 500; }
.entry-content p, .woocommerce-tabs p, .comment-content p { max-width: 68ch; }
.tab-panels .entry-content p,
.toggle-panels .entry-content p { max-width: none; }

.tabbed-content .tab-panels { background-color: #FFF6EC !important; }
a  { color: var(--chill-moss); }
a:hover { color: var(--chill-moss-dk); }

.page-wrapper, #main, .section { background-color: transparent; }

/* ========== 3. Header ========== */
.header-main,
.header-wrapper.stuck .header-main {
  background: rgba(238, 243, 241, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
  border-bottom: 1px solid var(--chill-leaf);
}
.header-top { background: var(--chill-moss) !important; font-size: 13px; }
.nav > li > a {
  font-weight: 400;
  text-transform: none;
  font-size: 15px;
  color: var(--chill-ink);
}
.nav > li.active > a,
.nav > li > a:hover { color: var(--chill-moss); }
.nav-dropdown {
  border-radius: var(--chill-radius-sm);
  border: 1px solid var(--chill-leaf);
  box-shadow: 0 18px 40px -20px rgba(31, 50, 56, .35);
}

/* ========== 4. Nút & form ========== */
.button, button, input[type="submit"], input[type="button"] {
  border-radius: 999px !important;
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0;
  padding: 0 1.6em;
  transition: background-color .25s ease, color .25s ease;
}
.button.primary, .button.alt, .checkout-button,
input[type="submit"].button, .single_add_to_cart_button {
  background-color: var(--chill-moss) !important;
  border-color: var(--chill-moss) !important;
  color: #fff !important;
}
.button.primary:hover, .button.alt:hover, .single_add_to_cart_button:hover {
  background-color: var(--chill-moss-dk) !important;
}
.button.is-outline {
  border: 1.5px solid var(--chill-moss);
  color: var(--chill-moss);
}
input[type="text"], input[type="email"], input[type="search"], input[type="tel"],
input[type="number"], input[type="password"], textarea, select {
  border-radius: var(--chill-radius-sm);
  border: 1px solid var(--chill-leaf);
  background: var(--chill-surface);
  box-shadow: none;
  color: var(--chill-ink);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--chill-moss);
  box-shadow: 0 0 0 3px rgba(63, 122, 112, .18);
}
:focus-visible { outline: 2px solid var(--chill-moss); outline-offset: 2px; }

/* ========== 5. Sản phẩm (WooCommerce) ========== */
.product-small .box-image,
.box-image img {
  border-radius: var(--chill-radius-lg);
  overflow: hidden;
}
.product-small .box-image { background: var(--chill-surface); }
.product-small .box-image img { transition: transform .6s ease; }
.product-small:hover .box-image img { transform: scale(1.035); }
.product-small .box-text { padding-top: 14px; }
.product-small .name a, .product-title a { color: var(--chill-ink); font-weight: 500; }
.price, .price .amount { color: var(--chill-moss-dk); font-weight: 500; }
del .amount { color: var(--chill-muted); opacity: .7; }

.badge-inner, .onsale {
  background-color: var(--chill-sun) !important;
  color: var(--chill-ink) !important;
  border-radius: 999px !important;
  font-weight: 600;
}
.badge-container { margin: 12px; }

/* Trang chi tiết sản phẩm */
.product-gallery .woocommerce-product-gallery__image img { border-radius: var(--chill-radius-lg); }
.product-info .product-title { font-weight: 300; font-size: 2rem; }
.woocommerce-tabs .tabs li a { text-transform: none; font-weight: 500; }

/* ========== 6. Section & block ========== */
.section-title-container .section-title b { background-color: var(--chill-leaf); }
.section-title span { text-transform: none; font-weight: 400; }
.box-blog-post .box-image, .banner, .ux-banner .banner-bg { border-radius: var(--chill-radius-lg); overflow: hidden; }
.icon-box .icon-inner { color: var(--chill-moss); }
.message-box, .woocommerce-message, .woocommerce-info {
  border-radius: var(--chill-radius-sm);
  background: var(--chill-leaf);
  color: var(--chill-ink);
}

/* Dải lượn sóng mềm phía trên footer – điểm nhấn duy nhất */
.footer-wrapper { position: relative; margin-top: 60px; }
.footer-wrapper::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -39px; height: 40px;
  background: var(--chill-moss-dk);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C200 0 400 0 600 20 S1000 40 1200 8 L1200 40 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40 C200 0 400 0 600 20 S1000 40 1200 8 L1200 40 Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}

/* ========== 7. Footer ========== */
.footer-wrapper .footer, .footer-1, .footer-2 {
  background-color: var(--chill-moss-dk) !important;
  color: #DCEAE5;
  border: 0;
}
.footer-wrapper h3, .footer-wrapper .widget-title { color: #fff; font-weight: 500; text-transform: none; }
.footer-wrapper a { color: #DCEAE5; }
.footer-wrapper a:hover { color: var(--chill-sun); }
.absolute-footer { background-color: #264E47 !important; color: #A9C8C0; font-size: 13px; }

/* ========== 8. Mobile & accessibility ========== */
@media (max-width: 849px) {
  body { font-size: 15px; }
  .product-small .box-image { border-radius: 16px; }
  .footer-wrapper::before { height: 24px; top: -23px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
/* ========== Banner ========== */
.hero-tony .section-content { position: relative; }

/* Chặn Flickity "adaptiveHeight" tính lại chiều cao slide nhỏ hơn 650px
   đã đặt trong UX Builder (khớp với padding-top: 650px của banner) */
.hero-tony .slider-wrapper,
.hero-tony .flickity-viewport,
.hero-tony .flickity-slider,
.hero-tony .banner,
.hero-tony .banner-inner {
  min-height: 650px !important;
}

.hero-form-wrap {
  position: absolute !important;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  z-index: 10;
  justify-content: flex-end;
  pointer-events: none; /* để vẫn bấm được slider phía sau */
  max-width: none !important; /* bỏ giới hạn container boxed của Flatsome */
  width: 100% !important;
  margin: 0 !important;
  padding-right: 0 !important;
}
.hero-form-wrap > .hero-form {
  pointer-events: auto;
  flex: 0 0 560px; max-width: 560px;
}
.hero-form > .col-inner {
  background: #fff;
  border: 3px solid #E31E24;
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.35);
}

/* Điện thoại: form xuống dưới slider */
@media (max-width: 849px) {
  .hero-form-wrap {
    position: static !important;
    transform: none;
    margin-top: -40px; /* đè nhẹ lên mép slider cho đẹp */
  }
  .hero-form-wrap > .hero-form { flex-basis: 100%; max-width: 100%; }
}
.tony-form .tf-field { position: relative; margin-bottom: 16px; }
.tony-form .tf-field::before {
  content: ""; position: absolute; left: 14px; top: 50%;
  width: 18px; height: 18px; transform: translateY(-50%);
  background: var(--chill-moss-dk); z-index: 2; pointer-events: none;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat;
}
.tf-name  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5 5 0 1 0 0-10 5 5 0 0 0 0 10zm0 2c-5 0-9 2.5-9 5.5V22h18v-2.5C21 16.5 17 14 12 14z'/%3E%3C/svg%3E"); }
.tf-phone { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15 15 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
.tf-year  { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2zm-2 8h14v10H5z'/%3E%3C/svg%3E"); }

.tony-form input[type="text"],
.tony-form input[type="tel"],
.tony-form select {
  width: 100%; height: 48px; margin: 0;
  padding-left: 42px;
  border: 1px solid #EFDEDE; border-radius: 12px;
  background-color: #FBF7F6; box-shadow: none;
  font-family: var(--chill-font);
  font-size: 15px; color: #3A2E2E;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.tony-form input::placeholder { color: #AD9797; }
.tony-form input:focus, .tony-form select:focus {
  border-color: var(--chill-moss); background-color: #fff;
  box-shadow: 0 0 0 3px rgba(227, 30, 36, .12);
}

.tony-form .tf-submit {
  width: 100%; height: 52px; margin: 8px 0 0;
  border: 0; border-radius: 999px;
  background: linear-gradient(180deg, #F0373D, #C8141A);
  color: #fff; font-weight: 600; font-size: 15px;
  font-family: var(--chill-font);
  text-transform: uppercase; letter-spacing: .3px;
  box-shadow: 0 10px 22px -10px rgba(200, 20, 26, .6);
  transition: filter .2s ease, transform .15s ease;
}
.tony-form .tf-submit:hover { filter: brightness(1.08); transform: translateY(-1px); }
.tony-form .tf-submit:active { transform: translateY(0); }

/* Thông báo lỗi & kết quả */
.tony-form .wpcf7-not-valid-tip { font-size: 12.5px; margin-top: 4px; color: #C8141A; }
.hero-form .wpcf7 form .wpcf7-response-output {
  margin: 12px 0 0; padding: 8px 12px;
  border-radius: 10px; font-size: 13.5px;
}
.hero-form .wpcf7-spinner { position: absolute; margin: 16px auto 0; left: 0; right: 0; }

/* Ô chữ "ƯU ĐÃI..." cạnh đồng hồ đếm ngược – làm mềm mại hơn thay vì viền cứng, đỏ gắt */
.hero-form .section-title-container {
  background: #FDECEC;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  height: 100%;
}
.hero-form .section-title-container .section-title { margin: 0; }
.hero-form .section-title-container .section-title b { display: none; }
.hero-form .section-title-main {
  color: var(--chill-moss-dk) !important;
  font-family: var(--chill-font);
  font-weight: 600 !important;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
}

