/* "Mais vendidos" v2 (11/11/2026): a dark green panel with the 8 best sellers in a grid (snipplets/mainstream/home-best-sellers.tpl).
   The panel brings its own colour, so the page tone around it (data-ms-tone) can keep blending without touching its text. */
.ms-best {
  padding: clamp(28px, 4vw, 64px) 0;
}
.ms-best-panel {
  position: relative;
  isolation: isolate;
  margin-inline: clamp(10px, 1.6vw, 24px);
  padding: clamp(44px, 6vw, 92px) clamp(22px, 5.4vw, 84px) clamp(44px, 5.6vw, 84px);
  border-radius: clamp(26px, 3vw, 44px);
  overflow: hidden;
  color: #efe9dc;
  background:
    radial-gradient(110% 75% at 88% 0%, rgba(222, 192, 140, .17), transparent 58%),
    radial-gradient(85% 70% at 0% 100%, rgba(120, 156, 124, .2), transparent 62%),
    linear-gradient(162deg, #2a3a30 0%, #1f2b24 52%, #19221d 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .07),
    0 2px 6px rgba(24, 33, 28, .12),
    0 26px 48px -28px rgba(24, 33, 28, .5),
    0 60px 110px -60px rgba(24, 33, 28, .55);
}
.ms-best-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(32px, 4.2vw, 60px);
}
.ms-best-eyebrow {
  margin: 0;
  font: 500 11px/1.6 'DM Sans', Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(239, 233, 220, .62);
}
.ms-home-v2 .ms-best h2 {
  margin: 12px 0 0;
  font: 400 clamp(34px, 3.8vw, 58px)/1.08 'DM Sans', Arial, sans-serif;
  letter-spacing: -.045em;
  color: #f5f0e6;
}
.ms-home-v2 .ms-best h2 em {
  font-family: Gelasio, Georgia, serif;
  font-weight: 400;
  color: #e4d0a8;
}
.ms-best-lede {
  max-width: 330px;
  margin: 0;
  font: italic 400 clamp(18px, 1.6vw, 23px)/1.35 Gelasio, Georgia, serif;
  color: rgba(239, 233, 220, .8);
}
.ms-best-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(30px, 3.4vw, 48px) clamp(14px, 1.8vw, 26px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ms-best-item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ms-best-picture {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  overflow: hidden;
  background: #2c3b32;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 24px 44px -28px rgba(0, 0, 0, .75);
}
.ms-best-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s cubic-bezier(.23, 1, .32, 1);
}
.ms-best-item:hover .ms-best-picture img { transform: scale(1.035); }
/* 1º, 2º and 3º: a glass ribbon tag tinted gold, silver and bronze (owner, 11/11: "coloca ela em formato de glass… com a
   cor de ouro prata e bronze"). It hangs over the photo's top edge, folds behind it and ends in a notch.
   Layers: ::before = soft shadow, ::after = the glass (clipped to the ribbon, blurring the photo behind it),
   number span ::before = the fold. No filter on the tag itself: a filter would cut the glass off from the photo behind. */
