/* iPhone / Android storefront */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.site-header {
  padding-top: max(10px, env(safe-area-inset-top));
}

.whats-float {
  bottom: calc(10px + env(safe-area-inset-bottom));
  right: calc(10px + env(safe-area-inset-right));
}

.mf-toast {
  bottom: calc(90px + env(safe-area-inset-bottom));
}

.sticky-buy {
  display: none;
}

@media (max-width: 900px) {
  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  button,
  a,
  .size-btn,
  .icon-btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
  }

  .site-header {
    padding: 8px 12px;
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .logo-link img {
    width: 148px !important;
    max-height: 44px;
  }

  .icon-btn {
    width: 44px;
    height: 44px;
  }

  .mobile-nav.open {
    inset: 0 18% 0 0;
    padding-top: max(24px, env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
  }

  .promo {
    margin-top: 12px;
    padding: 18px 12px;
  }

  .promo h1 {
    font-size: 1.35em;
    line-height: 1.2;
  }

  .box-pesquisa {
    padding: 10px 8px;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    background: #f6f7f8;
    padding: 12px;
  }

  .toolbar select {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }

  .product-list {
    margin: 0 -4px;
  }

  .product-card,
  .product-card:nth-child(2n),
  .product-card:nth-child(3n) {
    width: calc(50% - 8px);
    margin: 8px 4px 0;
  }

  .product-name {
    font-size: 11px;
    min-height: 28px;
  }

  .tags-below {
    display: none;
  }

  .cart-drawer {
    width: 100% !important;
    inset: auto 0 0 0 !important;
    height: min(88vh, 720px);
    border-radius: 16px 16px 0 0;
    transform: translateY(110%) !important;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .cart-drawer.open {
    transform: translateY(0) !important;
  }

  .back-to-top {
    right: 16px;
    bottom: calc(80px + env(safe-area-inset-bottom));
  }

  .banner-promocao {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }

  .topo-produto {
    flex-direction: column;
    gap: 16px;
  }

  .gallery {
    flex-direction: column-reverse;
  }

  .thumbs {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .thumbs button {
    flex: 0 0 72px;
    height: 72px;
    width: 72px;
  }

  .gallery-main {
    min-height: 360px;
    max-height: 70vh;
  }

  .gallery-main img,
  .gallery-main video {
    max-height: 70vh;
    width: 100%;
  }

  .buy-col {
    width: 100%;
    min-width: 0;
    padding-bottom: 90px;
  }

  .qty-buy {
    margin-bottom: 8px;
  }

  .sticky-buy {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    background: #fff;
    border-top: 1px solid #e8eaed;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    gap: 12px;
    align-items: center;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
  }

  .sticky-buy__price {
    display: flex;
    flex-direction: column;
    min-width: 110px;
  }

  .sticky-buy__price strong {
    color: #32bcad;
    font-size: 18px;
  }

  .sticky-buy .btn-buy {
    flex: 1;
    height: 48px;
  }

  .size-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .measure-btns button {
    min-height: 40px;
    flex: 1;
  }

  .cart-page,
  .checkout,
  .pdp {
    padding-left: 12px;
    padding-right: 12px;
  }

  .cart-layout,
  .checkout-grid {
    display: flex;
    flex-direction: column;
  }

  .cart-line {
    grid-template-columns: 72px 1fr auto;
    gap: 10px;
  }
  .cart-line > :nth-child(3) {
    display: none;
  }

  .sticky-checkout-btn {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 5;
  }

  .steps {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .steps span {
    white-space: nowrap;
    font-size: 11px;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field input,
  .cep-field input,
  .qty-box input {
    height: 48px;
    font-size: 16px;
  }

  .btn-green,
  .btn-buy,
  .btn-checkout {
    min-height: 48px;
  }

  .footer-col ul,
  .footer-col .selos,
  .footer-col .pay-icons,
  .footer-col .contato-list {
    display: none;
    padding: 12px;
  }

  .footer-col.open ul,
  .footer-col.open .selos,
  .footer-col.open .pay-icons,
  .footer-col.open .contato-list {
    display: flex;
    flex-wrap: wrap;
  }

  .whats-float {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 380px) {
  .product-name {
    font-size: 10px;
  }

  .logo-link img {
    width: 128px !important;
  }
}
