/* Mobile — sobrescreve regras Club LB que quebram layout */

@media (max-width: 760px) {
  .wrap {
    padding-inline: 20px !important;
  }

  .topbar {
    padding: 5px 10px !important;
    font-size: 0.6875rem !important;
    line-height: 1.3;
    gap: 4px 6px !important;
  }

  .topbar > span:first-child,
  .topbar > .topbar__sep:first-of-type {
    display: none;
  }

  /* Cabeçalho compacto: logo | busca | ícones */
  .head {
    border-bottom: 1px solid var(--border);
  }

  .head .head__row {
    display: grid !important;
    flex-wrap: nowrap !important;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand search actions";
    height: auto !important;
    min-height: 0 !important;
    gap: 6px 8px;
    align-items: center;
    padding: 8px 0 6px !important;
  }

  .brand {
    grid-area: brand;
    flex: none !important;
    min-width: 0;
    max-width: none !important;
    display: flex !important;
    align-items: center;
    gap: 6px !important;
  }

  .brand--has-logo {
    flex-direction: row;
    align-items: center;
  }

  .brand img,
  .brand__logo {
    max-height: 44px !important;
    max-width: 44px !important;
    width: auto !important;
    height: auto !important;
  }

  .brand__name {
    font-size: 0.7rem !important;
    letter-spacing: 0.1em !important;
    line-height: 1.15 !important;
    max-width: min(88px, 28vw) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .brand__text {
    font-size: 1rem;
    line-height: 1;
    letter-spacing: 0.1em;
  }

  .brand__text small,
  .brand__tag {
    display: none !important;
  }

  .search {
    grid-area: search;
    order: unset !important;
    flex: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    height: 36px;
    padding: 0 8px;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
  }

  .search svg {
    width: 17px;
    height: 17px;
  }

  .search input {
    font-size: 0.8125rem;
    min-width: 0;
    width: 100%;
  }

  .head__actions {
    grid-area: actions;
    flex: none !important;
    flex-shrink: 0 !important;
    margin-left: 0 !important;
    gap: 2px;
    align-self: center;
    align-items: center;
    position: relative;
    z-index: 2;
  }

  .hbtn {
    padding: 6px !important;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
    border-radius: 10px;
  }

  .hbtn svg {
    width: 20px;
    height: 20px;
  }

  .hbtn__label {
    display: none;
  }

  .hbtn--cart {
    padding: 6px 8px !important;
  }

  .badge {
    left: auto !important;
    right: 0 !important;
    top: 0 !important;
    min-width: 16px;
    height: 16px;
    font-size: 0.625rem;
    line-height: 16px;
  }

  .head > .wrap:last-of-type {
    padding-top: 0;
    padding-bottom: 6px;
    overflow: visible;
  }

  .cats {
    margin: 0 !important;
    padding: 0 4px 4px 0 !important;
    gap: 6px;
    align-items: center;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline-end: 12px;
  }

  .cats a {
    padding: 5px 11px;
    font-size: 0.75rem;
    line-height: 1.2;
  }

  /* Conteúdo */
  main,
  main.site-main,
  .site-main {
    padding-top: 0.5rem !important;
    padding-bottom: 2.75rem !important;
  }

  .sec {
    margin-bottom: 2rem !important;
  }

  .sec__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    margin-bottom: 1rem !important;
  }

  .sec__head h2.display {
    text-transform: none !important;
    letter-spacing: 0.02em;
    font-size: 1.35rem;
    line-height: 1.2;
  }

  .sec__head p {
    font-size: 0.875rem;
    margin-top: 0.25rem;
  }

  .sec__head .link {
    white-space: normal !important;
    margin-left: 0 !important;
    margin-top: 0.25rem;
  }

  /* Categorias home — grid, não carrossel estreito */
  .tiles {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 14px !important;
  }

  .tiles.tiles--6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tile {
    flex: unset !important;
    width: auto !important;
    min-width: 0;
    aspect-ratio: 1 / 1.05;
  }

  /* Produtos */
  .grid,
  .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-columns: unset !important;
    grid-auto-flow: unset !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    gap: 14px !important;
  }

  .card__body {
    padding: 10px 11px 12px !important;
  }

  .card__cat {
    font-size: 0.625rem;
  }

  .card__name {
    font-size: 0.8125rem !important;
    min-height: 0 !important;
    -webkit-line-clamp: 2;
  }

  .card .stars {
    font-size: 0.72rem;
  }

  .card .price b {
    font-size: 1.05rem !important;
  }

  .card .price small {
    padding-right: 0 !important;
    font-size: 0.6875rem;
  }

  .card__buy {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
  }

  .card__buy .btn {
    padding: 9px 10px;
    font-size: 0.75rem;
  }

  .card__add {
    display: none !important;
  }

  /* Vantagens */
  .perks {
    gap: 10px;
  }

  .perks--home .perk {
    padding: 0.4rem 0.2rem !important;
    gap: 0.45rem !important;
    background: transparent !important;
    border: none !important;
  }

  .perk {
    padding: 12px !important;
    gap: 10px;
  }

  .perk b {
    font-size: 0.8125rem !important;
  }

  .perk span {
    font-size: 0.75rem !important;
  }

  /* Hero card — mobile-app.css */

  .beauty-hero__copy p {
    font-size: 0.9rem;
  }

  .beauty-hero__cta-row .btn {
    font-size: 0.8125rem;
    padding: 11px 12px;
  }

  /* Promo / editorial */
  .promo-mosaic {
    margin-bottom: 2rem;
  }

  .editorial__card {
    padding: 1.35rem 1.15rem;
  }

  .editorial__card h2.display {
    font-size: 1.35rem;
  }

  /* Páginas */
  .page-title h1.display {
    font-size: 1.45rem;
  }

  .toolbar {
    margin-bottom: 1rem;
  }

  .panel {
    padding: 1.1rem !important;
  }

  .contact-layout {
    gap: 0.85rem;
  }

  .cart-page .summary {
    margin-top: 0.5rem;
  }

  .pd__price b {
    font-size: 1.85rem !important;
  }

  .pd-info h1 {
    font-size: 1.35rem !important;
  }

  /* Rodapé — respiro */
  .foot {
    margin-top: 1.5rem;
  }
}

@media (max-width: 420px) {
  .head .head__row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "searchrow searchrow";
    gap: 8px 6px;
    padding-bottom: 8px !important;
  }

  .brand {
    max-width: none;
  }

  .search {
    width: 100% !important;
  }
}

@media (max-width: 400px) {
  .beauty-hero__cta-row {
    flex-direction: column;
  }

  .beauty-hero__cta-row .btn {
    flex: 1 1 auto;
    width: 100%;
  }

  .about-home__actions {
    flex-direction: column;
  }

  .about-home__actions .btn {
    width: 100%;
  }
}

@media (min-width: 401px) and (max-width: 760px) {
  .perks {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
