@import url(global-styles.css);

p.text-right {
  display: flex;
  justify-content: space-between;
  white-space: nowrap;
  width: 100%;
}

#productos-container {
  overflow-x: auto;
  white-space: nowrap;
}

.item-gap {
  display: flex;
  gap: 16px;
  padding-bottom: 10px;
  white-space: nowrap;
  scroll-behavior: smooth;
  padding-left: 16px;
}

.modal-img {
  max-height: 500px;
  width: 100%;
  object-fit: contain;
}

.card {
  flex: 0 0 auto;
  width: 220px;
  height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: var(--white);
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s;
}

.card:hover {
  transform: scale(1.05);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 5px;
}

.card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  flex-grow: 1;
  width: 100%;
}

.card-text {
  max-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  white-space: normal;
  font-size: 14px;
  text-align: center;
  padding: 0 10px;
}

.item-gap .btn {
  width: 80%;
  margin-top: auto;
}

.cart-btn {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  background-color: red;
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  min-width: 18px;
  height: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

.carousel-container {
  position: relative;
  padding: 0 50px;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.arrow:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.arrow.left {
  left: -20px; /* misma distancia desde la izquierda */
}

.arrow.right {
  right: -20px /* misma distancia desde la derecha */
}

@media screen and (max-width: 768px) {
  .carousel-container {
    padding: 0 20px;
  }

  .arrow {
    width: 35px;
    height: 35px;
  }

  .item-gap {
    gap: 12px;
    padding-left: 12px;
  }

  .card {
    width: 180px;
    height: 320px;
  }
}

@media screen and (max-width: 480px) {
  .arrow {
    display: none;
  }

  .card {
    width: 160px;
    height: 300px;
  }
}

.titulo-largo {
  font-size: 1.3rem;
  white-space: normal;
  overflow-wrap: break-word;
  line-height: 1.2;
  min-height: 3rem;
}

.card {
  text-decoration: none;
  color: inherit;
}

body.dark-mode .modal-content {
  background-color: var(--white);
  color: var(--black);
}

.items-centrados {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center; /* Esto las centra horizontalmente */
}

/* Centrado vertical y horizontal */
.fullscreen-center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

/* Alternativamente, si solo quieres centrar cuando son pocas */
.items-centrados.few-items {
  justify-content: center;
}

.move-text {
  margin-top: 250px;
}

.section-title {
  font-size: 2.5rem;
}

#destacados {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  min-height: 300px; /* Ajustá según altura típica del contenido */
}