/* =============================================
   RESPONSIVE — AromaLand
   Mobile-first: mobile default → scale up
   Thứ tự: min-width trước, max-width sau (từ rộng → hẹp để cascade đúng)
   Breakpoints: 480 | 768 | 1024 | 1280
   ============================================= */

/* ============ TABLET SMALL (480px+) ============ */
@media (min-width: 480px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .channels__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============ TABLET (768px+) ============ */
@media (min-width: 768px) {
  .container { padding: 0 var(--space-8); }

  .hero__content { grid-template-columns: 1fr 1fr; }
  .hero__visual  { order: 0; }
  .hero__title   { font-size: var(--text-4xl); }
  .bottle--main .bottle__img { height: 300px; }
  .bottle--side .bottle__img { height: 220px; }

  .features__grid     { grid-template-columns: repeat(2, 1fr); }
  .products__grid     { grid-template-columns: repeat(3, 1fr); }
  .steps              { grid-template-columns: repeat(3, 1fr); }
  .steps::before      { display: block; }
  .testimonials__grid { grid-template-columns: repeat(3, 1fr); }
  .channels__grid     { grid-template-columns: repeat(2, 1fr); }
  .footer__grid       { grid-template-columns: 2fr 1fr 1fr; }
}

/* ============ DESKTOP (1024px+) ============ */
@media (min-width: 1024px) {
  .features__grid { grid-template-columns: repeat(4, 1fr); }
  .products__grid { grid-template-columns: repeat(4, 1fr); }
  .channels__grid { grid-template-columns: repeat(4, 1fr); }
  .footer__grid   { grid-template-columns: 2fr 1fr 1fr 1.5fr; }
  .bottle--main .bottle__img { height: 460px; }
  .bottle--side .bottle__img { height: 340px; }
  .hero__bottles { gap: 20px; }
}

/* ============ WIDE (1280px+) ============ */
@media (min-width: 1280px) {
  .container     { padding: 0 var(--space-6); }
  .hero__title   { font-size: var(--text-5xl); }
  .section-title { font-size: var(--text-3xl); }
  .products__grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============ MOBILE NAV + LAYOUT (< 768px) ============ */
@media (max-width: 767px) {
  /* Nav collapse */
  .nav__menu {
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: var(--color-surface);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: var(--space-2) 0 var(--space-4);
    border-bottom: 2px solid var(--color-border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    /* Ẩn bằng visibility + opacity thay vì transform để không che hero */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: visibility 0.28s, opacity 0.28s ease, transform 0.28s ease;
    z-index: 199;
  }
  .nav__menu.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .nav__link {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: var(--space-3);
  }
  .nav__link::before {
    content: '';
    display: inline-block;
    width: 4px; height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .nav__link:hover::before,
  .nav__link--active::before { opacity: 1; }
  .nav__link--active { color: var(--color-primary); font-weight: var(--font-semibold); }
  .nav__link::after  { display: none; }

  /* Nút Mua ngay trong mobile menu */
  .nav__menu-cta {
    margin: var(--space-4) var(--space-6) var(--space-2);
    display: block;
  }

  .nav__cta       { display: none; }
  .nav__hamburger { display: flex; }

  /* Hero */
  .hero { padding-top: var(--space-10); }
  .hero__content {
    grid-template-columns: 1fr;
    gap: var(--space-6);
    padding-bottom: var(--space-10);
    text-align: center;
  }
  .hero__text    { min-width: 0; overflow-wrap: break-word; word-break: break-word; }
  .hero__visual  { order: -1; max-width: 100%; overflow: hidden; }
  .hero__stats   { justify-content: center; gap: var(--space-6); }
  .hero__actions { justify-content: center; }
  .hero__title   { font-size: var(--text-2xl); }
  .hero__desc    { font-size: var(--text-base); }
  .hero__badge {
    display: block;
    margin: 0 auto var(--space-4);
    white-space: normal;
    text-align: center;
    max-width: 100%;
    line-height: 1.6;
    font-size: var(--text-xs);
    padding: var(--space-2) var(--space-4);
  }

  /* Bottles */
  .bottle--main .bottle__img { height: 180px; }
  .bottle--side .bottle__img { height: 130px; }
  .hero__bottles { gap: 8px; }

  /* Sections */
  .section       { padding: var(--space-12) 0; }
  .section-title { font-size: var(--text-2xl); }
  .section-desc  { font-size: var(--text-base); }
  .section-header { margin-bottom: var(--space-8); }

  /* Steps */
  .steps         { grid-template-columns: 1fr; }
  .steps::before { display: none; }

  /* Testimonials */
  .testimonials__grid { grid-template-columns: 1fr; }

  /* CTA */
  .cta-banner        { padding: var(--space-12) var(--space-4); }
  .cta-banner__title { font-size: var(--text-2xl); }
  .cta-banner__desc  { font-size: var(--text-base); }

  /* Footer */
  .footer__grid  { grid-template-columns: 1fr 1fr; gap: var(--space-6); }
  .footer__brand { grid-column: span 2; }

  /* Zalo float */
  .zalo-float {
    bottom: var(--space-5);
    right: var(--space-4);
    height: 44px;
    padding: 0 var(--space-4) 0 var(--space-3);
    font-size: var(--text-xs);
  }

  /* Product card */
  .product-card__img     { height: 180px; }
  .product-card__img img { height: 155px; }

  /* Stats strip (san-pham.html) */
  .stats-strip {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    padding: var(--space-5) 0;
    margin-bottom: var(--space-8);
  }
  .stats-strip__item  { padding: var(--space-3); background: var(--color-secondary); border-radius: var(--radius-md); text-align: center; }
  .stats-strip__value { font-size: var(--text-2xl); }
  .stats-strip__label { font-size: var(--text-xs); }

  /* Page hero (san-pham, gioi-thieu, lien-he) */
  .page-hero        { padding: var(--space-12) 0 var(--space-8); }
  .page-hero__title { font-size: var(--text-3xl); }
  .page-hero__desc  { font-size: var(--text-sm); }
  .breadcrumb       { font-size: var(--text-xs); }

  /* Voucher bar */
  .voucher-bar       { padding: var(--space-3) var(--space-4); }
  .voucher-bar__title { width: 100%; }
}

/* ============ MOBILE NHỎ (< 480px) — override sau < 768px ============ */
@media (max-width: 479px) {
  /* Hero nhỏ hơn */
  .hero__title   { font-size: var(--text-xl); }
  .hero__desc    { font-size: var(--text-sm); }
  .hero__badge   { font-size: 11px; padding: var(--space-1) var(--space-3); }
  .hero__stats   { gap: var(--space-4); }
  .hero__stat strong { font-size: var(--text-xl); }
  .hero__stat span   { font-size: 10px; }

  /* Nút CTA hero */
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  /* Grid */
  .features__grid     { grid-template-columns: 1fr; }
  .products__grid     { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
  .channels__grid     { grid-template-columns: repeat(2, 1fr); }
  .testimonials__grid { grid-template-columns: 1fr; }
  .steps              { grid-template-columns: 1fr; }

  /* CTA banner */
  .cta-banner__actions { flex-direction: column; align-items: center; }
  .cta-banner__actions .btn { width: 100%; max-width: 300px; justify-content: center; }
  .cta-banner__title { font-size: var(--text-xl); }

  /* Footer 1 cột */
  .footer__grid  { grid-template-columns: 1fr; gap: var(--space-6); }
  .footer__brand { grid-column: span 1; }

  /* Section */
  .section-title  { font-size: var(--text-xl); }
  .section-header { margin-bottom: var(--space-6); }

  /* Product card compact */
  .product-card__img     { height: 160px; }
  .product-card__img img { height: 140px; }
  .product-card__body    { padding: var(--space-3); }
  .product-card__title   { font-size: var(--text-sm); }

  /* Stats strip 2×2 compact */
  .stats-strip       { gap: var(--space-3); padding: var(--space-4) 0; }
  .stats-strip__value { font-size: var(--text-xl); }

  /* Filter bar */
  .filter-bar  { padding: var(--space-3); gap: var(--space-2); margin-bottom: var(--space-6); }
  .filter-tags { gap: var(--space-1); }
  .filter-tag  { padding: 4px var(--space-2); font-size: 11px; }

  /* Page hero nhỏ */
  .page-hero        { padding: var(--space-10) 0 var(--space-6); }
  .page-hero__title { font-size: var(--text-2xl); }
}
