/* Separate mobile model for M&S Variados. Desktop keeps the current visual language. */
@media (max-width: 768px) {
  body {
    background: #f8fafc;
  }

  .container {
    padding: 10px 10px 0;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "search";
    gap: 10px;
    align-items: center;
    padding: 10px 12px 12px;
    z-index: 100;
  }

  .brand {
    grid-area: brand;
    min-width: 0;
    justify-content: center;
  }

  .brand-logo {
    height: 34px;
    max-width: 168px;
  }

  .topnav {
    grid-area: nav;
    display: none !important;
  }

  .track-link,
  .cart-link {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid !important;
    place-items: center;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .10);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
  }

  .track-link .track-label,
  .cart-link .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .cart-link {
    position: relative;
  }

  .cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    font-size: 11px;
  }

  .searchbar {
    grid-area: search;
    max-width: none;
    width: 100%;
    justify-content: stretch;
  }

  .search-toggle {
    display: none;
  }

  .search-input {
    display: block;
    max-width: none;
    width: 100%;
    height: 44px;
    border-radius: 14px;
    padding: 0 14px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
  }

  .category-strip {
    margin-top: 10px;
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 10px;
    padding-right: 10px;
    overflow: hidden;
  }

  .stories {
    gap: 12px;
    padding: 8px 2px 12px;
    scroll-snap-type: x proximity;
  }

  .story {
    min-width: 70px;
    scroll-snap-align: start;
  }

  .story-img {
    width: 58px;
    height: 58px;
  }

  .story-name {
    max-width: 72px;
    font-size: 11px;
  }

  .products {
    margin-top: 8px;
    padding-bottom: 96px;
  }

  .products-head h2 {
    margin: 0;
    font-size: 20px;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
  }

  .card {
    border-radius: 12px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
  }

  .card img {
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    padding: 8px;
    background: #ffffff;
  }

  .card h3 {
    min-height: 38px;
    margin: 8px 9px 4px;
    font-size: 13px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .price {
    margin: 0 9px 8px;
    font-size: 14px;
  }

  .card-actions {
    padding: 0 9px 10px;
  }

  .ms-buy-btn {
    width: 100%;
    min-height: 40px;
    border-radius: 12px;
  }

  .ms-promo-slot,
  .ms-stock-slot {
    min-height: 22px;
  }

  .ms-promo-badge,
  .ms-stock-badge {
    max-width: calc(100% - 16px);
    margin-left: 8px;
    margin-right: 8px;
    font-size: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .footer {
    padding-bottom: 24px;
  }

  html.has-bottom-nav .footer {
    padding-bottom: 82px;
  }
}

@media (max-width: 380px) {
  .grid {
    gap: 8px;
  }

  .brand-logo {
    max-width: 142px;
  }

  .card h3 {
    font-size: 12px;
  }

  .ms-buy-btn {
    font-size: 13px;
  }
}
