@import url('https://fonts.googleapis.com/css2?family=Ubuntu&display=swap');


#tpv,
#extraFields {
  display: none;
}


/* =========================
   GENERALES
   ========================= */

.mbe-text-red {
  color: #D51A00;
}

div#content {
  background: none;
}

.cle-tpvhome-left {
    width: 100% !important;
}

input, select, textarea {
  width: 100%;
  padding: 12px 10px;
  border-radius: 10px;
  border: 0;
  font-family: 'Ubuntu', sans-serif;
}

.input-group label, .input-grupo label {
    text-align: left;
}

button.btn.btn-sm.flex-grow-1.js-cle-tpv-create-order {
    width: 100%;
    background: #D51A00;
    color: white;
}

button.btn.btn-outline-danger.btn-sm.flex-grow-1.js-cle-tpv-clear {
    width: 100%;
    margin-bottom: 5px;
    background: #efefef;
    border: 1px solid #efefef;
    color: black;
}

.col-6.col-md-3.col-lg-3.mb-3.cle-tpvhome-product-col {
    padding: 0px 5px !important;
}

.cle-tpvhome-cart.card {
    border: 1px solid black;
}

/* =========================
   HEADER
   ========================= */

#mbe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.col1, .col2 {
  width: 100%;
  color: #fff;
}

.col2 {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#mbe-header .currency-selector,
#mbe-header #_desktop_user_info,
#mbe-header #_desktop_cart {
  display: none;
}

/* =========================
   CONTENEDOR PRINCIPAL
   ========================= */

#botellasForm {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin: 20px 0;
}

/* 🔥 CLAVE: el form NO es flex */
#botellasForm form {
  display: block;
}

/* =========================
   SECCIONES FORM
   ========================= */

.form-section {
  margin-bottom: 10px;
}




.form-section h3 {
  margin-bottom: 20px;
  font-size: 18px;
}

/* =========================
   INPUTS
   ========================= */

.input-group,
.input-grupo {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
}

label {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 16px;
}

/* Grid de 3 columnas */
.row-input {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* =========================
   BOTONES
   ========================= */

button {
  border-radius: 10px;
  border: 0;
  cursor: pointer;
}

#calcularBtn,
#confirmSeleccionBtn {
  width: 100%;
  padding: 12px;
  background-color: #D51A00;
  color: #fff;
  transition: background 0.3s ease;
}

#calcularBtn:hover,
#confirmSeleccionBtn:hover {
  background-color: #b71701;
}

#payPortes {
  width: 100%;
  padding: 15px;
  background: linear-gradient(180deg, #D51A00 0%, #a21300 100%);
  color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* =========================
   PORTES
   ========================= */

.porte-result {
  display: none;
  margin: 20px 0;
  padding: 15px;
  background: #ffffff47;
  border-radius: 10px;
  text-align: center;
}

.porte-result p {
  margin: 0;
  color: #000;
}

#portePrecio {
  color: #D51A00;
}

/* =========================
   TPV
   ========================= */

.tpv-wrapper {
  margin-top: 40px;
}

/* =========================
   CARRITO
   ========================= */

.cle-tpvhome-cart {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cle-tpvhome-cart-body {
  flex: 1;
  overflow-y: auto;
  max-height: 60vh;
}

@media (min-width: 992px) {
  .cle-tpvhome-cart {
    position: sticky;
    top: 20px;
  }

  .cle-tpvhome-cart-body {
    max-height: calc(100vh - 260px);
  }
}

/* Líneas del carrito */
.cle-tpvhome-cart-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.cle-tpvhome-cart-line-name {
  flex: 1;
  font-size: 14px;
}

.cle-tpvhome-cart-line-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================
   ERRORES
   ========================= */

.field-error {
  color: #D51A00;
  font-size: 13px;
  margin-top: 4px;
}

/* =========================
   FOOTER
   ========================= */

#mbe-footer {
  margin-top: 50px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.cms {
  width: 100%;
  font-size: 12px;
  color: #000;
  font-family: 'Ubuntu', sans-serif;
}

@media (min-width: 768px) {
  #mbe-footer {
    flex-wrap: nowrap;
  }
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 768px) {
  .row-input {
    grid-template-columns: 1fr;
  }

  label {
    font-size: 14px;
  }

  input, select, textarea {
    font-size: 14px;
    padding: 10px 8px;
  }

  #payPortes {
    padding: 12px;
    font-size: 16px;
  }
}

