/* Mobile — experiência tipo app nativo */

@media (max-width: 760px) {
  :root {
    --app-gutter: 20px;
    --app-gap: 14px;
    --app-section-gap: 16px;
    --app-block-gap: 14px;
    --app-radius: 16px;
  }

  /* Gutter único — conteúdo nunca colado na borda */
  .site-main,
  main.site-main {
    padding-inline: var(--app-gutter) !important;
  }

  .site-main > *,
  main.site-main > * {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  html {
    -webkit-tap-highlight-color: transparent;
  }

  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #f5f2eb;
  }

  body.has-app-tabbar {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .topbar {
    display: none;
  }

  .cep-strip {
    display: none !important;
  }

  .wrap {
    padding-inline: var(--app-gutter) !important;
    box-sizing: border-box;
  }

  .page.wrap,
  .catalog-page.wrap,
  .pd-page.wrap,
  .cart-page.wrap {
    padding-inline: 0 !important;
  }

  .tiles,
  .row:not(.product-block__grid),
  .cats {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .head {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: env(safe-area-inset-top, 0px);
    box-shadow: 0 1px 0 rgba(18, 16, 14, 0.08);
  }

  .head .head__row {
    display: grid !important;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "searchrow searchrow";
    gap: 8px !important;
    padding: 12px 0 10px !important;
    min-height: 0 !important;
    align-items: center;
  }

  .head__search-row {
    grid-area: searchrow;
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .head .brand {
    justify-self: start;
  }

  .head__actions {
    justify-self: end;
    flex-shrink: 0;
  }

  .head > .wrap:not(.head__row) {
    display: none !important;
  }

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

  .head__actions {
    display: flex;
    gap: 4px;
    align-items: center;
  }

  .hbtn {
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 7px !important;
    border-radius: 10px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .hbtn--cart {
    background: transparent !important;
    border: none !important;
  }

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

  .hbtn__label {
    display: none !important;
  }

  .hbtn svg,
  .hbtn .wishlist-head-icon {
    width: 20px !important;
    height: 20px !important;
  }

  .head__search-row .search {
    flex: 1 1 0% !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    height: 42px !important;
    border-radius: 12px !important;
    padding: 0 10px 0 11px !important;
    background: #f0ebe3 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .head__search-row .search svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
    opacity: 0.55;
  }

  .head__search-row .search input {
    flex: 1 1 auto !important;
    width: 100% !important;
    font-size: 0.8125rem !important;
    min-width: 0;
  }

  .search input::placeholder {
    color: var(--faint);
  }

  .head .head__row.wrap {
    padding-inline: var(--app-gutter) !important;
    background: #fff;
  }

  /* Categorias horizontais: Filtrar + tab bar (+ anéis na home) */
  .main-nav,
  .cats {
    display: none !important;
  }

  body.has-shop-filters .head__search-row .mobile-shop-toolbar {
    display: flex !important;
    flex: 0 0 42px;
    width: 42px;
    min-width: 42px;
    align-items: stretch;
  }

  body.has-shop-filters .head__search-row .mobile-shop-toolbar__btn {
    width: 100%;
  }

  /* Club LB força .row como carrossel — corrige grade de produtos */
  .product-block__grid,
  .product-block__grid.row,
  .product-block__grid.grid,
  .brand-panel .row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-columns: unset !important;
    grid-auto-flow: row !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-padding: 0 !important;
  }

  .site-main,
  main.site-main {
    padding-top: 4px !important;
    padding-bottom: 1.75rem !important;
    display: flex;
    flex-direction: column;
    gap: var(--app-section-gap);
  }

  /* Páginas internas: .wrap duplicava gutter */
  .site-main > .wrap.page,
  .site-main > .wrap.catalog-page,
  .site-main > .wrap.pd-page,
  .site-main > .wrap.cart-page,
  .site-main > .auth-page__wrap {
    padding-inline: 0 !important;
  }

  .crumbs {
    display: none;
  }

  .page {
    padding-top: var(--app-section-gap) !important;
    padding-bottom: 0.75rem !important;
  }

  .catalog-page .page-title {
    margin-top: 0.25rem;
  }

  .page-title {
    margin-bottom: 1rem;
    padding-top: 0.15rem;
  }

  .page-title h1.display {
    font-size: 1.35rem;
  }

  .page-title p {
    font-size: 0.8125rem;
    color: var(--muted);
  }

  .grid,
  .row,
  .favoritos-grid,
  .tiles,
  .tiles.tiles--6 {
    gap: var(--app-gap) !important;
  }

  .product-block {
    gap: 1rem !important;
  }

  .product-block + .product-block,
  .sec + .sec {
    margin-top: var(--app-section-gap);
  }

  .card {
    border-radius: 12px !important;
    overflow: hidden;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(18, 16, 14, 0.06) !important;
  }

  .card__body {
    padding: 0.75rem 0.65rem 0.85rem !important;
    gap: 0.35rem;
  }

  .card__buy {
    margin-top: 0.55rem !important;
    padding-top: 0.55rem !important;
  }

  .card__name {
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
  }

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

  .card .btn--primary {
    border-radius: 10px !important;
    min-height: 40px;
    font-size: 0.8125rem !important;
  }

  .card__img {
    border-radius: 14px 14px 0 0;
  }

  /* Hero — banner tipo card (margem + cantos + sombra) */
  .beauty-hero {
    margin: 8px 0 0 !important;
    width: 100% !important;
    max-width: none;
    min-height: min(72vw, 320px) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
    box-shadow:
      0 10px 32px rgba(18, 16, 14, 0.14),
      0 2px 8px rgba(18, 16, 14, 0.06) !important;
    isolation: isolate;
  }

  .beauty-hero__bg,
  .beauty-hero__shade {
    border-radius: inherit;
  }

  .beauty-hero__shade {
    background: linear-gradient(
      105deg,
      rgba(13, 12, 10, 0.72) 0%,
      rgba(13, 12, 10, 0.45) 55%,
      rgba(13, 12, 10, 0.35) 100%
    ) !important;
  }

  .beauty-hero .beauty-hero__grid.wrap {
    padding-inline: 1.15rem !important;
    padding-top: 1.35rem !important;
    padding-bottom: 2.65rem !important;
    align-items: flex-end !important;
  }

  .beauty-hero__copy {
    max-width: 100%;
  }

  .beauty-hero__title {
    font-size: clamp(1.5rem, 6.5vw, 1.95rem) !important;
    margin-bottom: 0.65rem !important;
  }

  .beauty-hero__copy p {
    font-size: 0.8125rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1rem !important;
    max-width: 36ch;
  }

  .beauty-hero__tag {
    margin-bottom: 0.65rem !important;
    font-size: 0.625rem !important;
    padding: 0.3rem 0.65rem !important;
  }

  .beauty-hero__cta-row {
    width: 100%;
  }

  .beauty-hero__cta-row .btn--primary {
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    border-radius: 12px !important;
    font-size: 0.875rem !important;
  }

  .beauty-hero__dots {
    bottom: 0.75rem !important;
  }

  .beauty-hero__dots button.is-active {
    background: var(--gold-deep) !important;
  }

  .partners-band {
    margin: 0.75rem 0 0 !important;
    width: 100% !important;
    border-radius: var(--app-radius);
    overflow: hidden;
    border-block-color: rgba(201, 168, 108, 0.22);
  }

  .partners-band .wrap {
    padding-inline: 0.85rem !important;
  }

  .cat-rings-ticker__track {
    animation-duration: 32s;
  }

  .cat-rings--icons {
    display: flex !important;
    grid-template-columns: unset !important;
    padding: 0.1rem 0.5rem 0.75rem 0.1rem !important;
    gap: 0.75rem !important;
  }

  .cat-rings-block__all {
    font-size: 0.6875rem !important;
  }

  .cat-ring__bubble {
    width: 58px !important;
    height: 58px !important;
  }

  .cat-ring__bubble svg {
    width: 24px !important;
    height: 24px !important;
  }

  .perks-ticker {
    margin-bottom: 0.65rem !important;
  }

  .partners-band__inner {
    padding-block: 1.5rem !important;
    gap: 1.25rem !important;
  }

  .partners-logos {
    gap: 1rem 1.25rem !important;
    justify-content: center !important;
  }

  .partners-logos a {
    width: auto !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 0.25rem !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  .partners-logos__img,
  .partners-logos img {
    max-height: 58px !important;
    max-width: min(200px, 46vw) !important;
    width: auto !important;
    object-fit: contain !important;
  }

  .partners-band__title {
    max-width: none !important;
    text-align: center;
  }

  .partners-band__kicker {
    text-align: center;
  }

  .partners-band__copy {
    text-align: center;
  }

  .promo-duo.wrap {
    gap: var(--app-gap) !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .promo-duo .promo-card {
    border-radius: var(--app-radius);
    overflow: hidden;
  }

  .about-home.wrap {
    margin: 0 !important;
    padding: 0 !important;
  }

  .about-home__card {
    border-radius: var(--app-radius) !important;
    padding: 1.15rem 1rem !important;
  }

  /* Barra Filtrar — estilo marketplace */
  .mobile-shop-toolbar {
    display: none;
    margin: 0;
    padding: 0;
  }

  .mobile-shop-toolbar__btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: #f0ebe3;
    color: var(--gold-deep);
    cursor: pointer;
    box-shadow: none;
  }

  .mobile-shop-toolbar__btn svg {
    display: block;
    flex-shrink: 0;
  }

  .mobile-shop-toolbar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .mobile-shop-toolbar__badge {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-deep);
    box-shadow: 0 0 0 2px #f0ebe3;
  }

  /* Bottom sheet — fora do header (no fim do body) */
  .filter-sheet[hidden] {
    display: none !important;
  }

  .filter-sheet:not([hidden]) {
    display: flex;
  }

  .filter-sheet {
    position: fixed;
    inset: 0;
    z-index: 650;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    pointer-events: none;
  }

  .filter-sheet.is-open {
    pointer-events: auto;
  }

  body.filter-sheet-open {
    overflow: hidden;
  }

  .filter-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(13, 12, 10, 0.55);
    opacity: 0;
    transition: opacity 0.28s ease;
  }

  .filter-sheet.is-open .filter-sheet__backdrop {
    opacity: 1;
  }

  .filter-sheet__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    max-height: min(88vh, 640px);
    background: #fff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -8px 32px rgba(18, 16, 14, 0.18);
    transform: translate3d(0, 100%, 0);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  .filter-sheet.is-open .filter-sheet__dialog {
    transform: translate3d(0, 0, 0);
  }

  .filter-sheet__handle {
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: 10px auto 4px;
    border-radius: 999px;
    background: rgba(18, 16, 14, 0.15);
  }

  .filter-sheet__head {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0.35rem 18px 0.85rem;
    border-bottom: 1px solid rgba(18, 16, 14, 0.06);
  }

  .filter-sheet__title {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 1.0625rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  .filter-sheet__close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
  }

  .filter-sheet__form {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
  }

  .filter-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 18px;
    display: grid;
    gap: 1rem;
    -webkit-overflow-scrolling: touch;
  }

  .filter-sheet__label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
  }

  .filter-sheet__select {
    width: 100%;
    min-height: 48px;
    border-radius: 10px !important;
    font-size: 0.9375rem !important;
    font-weight: 600;
  }

  .filter-sheet__toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
    padding: 0 0.85rem;
    border-radius: 12px;
    background: #f7f4ee;
    cursor: pointer;
  }

  .filter-sheet__toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
  }

  .filter-sheet__toggle-ui {
    flex-shrink: 0;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: rgba(18, 16, 14, 0.15);
    position: relative;
    transition: background 0.2s;
  }

  .filter-sheet__toggle-ui::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
  }

  .filter-sheet__toggle input:checked + .filter-sheet__toggle-ui {
    background: var(--gold-deep);
  }

  .filter-sheet__toggle input:checked + .filter-sheet__toggle-ui::after {
    transform: translateX(18px);
  }

  .filter-sheet__toggle-text {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--fg);
  }

  .filter-sheet__foot {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 0.5rem;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(18, 16, 14, 0.08);
    background: #fff;
    box-shadow: 0 -4px 16px rgba(18, 16, 14, 0.06);
  }

  .filter-sheet__clear {
    min-height: 48px !important;
    border-radius: 10px !important;
    background: #f0ebe3 !important;
    color: var(--fg) !important;
    font-weight: 700 !important;
  }

  .filter-sheet__apply {
    min-height: 48px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
  }

  /* Tab bar inferior */
  .app-tabbar {
    display: flex;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    bottom: 0 !important;
    z-index: 500;
    transform: translateZ(0);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 -1px 0 rgba(18, 16, 14, 0.1);
    justify-content: space-around;
    gap: 2px;
  }

  .app-tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 2px;
    text-decoration: none;
    color: var(--muted);
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 10px;
    min-width: 0;
  }

  .app-tabbar__item svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
  }

  .app-tabbar__item.is-active {
    color: var(--gold-deep);
    background: var(--gold-soft);
  }

  .app-tabbar__item.is-active svg {
    fill: rgba(197, 160, 89, 0.25);
    stroke: var(--gold-deep);
  }

  .foot--mini {
    margin-top: 0.5rem !important;
    padding-bottom: 0 !important;
  }

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

  .catalog-toolbar {
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
  }

  .sec__head {
    margin-bottom: 1.1rem !important;
    gap: 0.5rem !important;
  }

  .sec__head .link {
    margin-top: 0.35rem;
  }

  .brand-pills {
    gap: 0.5rem !important;
    margin-bottom: 1rem !important;
    padding-bottom: 0.35rem !important;
  }

  .brand-panel {
    margin-top: 0.5rem;
  }

  .about-home,
  .editorial {
    margin-top: var(--app-section-gap);
  }

  .catalog-toolbar__summary {
    font-size: 0.75rem;
  }

  /* Login / entrar — sem loja no topo (logo fica no card) */
  .has-minimal-header .topbar,
  .has-minimal-header .head {
    display: none !important;
  }

  .has-minimal-header .site-main {
    padding-top: 0.5rem !important;
  }

  .home-below-hero {
    padding-top: 0.1rem !important;
  }

  /* Landing home — hero full bleed, seções com gutter único */
  body.landing-home {
    background: #faf8f4 !important;
  }

  body.landing-home .site-main,
  body.landing-home main.site-main {
    padding-inline: 0 !important;
    padding-top: 0 !important;
    gap: 0 !important;
    padding-bottom: 1rem !important;
  }

  body.landing-home.has-app-tabbar .site-main,
  body.landing-home.has-app-tabbar main.site-main {
    padding-bottom: calc(1rem + 72px + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.page-account .site-main,
  body.page-account main.site-main {
    padding-inline: var(--app-gutter) !important;
    padding-top: 0.35rem !important;
    padding-bottom: 0.5rem !important;
  }

  body.page-account.has-app-tabbar .account-page {
    padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  }

  body.page-account .foot--mini {
    margin-top: 0.35rem !important;
    padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
  }

  body.landing-home .landing-body {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  body.landing-home .landing-section--cats > .wrap,
  body.landing-home .landing-stack.wrap,
  body.landing-home .landing-section--trust > .wrap,
  body.landing-home .landing-section--care > .wrap.landing-section--care__frame {
    padding-inline: var(--app-gutter) !important;
    box-sizing: border-box;
    max-width: 100%;
  }

  body.landing-home .landing-banners .wrap.landing-banners__inner {
    padding-inline: var(--app-gutter) !important;
  }

  body.landing-home .head .brand__name {
    max-width: none !important;
    font-size: 0.8125rem !important;
    -webkit-line-clamp: 1;
  }

  body.landing-home .head .brand__logo {
    max-height: 44px !important;
    max-width: 44px !important;
  }

  main .sec.wrap {
    background: #fff;
    margin: 0 !important;
    padding: 1.2rem 1rem 1.35rem !important;
    border-radius: var(--app-radius);
    box-shadow: 0 1px 4px rgba(18, 16, 14, 0.06);
  }

  .site-main > .wrap {
    padding-inline: 0 !important;
  }

  .app-tabbar {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .pagination {
    margin-top: 1.5rem !important;
    padding-top: 1.25rem !important;
  }

  .pd-page,
  .cart-page,
  .auth-page,
  .favoritos-page .wrap {
    padding-top: var(--app-section-gap);
  }

  .empty {
    margin: 1.25rem 0;
    padding: 1.5rem 1rem !important;
  }

  /* Grade sempre 2 colunas — nada colado na borda em telas estreitas */
  @media (max-width: 400px) {
    .grid,
    .row,
    .tiles,
    .tiles.tiles--6,
    .favoritos-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
      gap: var(--app-gap) !important;
    }
  }
}

@media (min-width: 761px) {
  .app-tabbar {
    display: none;
  }

  .mobile-shop-toolbar {
    display: none !important;
  }

  .filter-sheet {
    display: none !important;
  }

  .main-nav__all-short {
    display: none;
  }

  .main-nav__all-long {
    display: inline;
  }
}

