/*
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.0
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:    #3F7A70; /* màu chính */
  --chill-moss-dk: #2F5F57;
  --chill-leaf:    #CFE2DC; /* 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; }
p  { max-width: 68ch; }
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; }
}
