/* ====== Layout geral (produtos page) ====== */

/* ====== Container principal ====== */
.product-detail-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.product-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.product-images {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.main-image img {
  width: 100%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.thumbs-area {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.thumb-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.thumb-btn:hover {
  transform: scale(1.05);
}

.thumb-img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid #eee;
}

.btn-back-inline {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background: #444;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.3s;
}

.btn-back-inline:hover {
  background: #222;
}

/* ====== Área lateral ====== */
.product-card-side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.product-card-side h1 {
  font-size: 1.8rem;
  margin: 0;
}

.top-actions {
  display: flex;
  gap: 1rem;
}

.btn-add-cart {
  background: #ff4081;
  border: none;
  padding: 0.75rem 1.5rem;
  color: white;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-add-cart:hover {
  background: #e73570;
}

.price {
  font-size: 1.6rem;
  color: #222;
  font-weight: 600;
}

.description-box {
  background: #fafafa;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #eee;
}

.product-description-textarea {
  width: 100%;
  height: 160px;
  border: none;
  background: transparent;
  resize: none;
  font-size: 1rem;
  line-height: 1.5;
  color: #444;
}

/* ====== Responsividade ====== */
@media (max-width: 768px) {
  .product-wrap {
    grid-template-columns: 1fr;
  }

  .product-card-side {
    order: 2;
  }

  .product-images {
    order: 1;
  }

  .main-image img {
    max-width: 100%;
  }
}

/* footer herdado do style.css principal */

/* ===================================================================== */
/* MOBILE UX – categorias em combobox + cards centralizados               */
/* ===================================================================== */

.categoria-combobox {
  display: none; /* só aparece no mobile */
}

@media (max-width: 768px) {
  /* Esconde sidebar no mobile */
  #sidebar-categorias.sidebar {
    display: none;
  }

  /* Mostra combobox acima dos produtos */
  .categoria-combobox {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin: 0 0 16px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
  }

  /* Centraliza cards no mobile (1 coluna) */
  .products-area #product-grid.product-grid-5x3 {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 0 12px;
  }

  .products-area #product-grid.product-grid-5x3 .produto-card-unificado {
    width: 100%;
    max-width: 100%;
  }
}

/* ===== Banners na página de produtos (slider infinito) ===== */
.banner-section-produtos {
  width: 100vw;
  margin: 0 0 24px;
  padding: 0;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw; /* full-bleed na largura total */
}

#banners-container-produtos {
  width: 100vw;
  position: relative;
  overflow: hidden;
  height: 600px; /* altura fixa para mostrar o banner completo */
}

/* Cada slide (link ou div) ocupa a mesma área, apenas um visível */
#banners-container-produtos .banner-slide-link {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  display: flex;
}

#banners-container-produtos .banner-slide-link.active {
  opacity: 1;
  pointer-events: auto;
}

#banners-container-produtos .banner-item {
  width: 100%;
  display: block;
}

#banners-container-produtos .banner-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

#banners-container-produtos .banner-slide-link {
  text-decoration: none;
}

/* Botões de navegação dos banners */
.banner-prod-prev,
.banner-prod-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 28px;
  padding: 10px 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 5;
  transition: background 0.2s ease, transform 0.2s ease;
}

.banner-prod-prev:hover,
.banner-prod-next:hover {
  background: rgba(0, 0, 0, 0.75);
  transform: translateY(-50%) scale(1.05);
}

.banner-prod-prev {
  left: 20px;
}

.banner-prod-next {
  right: 20px;
}

@media (max-width: 768px) {
  #banners-container-produtos {
    height: 400px;
  }

  .banner-prod-prev,
  .banner-prod-next {
    font-size: 22px;
    padding: 8px 12px;
  }
}
