/* Ajustes de escala para acercar la web a las proporciones de la APK. */
.topbar-inner,
.main-content,
.footer-inner {
  width: min(1160px, calc(100% - 32px));
}

.topbar-inner { min-height: 64px; }
.brand { gap: 9px; font-size: 16px; }
.brand img { width: 34px; height: 42px; }
.nav-link { padding: 8px 11px; font-size: 14px; }
.icon-action { width: 38px; height: 38px; border-radius: 12px; }

.main-content { padding: 20px 0 52px; }
.search-section { margin-bottom: 14px; }
.search-box { min-height: 46px; border-radius: 14px; padding-inline: 13px; }
.search-box input { font-size: 15px; }
.search-box > span { font-size: 21px; }

.content-section { margin-top: 22px; }
.section-heading { margin-bottom: 10px; }
.eyebrow { font-size: 10px; }
h1 { font-size: clamp(23px, 3vw, 30px); }
h2 { font-size: clamp(20px, 2.4vw, 25px); }
.catalog-count { font-size: 12px; }

.promotion-strip {
  grid-auto-columns: minmax(58%, 730px);
  gap: 12px;
}
.promotion-card {
  min-height: 0;
  border-radius: 18px;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}
.carousel-dot.is-active { width: 15px; }

.category-strip { gap: 7px; }
.category-pill {
  min-height: 34px;
  padding-inline: 14px;
  border-radius: 17px;
  font-size: 13px;
}

.product-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.product-card { border-radius: 15px; }
.product-body { padding: 10px 11px 12px; }
.product-meta { min-height: 15px; font-size: 10px; margin-bottom: 3px; }
.product-name { min-height: 37px; font-size: 13px; line-height: 1.4; }
.product-pricing { margin-top: 8px; gap: 6px; }
.product-price { font-size: 17px; }
.regular-price, .promo-label { font-size: 10px; }
.promo-badge, .stock-badge {
  top: 8px;
  padding: 5px 7px;
  font-size: 9px;
}
.promo-badge { left: 8px; }
.stock-badge { right: 8px; }

.product-dialog { width: min(820px, calc(100% - 24px)); }
.dialog-shell { padding: 18px; }
.product-detail { gap: 20px; }
.detail-copy h2 { font-size: clamp(23px, 3vw, 32px); }
.detail-price { margin-top: 18px; font-size: 28px; }
.detail-description { line-height: 1.6; font-size: 14px; }

@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .promotion-strip { grid-auto-columns: minmax(68%, 680px); }
}

@media (max-width: 760px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .topbar-inner,
  .main-content,
  .footer-inner { width: calc(100% - 20px); }
  .topbar-inner { min-height: 56px; }
  .brand span { font-size: 15px; }
  .brand img { width: 29px; height: 36px; }
  .main-content { padding-top: 9px; }
  .search-section { top: 61px; padding: 4px 0 5px; }
  .search-box { min-height: 43px; border-radius: 13px; }
  .content-section { margin-top: 17px; }
  .section-heading { margin-bottom: 8px; }
  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  .eyebrow { font-size: 9px; }
  .promotion-strip { grid-auto-columns: 86%; gap: 8px; }
  .promotion-card { border-radius: 15px; }
  .category-pill { min-height: 32px; padding-inline: 12px; font-size: 12px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .product-card { border-radius: 13px; }
  .product-body { padding: 8px 9px 10px; }
  .product-name { min-height: 34px; font-size: 12px; }
  .product-price { font-size: 16px; }
  .mobile-nav { min-height: calc(58px + env(safe-area-inset-bottom)); padding-top: 3px; }
  .mobile-nav-item span { font-size: 18px; }
  .mobile-nav-item small { font-size: 9px; }
  .product-dialog { max-height: 90dvh; border-radius: 20px 20px 0 0; }
  .dialog-shell { padding: 13px 11px 20px; }
  .detail-image { border-radius: 15px; }
  .detail-copy h2 { font-size: 24px; }
  .detail-price { font-size: 25px; }
  .toast { bottom: calc(69px + env(safe-area-inset-bottom)); }
}

@media (max-width: 390px) {
  .topbar-inner,
  .main-content { width: calc(100% - 16px); }
  .promotion-strip { grid-auto-columns: 88%; }
  .product-grid { gap: 7px; }
  .product-body { padding-inline: 8px; }
}
