:root {
  --brand: #16a34a;
  --brand-dark: #15803d;
}

body {
  font-family: "Quicksand", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bg-brand { background: var(--brand) !important; }
.text-brand { color: var(--brand) !important; }
.btn-brand {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.topbar { background: #14532d; color: #fff; }
.topbar a { color: #fff; text-decoration: none; }

.search-pill .form-control {
  border-right: 0;
}
.search-pill .btn {
  width: 52px;
}
.search-pill .form-control,
.search-pill .btn {
  height: 44px;
}

.btn-cta {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 12px;
  font-weight: 800;
}

.primary-nav {
  background: #14532d;
  border-top: 1px solid rgba(255,255,255,.08);
}

.primary-nav-row {
  min-height: 52px;
  flex-wrap: nowrap;
}

.btn-menu {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .2px;
  white-space: nowrap;
}
.btn-menu:hover {
  background: #f8fafc;
}

.nav-link-item {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2px;
  padding: 8px 10px;
  border-radius: 10px;
}
.nav-link-item:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.nav-links {
  justify-content: flex-start;
  white-space: nowrap;
}

.hotline-on-nav {
  color: rgba(255,255,255,.78);
  white-space: nowrap;
}
.hotline-on-nav strong {
  color: #fff;
}

.product-card:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(15, 23, 42, 0.10); }
.product-card { transition: .18s ease; }

.badge-new { background: var(--brand); }

footer a { text-decoration: none; }

/* Featured tiles (Danh mục tiêu biểu) */
.featured-tile {
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  min-height: 132px;
  --tile-grad: linear-gradient(90deg, #e8f7ee 0%, #f4fbf7 60%);
  --tile-img: none;
  /* Layer order matters: first is on top. Put image on top, gradient below. */
  background-image: var(--tile-img), var(--tile-grad);
  background-repeat: no-repeat, no-repeat;
  /* Make image large (≈40–55% card) but still no-crop */
  --tile-img-size: 52% auto;
  background-size: var(--tile-img-size), cover;
  background-position: right 12px center, center;
}
.featured-tile--large {
  min-height: 140px;
  --tile-img-size: 56% auto;
  background-position: right 10px center, center;
}
.featured-tile__content {
  padding: 14px 14px 14px 14px;
  flex: 1 1 auto;
  padding-right: 50%;
}
.featured-tile--small .featured-tile__content {
  padding-right: 46%;
}
.featured-tile--small {
  --tile-img-size: 50% auto;
}
.featured-tile__image { display:none; }
.featured-tile__title {
  font-weight: 900;
  letter-spacing: -.2px;
  color: #14532d;
  text-transform: uppercase;
  font-size: 16px;
}
.featured-tile{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, filter .18s ease;
}
.featured-tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(2, 6, 23, .10);
  border-color: rgba(22,163,74,.35);
  filter: saturate(1.04);
}
.featured-tile__subtitle {
  margin-top: 6px;
  font-size: 12px;
  color: rgba(15,23,42,.68);
  line-height: 1.25rem;
}
.featured-tile--small .featured-tile__title {
  font-size: 13px;
}
.featured-tile--small .featured-tile__subtitle {
  font-size: 12px;
  font-weight: 700;
}

.tile-theme-mint { --tile-grad: linear-gradient(90deg, #e8f7ee 0%, #f4fbf7 60%); background-color:#e8f7ee; }
.tile-theme-sage { --tile-grad: linear-gradient(90deg, #eaf4ef 0%, #f7fbf9 60%); background-color:#eaf4ef; }
.tile-theme-teal { --tile-grad: linear-gradient(90deg, #e6fbf7 0%, #f3fffd 60%); background-color:#e6fbf7; }
.tile-theme-lime { --tile-grad: linear-gradient(90deg, #f3fde7 0%, #fbfff4 60%); background-color:#f3fde7; }
.tile-theme-sky  { --tile-grad: linear-gradient(90deg, #e8f2ff 0%, #f6faff 60%); background-color:#e8f2ff; }
.tile-theme-stone{ --tile-grad: linear-gradient(90deg, #f1f5f9 0%, #ffffff 60%); background-color:#f1f5f9; }

/* Featured tiles grid: adaptive up to 5 items */
.featured-tiles-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 768px){
  .featured-tiles-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
  .featured-tile--large{ grid-column: span 2; }
}
@media (min-width: 992px){
  .featured-tiles-grid{ grid-template-columns: repeat(4, minmax(0,1fr)); }
  .featured-tile--large{ grid-column: span 2; }
}

/* Hero banner: show full image (no crop) */
.hero-banner-img {
  height: auto;
  object-fit: contain;
  background: #ffffff;
}
@media (max-width: 576px) {
  .hero-banner-img {
    height: auto;
  }
}

/* Product grid: 5 items/row on desktop (configurable) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.product-grid > .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.product-grid > .card .card-body {
  display: flex;
  flex-direction: column;
}
.product-grid > .card .card-body > a.btn {
  margin-top: auto !important;
}
.product-grid > .card .product-title {
  min-height: 40px;
}
.product-grid > .card .product-desc {
  min-height: 40px;
}
.product-grid > .card .product-price {
  min-height: 20px;
}
@media (min-width: 768px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .product-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .product-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .product-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.product-title {
  text-align: center;
  font-weight: 800;
}
@media (min-width: 992px) {
  .product-grid.cols-5 .card-body,
  .product-grid.cols-6 .card-body {
    padding: 12px;
  }
  .product-grid.cols-5 .bg-light.rounded-top-4,
  .product-grid.cols-6 .bg-light.rounded-top-4 {
    padding: 10px !important;
  }
  .product-grid.cols-5 .product-title,
  .product-grid.cols-6 .product-title {
    font-size: 13px;
    min-height: 36px !important;
  }
  .product-grid.cols-5 .btn,
  .product-grid.cols-6 .btn {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* Footer theme */
.site-footer {
  background: #14532d;
  color: rgba(255,255,255,.85);
}
.site-footer a { color: rgba(255,255,255,.85); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-title { color: #fff; font-weight: 900; letter-spacing: .2px; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.12); }
.pay-badge {
  background: #fff;
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pay-badge img { height: 18px; width: auto; display:block; }

/* Service badges (product page) */
.service-badge{
  background: linear-gradient(90deg, rgba(22,163,74,.12) 0%, rgba(22,163,74,.04) 70%);
  border: 1px solid rgba(22,163,74,.18);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  height: 100%;
}
.service-icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(22,163,74,.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.service-title{ font-weight: 900; color: #14532d; font-size: 13px; letter-spacing: .1px; }
.service-sub{ color: rgba(15,23,42,.62); font-size: 12px; }

/* Floating contact channels */
.floating-channels{
  position: fixed;
  bottom: 16px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.floating-channels--right{ right: 16px; }
.floating-channels--left{ left: 16px; }
.floating-channel{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(2, 6, 23, .18);
  border: 1px solid rgba(255,255,255,.18);
}
.floating-channel:hover{ background: var(--brand-dark); color:#fff; }
.floating-channel__icon{
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}
