@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Nunito:wght@400;600;700&display=swap');

:root {
  --primary: #003366;
  --primary-light: #0055A5;
  --secondary: #0099CC;
  --accent: #FF6600;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --dog: #4A90D9;
  --cat: #9B59B6;
  --poultry: #E67E22;
  --pig: #E91E8C;
  --fish: #00BCD4;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(0, 51, 102, 0.1);
  --shadow-hover: 0 8px 32px rgba(0, 51, 102, 0.18);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --header-h: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

body.search-disabled .header-actions {
  display: none !important;
}

.logo-link { flex-shrink: 0; }

.logo-img {
  height: 36px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  display: block;
}

.header-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  flex: 1;
  text-align: center;
  min-width: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  padding: 4px 8px;
  flex-shrink: 0;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 12px;
  min-height: 32px;
  transition: all 0.2s;
  font-family: inherit;
}

.lang-btn img {
  border-radius: 2px;
  display: block;
}

.lang-btn.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
}

.lang-divider {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  user-select: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 100%;
  order: 3;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}

.search-wrap {
  position: relative;
  flex: 1;
  max-width: 100%;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 1rem 0.6rem 2.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
}

.search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
}

.search-result-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-height: 44px;
  align-items: center;
  text-align: left;
  width: 100%;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
}

.search-result-item:hover,
.search-result-item:focus {
  background: var(--bg);
  outline: none;
}

.search-result-item img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.search-result-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.search-empty {
  padding: 1rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── Hero Banner ── */
.hero-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: #fff;
  padding: 1.5rem 1rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Dot grid overlay */
.hero-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.10) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
  z-index: 0;
}

/* Blob glow top-right */
.hero-banner::after {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0,153,204,0.30) 0%, transparent 70%);
  animation: heroBlobPulse 3.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes heroBlobPulse {
  0%, 100% { transform: scale(1);   opacity: 0.6; }
  50%       { transform: scale(1.25); opacity: 1;   }
}

.hero-content {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.hero-subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Catalog */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.catalog-section { margin-top: 0.5rem; }

.catalog-empty-state {
  max-width: 700px;
  margin: 24px auto;
  padding: 28px 24px;
  text-align: center;
  background: #fff;
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
}

.catalog-empty-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.catalog-empty-hint {
  font-size: 14px;
  line-height: 1.6;
}

.catalog-empty-hint code {
  font-size: 12px;
  background: #f0f4f8;
  padding: 2px 6px;
  border-radius: 4px;
}

.level1-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.level1-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 120px;
  padding: 1rem 0.5rem;
  border: none;
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  font-family: inherit;
  color: var(--text);
}

.level1-card-bg {
  position: absolute;
  inset: 0;
  background: var(--card-color, var(--primary));
  opacity: 0.12;
  transition: opacity var(--transition);
}

.level1-card.active .level1-card-bg,
.level1-card:hover .level1-card-bg { opacity: 0.22; }

.level1-card.active {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.level1-emoji {
  font-size: 2rem;
  line-height: 1;
  z-index: 1;
}

.level1-fa {
  font-size: 1.25rem;
  color: var(--card-color, var(--primary));
  z-index: 1;
}

.level1-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;
}

.level1-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 1;
  text-align: center;
}

.level1-arrow {
  font-size: 0.75rem;
  color: var(--card-color, var(--primary));
  transition: transform var(--transition);
  z-index: 1;
}

.level1-card.active .level1-arrow { transform: rotate(180deg); }

/* Accordion */
.accordion-panels { margin-top: 0.5rem; }

.accordion-panel {
  background: var(--surface);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.level2-wrap { padding: 1rem; }

.level2-loading {
  text-align: center;
  color: var(--text-muted);
  padding: 1rem;
}

.level2-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.level2-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  transition: all var(--transition);
}

.level2-item:hover,
.level2-item.active {
  border-color: var(--secondary);
  background: rgba(0, 153, 204, 0.1);
  color: var(--primary);
}

.level2-badge {
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  min-width: 1.5rem;
  text-align: center;
}