.ms-best-rank {
  position: absolute;
  top: -8px;
  left: 22px;
  z-index: 2;
  display: flex;
  justify-content: center;
  box-sizing: border-box;
  width: 46px;
  height: 66px;
  margin: 0;
  padding-top: 15px;
  pointer-events: none;
  font: italic 400 22px/1 Gelasio, Georgia, serif;
  letter-spacing: -.02em;
  color: #1f2b24;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
}
.ms-best-rank::before,
.ms-best-rank::after,
.ms-best-rank > span[aria-hidden]::before {
  content: '';
  position: absolute;
}
.ms-best-rank::before {
  z-index: -2;
  inset: 8px 5px 6px;
  border-radius: 6px;
  background: rgba(10, 16, 12, .42);
  filter: blur(7px);
  transform: translateY(6px);
}
.ms-best-rank::after {
  z-index: -1;
  inset: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 83%, 0 100%);
  background:
    linear-gradient(158deg, rgba(255, 255, 255, .58) 0%, rgba(255, 255, 255, .14) 30%, rgba(255, 255, 255, 0) 52%),
    var(--ms-best-rank-tint);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 1px 0 0 rgba(255, 255, 255, .4), inset -1px 0 0 rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(6px) saturate(1.6);
  backdrop-filter: blur(6px) saturate(1.6);
}
/* The fold: the ribbon turns behind the card's top edge. */
.ms-best-rank > span[aria-hidden]::before {
  z-index: -1;
  top: 0;
  right: -7px;
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 8px solid var(--ms-best-rank-fold);
}
.ms-best-rank-1 { --ms-best-rank-tint: linear-gradient(180deg, rgba(240, 214, 150, .44), rgba(214, 178, 106, .5)); --ms-best-rank-fold: rgba(140, 108, 52, .9); }
.ms-best-rank-2 { --ms-best-rank-tint: linear-gradient(180deg, rgba(244, 245, 240, .44), rgba(196, 200, 192, .48)); --ms-best-rank-fold: rgba(112, 117, 110, .9); }
.ms-best-rank-3 { --ms-best-rank-tint: linear-gradient(180deg, rgba(236, 196, 166, .44), rgba(196, 140, 102, .5)); --ms-best-rank-fold: rgba(128, 86, 58, .9); }
.ms-best-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.ms-best-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding-top: 18px;
}
.ms-best-brand {
  margin: 0 0 5px;
  font: 500 10.5px/1.4 'DM Sans', Arial, sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(239, 233, 220, .56);
}
.ms-home-v2 .ms-best h3 {
  margin: 0 0 10px;
  font: 500 clamp(17px, 1.45vw, 21px)/1.2 'DM Sans', Arial, sans-serif;
  letter-spacing: -.03em;
}
.ms-best h3 a {
  color: #f5f0e6;
  text-decoration: none;
}
/* The name's link covers the whole card; the arrow stays above it. */
.ms-best h3 a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.ms-best h3 a:focus-visible { outline: none; }
.ms-best-item:has(h3 a:focus-visible) .ms-best-picture { outline: 2px solid #e4d0a8; outline-offset: 3px; }
.ms-best .ms-item-reference {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 8px;
}
.ms-best .ms-item-reference-label {
  font: 400 11px/1.4 'DM Sans', Arial, sans-serif;
  color: rgba(239, 233, 220, .5);
}
.ms-best .ms-item-reference-name {
  font: 400 13px/1.45 'DM Sans', Arial, sans-serif;
  color: rgba(239, 233, 220, .84);
}
.ms-best-formats {
  margin: 0 0 14px;
  font: 400 12px/1.5 'DM Sans', Arial, sans-serif;
  color: rgba(239, 233, 220, .56);
}
.ms-best-buy {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(239, 233, 220, .15);
}
.ms-best-buy p {
  margin: 0;
  font: 500 17px/1.3 'DM Sans', Arial, sans-serif;
  color: #f5f0e6;
}
.ms-best-buy small {
  display: block;
  font: 400 11.5px/1.5 'DM Sans', Arial, sans-serif;
  color: rgba(239, 233, 220, .56);
}
.ms-best-go {
  position: relative;
  z-index: 2;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(239, 233, 220, .34);
  border-radius: 50%;
  color: #f5f0e6;
  transition: background-color .3s, border-color .3s, color .3s;
}
.ms-best-go svg { width: 18px; height: 18px; }
.ms-best-item:hover .ms-best-go,
.ms-best-go:focus-visible {
  border-color: #efe9dc;
  background: #efe9dc;
  color: #1f2b24;
  outline: none;
}

/* Cards about 12% smaller on the computer (owner, 11/11/2026: "diminui cerca de 12% o tamanho dos cards"): the head and the
   grid share a narrower, centred column, so the cards stay aligned with the title. The phone's two columns stay as they are. */
@media (min-width: 901px) {
  .ms-best-head,
  .ms-best-grid {
    width: 89%;
    margin-inline: auto;
  }
}
@media (max-width: 900px) {
  .ms-best-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .ms-best-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .ms-best { padding: 18px 0; }
  .ms-best-panel {
    margin-inline: 8px;
    padding: 40px 16px 34px;
    border-radius: 26px;
  }
  .ms-best-head { margin-bottom: 26px; }
  .ms-best-lede { font-size: 14px; }
  .ms-best-grid { gap: 26px 12px; }
  .ms-best-picture { border-radius: 16px; }
  .ms-best-info { padding-top: 12px; }
  .ms-best-brand { font-size: 9.5px; }
  .ms-home-v2 .ms-best h3 { margin-bottom: 6px; font-size: 16px; }
  .ms-best .ms-item-reference { margin-bottom: 0; }
  .ms-best .ms-item-reference-label,
  .ms-best-formats { display: none; }
  .ms-best .ms-item-reference-name {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  .ms-best-buy { gap: 8px; padding-top: 10px; margin-top: 12px; }
  .ms-best-buy p { font-size: 15px; }
  .ms-best-buy small { font-size: 10.5px; }
  .ms-best-go { width: 32px; height: 32px; }
  .ms-best-rank { top: -6px; left: 14px; width: 36px; height: 52px; padding-top: 12px; font-size: 17px; }
  .ms-best-rank > span[aria-hidden]::before { right: -6px; border-right-width: 6px; border-bottom-width: 6px; }
  .ms-best-go svg { width: 15px; height: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-best-picture img, .ms-best-go { transition: none; }
  .ms-best-item:hover .ms-best-picture img { transform: none; }
}
