/* Container Principal */
#bt-catalog-widget {
  width: 100%;
  margin: 40px 0;
}

.buy-together-wrapper {
  margin: 0 auto;
  padding: 0 20px;
}

#bt-catalog-widget * {
  box-sizing: border-box;
}

/* Header */
.bt-header {
  margin-bottom: 30px;
}

.bt-header h2 {
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* Container Principal - Layout em 2 Colunas */
.bt-main-container {
  display: flex;
  gap: 30px;
  align-items: center;
  flex-wrap: wrap;
}

@media (min-width: 993px) {
  .bt-main-container {
    flex-wrap: nowrap;
  }
}

/* Carrossel de Produtos */
.bt-products-carousel {
  flex: 1 1 auto;
  position: relative;
  min-width: 0;
  width: 100%;
}

@media (min-width: 993px) {
  .bt-products-carousel {
    width: auto;
    flex: 1 1 0%;
  }
}

.bt-products-carousel .swiper {
  overflow: hidden;
  padding-bottom: 40px;
  width: 100%;
  max-width: 100%;
}

.bt-products-carousel .swiper-wrapper {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.bt-products-carousel .swiper-slide {
  height: auto;
  display: flex;
  flex-shrink: 0;
}

/* Card de Produto */
.bt-product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 400px;
}

.bt-thumb-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.bt-thumb-wrapper > .product-thumb {
  height: 100%;
}

.bt-thumb-overlays {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
  z-index: 4;
}

.bt-thumb-overlays .bt-checkbox,
.bt-thumb-overlays .bt-current-badge {
  pointer-events: auto;
}

/* Checkbox */
.bt-checkbox {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.bt-checkbox input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.bt-checkbox label {
  cursor: pointer;
  margin: 0;
}

.bt-checkbox-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--variant-button-background-color);
  border: 2px solid var(--variant-button-border-color);
  border-radius: var(--border-radius-default);
}

.bt-checkbox input[type="checkbox"]:checked ~ label .bt-checkbox-mark {
  background: var(--text);
  border-color: var(--text);
}

.bt-checkbox-mark i {
  color: var(--variant-button-selected-color);
  font-size: 12px;
  opacity: 0;
}

.bt-checkbox input[type="checkbox"]:checked ~ label .bt-checkbox-mark i {
  opacity: 1;
}

/* Badge Produto Atual */
.bt-current-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--background);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  width: 112px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Símbolo + entre produtos */
.bt-plus-separator {
  position: absolute;
  top: 50%;
  right: -10px;
  transform: translate(50%, -50%);
  width: 12px;
  height: 12px;
  font-size: 16px;
  line-height: 12px;
  color: var(--text);
  font-weight: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

@media (max-width: 992px) {
  .bt-plus-separator {
    right: -8px;
  }
}

@media (max-width: 576px) {
  .bt-plus-separator {
    right: -6px;
    font-size: 10px;
  }
}

/* Seletor de Tamanhos */
.bt-size-selector {
  display: flex;
  gap: 6px;
  margin-top: auto;
  flex-wrap: wrap;
  position: absolute;
  top: 255px;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 99;
}

.bt-thumb-wrapper + .bt-size-selector {
  margin-top: 16px;
}

.bt-size-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  background: var(--variant-button-background-color);
  border: 1px solid var(--variant-button-border-color);
  font-size: 13px;
  font-weight: 600;
  font-style: normal;
  color: var(--text);
  line-height: 100%;
  letter-spacing: 0%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.bt-size-btn.active {
  background: var(--secondary);
  border-color: var(--variant-button-border-color);
  color: var(--variant-button-selected-color);
}

.bt-size-btn:disabled {
  cursor: not-allowed;
}

.bt-size-btn.out-of-stock {
  background: var(--gray-light);
  border-color: var(--variant-button-border-color);
  color: var(--text-gray);
  text-decoration-color: var(--text-gray);
  text-decoration-thickness: 1px;
}

.bt-size-btn.out-of-stock:after {
  content: "";
  width: 45px;
  height: 1px;
  background: var(--text-gray);
  transform: rotate(28deg);
  position: absolute;
  border-radius: 2px;
}

/* Navegação do Carrossel */
.bt-carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.bt-carousel-nav.bt-carousel-prev {
  left: -15px;
}

.bt-carousel-nav.bt-carousel-next {
  right: -15px;
}

.bt-carousel-nav button {
  width: 40px;
  height: 40px;
  background: var(--background);
  border: 1px solid var(--variant-button-border-color);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-gray);
}