/* Products grid */
.level3-section {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.level3-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--primary);
  margin: 1rem 0 0.75rem;
}

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.product-card {
  background: var(--bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: box-shadow var(--transition);
}

.product-card:hover { box-shadow: var(--shadow); }

.product-card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: #e8eef5;
}

.product-card-img[src=""],
.product-card-img:not([src]) {
  visibility: hidden;
  min-height: 120px;
  background: #e8eef5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 300'%3E%3Crect fill='%23E8EEF5' width='400' height='300'/%3E%3Ctext x='200' y='155' text-anchor='middle' fill='%236B7280' font-size='16' font-family='Arial'%3EChưa có ảnh%3C/text%3E%3C/svg%3E") center/contain no-repeat;
  visibility: visible;
}

.product-card-body { padding: 1rem; }

.product-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.product-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.product-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover { background: var(--primary-light); }

.btn-accent {
  background: var(--accent);
  color: #fff;
}

.btn-accent:hover { filter: brightness(1.05); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--secondary);
  color: var(--secondary);
}

.level3-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
}

/* BROCHURE GALLERY – SCROLL DỌC FULLSCREEN */
.brochure-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #111;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brochure-overlay[hidden] { display: none !important; }

.bro-topbar {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(env(safe-area-inset-top, 0px), 10px) 12px 10px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
  min-height: 52px;
}

.bro-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bro-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.18s ease;
}

.bro-btn:hover { transform: scale(1.12); }
.bro-btn:active { transform: scale(0.9); }

.bro-close {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  order: -1;
}

.bro-close:hover { background: rgba(255, 255, 255, 0.25); }

.bro-heart {
  background: rgba(255, 255, 255, 0.88);
  line-height: 1;
}

.bro-heart:hover { background: #fff; }

.bro-heart.active {
  background: rgba(233, 30, 140, 0.12);
  border: 1.5px solid rgba(233, 30, 140, 0.35);
}

.bro-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
}

.bro-scroll::-webkit-scrollbar { display: none; }

.bro-item {
  scroll-snap-align: start;
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.bro-scroll:has(.bro-item:nth-child(2)) .bro-item {
  height: 88vh;
  min-height: 88vh;
}

.bro-item.multi {
  height: 88vh;
  min-height: 88vh;
}

.bro-item picture,
.bro-item .bro-img,
.bro-item img {
  max-width: 100%;
  max-height: 100%;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.bro-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 16px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  pointer-events: none;
}

.bro-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 260px;
  background: #111;
}

.bro-item + .bro-item {
  border-top: 2px solid rgba(255, 255, 255, 0.06);
}

.bro-item:not(:last-child)::after {
  content: '↓';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  color: rgba(255, 255, 255, 0.35);
  animation: broArrowBounce 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes broArrowBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.35; }
  50% { transform: translateX(-50%) translateY(5px); opacity: 0.65; }
}

.bro-bottombar {
  flex-shrink: 0;
  padding: 10px 14px;
  padding-bottom: max(env(safe-area-inset-bottom, 0px), 10px);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 0.5px solid rgba(255, 255, 255, 0.08);
}

.bro-bottombar[hidden] { display: none !important; }

.bro-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--accent);
  color: #fff;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px rgba(255, 102, 0, 0.35);
}

.bro-link-btn:hover { background: #e55a00; transform: translateY(-2px); }
.bro-link-btn:active { transform: scale(0.97); }

.bro-no-link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  padding: 6px 0;
}
/* Contact modal */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 20, 50, 0.55);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) 1rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.modal-overlay[hidden] { display: none; }

.modal-dialog.contact-modal-box {
  background: var(--surface);
  width: 100%;
  max-width: 560px;
  max-height: calc(100dvh - 2.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 30, 70, 0.35);
  margin: auto;
  flex-shrink: 0;
}

