/*
Theme Name: Flatsome Child - Nuoc Da Sach PQICE (nuocdaphuquoc.com)
Description: Modern Token-Driven Design System for Flatsome 3.20.11 (Zero-Rework Edition 10/2026)
Author: Antigravity Engineering
Template: flatsome
Version: 4.0.0
*/

/* ==========================================================================
   1. DESIGN TOKENS (EXTRACTED FROM NUOCDASACH.COM + MODERNIZED FOR 2026)
   ========================================================================== */
:root {
  /* Brand Colors */
  --fx-primary: #279cea;
  --fx-primary-hover: #0284c7;
  --fx-primary-soft: rgba(39, 156, 234, 0.11);
  --fx-secondary: #0a2540;
  --fx-accent: #f6cb43;
  --fx-accent-hover: #eab308;

  /* Surfaces & Backgrounds */
  --fx-surface: #ffffff;
  --fx-surface-muted: #f4f9fd;
  --fx-surface-subtle: #e6f3fc;
  --fx-surface-dark: #0a2540;
  --fx-surface-dark-elevated: #0f345a;

  /* Typography & Contrast Colors (WCAG AA Checked) */
  --fx-text-heading: #0a2540;
  --fx-text-body: #334155;
  --fx-text-muted: #64748b;
  --fx-text-on-dark: #ffffff;
  --fx-text-muted-on-dark: #dbeafe;

  /* Borders & Dividers */
  --fx-border: #dcebf7;
  --fx-border-hover: rgba(39, 156, 234, 0.45);
  --fx-border-on-dark: rgba(255, 255, 255, 0.16);

  /* Radii */
  --fx-radius-sm: 8px;
  --fx-radius-md: 16px;
  --fx-radius-lg: 22px;
  --fx-radius-pill: 9999px;

  /* Elevations / Shadows */
  --fx-shadow-sm: 0 4px 14px -2px rgba(10, 37, 64, 0.06), 0 2px 6px -1px rgba(10, 37, 64, 0.04);
  --fx-shadow-md: 0 12px 28px -6px rgba(10, 37, 64, 0.1), 0 4px 12px -3px rgba(39, 156, 234, 0.08);
  --fx-shadow-lg: 0 22px 44px -12px rgba(10, 37, 64, 0.16), 0 8px 18px -6px rgba(39, 156, 234, 0.12);
  --fx-shadow-primary: 0 10px 25px -4px rgba(39, 156, 234, 0.4);

  /* Transitions */
  --fx-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   2. FLUID RESPONSIVE TYPOGRAPHY & VIETNAMESE DIACRITIC SAFETY
   ========================================================================== */
body {
  color: var(--fx-text-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6,
.heading-font {
  color: var(--fx-text-heading);
  letter-spacing: -0.01em;
  line-height: 1.28;
  margin-top: 0;
}

h1, .h1, .fx-hero-title {
  font-size: clamp(1.85rem, 3.2vw + 1rem, 3.1rem);
  font-weight: 800;
  line-height: 1.22;
}

h2, .h2, .section-title-main {
  font-size: clamp(1.45rem, 2.1vw + 0.85rem, 2.25rem);
  font-weight: 800;
}

h3, .h3 {
  font-size: clamp(1.18rem, 1.3vw + 0.75rem, 1.5rem);
  font-weight: 700;
}

h4, .h4 {
  font-size: clamp(1.05rem, 0.8vw + 0.75rem, 1.22rem);
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* High-Contrast Guardrails for Dark Sections & Banners (.dark) */
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6,
.dark .section-title-main,
.dark .featured-box h4, .dark .featured-box h5 {
  color: var(--fx-text-on-dark) !important;
}

.dark p, .dark li, .dark .featured-box p {
  color: var(--fx-text-muted-on-dark);
}

/* Protect white cards placed inside dark sections */
.dark .box-text[style*="background-color:#ffffff"] h1,
.dark .box-text[style*="background-color:#ffffff"] h2,
.dark .box-text[style*="background-color:#ffffff"] h3,
.dark .box-text[style*="background-color:#ffffff"] h4,
.dark .box-text[style*="background-color:#ffffff"] h5,
.dark .box-text[style*="background-color: rgb(255, 255, 255)"] h4,
.dark .col-inner[style*="background-color:#ffffff"] h3,
.dark .col-inner[style*="background-color:#ffffff"] h4 {
  color: var(--fx-text-heading) !important;
}

.dark .box-text[style*="background-color:#ffffff"] p,
.dark .col-inner[style*="background-color:#ffffff"] p {
  color: var(--fx-text-body) !important;
}

/* ==========================================================================
   3. EYEBROW BADGES, SECTION HEADERS & NATIVE [title] POLISH
   ========================================================================== */
.fx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0284c7;
  background: var(--fx-primary-soft);
  border: 1px solid rgba(39, 156, 234, 0.28);
  border-radius: var(--fx-radius-pill);
}

.dark .fx-eyebrow {
  color: var(--fx-accent);
  background: rgba(10, 37, 64, 0.65);
  border-color: rgba(246, 203, 67, 0.45);
  backdrop-filter: blur(8px);
}

.fx-badge {
  display: inline-block;
  align-self: center;
  padding: 4px 11px;
  margin-bottom: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0284c7;
  background: var(--fx-primary-soft);
  border-radius: 6px;
}

.fx-criteria-center-img .img-inner {
  border-radius: 20px;
  overflow: hidden;
  border: 4px solid var(--fx-surface-subtle);
  box-shadow: var(--fx-shadow-md);
}

.fx-title-accent {
  color: var(--fx-primary);
}

.section-title-container {
  margin-bottom: 1.75rem;
}

.section-title-normal,
.section-title-bold,
.section-title-bold-center,
.section-title-center {
  border-bottom: 2px solid var(--fx-border) !important;
}

.section-title-normal span.section-title-main,
.section-title-bold span.section-title-main,
.section-title-bold-center span.section-title-main {
  border: none !important;
  border-bottom: 3px solid var(--fx-primary) !important;
  padding: 0 0 10px 0 !important;
  margin-bottom: -2px !important;
}

.section-title b {
  display: none !important;
}

.section-title a {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  color: var(--fx-primary) !important;
  margin-left: auto;
  padding-bottom: 10px;
}

/* Native [bullet_item] Checkmark List Polish */
li.bullet-checkmark,
li.bullet-arrow {
  list-style: none !important;
  position: relative;
  padding-left: 30px !important;
  margin-bottom: 10px !important;
  font-weight: 500;
  color: var(--fx-text-heading);
  line-height: 1.55;
}

li.bullet-checkmark::before,
li.bullet-arrow::before {
  content: "✓" !important;
  position: absolute !important;
  left: 0 !important;
  top: 2px !important;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--fx-primary-soft);
  color: var(--fx-primary-hover);
  font-size: 0.76rem !important;
  font-weight: 800;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   4. NATIVE FLATSOME CARDS, BOXES & EQUAL-HEIGHT PERFECTION
   ========================================================================== */
.box-shadow-1,
.row-box-shadow-1 > .col > .col-inner {
  box-shadow: var(--fx-shadow-sm) !important;
  border: 1px solid var(--fx-border);
  transition: transform 0.32s var(--fx-ease), box-shadow 0.32s var(--fx-ease), border-color 0.32s var(--fx-ease);
}

.box-shadow-2,
.row-box-shadow-2 > .col > .col-inner {
  box-shadow: var(--fx-shadow-md) !important;
  border: 1px solid var(--fx-border);
  transition: transform 0.32s var(--fx-ease), box-shadow 0.32s var(--fx-ease), border-color 0.32s var(--fx-ease);
}

.box-shadow-3:hover,
.box-shadow-4:hover,
.row-box-shadow-3-hover > .col > .col-inner:hover,
.row-box-shadow-4-hover > .col > .col-inner:hover,
.box.has-hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--fx-shadow-lg) !important;
  border-color: var(--fx-border-hover);
}

/* Critical Flatsome Flexbox Guardrail: Prevent .box-image & inline <a> from collapsing to 0px width */
.box .box-image,
.gallery-box .box-image,
.post-item .box-image {
  width: 100% !important;
  margin: 0 !important;
  flex-shrink: 0;
}

.box .box-image > a,
.box .box-image > a > div,
.gallery-col a.image-lightbox,
.post-item .col-inner > a.plain {
  display: block !important;
  width: 100% !important;
}

/* Ice Product Cards (Matching Ice Podium Showcase) */
.fx-ice-card.box {
  background: #ffffff;
  border-radius: var(--fx-radius-md);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 28px -6px rgba(6, 24, 44, 0.25);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s var(--fx-ease), box-shadow 0.32s var(--fx-ease), border-color 0.32s ease;
}

.fx-ice-card.box:hover {
  transform: translateY(-6px);
  border-color: var(--fx-accent);
  box-shadow: 0 20px 38px -8px rgba(6, 24, 44, 0.36);
}

.fx-ice-card .box-image {
  width: 100% !important;
  margin: 0 !important;
  background: radial-gradient(circle at 50% 60%, #dff2fe 0%, #f0f9ff 58%, #ffffff 100%);
  padding: 14px;
  border-bottom: 1px solid #e6f1fa;
}

.fx-ice-card .box-image .image-cover {
  border-radius: 14px;
}

.fx-ice-card .box-image .image-cover img {
  object-fit: contain !important;
  padding: 4px;
}

.fx-ice-card .box-text {
  background: #ffffff;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fx-ice-card .box-text .box-text-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.fx-ice-card .box-text h3,
.fx-ice-card .box-text h4 {
  color: var(--fx-text-heading) !important;
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.5em;
}

.fx-ice-card .box-text p {
  color: var(--fx-text-muted) !important;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.fx-ice-card .box-text .button {
  margin-top: auto;
}

/* Certificate Gallery ([ux_gallery]) Document Framing */
.gallery-col .col-inner {
  height: 100%;
}

.gallery-box.box {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--fx-border);
  padding: 10px;
  box-shadow: var(--fx-shadow-sm);
  transition: transform 0.3s var(--fx-ease), box-shadow 0.3s var(--fx-ease), border-color 0.3s ease;
}

.gallery-box.box:hover {
  transform: translateY(-5px);
  box-shadow: var(--fx-shadow-lg);
  border-color: var(--fx-primary);
}

.gallery-box .box-image {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #edf4fa;
}

.gallery-box .box-image .image-cover img {
  object-fit: contain !important;
  background: #ffffff;
}

.gallery-box .box-text {
  display: none !important;
}

/* Partner Logo Cards */
.fx-partner-card > .col-inner {
  background: #f8fbff;
  border: 1px solid var(--fx-border);
  border-radius: 16px;
  padding: 16px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.fx-partner-card > .col-inner:hover {
  transform: translateY(-4px);
  box-shadow: var(--fx-shadow-md);
  border-color: var(--fx-primary);
  background: #ffffff;
}

.fx-partner-card img {
  max-height: 82px !important;
  width: auto !important;
  object-fit: contain;
}

/* General Boxes, Blog Posts & Products */
.box-default,
.box-normal,
.product-small.box,
.post-item .col-inner {
  border-radius: var(--fx-radius-md);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.box-default .box-text,
.box-normal .box-text,
.product-small .box-text,
.post-item .box-text {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.box-default .box-text .button,
.post-item .box-text .button {
  margin-top: auto;
}

.post-item .post-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.65em;
  line-height: 1.35;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.post-item .from_the_blog_excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--fx-text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

/* [featured_box] Criteria Cards (5 Tiêu Chí HACCP Codex 2020) */
.fx-criteria-card > .col-inner {
  height: 100%;
  border-left: 4px solid var(--fx-primary) !important;
}

.fx-criteria-card .featured-box .icon-box-img {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #279cea 0%, #0284c7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-shadow: 0 6px 16px rgba(39, 156, 234, 0.28);
}

.fx-criteria-card .featured-box .icon-box-img img {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain;
  padding-top: 0 !important;
}

.featured-box .icon-box-img {
  margin-bottom: 0.75rem;
  transition: transform 0.3s var(--fx-ease);
}

.featured-box:hover .icon-box-img {
  transform: scale(1.08);
}

.featured-box h4,
.featured-box h5 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--fx-text-heading);
  margin-bottom: 0.4rem;
}

.featured-box p {
  color: var(--fx-text-muted);
  font-size: 0.93rem;
  line-height: 1.58;
}

/* Delivery Network Branch Badges (Hệ Thống 68 Điểm Giao Nhận) */
.fx-branch-card > .col-inner {
  display: flex;
  align-items: center;
  height: 100%;
  background: #ffffff;
  border: 1px solid var(--fx-border);
  border-left: 4px solid var(--fx-primary);
  border-radius: 12px;
  padding: 14px 18px !important;
  box-shadow: var(--fx-shadow-sm);
  transition: all 0.25s var(--fx-ease);
}

.fx-branch-card > .col-inner:hover {
  transform: translateY(-3px);
  border-color: var(--fx-primary);
  box-shadow: var(--fx-shadow-md);
}

.fx-branch-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 3px;
  color: var(--fx-text-heading);
}

.fx-branch-card p {
  font-size: 0.83rem;
  color: var(--fx-text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   5. ACCORDION (FAQ), TABS, TESTIMONIALS & PRICING TABLES
   ========================================================================== */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--fx-surface);
  border: 1px solid var(--fx-border) !important;
  border-radius: var(--fx-radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.accordion-item.active,
.accordion-item:hover {
  border-color: var(--fx-border-hover) !important;
  box-shadow: var(--fx-shadow-sm);
}

.accordion-title {
  position: relative;
  padding: 16px 20px 16px 46px !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: var(--fx-text-heading) !important;
  border-top: none !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.accordion-title.active {
  color: var(--fx-primary-hover) !important;
  background: var(--fx-surface-muted);
}

.accordion-inner {
  padding: 14px 20px 20px 20px !important;
  color: var(--fx-text-body);
  border-top: 1px solid var(--fx-border);
}

/* [ux_price_table] */
.pricing-table {
  border-radius: var(--fx-radius-lg) !important;
  border: 1px solid var(--fx-border);
  overflow: hidden;
}

.pricing-table.featured-table {
  border: 2px solid var(--fx-primary);
  box-shadow: var(--fx-shadow-lg) !important;
}

.pricing-table .price {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--fx-primary);
}

/* ==========================================================================
   6. BUTTONS, FORMS & HIGH-CONTRAST INTERACTIVE STATES
   ========================================================================== */
.button {
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: none;
  transition: transform 0.22s var(--fx-ease), box-shadow 0.22s var(--fx-ease), background-color 0.22s ease;
}

.button.primary:not(.is-outline):not(.is-link):hover {
  transform: translateY(-2px);
  box-shadow: var(--fx-shadow-primary);
}

.button.white.is-outline {
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.85) !important;
}

.button.white.is-outline:hover {
  background-color: #ffffff !important;
  color: var(--fx-secondary) !important;
  border-color: #ffffff !important;
}

/* Modern Inputs & Contact Forms */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="password"],
input[type="search"],
select,
textarea {
  height: 46px;
  padding: 0 15px;
  border-radius: var(--fx-radius-sm) !important;
  border: 1px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: var(--fx-text-heading) !important;
  font-size: 0.95rem !important;
  box-shadow: none !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  height: auto;
  min-height: 110px;
  padding: 12px 15px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--fx-primary) !important;
  box-shadow: 0 0 0 3px rgba(39, 156, 234, 0.18) !important;
  outline: none !important;
}

/* ==========================================================================
   7. HEADER, TOPBAR, FOOTER & FLOATING CONTACT WIDGET
   ========================================================================== */
.header-top {
  font-size: 0.88rem;
  font-weight: 600;
}

.header-main .nav > li > a {
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--fx-text-heading);
  transition: color 0.2s ease;
}

.header-main .nav > li > a:hover,
.header-main .nav > li.current-menu-item > a,
.header-main .nav > li.active > a {
  color: var(--fx-primary);
}

/* Header & Footer Logo Polish (PQ ICE - NUOCDAPHUQUOC.COM) */
#logo img {
  max-height: 78px !important;
  width: auto !important;
  object-fit: contain;
  transition: transform 0.25s ease, max-height 0.25s ease;
}

