/* The old Shop and category templates output separate round badges. */
body :is(span, div)[class^="vip-"][class$="-best-seller"] {
  display: none !important;
}

.vip-best-pill {
  display: inline-flex; align-items: center; align-self: start; gap: 5px;
  width: fit-content; max-width: 100%; padding: 3px 7px;
  border: 1px solid #e5c082; border-radius: 999px;
  color: #523716; background: linear-gradient(115deg, #fff7e5, #fbe8c1);
  font-size: 10px; font-weight: 760; letter-spacing: .045em;
  line-height: 1.28; text-transform: uppercase;
}
.vip-best-pill::before {
  content: ""; flex: none; width: 13px; height: 11px;
  background: #97642c;
  clip-path: polygon(0 25%, 27% 44%, 50% 0, 73% 44%, 100% 25%, 82% 84%, 82% 100%, 18% 100%, 18% 84%);
}
.single-product .entry-summary .vip-best-pill { margin-bottom: 7px; }
.vip-catalog-card .vip-catalog-best-pill {
  position: absolute; z-index: 6; top: 9px; left: 9px;
  margin: 0; padding: 5px 8px; border-radius: 6px;
  box-shadow: 0 2px 8px #42251326;
  pointer-events: none;
}
.vip-catalog-card :is(.product-loop-thumb, .image_frame):has(.onsale) > .vip-catalog-best-pill { top: 37px; }
#vip-home-bestsellers {
  box-sizing: border-box; width: calc(100% - 32px); max-width: 1384px;
  margin: clamp(20px, 3vw, 42px) auto; padding: clamp(13px, 2.5vw, 32px);
  color: #fff7e8; background: linear-gradient(127deg, #251e19, #191719 72%);
  border: 1px solid #6b523b; border-radius: 17px;
}
.vip-best-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 10px; margin-bottom: clamp(10px, 1.6vw, 22px);
}
.vip-best-head h2 {
  margin: 0; color: #fff4dc; text-transform: uppercase;
  font: 800 clamp(26px, 4vw, 53px)/1 VIPCategory, VIPDisplay, "Arial Narrow", sans-serif;
}
.vip-best-count { display: block; margin-top: 4px; color: #e1d2bd; font-size: 12px; }
.vip-best-nav { display: flex; gap: 6px; }
#vip-home-bestsellers .vip-best-nav button {
  display: grid; width: 39px; height: 39px; margin: 0; padding: 0;
  place-items: center; border: 1px solid #b4915f; border-radius: 7px;
  color: #ffe6b5; background: #38302b; cursor: pointer;
}
#vip-home-bestsellers .vip-best-nav button:hover:not(:disabled) { background: #554438; }
#vip-home-bestsellers .vip-best-nav button:disabled { opacity: .46; cursor: default; }
.vip-best-chevron {
  width: 9px; height: 9px; border-top: 2px solid currentColor;
  border-right: 2px solid currentColor; transform: rotate(45deg);
}
.vip-best-nav button:first-child .vip-best-chevron { transform: rotate(-135deg); }
.vip-best-track {
  --card-gap: 11px;
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * var(--card-gap)) / 5);
  overflow-x: auto; gap: var(--card-gap); padding: 1px 1px 10px;
  overscroll-behavior-x: contain; scroll-snap-type: x mandatory;
  scrollbar-color: #907048 #2d2724; scrollbar-width: thin;
}
#vip-home-bestsellers .vip-best-card {
  box-sizing: border-box; display: flex; flex-direction: column; min-width: 0;
  scroll-snap-align: start; overflow: hidden; border-radius: 10px;
  border: 1px solid #ebdcc4; background: #fffdf7; color: #24211e; text-decoration: none;
}
#vip-home-bestsellers .vip-best-card:hover { border-color: #cc9b51; }
.vip-best-card:focus-visible, .vip-best-nav button:focus-visible, .vip-best-track:focus-visible {
  outline: 2px solid #f0b964; outline-offset: -2px;
}
.vip-best-media {
  display: grid; place-items: center; aspect-ratio: 1.09;
  padding: 10px; background: radial-gradient(ellipse at 52% 46%, #fff, #f7efe1);
}
#vip-home-bestsellers .vip-best-photo {
  display: block; width: 100%; height: 100%; max-height: 205px;
  object-fit: contain; mix-blend-mode: multiply;
}
.vip-best-info { display: flex; flex: 1; flex-direction: column; align-items: start; gap: 7px; padding: 10px 12px; }
.vip-best-name { color: #24211e; font-size: 14px; font-weight: 740; line-height: 1.3; overflow-wrap: anywhere; }
.vip-best-price { margin-top: auto; color: #4f3b24; font-size: 14px; font-weight: 720; }
.vip-best-price del { color: #73685d; font-size: .91em; }
@media (max-width: 1024px) {
  .vip-best-track { grid-auto-columns: calc((100% - 3 * var(--card-gap)) / 4); }
}
@media (max-width: 750px) {
  .vip-best-track { grid-auto-columns: calc((100% - 2 * var(--card-gap)) / 3); }
}
@media (max-width: 560px) {
  .vip-catalog-card .vip-catalog-best-pill { left: 5px; top: 5px; padding: 4px 5px; }
  .vip-catalog-card :is(.product-loop-thumb, .image_frame):has(.onsale) > .vip-catalog-best-pill { top: 31px; }
  #vip-home-bestsellers { width: calc(100% - 20px); }
  .vip-best-track { --card-gap: 8px; grid-auto-columns: calc((100% - var(--card-gap)) / 2); }
  .vip-best-info { padding: 8px; }
  .vip-best-name, .vip-best-price { font-size: 12px; }
  .vip-best-pill { font-size: 9px; }
}