.contact-modal-box .modal-close {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.site-footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem 1rem;
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner { max-width: 1200px; margin: 0 auto; }

.footer-links { margin-top: 0.5rem; }

.footer-links a {
  color: var(--secondary);
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.footer-links span { margin: 0 0.5rem; opacity: 0.5; }

/* Back to top */
.back-to-top {
  position: fixed;
  left: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 90;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--shadow-hover);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:active {
  transform: scale(0.95);
}

/* Tablet */
@media (min-width: 640px) {
  .header-actions {
    flex: 0 1 auto;
    order: unset;
    max-width: 280px;
  }

  .header-title { font-size: 1.15rem; }

  .level1-grid { grid-template-columns: repeat(3, 1fr); }

  .products-grid { grid-template-columns: repeat(2, 1fr); }

  .modal-overlay {
    padding:
      max(1.5rem, env(safe-area-inset-top, 0px))
      1.25rem
      max(1.5rem, env(safe-area-inset-bottom, 0px));
  }

  .modal-dialog {
    max-width: 600px;
    max-height: calc(100dvh - 3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 3rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }

}

/* Desktop */
@media (min-width: 1024px) {
  .header-inner { flex-wrap: nowrap; }

  .header-title { text-align: left; }

  .header-actions { max-width: 320px; }

  .level1-grid { grid-template-columns: repeat(5, 1fr); }

  .products-grid { grid-template-columns: repeat(3, 1fr); }

  .hero-title { font-size: 1.75rem; }
}

@media (max-width: 639px) {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
  }

  .header-inner {
    flex-wrap: nowrap;
    padding: 0.5rem 0.75rem;
    gap: 0.35rem;
    align-items: center;
  }

  .lang-switcher {
    order: 2;
    margin-left: auto;
  }

  .header-actions {
    order: 3;
  }

  .logo-img {
    height: 26px;
    width: auto;
  }

  .header-title {
    font-size: 0.8125rem;
    text-align: left;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  .header-actions {
    flex: 0 0 auto;
    order: unset;
    width: auto;
    position: static;
  }

  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    font-size: 1.1rem;
  }

  .header-actions.collapsed .search-wrap {
    display: none;
  }

  .header-actions.expanded {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex: none;
    width: 100%;
    padding: 0.5rem 0.75rem 0.75rem;
    background: var(--primary);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 110;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .header-actions.expanded .search-wrap {
    display: block;
    flex: 1;
    max-width: none;
  }

  .search-input {
    min-height: 40px;
    font-size: 16px;
  }

  .hero-banner {
    padding: 1rem 0.75rem;
  }

  .hero-title {
    font-size: 1.15rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
  }

  .modal-overlay {
    padding:
      max(1rem, env(safe-area-inset-top, 0px))
      0.75rem
      max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .modal-dialog {
    max-height: calc(100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100vh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    border-radius: 14px;
  }

  .contact-modal-overlay {
    --modal-mobile-bottom-gap: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    padding-top: max(2.75rem, calc(env(safe-area-inset-top, 0px) + 2rem));
    padding-bottom: var(--modal-mobile-bottom-gap);
    overflow: hidden;
  }

  .contact-modal-box {
    width: 100%;
    max-width: 100%;
    margin: 0;
    flex: 0 1 auto;
    min-height: 0;
    max-height: calc(
      100svh - env(safe-area-inset-top, 0px) - 2.75rem - var(--modal-mobile-bottom-gap)
    );
    max-height: calc(
      100dvh - env(safe-area-inset-top, 0px) - 2.75rem - var(--modal-mobile-bottom-gap)
    );
    max-height: calc(
      100vh - env(safe-area-inset-top, 0px) - 2.75rem - var(--modal-mobile-bottom-gap)
    );
    border-radius: 16px 16px 0 0;
  }

  .contact-modal-overlay .modal-close {
    position: fixed;
    top: max(0.5rem, env(safe-area-inset-top, 0px));
    right: max(0.65rem, env(safe-area-inset-right, 0px));
    z-index: 1002;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }

  .contact-modal-footer {
    padding: 0.65rem 1rem max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 1rem));
  }

  .contact-modal-footer .btn-submit {
    margin-top: 0;
  }

  .back-to-top {
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
    width: 44px;
    height: 44px;
  }

  .lang-switcher {
    padding: 3px 6px;
  }

  .lang-btn {
    font-size: 12px;
    min-height: 30px;
    padding: 2px 4px;
  }

  .lang-btn img {
    width: 18px;
    height: auto;
  }
}

/* ── Ngôn ngữ ── */
body.lang-vi .text-en { display: none !important; }
body.lang-en .text-vi { display: none !important; }
.text-en { display: none; }
.text-vi { display: inline; }

body.lang-en .text-en { display: inline; }
body.lang-en .text-vi { display: none !important; }

.species-name .text-vi,
.species-name .text-en,
.subcat-name .text-vi,
.subcat-name .text-en {
  display: block;
}

body.lang-vi .species-name .text-en,
body.lang-en .species-name .text-vi,
body.lang-vi .subcat-name .text-en,
body.lang-en .subcat-name .text-vi {
  display: none !important;
}

/* Ẩn layout catalog cũ (grid) */
.level1-grid,
.accordion-panels,
.level3-section,
.products-grid {
  display: none !important;
}

/* ── Catalog list dọc ── */
.catalog-list {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

/* ── Species Row ── */
.species-row {
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(0,51,102,0.06);
  transition: box-shadow 0.25s ease, border-color 0.25s ease,
              transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}

.species-row:hover {
  transform: translateX(4px);
  border-color: #c5d4e8;
}

.species-row.active {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,51,102,0.14);
  transform: translateX(0);
}

.species-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  min-height: 56px;
}

.species-header:hover { background: #f8fafc; }

.species-row.active .species-header {
  background: var(--primary);
  color: #fff;
}

.species-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* Emoji wrapper – colored bg per species */
.species-emoji-wrap {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  background: rgba(0,51,102,0.08);
}
.species-emoji-wrap.cun-cuong  { background: rgba(74,144,217,0.12); }
.species-emoji-wrap.meo-cuong  { background: rgba(155,91,182,0.12); }
.species-emoji-wrap.gia-cam    { background: rgba(230,126,34,0.12); }
.species-emoji-wrap.heo        { background: rgba(233,30,140,0.10); }
.species-emoji-wrap.thuy-san   { background: rgba(0,188,212,0.12); }

.species-row:hover .species-emoji-wrap {
  transform: scale(1.15) rotate(-5deg);
}
.species-row.active .species-emoji-wrap {
  transform: scale(1.08);
  background: rgba(255,255,255,0.18);
}

.species-emoji {
  font-size: 26px;
  line-height: 1;
}

.species-cat-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 8px;
  display: block;
  flex-shrink: 0;
  background: transparent;
}

.species-row.active .species-cat-img {
  filter: brightness(1.08) drop-shadow(0 1px 3px rgba(0,0,0,0.25));
}

.species-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.species-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.species-meta {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.2;
  font-family: var(--font-body);
}

.species-row.active .species-meta,
.species-row.active .species-meta .text-vi,
.species-row.active .species-meta .text-en {
  color: rgba(255,255,255,0.60) !important;
}

.species-row.active .species-name,
.species-row.active .species-name .text-vi,
.species-row.active .species-name .text-en {
  color: #fff !important;
}

.chevron-icon {
  font-size: 14px;
  color: var(--primary);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  display: inline-block;
  flex-shrink: 0;
}

.species-row.active .chevron-icon {
  transform: rotate(180deg);
  color: #fff;
}

/* Accordion mượt — grid 0fr/1fr (tránh giật cuối max-height) */
.subcategory-panel,
.products-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.34s cubic-bezier(0.4, 0, 0.2, 1);
}

.subcategory-panel.panel-open,
.products-panel.panel-open {
  grid-template-rows: 1fr;
}

.panel-slide-inner {
  overflow: hidden;
  min-height: 0;
}

.subcategory-panel {
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.subcategory-panel[hidden],
.products-panel[hidden] {
  display: none !important;
}

.panel-loading,
.empty-state,
.error-state {
  text-align: center;
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 14px;
}

.error-state { color: #dc2626; }

.subcat-row {
  border-bottom: 1px solid #eef0f3;
}

.subcat-row:last-child { border-bottom: none; }

.subcat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px 13px 28px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 48px;
}

.subcat-header:hover { background: #eef2f8; }

/* Accent bar bên trái subcat đang active */
.subcat-row.active .subcat-header {
  background: rgba(0,51,102,0.055);
  position: relative;
}
.subcat-row.active .subcat-header::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  min-height: 20px;
  border-radius: 0 3px 3px 0;
  background: var(--secondary);
}

.subcat-icon {
  font-size: 16px;
  color: var(--secondary);
  font-weight: 700;
  transition: transform 0.2s;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.subcat-row.active .subcat-icon { transform: rotate(90deg); }

/* Icon FA trong subcat */
.subcat-icon-fa {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(0,153,204,0.08);
  color: var(--secondary);
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
}

.subcat-row.active .subcat-icon-fa {
  background: rgba(0,51,102,0.10);
  color: var(--primary);
}

.subcat-header:hover .subcat-icon-fa {
  background: rgba(0,153,204,0.14);
}

/* Badge số sản phẩm */
.subcat-badge {
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,153,204,0.10);
  color: var(--secondary);
  padding: 2px 8px;
  border-radius: 99px;
  flex-shrink: 0;
  margin-right: 4px;
  border: 1px solid rgba(0,153,204,0.18);
  white-space: nowrap;
}

.subcat-row.active .subcat-badge {
  background: rgba(0,51,102,0.08);
  color: var(--primary);
  border-color: rgba(0,51,102,0.15);
}

.subcat-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  min-width: 0;
}

.subcat-row.active .subcat-name,
.subcat-row.active .subcat-name .text-vi,
.subcat-row.active .subcat-name .text-en {
  color: var(--primary);
}

.chevron-icon.small { font-size: 11px; }

.subcat-row.active .chevron-icon.small { transform: rotate(180deg); }

.products-panel .panel-slide-inner {
  padding: 12px 20px 16px 44px;
  background: #fff;
  border-top: 1px solid #eef0f3;
}

/* ── Product Card trong catalog list ── */
.catalog-list .product-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  border-radius: 8px;
  background: transparent;
  overflow: hidden;
  position: relative;
  transition: background 0.18s ease,
              transform 0.22s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.18s ease;
}

