/* ============================================================
   BOTIGA THEME — SLIDE CART MODAL (Estilo Rouje)
   Mantém identidade visual do tema Botiga
   ============================================================ */

/* Overlay */
.botiga-slide-cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* ✅ SCROLL NO SLIDE CART BOTIGA - MOBILE (versão reforçada com Flexbox) */
@media (max-width: 991px) {

    /* Container principal - força layout flex column */
    .botiga-slide-cart.is-active {
        display: flex !important;
        flex-direction: column !important;
        height: 100dvh !important;           /* altura total da tela */
        max-height: 100dvh !important;
        overflow: hidden !important;
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
    }

    /* Header, banner e footer NÃO rolam */
    .botiga-slide-cart__header,
    .botiga-slide-cart__shipping-banner,
    .botiga-slide-cart__footer {
        flex-shrink: 0 !important;
    }

    /* Corpo que deve rolar */
    .botiga-slide-cart__body {
        flex: 1 1 auto !important;           /* ocupa todo o espaço restante */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important; /* scroll suave no iPhone */
        padding-bottom: 20px !important;
        max-height: none !important;
    }

    /* Garante que a lista de itens não limite a altura */
    .botiga-slide-cart__items {
        min-height: auto !important;
    }
}

.botiga-slide-cart-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

/* Painel principal */
.botiga-slide-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: #faf4f0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -4px 0 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.botiga-slide-cart.is-active {
  transform: translateX(0);
}

/* Cabeçalho */
.botiga-slide-cart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: #faf4f0;
  min-height: 64px;
  flex-shrink: 0;
}

.botiga-slide-cart__tabs {
  display: flex;
  gap: 0;
}

.botiga-slide-cart__tab {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #1a1a1a);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 20px 16px 18px 0;
  margin-right: 20px;
  cursor: pointer;
  transition: border-color 0.2s ease;
  font-family: "Manrope";
  line-height: 1;
}

.botiga-slide-cart__tab.is-active {
  border-bottom-color: var(--botiga-color-text, #004748);
}

.botiga-slide-cart__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--botiga-color-text, #004748);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  margin-right: -8px;
}

.botiga-slide-cart__close:hover {
  opacity: 1;
}

.botiga-slide-cart__close svg {
  width: 18px;
  height: 18px;
}

/* Banner de frete grátis */
.botiga-slide-cart__shipping-banner {
  background: #faf4f0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 28px;
  text-align: center;
  flex-shrink: 0;
}

.botiga-slide-cart__shipping-banner p {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #004748);
  margin: 0;
  font-weight: 500;
}

.botiga-slide-cart__shipping-banner a {
  color: var(--botiga-color-primary, #c8a882);
  text-decoration: underline;
}

/* Barra de progresso do frete */
.botiga-slide-cart__progress {
  height: 2px;
  background: rgba(0, 0, 0, 0.1);
  margin-top: 8px;
  border-radius: 2px;
  overflow: hidden;
}

.botiga-slide-cart__progress-bar {
  height: 100%;
  background: var(--botiga-color-primary, #c8a882);
  border-radius: 2px;
  transition: width 0.5s ease;
}

/* Área de itens — scrollável */
.botiga-slide-cart__body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 28px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.botiga-slide-cart__body::-webkit-scrollbar {
  width: 4px;
}
.botiga-slide-cart__body::-webkit-scrollbar-track {
  background: transparent;
}
.botiga-slide-cart__body::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

/* Item do carrinho */
.botiga-slide-cart__item {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  animation: cart-item-in 0.3s ease forwards;
}

@keyframes cart-item-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.botiga-slide-cart__item-image {
  width: 100px;
  height: 120px;
  object-fit: cover;
  background: var(--botiga-color-secondary-bg, #ede9e2);
  display: block;
}

.botiga-slide-cart__item-image a {
  display: block;
  height: 100%;
}

.botiga-slide-cart__item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.botiga-slide-cart__item-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 2px;
}

.botiga-slide-cart__item-name {
  font-size: 13px!important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #1a1a1a);
  margin: 0;
  line-height: 1.3;
}

.botiga-slide-cart__item-name a {
  color: inherit;
  text-decoration: none;
}

.botiga-slide-cart__item-meta {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--botiga-color-primary, #c8a882);
  margin: 0;
  line-height: 1.6;
}

/* Controles de quantidade */
.botiga-slide-cart__qty {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.botiga-slide-cart__qty-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--botiga-color-text, #1a1a1a);
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  opacity: 0.6;
  transition: opacity 0.2s ease;
  font-family: "Manrope";
  line-height: 1;
}

.botiga-slide-cart__qty-btn:hover {
  opacity: 1;
}

.botiga-slide-cart__qty-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--botiga-color-text, #004748);
  min-width: 16px;
  text-align: center;
}

.botiga-slide-cart__item-remove {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.35);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-top: 12px;
  display: inline-block;
  font-family: "Manrope";
  transition: color 0.2s ease;
}

