body {
  font-family: Arial, sans-serif;
  background-color: #fefefe;
  /* margin: 40px; */
}

.tabla-contenedor {
  max-width: 1000px;
  margin: 0 auto;
  border: 1px solid #ccc;
}

h1 {
  text-align: center;
  color: #2c3e50;
}

.subtitulo {
  text-align: center;
  font-style: italic;
  margin-bottom: 20px;
  color: #333;
}

table {
  width: 100%;
  border-collapse: collapse;
}


thead {
  background-color: #008B8B;
  color: white;
}

th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

tbody tr:nth-child(even) {
  background-color: #f2f2f2;
}

tfoot {
  background-color: #008B8B;
  color: white;
  font-weight: bold;
  text-align: center;
}

.precio {
  font-weight: bold;
}

/* Estilos para la vista de escritorio */
.desktop-view {
  display: block;
}

.mobile-view .price-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.row-barrel-title {
  width: 100%;
  padding: 10px 20px;
}

/* Contenedores de precio */
.price-container {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Estilos de precios */
.base-price {
  display: inline-block;
}

.original-price {
  text-decoration: line-through;
  color: #888;
  margin-right: 5px;
}

.discounted-price {
  color: green;
  font-weight: bold;
}

/* Estructura de división */
.price-split {
  display: flex;
  justify-content: space-between;
  background: #f7f7f7;
  border-radius: 8px;
  padding: 0.5rem;
  margin: 1rem 0;
}

.price-block {
  width: 45%;
  text-align: center;
}

.divider {
  width: 1px;
  background-color: #ccc;
  height: 50px;
}

.price-per-liter {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.3rem;
}

/* Estilos generales */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-content {
  background: white;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 400px;
  text-align: center;
}

.modal-content h2 {
  margin-bottom: 20px;
}

.modal-content label {
  display: block;
  margin-bottom: 10px;
  text-align: left;
}

.modal-content input {
  width: 100%;
  padding: 8px;
  margin-top: 4px;
  box-sizing: border-box;
}

.submit-btn {
  background-color: #11999e;
  color: white;
  border: none;
  padding: 10px;
  margin-top: 15px;
  width: 100%;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
}

.cancel-btn {
  margin-top: 10px;
  background: transparent;
  border: none;
  color: #555;
  cursor: pointer;
  text-decoration: underline;
}

.fancy-toggle-btn {
  background-color: #ef0472;
  color: white;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin: 15px auto;
  display: block;
  border: none;
}

.fancy-toggle-btn:hover {
  background-color: rgb(233, 41, 137);
  transform: scale(1.05);
}

.spinner {
  width: 16px;
  height: 16px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  display: inline-block;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Inicialmente ocultamos columnas con esta clase */
.toggle-columns {
  display: none;
}

/* Cuando está activa la clase en la tabla, se muestran */
.show-columns .toggle-columns {
  display: table-cell;
}

/* productallbuttons,productnewbuttons,productbutto */
.quote-button {
  display: inline-block;
  padding: 8.5px 40px;
  /* color de fondo */
  color: white;
  /* texto */
  text-decoration: none;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.quote-button:hover {
  background-color: #11999e;
  /* color al pasar el mouse */
  color: #ffffff;
}

.productallbuttons {
  width: 50%;
  height: 10vh;
}

.productnewbuttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.productbutto {
  color: black;
  background-color: antiquewhite;
  padding: 15px;
  border-radius: 15px;
  font-weight: bolder;
  transition: 1s;
  cursor: pointer;
}

.productbutto:hover {
  background-color: rgb(245, 217, 180);
  color: rgb(33, 34, 34);
}

.product-row:hover {
  background-color: #f0f9ff;
}

#you-pay-total {
  font-weight: bold;
  font-size: 22px;
}

tfoot tr {
  border-top: 2px solid #ccc;
}

.mobile-view {
  display: none;
}

/* Estilos para la vista de escritorio */

@media screen and (max-width: 960px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
    padding: 1rem;
  }

  .mobile-view .product-card {
    border: 1px solid #ccc;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: #fff;
  }

  .quantity-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
  }

  .increment-btn,
  .decrement-btn {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 8px;
    border: none;
    background-color: #007bff;
    color: #fff;
    cursor: pointer;
  }

  .you-pay-btn-wrapper {
    text-align: center;
    margin-top: 1rem;
  }

  .you-pay-btn {
    background-color: teal;
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
  }

  .you-pay-display {
    display: block;
    margin-top: 0.5rem;
    font-weight: bold;
    color: rgb(0, 47, 255);
    font-size: 1.2rem;
    margin-left: 0.5rem;
  }
}

/* Estilos base que aplican fuera del media query */
.mobile-view .product-card {
  border: 1px solid #ccc;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  background-color: #fff;
}

.price-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
  background: #f7f7f7;
  border-radius: 8px;
  padding: 0.5rem;
}

.price-block {
  width: 45%;
  text-align: center;
}

.divider {
  width: 1px;
  background-color: #ccc;
  height: 50px;
}

.quantity-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.quantity-controls button {
  padding: 0.5rem 1rem;
  font-size: 1.2rem;
  border-radius: 8px;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.you-pay-text {
  margin-top: 1rem;
  text-align: center;
  font-size: 1.1rem;
}

.you-pay-display {
  color: rgb(0, 47, 255);
  font-weight: bold;
  margin-left: 0.5rem;
}

.mobile-total {
  text-align: center;
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

/* Estilos responsivos para ocultar vista escritorio y mostrar vista móvil */
@media screen and (max-width: 960px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
    padding: 1rem;
  }
}

@media (max-width: 400px) {
  .price-container {
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: center;
  }

  .original-price,
  .discounted-price,
  .base-price {
    white-space: nowrap;
    font-size: 0.75rem;
    /* Más compacto */
  }
}

.shipping-fee {
  color: #d9534f;
  font-weight: bold;
}

.free-shipping {
  color: #5cb85c;
  font-weight: bold;
}

.price-breakdown {
  margin-top: 10px;
  padding: 10px;
  background-color: #f9f9f9;
  border-radius: 5px;
}