.catalog-list .product-card:last-child { border-bottom: none; }

/* Shimmer sweep khi hover */
.catalog-list .product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0,153,204,0.06) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.4s ease;
  pointer-events: none;
}

.catalog-list .product-card:hover {
  background: #f8fafc;
  transform: translateX(3px);
  box-shadow: -3px 0 0 0 var(--secondary);
}

.catalog-list .product-card:hover::after {
  transform: translateX(100%);
}

.catalog-list .product-card picture,
.catalog-list .product-card .product-card-img,
.catalog-list .product-card img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f7fa;
  flex-shrink: 0;
  aspect-ratio: auto;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  display: block;
}

.catalog-list .product-card:hover picture,
.catalog-list .product-card:hover .product-card-img,
.catalog-list .product-card:hover img {
  transform: scale(1.08);
}

.catalog-list .product-card-info { flex: 1; min-width: 0; }

.catalog-list .product-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.catalog-list .product-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.product-card-arrow {
  color: var(--secondary);
  font-size: 18px;
  flex-shrink: 0;
  font-weight: 700;
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1),
              color 0.18s ease;
}

.catalog-list .product-card:hover .product-card-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

.loading-dots {
  display: flex;
  gap: 6px;
  padding: 20px;
  justify-content: center;
}

.loading-dots.center { padding: 40px 20px; }