.stuck #logo img {
  max-height: 60px !important;
}

.fx-footer-logo .img-inner {
  background: #ffffff;
  padding: 10px 18px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  display: inline-block;
}

/* Footer [ux_menu] Clean Styling */
.ux-menu-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--fx-primary);
  display: inline-block;
}

.ux-menu-link__link {
  padding: 6px 0;
  color: var(--fx-text-muted-on-dark);
  transition: color 0.2s ease, transform 0.2s ease;
}

.ux-menu-link__link:hover {
  color: var(--fx-accent);
  transform: translateX(4px);
}

/* Floating Hotline & Zalo/Messenger Widget (Cloned from nuocdasach.com) */
.fx-floating-contact {
  position: fixed;
  z-index: 9990;
  left: 18px;
  bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fx-floating-social {
  position: fixed;
  z-index: 9990;
  right: 18px;
  bottom: 76px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fx-float-phone {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #279cea 0%, #0284c7 100%);
  color: #ffffff !important;
  padding: 8px 20px 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(39, 156, 234, 0.45);
  border: 2px solid #ffffff;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fx-float-phone:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 14px 30px rgba(39, 156, 234, 0.6);
  color: #ffffff !important;
}

.fx-float-phone-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: fx-pulse 1.8s infinite;
}

.fx-float-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(10, 37, 64, 0.22);
  border: 2px solid var(--fx-primary);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.fx-float-btn:hover {
  transform: scale(1.1);
}

.fx-float-btn img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

@keyframes fx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
  70% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* Responsive Refinements */
@media (max-width: 849px) {
  .section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

@media (max-width: 549px) {
  .section {
    padding-top: 36px;
    padding-bottom: 36px;
  }
  .row .col {
    padding-bottom: 18px;
  }
  .button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .fx-float-phone span.fx-phone-text {
    font-size: 0.88rem;
  }
  .fx-floating-contact {
    left: 12px;
    bottom: 14px;
  }
  .fx-floating-social {
    right: 12px;
    bottom: 68px;
  }
}
