/* =============================================================================
   base.css — shared by ALL pages (split from styles.css 2026-07-16)
   Tokens / reveal / hover / toast / confirm modal / user dropdown / cart nav /
   header polish (S12.5) / S13 mobile audit / img fallback / floating Zalo CTA
   ============================================================================= */
/* ==================== Adsngam.com — Cream Light Theme ==================== */

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: #FEEFDD;
  color: #201E1F;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  background-image:
    radial-gradient(ellipse 800px 600px at 10% -10%, rgba(255, 64, 0, 0.10), transparent 50%),
    radial-gradient(ellipse 600px 500px at 90% 10%, rgba(80, 178, 192, 0.12), transparent 50%),
    radial-gradient(ellipse 700px 500px at 50% 100%, rgba(250, 170, 141, 0.18), transparent 50%);
}

/* S13 mobile audit — safety net toàn site:
   - chặn horizontal scroll do blob trang trí / element tràn mép
   - cho modal cuộn được trên màn hình thấp (375×667) thay vì bị cắt đầu */
html, body { overflow-x: hidden; }
.confirm-modal-backdrop { overflow-y: auto; }
.confirm-modal { max-height: 90vh; overflow-y: auto; }

/* Display headings */
.font-display {
  letter-spacing: -0.02em;
  font-weight: 800;
}

/* ==================== Scroll Reveal Animations ==================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-reveal-delay="50"] { transition-delay: 50ms; }
.reveal[data-reveal-delay="100"] { transition-delay: 100ms; }
.reveal[data-reveal-delay="150"] { transition-delay: 150ms; }
.reveal[data-reveal-delay="200"] { transition-delay: 200ms; }
.reveal[data-reveal-delay="300"] { transition-delay: 300ms; }

/* ==================== Hover animations for buttons ==================== */
/* Primary CTA buttons get a subtle lift + soft shadow on hover */
.btn-hover {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease;
  will-change: transform;
}

.btn-hover:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 12px 28px -10px rgba(255, 64, 0, 0.4);
}

.btn-hover:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 0.1s;
}

/* Arrow inside button slides forward on hover */
.btn-hover svg {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-hover:hover svg {
  transform: translateX(3px);
}

/* Ghost / secondary buttons — subtle border + background tint */
.btn-ghost {
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              background-color 0.2s ease,
              border-color 0.2s ease;
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background-color: rgba(32, 30, 31, 0.04);
  border-color: rgba(255, 64, 0, 0.4);
}

.btn-ghost:active {
  transform: translateY(0);
}

/* Card hover lift — applies via .group hover */
.card-hover {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px -16px rgba(250, 170, 141, 0.45);
  border-color: rgba(255, 64, 0, 0.4);
}

/* Nav link hover */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #FF4000;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-link:hover::after {
  transform: scaleX(1);
}

/* Logo gentle pulse on hover */
.logo-hover {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.logo-hover:hover {
  transform: scale(1.05);
}

/* ==================== Reduced motion ==================== */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal.is-visible,
  .btn-hover,
  .btn-ghost,
  .card-hover,
  .nav-link::after,
  .logo-hover {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==================== Custom scrollbar (light) ==================== */
@media (min-width: 1024px) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: #FEEFDD;
  }
  ::-webkit-scrollbar-thumb {
    background: #F2C5A5;
    border-radius: 10px;
    border: 2px solid #FEEFDD;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #FAAA8D;
  }
}

/* ==================== Selection ==================== */
::selection {
  background: rgba(255, 64, 0, 0.25);
  color: #201E1F;
}

/* ==================== Focus styles ==================== */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ==================== Pulse animation ==================== */
@keyframes softPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse {
  animation: softPulse 2s ease-in-out infinite;
}

/* ==================== Subtle paper texture (optional grain) ==================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============ Toast notifications ============ */
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

#toastRoot {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
}

.toast {
  background-color: #5BA85A;
  color: #FEEFDD;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 12px 28px -10px rgba(91, 168, 90, 0.45),
              0 4px 12px -4px rgba(0, 0, 0, 0.08);
  animation: toastSlideIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: auto;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.is-error {
  background-color: #FF4000;
  box-shadow: 0 12px 28px -10px rgba(255, 64, 0, 0.45),
              0 4px 12px -4px rgba(0, 0, 0, 0.08);
}

@media (max-width: 640px) {
  #toastRoot {
    top: 16px;
    left: 16px;
    right: 16px;
    align-items: stretch;
  }
  .toast {
    text-align: center;
    white-space: normal;
  }
}

/* Reduced motion respect (extend existing rule) */
@media (prefers-reduced-motion: reduce) {
  .auth-card,
  .toast,
  .google-btn.is-loading .google-btn-text::before,
  .spinner {
    animation: none !important;
  }
  .google-btn:hover,
  .google-btn:active {
    transform: none !important;
  }
}