.loading-dots span {
  width: 8px;
  height: 8px;
  background: var(--secondary);
  border-radius: 50%;
  animation: bounceDots 1s infinite alternate;
}

.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounceDots {
  from { transform: translateY(0); opacity: 0.4; }
  to { transform: translateY(-8px); opacity: 1; }
}

/* ── Contact FAB ── */
.contact-fab {
  position: fixed;
  bottom: calc(24px + env(safe-area-inset-bottom));
  right: 20px;
  z-index: 888;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255,102,0,0.40);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              box-shadow 0.25s ease,
              background 0.2s ease;
  overflow: visible;
  animation: fabEntrance 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.8s both;
}

/* Ripple layer (không clip badge) */
.contact-fab::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.18);
  border-radius: inherit;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.25s, transform 0.35s;
  z-index: 0;
  pointer-events: none;
}

.contact-fab-icon,
.contact-fab-label {
  position: relative;
  z-index: 1;
}

.contact-fab:hover {
  background: #e55a00;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 32px rgba(255,102,0,0.50);
}

.contact-fab:hover::before {
  opacity: 1;
  transform: scale(1);
}

.contact-fab:active {
  transform: scale(0.95);
  transition-duration: 0.1s;
}

@keyframes fabEntrance {
  from { transform: translateY(80px) scale(0.5); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

.contact-fab-icon { font-size: 20px; line-height: 1; }

.contact-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  z-index: 2;
  background: #fff;
  color: var(--accent);
  border-radius: 999px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

/* Product interest button */
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.btn-interest {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: transform 0.2s;
  line-height: 1;
}

.btn-interest:hover { transform: scale(1.2); }

/* Contact modal form */
.contact-modal-overlay {
  align-items: center;
}

.contact-modal-box {
  max-width: 480px;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: min(
    88dvh,
    calc(100dvh - 2.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))
  );
  max-height: min(
    88vh,
    calc(100vh - 2.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))
  );
}