.botiga-slide-cart__item-remove:hover {
  color: var(--botiga-color-text, #004748);
}

/* Preço do item */
.botiga-slide-cart__item-price {
  font-size: 14px;
  font-weight: 500;
  color: var(--botiga-color-text, #004748);
  padding-top: 2px;
  white-space: nowrap;
}

/* Seção "Você também vai gostar" */
.botiga-slide-cart__upsell {
  padding: 32px 0 16px;
}

.botiga-slide-cart__upsell-title {
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #1a1a1a);
  margin: 0 0 20px;
  line-height: 1;
  font-family: "Manrope";;
}

.botiga-slide-cart__upsell-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.botiga-slide-cart__upsell-item {
  background: var(--botiga-color-secondary-bg, #ede9e2);
  position: relative;
  overflow: hidden;
}

/* imagem agora gerenciada por .botiga-slide-cart__upsell-img */

.botiga-slide-cart__upsell-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: white;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 7px;
  color: var(--botiga-color-text, #004748);
  text-transform: uppercase;
}

.botiga-slide-cart__upsell-stars {
  position: absolute;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 2px;
}

.botiga-slide-cart__upsell-img {
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--botiga-color-secondary-bg, #ede9e2);
}

.botiga-slide-cart__upsell-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.botiga-slide-cart__upsell-item:hover .botiga-slide-cart__upsell-img img {
  transform: scale(1.04);
}

.botiga-slide-cart__upsell-info {
  padding: 7px 2px 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.botiga-slide-cart__upsell-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #1a1a1a;
  line-height: 1.3;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.botiga-slide-cart__upsell-price {
  font-size: 11px;
  font-weight: 500;
  color: #004748;
  display: block;
}

.botiga-slide-cart__upsell-price .woocommerce-Price-amount {
  font-size: inherit;
  color: inherit;
}

.botiga-slide-cart__upsell-stars svg {
  width: 10px;
  height: 10px;
  fill: #d4af6e;
}

/* Rodapé: total + botão */
.botiga-slide-cart__footer {
  padding: 20px 28px 28px;
  background: #faf4f0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.botiga-slide-cart__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.botiga-slide-cart__total-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #1a1a1a);
  margin: 0;
}

.botiga-slide-cart__total-price {
  font-size: 15px;
  font-weight: 600;
  color: var(--botiga-color-text, #1a1a1a);
}

.botiga-slide-cart__checkout-btn {
  display: block;
  width: 100%;
  padding: 16px 24px;
  background: #004748;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: "Manrope";;
  transition: background 0.25s ease, opacity 0.2s ease;
}

.botiga-slide-cart__checkout-btn:hover {
  background: #006162;
  color: #fff;
  text-decoration: none;
}

/* Estado de carregamento */
.botiga-slide-cart.is-loading .botiga-slide-cart__body {
  opacity: 0.5;
  pointer-events: none;
}

.botiga-slide-cart__loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid rgba(0,0,0,0.1);
  border-top-color: var(--botiga-color-text, #1a1a1a);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.botiga-slide-cart.is-loading .botiga-slide-cart__loader {
  display: block;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Carrinho vazio */
.botiga-slide-cart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 28px;
  text-align: center;
  gap: 16px;
}

.botiga-slide-cart__empty p {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.4);
  margin: 0;
}

.botiga-slide-cart__empty a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--botiga-color-text, #1a1a1a);
  text-decoration: underline;
}

/* Responsivo */
@media (max-width: 520px) {
  .botiga-slide-cart {
    width: 100vw;
  }

  .botiga-slide-cart__header,
  .botiga-slide-cart__body,
  .botiga-slide-cart__shipping-banner,
  .botiga-slide-cart__footer {
    padding-left: 20px;
    padding-right: 20px;
  }

  .botiga-slide-cart__item {
    grid-template-columns: 80px 1fr auto;
    gap: 14px;
  }

  .botiga-slide-cart__item-image {
    width: 80px;
    height: 96px;
  }

  .botiga-slide-cart__upsell-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Ocultar o mini-cart padrão do Botiga quando nosso modal estiver ativo */
body.botiga-slide-cart-open {
  overflow: hidden;
}


.botiga-slide-cart__item-name a:hover{
    color:#004748;
}

.botiga-slide-cart__checkout-btn:visited{
    color: #ffffff;
}