/* ---- Confirm modal + shared modal keyframes (used: account/admin/blog/checkout/login + user dropdown) ---- */
/* ---- Confirm modal ---- */
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background-color: rgba(32, 30, 31, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}

.confirm-modal-backdrop.hidden {
  display: none;
}

.confirm-modal {
  background-color: #FFFFFF;
  border-radius: 24px;
  padding: 28px;
  padding-top: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px -20px rgba(32, 30, 31, 0.4);
  animation: modalScaleIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
}

/* Modal close X button — góc trên phải. Tránh click backdrop để đóng nhầm
   (vd verify mail modal, mất state phải re-send). */
.modal-close-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(254, 239, 221, 0.85);
  color: #4A4548;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #F2C5A5;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 0;
  z-index: 1;
}
.modal-close-x:hover {
  background: #FAAA8D;
  color: #201E1F;
  transform: scale(1.08);
}
.modal-close-x:focus-visible {
  outline: 2px solid #FF4000;
  outline-offset: 2px;
}


/* ---- User dropdown (navbar logged-in state) ---- */
.user-nav-dropdown {
  min-width: 200px;
  z-index: 60;
  border: 1px solid #F8DBC0;
  box-shadow: 0 12px 32px -12px rgba(32, 30, 31, 0.18);
  animation: modalScaleIn 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-nav-dropdown a,
.user-nav-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #4A4548;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.user-nav-dropdown a:hover,
.user-nav-dropdown button:hover {
  background-color: rgba(255, 64, 0, 0.08);
  color: #201E1F;
}

.user-nav-dropdown hr {
  border: 0;
  border-top: 1px solid #F8DBC0;
  margin: 6px 4px;
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .confirm-modal-backdrop,
  .confirm-modal,
  .user-nav-dropdown {
    animation: none !important;
  }
}


/* ==================== Cart icon trong navbar (S12.4) ====================
   Cart đã được ẩn toàn site — mọi giao dịch chuyển sang Zalo/Messenger.
   Giữ markup để admin/checkout cũ vẫn hoạt động nội bộ. */
.cart-nav-btn {
  position: relative;
  display: none !important;
}

.cart-nav-btn .cart-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #FF4000;
  color: #FEEFDD;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid #FEEFDD;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cart-nav-btn .cart-badge.is-empty {
  display: none;
}


/* ==================== Header polish + animations (S12.5) ====================
   Áp cho mọi trang có chung navbar (index/login/account/learn/blog/admin/checkout).
   Target qua existing markup: header.fixed, .logo-hover, .nav-link,
   [data-user-dropdown-trigger], [data-user-avatar], .cart-nav-btn, .cart-badge.
   KHÔNG cần edit HTML — toàn bộ pages đều hưởng. */

/* Animated gradient line dưới header */
header.fixed {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

header.fixed::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 64, 0, 0.35) 18%,
    rgba(80, 178, 192, 0.45) 50%,
    rgba(250, 170, 141, 0.4) 82%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: headerGlowSweep 9s ease-in-out infinite;
  opacity: 0.85;
  pointer-events: none;
}

@keyframes headerGlowSweep {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Brand logo nhấn mạnh */
.logo-hover {
  position: relative;
  padding: 4px 8px 4px 4px;
  border-radius: 12px;
  transition: background-color 0.3s ease;
}

.logo-hover:hover {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.06), rgba(80, 178, 192, 0.06));
}

.logo-hover img {
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}

.logo-hover:hover img {
  transform: rotate(-8deg) scale(1.08);
  box-shadow: 0 8px 22px -6px rgba(255, 64, 0, 0.55), 0 0 0 3px rgba(255, 64, 0, 0.18);
}

.logo-hover span {
  transition: letter-spacing 0.3s cubic-bezier(0.22, 1, 0.36, 1), filter 0.3s ease;
}

.logo-hover:hover span {
  letter-spacing: -0.025em;
  filter: drop-shadow(0 0 10px rgba(255, 64, 0, 0.28));
}