.contact-modal-box .modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

.contact-form-panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.contact-modal-header {
  flex-shrink: 0;
  text-align: center;
  margin-bottom: 0;
  padding: 1.35rem 1.25rem 1rem;
  padding-right: 3.5rem;
  border-bottom: 1px solid #eef0f3;
}

.contact-modal-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem 0.5rem;
}

.contact-modal-footer {
  flex-shrink: 0;
  padding: 0.75rem 1.25rem max(1.25rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eef0f3;
  background: var(--surface);
  box-shadow: 0 -6px 16px rgba(0, 51, 102, 0.06);
  z-index: 2;
}

.contact-modal-footer .btn-submit {
  margin-top: 0;
}

.contact-modal-box .contact-success {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.5rem 1.25rem max(1.25rem, env(safe-area-inset-bottom, 0px));
}

/* display:flex ở trên ghi đè [hidden] — phải ẩn khi chưa gửi */
#contactFormPanel[hidden],
#contactSuccess[hidden] {
  display: none !important;
}

.contact-modal-box .contact-success .btn-submit {
  margin-top: auto;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .contact-modal-header {
    padding: 0.75rem 1rem;
    padding-right: 3rem;
  }

  .contact-modal-title {
    font-size: 18px;
  }

  .contact-modal-scroll {
    padding: 0.85rem 1rem 0.35rem;
  }

  .form-textarea {
    min-height: 72px;
  }
}

.contact-modal-icon { font-size: 36px; margin-bottom: 8px; }

.contact-modal-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.contact-modal-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.req { color: #e53e3e; }

.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(0, 153, 204, 0.12);
}

.form-input.error { border-color: #e53e3e; }

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.interest-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 36px;
  padding: 8px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1.5px dashed var(--border);
}

.interest-empty {
  color: #9ca3af;
  font-size: 13px;
  padding: 4px;
}

.interest-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.interest-tag-remove {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  line-height: 1;
}

.interest-tag-remove:hover { color: #fff; }

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s, transform 0.15s;
}

.btn-submit:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

.contact-success {
  text-align: center;
  padding: 20px 0;
}

.success-icon { font-size: 56px; margin-bottom: 12px; }

.contact-success h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.contact-success p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ══════════════════════════════════════════════
   HIỆU ỨNG 5 – SCROLL REVEAL & TOAST NÂNG CẤP
   ══════════════════════════════════════════════ */

/* Scroll reveal – species rows xuất hiện lần lượt */
@keyframes revealRowUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.species-row {
  opacity: 0;
  animation: revealRowUp 0.45s ease both;
}

