/**
 * responsive.css
 * -----------------------------------------------------------------------
 * Ajustes responsivos globais. O projeto é construído mobile-first em
 * style.css; este arquivo concentra apenas os breakpoints e ajustes que
 * não fazem sentido embutir diretamente no CSS de cada componente.
 *
 * Breakpoints adotados:
 *   - Mobile:    até 767px   (padrão, definido em style.css)
 *   - Tablet:    768px – 1023px
 *   - Desktop:   1024px – 1439px
 *   - Wide:      1440px+
 * -----------------------------------------------------------------------
 */

/* Tablet */
@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    padding: 0 2.5rem;
  }
}

/* Wide */
@media (min-width: 1440px) {
  .container {
    max-width: 1280px;
  }
}

/* -------------------------------------------------------------------- */
/* Ajustes finos de grid por breakpoint (Etapa de Performance/QA)       */
/* -------------------------------------------------------------------- */

/* Tablet: grids de 4 colunas passam para 3, evitando cards espremidos */
@media (min-width: 768px) and (max-width: 1023px) {
  .ingredients-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .offer-card--best {
    grid-column: 1 / -1;
  }
}

/* Mobile pequeno: reforça leitura confortável (princípio de UX da Fase 3) */
@media (max-width: 420px) {
  .offer-card__amount {
    font-size: 2.1rem;
  }

  .navbar__logo {
    font-size: 1.2rem;
  }
}

/* ======================================================================
   MOBILE — landing page profissional, não desktop reduzido.
   Escopo: apenas max-width:768px. Não afeta tablet/desktop.
   ====================================================================== */
@media (max-width: 768px) {

  /* --- Segurança contra overflow horizontal ------------------------- */
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  * {
    box-sizing: border-box;
  }

  img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  /* --- Layout geral / containers -------------------------------------- */
  .container {
    width: 92%;
    max-width: 92%;
    margin: 0 auto;
    padding: 0 20px;
  }

  h1, h2, h3 {
    text-align: center;
  }

  html,
  body {
    width: 100%;
  }

  .comparison-table-hint {
    display: none;
  }

  .comparison-table-wrapper {
    display: none;
  }

  .comparison-cards {
    display: block;
  }

  .comparison-card {
    width: 100%;
    background-color: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    padding: 20px;
    margin-bottom: 1rem;
  }

  .comparison-card:last-child {
    margin-bottom: 0;
  }

  .comparison-card__title {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
    text-align: left;
  }

  .comparison-card__row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--color-border);
  }

  .comparison-card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
  }

  .comparison-card__value {
    font-size: 1rem;
    color: var(--color-text);
  }

  .comparison-card__row--kerassentials .comparison-card__value {
    color: var(--color-primary);
    font-weight: 600;
  }

  /* --- Hero ------------------------------------------------------------ */
  .hero__inner {
    text-align: center;
  }

  .hero__content {
    order: 1;
  }

  .hero__media {
    order: 2;
  }

  .hero__badges {
    justify-content: center;
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .hero__actions .btn {
    width: 90%;
  }

  /* --- About (Sobre o Produto) ------------------------------------------ */
  .about__inner {
    text-align: center;
  }

  .about__content {
    order: 1;
  }

  .about__media {
    order: 2;
  }

  /* --- How it Works (Como Funciona) ------------------------------------- */
  .steps {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* --- How to Use (Como Usar) -------------------------------------------- */
  .how-to-use__inner {
    text-align: center;
  }

  .how-to-use__media {
    order: 1;
  }

  .how-to-use__content {
    order: 2;
  }

  .how-to-use__media img {
    width: 100%;
    height: auto;
  }

  /* --- Ingredients -------------------------------------------------------- */
  .ingredients-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .ingredient-card {
    width: 100%;
    padding: 2rem;
  }

  .ingredient-card img {
    width: 110px;
    height: 110px;
  }

  .ingredient-card h3 {
    font-size: 1.25rem;
  }

  .ingredient-card p {
    font-size: 1rem;
  }

  /* --- Benefits ------------------------------------------------------------ */
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .benefit-card {
    width: 100%;
  }

  /* --- Why Choose Kerassentials --------------------------------------------- */
  .why-choose__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .trust-badge {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 1.75rem 1rem;
    gap: 0.6rem;
  }

  .trust-badge__icon {
    margin: 0 auto;
  }

  /* --- Testimonials ------------------------------------------------------------ */
  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .testimonial-card {
    width: 100%;
  }

  /* --- Offers ------------------------------------------------------------------- */
  .offer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .offer-card {
    width: 100%;
  }

  .offer-card__image {
    margin-left: auto;
    margin-right: auto;
  }

  .offer-card .btn--full {
    width: 100%;
  }

  /* --- FAQ ------------------------------------------------------------------------ */
  .faq-list {
    width: 100%;
    max-width: 100%;
  }
}