/* Nav link micro-lift on hover (existing underline expand giữ nguyên) */
header .nav-link {
  transition: color 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

header .nav-link:hover {
  transform: translateY(-1px);
}

/* User dropdown trigger — gradient pill + animated avatar ring + online dot */
[data-user-dropdown-trigger] {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.08), rgba(80, 178, 192, 0.08)) !important;
  border: 1px solid rgba(255, 64, 0, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

[data-user-dropdown-trigger]:hover {
  background: linear-gradient(135deg, rgba(255, 64, 0, 0.16), rgba(80, 178, 192, 0.16)) !important;
  border-color: rgba(255, 64, 0, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px -8px rgba(255, 64, 0, 0.42);
}

[data-user-dropdown-trigger] [data-user-avatar] {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px rgba(255, 64, 0, 0.4);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
  animation: avatarRingPulse 3.2s ease-in-out infinite;
}

@keyframes avatarRingPulse {
  0%, 100% { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3.5px rgba(255, 64, 0, 0.42); }
  50%      { box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 5px rgba(80, 178, 192, 0.5); }
}

[data-user-dropdown-trigger]:hover [data-user-avatar] {
  transform: rotate(8deg) scale(1.06);
}

/* "Online" dot nhấp nháy ở góc avatar */
[data-user-dropdown-trigger]::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 30px;
  width: 9px;
  height: 9px;
  background: #5BA85A;
  border: 2px solid #FEEFDD;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
  animation: onlineDotPulse 2.4s ease-in-out infinite;
}

@keyframes onlineDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(91, 168, 90, 0.6); }
  50%      { box-shadow: 0 0 0 7px rgba(91, 168, 90, 0); }
}

/* User name luôn rõ; tăng max-width một chút để fit tên Việt */
[data-user-dropdown-trigger] [data-user-name] {
  max-width: 130px !important;
  font-weight: 600 !important;
  color: #201E1F !important;
}

/* Caret xoay khi dropdown mở */
[data-user-dropdown-trigger] svg:last-child {
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-user-dropdown-trigger][aria-expanded="true"] svg:last-child {
  transform: rotate(180deg);
}

/* Cart button — gradient bg + bounce + shake icon + animated badge */
.cart-nav-btn {
  background: linear-gradient(135deg, rgba(80, 178, 192, 0.12), rgba(255, 64, 0, 0.10)) !important;
  border: 1px solid rgba(80, 178, 192, 0.28);
  transition: background 0.35s ease, border-color 0.35s ease,
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease !important;
}

.cart-nav-btn:hover {
  background: linear-gradient(135deg, rgba(80, 178, 192, 0.25), rgba(255, 64, 0, 0.20)) !important;
  border-color: rgba(80, 178, 192, 0.5);
  transform: translateY(-2px) rotate(-3deg);
  box-shadow: 0 10px 22px -7px rgba(80, 178, 192, 0.5);
}