.bt-carousel-nav button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.bt-carousel-nav button i {
  font-size: 14px;
}

/* Paginação do Carrossel */
.bt-carousel-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.bt-carousel-pagination .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--gray);
  border-radius: 50%;
  cursor: pointer;
  opacity: 1;
}

.bt-carousel-pagination .swiper-pagination-bullet-active {
  background: var(--text);
}

/* Painel de Resumo Lateral */
.bt-summary-panel {
  width: 100%;
  flex-shrink: 0;
}

@media (min-width: 993px) {
  .bt-summary-panel {
    width: 320px;
    position: sticky;
    top: 20px;
  }
}

.bt-summary-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--green);
  letter-spacing: 1px;
  margin-bottom: 8px;
  display: block;
}

.bt-original-price {
  font-size: 14px;
  color: var(--text-gray);
  text-decoration: line-through;
  margin-bottom: 4px;
}

.bt-final-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 12px;
  display: block;
}

.bt-payment-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 16px;
  line-height: 1.5;
}

.bt-savings {
  background: var(--green);
  color: var(--variant-button-selected-color);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--border-radius-default);
  margin-bottom: 20px;
  text-align: center;
}

.bt-add-to-cart-btn {
  width: 100%;
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: ease all .5s;
}

.bt-add-to-cart-btn:hover {
  background: var(--green-hover);
}

/* Responsivo */
@media (max-width: 992px) {
  .bt-products-carousel {
    padding: 0 30px;
  }
}

@media (max-width: 576px) {
  .bt-header h2 {
    font-size: 22px;
  }

  .bt-products-carousel {
    padding: 0 20px;
  }

  .bt-products-carousel .swiper {
    padding-bottom: 20px;
  }

  .bt-product-card {
    padding: 0;
    min-height: 320px;
  }

  .bt-checkbox {
    top: 8px;
    left: 8px;
  }

  .bt-checkbox-mark {
    width: 20px;
    height: 20px;
  }

  .bt-checkbox-mark i {
    font-size: 10px;
  }

  .bt-current-badge {
    font-size: 11px;
    width: 90px;
    height: 28px;
    top: 8px;
    right: 8px;
  }

  .bt-product-info {
    margin-top: 8px;
  }

  .bt-product-name {
    font-size: 11px;
    min-height: auto;
    margin-bottom: 6px;
  }

  .bt-product-price {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .bt-installment-info {
    font-size: 10px;
  }

  .bt-size-btn {
    width: 36px;
    height: 36px;
    font-size: 11px;
    padding: 0;
  }

  .bt-plus-separator {
    right: -6px;
    font-size: 14px;
  }

  .bt-summary-content {
    padding: 16px;
  }

  .bt-summary-label {
    font-size: 10px;
    margin-bottom: 6px;
  }

  .bt-original-price {
    font-size: 12px;
  }

  .bt-final-price {
    font-size: 24px;
    margin-bottom: 10px;
  }

  .bt-payment-info {
    font-size: 11px;
    margin-bottom: 12px;
  }

  .bt-savings {
    font-size: 12px;
    padding: 6px 10px;
    margin-bottom: 16px;
  }

  .bt-add-to-cart-btn {
    padding: 14px 20px;
    font-size: 13px;
  }

  .bt-carousel-nav button {
    width: 32px;
    height: 32px;
  }

  .bt-carousel-nav button i {
    font-size: 12px;
  }

  .bt-carousel-nav.bt-carousel-prev {
    left: 0;
  }

  .bt-carousel-nav.bt-carousel-next {
    right: 0;
  }
}

/* Estados de Loading e Disabled */
.bt-product-card.loading {
  opacity: 0.6;
  pointer-events: none;
}

.bt-product-card[data-is-main="true"] .bt-checkbox input[type="checkbox"] {
  cursor: not-allowed;
}

.bt-product-card[data-is-main="true"] .bt-checkbox-mark {
  opacity: 0.8;
}
