:root {
  --letra: "Bodoni Moda", serif;
  --accent: #9703fa;
  --black: #050505;
}

html,
body {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--background);
  color: var(--gray);
  font-family: var(--letra);
  min-height: 100vh;
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
}

body.no-scroll {
  overflow: hidden; /* respaldo importante */
}

/* Opcional: evita que el body "salte" visualmente */
body {
  transition: none; /* si usas transiciones en body, desactívalas aquí */
}

body.loading {
  overflow: hidden;
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f7f7f7;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  font-size: 2rem;
}

/* CATEGORIAS */
.categorias {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin: 13vh 0 2.5rem;
}
@media (max-width: 720px) {
  .categorias {
    margin: 4.5rem 0 0;
  }
}

.categorias-container {
  overflow: hidden;
  border-radius: 12px;
  margin-left: 0.5rem;
}

.categorias-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 8px 0;
  scrollbar-width: none;
}
.categorias-scroll::-webkit-scrollbar {
  display: none;
}

.cat-btn {
  flex: 0 0 auto;
  padding: 10px 20px;
  background: #9703fa;
  font-family: var(--letra);
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.cat-btn:hover {
  background: #4b007c;
  transform: translateY(-2px);
}

.cat-btn:active,
.cat-btn.active {
  background: #000;
  color: white;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.3s;
}

.categorias:hover .scroll-btn {
  opacity: 1;
}

.scroll-btn.left {
  left: 10px;
}
.scroll-btn.right {
  right: 10px;
}

@media (max-width: 768px) {
  .scroll-btn {
    display: none;
  }
}

/* PRODUCTO */
.productos {
  padding: 0 20px;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.producto-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  max-width: 16rem;
}

.producto-card:hover {
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
}

.producto-img {
  position: relative;
  overflow: hidden;
  padding: 0;
  border: 0;
  width: 100%;
}

.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.producto-card:hover .producto-img img {
  transform: scale(1.08);
}

.producto-info {
  padding: 18px;
  text-align: center;
}

.producto-info h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: #2c3e50;
  height: 48px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.vendedor {
  font-size: 13px;
  color: #666;
  margin: 4px 0 8px;
  line-height: 1;
}

.vendedor strong {
  color: #2c3e50;
}

.precio {
  font-size: 20px;
  font-weight: 700;
  color: #2c3e50;
  margin: 8px 0;
}

.precio-anterior {
  text-decoration: line-through;
  color: #999;
  font-weight: 400;
  font-size: 15px;
  margin-right: 8px;
}

.precio-actual {
  color: #e74c3c;
}

.btn-add {
  margin-top: 12px;
  width: 100%;
  padding: 12px;
  background: #000;
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-add:hover {
  background: #333;
  transform: translateY(-2px);
}

.btn-add:active {
  transform: translateY(0);
}

/* Responsivo extra para móviles */
@media (max-width: 480px) {
  .productos-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .producto-img {
    height: 160px;
  }
  .producto-info h3 {
    font-size: 14px;
    height: 40px;
  }
}

/* === POP DEL CARRITO === */
.cart-bounce {
  animation: cartBounce 0.4s ease-out;
}

@keyframes cartBounce {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.3);
  }
  70% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* === +1 FLOTANTE === */
.plus-cart {
  position: fixed;
  font-weight: bold;
  font-size: 1rem;
  color: #0c0c0c;
  pointer-events: none;
  animation: plusFloat 0.9s ease forwards;
  z-index: 9999;
}

@keyframes plusFloat {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.8);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-25px) scale(1.2);
  }
}


/* MODAL */

/*Ventana modal*/
.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 3;
  overflow-wrap: break-word;
}

.modal-content {
  background-color: #ffffff61;
  backdrop-filter: blur(10px);
  margin: 35vh auto;
  padding: 20px;
  border: 1px solid #e8e4e4;
  width: 50%;
  text-align: center;
  border-radius: 15px;
  overflow-wrap: break-word;
  font-size: 1.3rem;
}
.modal-content p,
.modal-content h3,
.modal-content label {
  display: flex;
  justify-content: center;
  text-align: center;
  margin: auto;
  color: #050505;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@media (max-width: 720px) {
  .modal-content {
    width: 85%;
    font-size: 1rem;
  }

  .modal-content p {
    text-align: center;
    word-break: break-word;
    font-size: 18px;
    color: #050505;
  }
  .modal-content h3 {
    font-size: 23px;
    color: #050505;
  }
  .modal-content label {
    font-size: 18px;
    font-weight: 500;
    color: #080808;
  }
}
.preguntaNotificacion {
  border-top: 1px solid #000;
}
.preguntaNotificacion p {
  text-align: center;
  margin: 0 1rem;
}
.preguntaNotificacion h4 {
  margin-bottom: 0;
}
.btnNotis {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.modalBtn {
  width: 15rem;
  height: 3rem;
  font-family: var(--letra);
  border: 2px solid #f69825;
  border-radius: 5px;
  background-color: #f69825;
  font-weight: 100;
  transition: all 0.3s ease-in-out;
  margin: 1rem;
  font-size: large;
  color: #000;
}
.dobleFecha {
  border: 2px solid #1b849e;
  background-color: #25ccf6;
}
.bloquearUsu {
  border: 2px solid #9e471b;
  background-color: #f67225;
  font-size: larger;
}
.btnNotis {
  color: #000;
}

@media (max-width: 720px) {
  .btnNotis {
    flex-direction: column;
  }
}

.modalBtn:hover {
  cursor: pointer;
  /*   border-color: #ff8c00;
  box-shadow: 0 0 5px #ff8c00; */
}
.divCheckboxs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.divCheckboxs label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--letra);
  cursor: pointer;
  justify-content: center;
}

.divCheckboxs input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #5adbd7;
  border-radius: 50%;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.divCheckboxs input[type="checkbox"]:checked {
  background-color: #5adbd7;
  border: 2px solid #5adbd7;
  box-shadow: 0 0 5px rgba(90, 219, 215, 0.6);
}
