/* ==========================================================
   ART ROCK — UPSELL INTELIGENTE NO CARRINHO v5
   CSS externo para uso com upsell-carrinho-art-rock-v5-css-externo.js
========================================================== */

#ar-cart-upsell {
  position: relative;
  max-width: 100%;
  min-height: 190px;
  margin: 22px 0 8px;
  font-family: inherit;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 190px;
}

#ar-cart-upsell[hidden] {
  display: none !important;
}

.ar-upsell-shell {
  position: relative;
  min-height: 190px;
  padding: 14px 42px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 5px;
  box-sizing: border-box;
  box-shadow: 0 3px 13px rgba(0, 0, 0, 0.12);
}

.ar-upsell-title {
  margin: 0 0 12px;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  color: #222;
}

.ar-upsell-viewport {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overscroll-behavior-x: contain;
}

.ar-upsell-viewport::-webkit-scrollbar {
  display: none;
}

.ar-upsell-track {
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.ar-upsell-card {
  flex: 0 0 calc((100% - 18px) / 2);
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 160px;
  align-items: center;
  gap: 16px;
  min-height: 116px;
  padding: 8px 4px;
  box-sizing: border-box;
  scroll-snap-align: start;
}

.ar-upsell-card + .ar-upsell-card {
  border-left: 1px solid #ededed;
  padding-left: 18px;
}

.ar-upsell-image-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 112px;
  height: 100px;
}

.ar-upsell-image {
  display: block;
  width: 112px;
  height: 100px;
  max-width: 100%;
  object-fit: contain;
}

.ar-upsell-copy {
  min-width: 0;
}

.ar-upsell-kicker {
  margin: 0 0 3px;
  font-size: 15px;
  line-height: 1.3;
  color: #333;
}

.ar-upsell-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #222;
  font-size: 17px;
  line-height: 1.25;
  font-weight: 700;
  text-decoration: none;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ar-upsell-name:hover {
  text-decoration: underline;
}

.ar-upsell-description {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: #777;
  font-size: 12px;
  line-height: 1.35;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.ar-upsell-add {
  appearance: none;
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 15px;
  border: 0;
  border-radius: 9px;
  background: #050505;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.ar-upsell-add:hover {
  transform: translateY(-1px);
}

.ar-upsell-add:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.ar-upsell-add.is-added {
  background: #11875d;
}

.ar-upsell-add.is-error {
  background: #b42318;
}

.ar-upsell-add svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ar-upsell-arrow {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dedede;
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  transform: translateY(-15%);
}

.ar-upsell-arrow--prev {
  left: 8px;
}

.ar-upsell-arrow--next {
  right: 8px;
}

.ar-upsell-arrow:disabled {
  opacity: 0.25;
  cursor: default;
}

.ar-upsell-arrow svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.ar-upsell-skeleton {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 160px;
  gap: 16px;
  align-items: center;
  min-height: 116px;
}

.ar-skeleton-box,
.ar-skeleton-line {
  display: block;
  background: #f0f0f0;
  border-radius: 7px;
}

.ar-skeleton-box {
  width: 112px;
  height: 100px;
}

.ar-skeleton-lines {
  display: grid;
  gap: 9px;
}

.ar-skeleton-line {
  height: 13px;
  width: 100%;
}

.ar-skeleton-line:nth-child(2) {
  width: 78%;
  height: 18px;
}

.ar-skeleton-line:nth-child(3) {
  width: 58%;
}

.ar-skeleton-button {
  height: 44px;
  width: 100%;
  background: #ededed;
  border-radius: 9px;
}

@media (max-width: 991px) {
  #ar-cart-upsell {
    min-height: 232px;
    contain-intrinsic-size: 232px;
  }

  .ar-upsell-shell {
    min-height: 232px;
    padding: 14px 38px;
  }

  .ar-upsell-card {
    flex-basis: 100%;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    min-height: 150px;
    padding: 6px 0;
  }

  .ar-upsell-card + .ar-upsell-card {
    border-left: 0;
    padding-left: 0;
  }

  .ar-upsell-image-link,
  .ar-upsell-image {
    width: 92px;
    height: 92px;
  }

  .ar-upsell-actions {
    grid-column: 1 / -1;
  }

  .ar-upsell-description {
    -webkit-line-clamp: 2;
  }

  .ar-upsell-skeleton {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    min-height: 170px;
  }

  .ar-skeleton-box {
    width: 92px;
    height: 92px;
  }

  .ar-skeleton-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 479px) {
  #ar-cart-upsell {
    margin-top: 16px;
  }

  .ar-upsell-shell {
    padding: 14px 34px;
  }

  .ar-upsell-title {
    font-size: 16px;
  }

  .ar-upsell-kicker {
    font-size: 13px;
  }

  .ar-upsell-name {
    font-size: 15px;
  }

  .ar-upsell-arrow {
    width: 30px;
    height: 30px;
  }

  .ar-upsell-arrow--prev {
    left: 3px;
  }

  .ar-upsell-arrow--next {
    right: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ar-upsell-viewport {
    scroll-behavior: auto;
  }

  .ar-upsell-add {
    transition: none;
  }
}