/* Stagger delay cho từng hàng */
.species-row:nth-child(1) { animation-delay: 0.05s; }
.species-row:nth-child(2) { animation-delay: 0.12s; }
.species-row:nth-child(3) { animation-delay: 0.19s; }
.species-row:nth-child(4) { animation-delay: 0.26s; }
.species-row:nth-child(5) { animation-delay: 0.33s; }
.species-row:nth-child(n+6) { animation-delay: 0.40s; }

/* Không animate từng product card khi mở dropdown — tránh giật chồng slide */
.products-panel .product-card {
  animation: none;
}

/* ── Toast nâng cấp ── */
#toast.toast,
.toast {
  position: fixed;
  bottom: calc(88px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(16px) scale(0.92);
  background: rgba(0,51,102,0.94);
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-display);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 9000;
  transition: opacity 0.25s ease,
              transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 4px 20px rgba(0,51,102,0.25);
}

#toast.toast.show,
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

/* ── Lang switcher nâng cấp ── */
.lang-btn {
  transition: background 0.2s ease,
              color 0.2s ease,
              transform 0.2s cubic-bezier(0.34,1.56,0.64,1) !important;
}

.lang-btn:hover {
  transform: scale(1.08);
}

.lang-btn.active {
  background: rgba(255,255,255,0.25) !important;
  color: #fff !important;
  transform: scale(1.05);
}

/* ── Subcat header transition ── */
.subcat-header {
  transition: background 0.18s ease, padding-left 0.2s ease !important;
}

.subcat-row.active .subcat-header {
  padding-left: 32px;
}

/* ── Loading dots nâng cấp ── */
.loading-dots span {
  background: var(--secondary);
  animation: bounceDots 0.9s infinite alternate
             cubic-bezier(0.34,1.56,0.64,1);
}

/* ── Back to top button ── */
#backToTop {
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1),
              opacity 0.25s ease !important;
}

#backToTop:hover {
  transform: translateY(-4px) scale(1.1) !important;
}

/* ── Responsive: thu gọn FAB trên mobile nhỏ ── */
@media (max-width: 380px) {
  .contact-fab .contact-fab-label { display: none; }
  .contact-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .contact-fab .contact-fab-label { display: none; }
  .contact-fab {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════
   POPUP CHỌN NGÔN NGỮ LẦN ĐẦU
   ════════════════════════════════════════════ */
html.lang-chooser-pending {
  overflow: hidden;
}

html.lang-chooser-pending body > *:not(#langChooser) {
  visibility: hidden;
}

html.lang-ready #langChooser {
  display: none !important;
}

html.lang-chooser-pending #langChooser {
  display: flex;
}

.lang-chooser-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.25rem, env(safe-area-inset-top, 0px))
           1rem
           max(1.25rem, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(160deg, #003366 0%, #0055a5 45%, #0099cc 100%);
}

.lang-chooser-overlay[hidden] {
  display: none !important;
}

.lang-chooser-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: 20px;
  padding: 2rem 1.75rem 1.75rem;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 30, 70, 0.35);
  animation: langChooserIn 0.4s var(--spring);
}

@keyframes langChooserIn {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.lang-chooser-logo {
  display: block;
  margin: 0 auto 1.25rem;
  height: auto;
  max-width: 140px;
}

.lang-chooser-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.lang-chooser-sub,
.lang-chooser-sub-en {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.lang-chooser-sub-en {
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
}

.lang-chooser-sub {
  margin-bottom: 0.25rem;
}

.lang-chooser-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.lang-chooser-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 1.25rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  transition: border-color 0.2s, background 0.2s, transform 0.22s var(--spring), box-shadow 0.2s;
}

.lang-chooser-btn:hover {
  border-color: var(--secondary);
  background: #fff;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 153, 204, 0.2);
}

.lang-chooser-btn:active {
  transform: scale(0.97);
}

.lang-chooser-btn img {
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

@media (max-width: 380px) {
  .lang-chooser-buttons {
    grid-template-columns: 1fr;
  }

  .lang-chooser-card {
    padding: 1.5rem 1.25rem;
  }
}
