/* Estilos generales */
body {
  font-family: Arial, sans-serif;
  background-color: rgb(203, 205, 212);
  color: white;
  margin: 0;
  padding: 0;
}

a:visited {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 960px) {
  .kopi nav.encabezado #shopping_cart {
    display: none;
  }
}

.container {
  display: flex;
  justify-content: space-around;
  padding: 20px;
}

/* Estilos para el resumen del pedido */
.order-summary {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  width: 75%;
}

.h2Or {
  color: #131313;
}

.s3 {
  margin-top: 10px;
  margin-bottom: 10px;
  height: 1px;
  width: 99%;
  align-self: stretch;
  background: #131313;
}

/* Estilos para los detalles del producto */
.product-details {
  background-color: #ffffff;
  color: #000000;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-icon {
  width: 80px;
  /* Tamaño fijo en lugar de porcentaje */
  height: 80px;
  border-radius: 30px;
  object-fit: cover;
  /* Para que la imagen se ajuste bien */
  flex-shrink: 0;
  /* Evita que se reduzca */
}

.product-info {
  padding-left: 6px;
  flex: 1;
  min-width: 0;
  /* Permite que el texto se corte si es necesario */
}

.product-info p {
  margin: 5px 0;
  font-size: 15px;
  opacity: 0.9;
}

/* CORREGIDO: Era "pricebox" ahora es "preicebox" como en tu HTML */
.preicebox {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* Alinear a la derecha */
  justify-content: center;
  gap: 5px;
  /* Espacio entre precios */
  min-width: 80px;
  /* Ancho mínimo */
  flex-shrink: 0;
  /* No se reduce */
}

.price,
.price2 {
  font-weight: bold;
  margin: 0;
  /* Quitar márgenes por defecto */
  line-height: 1.2;
}

.price {
  font-size: 22px;
  color: #131313;
}

.price2 {
  color: #a6763e;
  font-size: 15px;
  /* REMOVIDO: margin-top: -25px que causaba la superposición */
}

/* Opciones del producto */
.opciones {
  display: flex;
  align-items: center;
  height: 50px;
  gap: 20px;
  line-height: 20px;
  flex-wrap: wrap;
  /* Permite que se ajusten en pantallas pequeñas */
}

.opciones .cantidad {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 104px;
  box-sizing: border-box;
  border-color: #cecece8a;
  border-style: solid;
  border-width: 3px;
  border-radius: 100px;
  overflow: hidden;
  gap: 20px;
  padding: 5px 10px;
}

.menos,
.mas {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: pointer;
  padding: 5px;
}

.opciones p {
  cursor: pointer;
  margin: 0;
  /* Quitar márgenes por defecto */
  white-space: nowrap;
  /* Evita que el texto se corte */
}

.opciones p:hover {
  color: #a6763e;
}

/* precios */
.price-summary {
  font-weight: bold;
  background-color: #fff;
  padding: 15px;
  border-radius: 10px;
  /* CAMBIADO: de -20px a 20px positivo */
  color: black;
  font-family: Arial, sans-serif;
}

.price-summary p {
  margin: 5px 0;
  font-size: 15px;
  opacity: 0.9;
}

.price-summary h3 {
  margin: 10px 0 0;
  font-size: 18px;
  color: #131313;
  /* CAMBIADO: de #ffffff a #131313 para que se vea */
}

/* detalles de pago */
.payment-details {
  padding-left: 20px;
  width: 30%;
  justify-content: start;
  align-content: start;
}

.checkboxDiv {
  display: flex;
  align-items: center;
  height: 120px;
}

.styledCheckbox {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 24px;
  margin-right: 12px;
}

.styledCheckbox input {
  opacity: 0;
  width: 0;
  height: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #fff;
  border: 2px solid #c8a97e;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.styledCheckbox input:checked+.checkmark {
  background-color: #5d7dc0;
  border-color: #5d7dc0;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.styledCheckbox input:checked+.checkmark:after {
  display: block;
}

.styledCheckbox .checkmark:after {
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Estilo para el botón */
button {
  width: 50%;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 15px;
  border: none;
  font-weight: 700;
  color: #FFF;
  font-size: 16px;
  cursor: pointer;
  margin: 0 auto;
  background-color: #000000;
  display: block;
}

a {
  text-decoration: none;
}

button:hover {
  background-color: #252525;
}

.loading-overlay {
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

/* Responsive para pantallas pequeñas */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
    gap: 20px;
  }

  .order-summary,
  .payment-details {
    width: 100%;
  }

  .product-details {
    flex-direction: column;
    text-align: center;
  }

  .opciones {
    justify-content: center;
    gap: 10px;
  }
}

/* Ocultar botón de proceder a pagar por defecto */
a[href="../pages/buy.html"] button {
  display: none;
}