.cart-nav-btn > span:first-child {
  display: inline-block;
  transform-origin: 50% 70%;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.cart-nav-btn:hover > span:first-child {
  animation: cartShake 0.7s cubic-bezier(0.36, 0, 0.66, -0.56) both;
}

@keyframes cartShake {
  0%   { transform: rotate(0deg) scale(1); }
  20%  { transform: rotate(-14deg) scale(1.1); }
  45%  { transform: rotate(11deg) scale(1.1); }
  70%  { transform: rotate(-7deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}

/* Cart badge bouncy entrance */
.cart-nav-btn .cart-badge:not(.is-empty) {
  animation: cartBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* Pulse ring tỏa ra từ badge */
.cart-nav-btn .cart-badge:not(.is-empty)::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  border: 2px solid rgba(255, 64, 0, 0.55);
  animation: cartBadgePulseRing 2.2s ease-out infinite;
  pointer-events: none;
}

@keyframes cartBadgePop {
  0%   { transform: scale(0); opacity: 0; }
  60%  { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes cartBadgePulseRing {
  0%   { transform: scale(1);   opacity: 0.85; }
  100% { transform: scale(2.3); opacity: 0; }
}

/* Zalo CTA: shimmer sweep nhẹ định kỳ — thu hút mắt mà không gắt */
header .btn-hover.bg-ink {
  position: relative;
  overflow: hidden;
}

header .btn-hover.bg-ink::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  pointer-events: none;
  animation: btnShimmerSweep 4.5s ease-in-out infinite;
  animation-delay: 1.5s;
}

@keyframes btnShimmerSweep {
  0%, 70%, 100% { left: -120%; }
  88%           { left: 220%; }
}

/* Mobile menu button polish */
#mobileMenuBtn {
  border-radius: 10px;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobileMenuBtn:hover {
  color: #FF4000;
  background: rgba(255, 64, 0, 0.08);
  transform: scale(1.08);
}

/* Reduce motion: tắt animation nhưng giữ hover state */
@media (prefers-reduced-motion: reduce) {
  header.fixed::after,
  [data-user-dropdown-trigger] [data-user-avatar],
  [data-user-dropdown-trigger]::before,
  .cart-nav-btn .cart-badge::after,
  .cart-nav-btn:hover > span:first-child,
  .cart-nav-btn .cart-badge:not(.is-empty),
  header .btn-hover.bg-ink::after {
    animation: none !important;
  }
  .logo-hover img,
  .logo-hover span,
  [data-user-dropdown-trigger],
  .cart-nav-btn,
  .cart-nav-btn > span:first-child,
  #mobileMenuBtn,
  header .nav-link {
    transition: none !important;
  }
}

/* =============================================================================
   S13 — Mobile audit safety overrides (≤640px)
   Aim: prevent horizontal scroll, ensure touch targets ≥44px, modal full-width.
   ============================================================================= */

@media (max-width: 640px) {
  body { word-break: break-word; }

  h1, h2, h3 {
    overflow-wrap: break-word;
  }

  /* Modal: full-width with safe gutters trên màn hình nhỏ */
  .confirm-modal-backdrop .confirm-modal,
  .product-detail-modal,
  .verify-modal {
    width: calc(100vw - 24px) !important;
    max-width: calc(100vw - 24px) !important;
    margin: 12px auto !important;
  }

  /* Touch targets ≥44px cho icon buttons */
  .cart-nav-btn,
  #mobileMenuBtn,
  [data-user-dropdown-trigger],
  .modal-close-x,
  .product-detail-close {
    min-width: 44px;
    min-height: 44px;
  }

  /* S13 audit — touch target ≥44px cho control chính mọi trang (mobile) */
  .admin-action-btn,
  .admin-filter button,
  .admin-nav-item,
  .admin-status-select,
  .account-nav-item,
  .order-filter button,
  .course-tab-btn,
  .lesson-nav-btn,
  .explore-btn,
  .comm-cat-tabs button,
  .comm-join-btn,
  .blog-category-pills button {
    min-height: 44px;
  }
  /* Nút icon vuông ≥44px */
  .qty-btn,
  .cart-item-remove,
  .password-toggle,
  .post-detail-close,
  .admin-featured-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  /* Nút Zalo mobile trong navbar (w-10 h-10 = 40px → 44px) */
  a[aria-label="Zalo"],
  a[title*="Zalo"].w-10 {
    min-width: 44px;
    min-height: 44px;
  }
  /* Ẩn nút nổi Zalo khi đang mở modal (tránh đè nội dung) */
  body.modal-open .floating-zalo-cta { display: none; }

  /* Footer newsletter form — stack vertically */
  form[data-newsletter-form] {
    flex-direction: column;
    align-items: stretch;
    gap: 8px !important;
    max-width: 100% !important;
  }
  form[data-newsletter-form] input,
  form[data-newsletter-form] button {
    width: 100%;
  }

  /* Resource tabs — gợi ý scrollable */
  .resource-tabs {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  /* Admin form grid — stack 1 col trên màn hình nhỏ */
  .admin-form-grid.cols-2,
  .admin-form-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
}

/* Tablet ≤768px — admin tables compact */
@media (max-width: 768px) {
  .admin-shell .data-table {
    font-size: 13px;
  }
  .admin-shell .data-table th[data-col-priority="3"],
  .admin-shell .data-table td[data-col-priority="3"] {
    display: none;
  }
}

/* =============================================================================
   B17 — Image fallback placeholder
   Khi auth-api.js setupImageFallback() swap <img> src sang inline SVG monogram,
   class .img-placeholder được apply để styled cho consistent look.
   ============================================================================= */
.img-placeholder {
  background: linear-gradient(135deg, #FF4000 0%, #FAAA8D 60%, #FEEFDD 100%);
  object-fit: contain;
  /* Inline SVG đã có rounded corners nên không override radius ở đây */
}


/* P1.2b (2026-07-16): block "GIÁ ẨN TOÀN SITE" đã GỠ — giá hiển thị công khai
   trở lại, chỉnh từ admin. Floating Zalo CTA giữ nguyên bên dưới. */

/* Floating Zalo CTA — bottom-right, always visible non-admin */
.floating-zalo-cta {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #FF4000;
  color: #FEEFDD;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 4px 12px -4px rgba(0,0,0,0.15);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, background 0.25s ease;
  animation: floating-zalo-pulse 2.4s ease-in-out infinite;
}
.floating-zalo-cta:hover {
  transform: translateY(-3px) scale(1.04);
  background: #E03500;
  box-shadow: 0 18px 36px -10px rgba(255, 64, 0, 0.65), 0 6px 16px -4px rgba(0,0,0,0.18);
}
.floating-zalo-cta .floating-zalo-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FEEFDD;
  color: #FF4000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
@keyframes floating-zalo-pulse {
  0%, 100% { box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 0 0 0 rgba(255, 64, 0, 0.45); }
  50%      { box-shadow: 0 12px 28px -8px rgba(255, 64, 0, 0.55), 0 0 0 14px rgba(255, 64, 0, 0); }
}
@media (max-width: 480px) {
  .floating-zalo-cta {
    right: 12px;
    bottom: 12px;
    padding: 10px 14px;
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .floating-zalo-cta {
    animation: none;
  }
  .floating-zalo-cta:hover {
    transform: none;
  }
}