/* =========================
   LINKS
   ========================= */

a.dropdown-item:hover {
  color: #D51A00;
}

@media (max-width: 768px) {
    .col-12.col-lg-8.cle-tpvhome-left {
    padding: 0px !important;
}
}

button.btn.btn-primary.btn-sm.w-100.js-cle-tpv-create-order {
    background: #D51A00 !important;
}

/* =========================
   GRID PRODUCTOS TPV
   ========================= */
/* Forzar 2 columnas en mobile */
@media (max-width: 767px) {
  .cle-tpvhome-product-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

  
  .cle-tpvhome-product-btn {
    padding: 0.75rem;
    border-radius: 8px;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
  }
  
  .cle-tpvhome-product-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
  }
  
  /* =========================
     CONTENIDO INTERNO
     ========================= */
  
  .cle-tpvhome-product-inner {
    flex-direction: column;   /* ⬅️ CLAVE */
    align-items: center;
    text-align: center;
    height: 100%;
  }
  
  /* =========================
     IMAGEN
     ========================= */
  
  .cle-tpvhome-product-image {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
  }
  
  .cle-tpvhome-product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
  }
  
  /* =========================
     NOMBRE PRODUCTO
     ========================= */
  
  .cle-tpvhome-product-name {
    font-size: 0.85rem;
    line-height: 1.2;
    font-weight: 500;
    color: #333;
  
    /* 🔒 CLAMP A 2 LÍNEAS */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  
    min-height: 2.4em; /* asegura altura homogénea */
  }

  /* =========================
   CONTENEDOR CARRITO
   ========================= */

.cle-tpvhome-cart {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 10px;
    overflow: hidden;
  }
  
  /* =========================
     HEADER
     ========================= */
  
  .cle-tpvhome-cart .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    padding: 0.75rem 1rem;
  }
  
  /* =========================
     BODY (SCROLL INTERNO)
     ========================= */
  
  .cle-tpvhome-cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    background: #fff;
  }
  
  /* Mensaje carrito vacío */
  .cle-tpvhome-cart-empty {
    text-align: center;
    font-size: 0.9rem;
    padding: 1rem 0;
  }
  
  /* =========================
     LÍNEAS DE PRODUCTO
     ========================= */
  
  .cle-tpvhome-cart-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    gap: 0.5rem;
  }
  
  .cle-tpvhome-cart-line:last-child {
    border-bottom: none;
  }
  
  /* Nombre producto */
  .cle-tpvhome-cart-line-name {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.2;
  
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* =========================
     CONTROLES CANTIDAD
     ========================= */
  
  .cle-tpvhome-cart-line-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
  }
  
  .cle-tpvhome-cart-line-controls button {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 0.9rem;
  }
  
  .cle-tpvhome-cart-line-qty {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
  }
  
  /* =========================
     FOOTER
     ========================= */
  
  .cle-tpvhome-cart .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e5e5e5;
  }
  
  /* Totales */
  .cle-tpvhome-cart-totals {
    font-size: 0.9rem;
  }
  
  .cle-tpvhome-cart-totals strong {
    font-size: 1rem;
  }
  
  /* =========================
     BOTONES
     ========================= */
  
  .cle-tpvhome-cart .btn {
    font-weight: 600;
  }
  
  .cle-tpvhome-cart .btn-sm {
    padding: 0.5rem;
  }
  
  /* Feedback táctil */
  .cle-tpvhome-cart .btn:active {
    transform: scale(0.97);
  }
  
  