html {
  background: rgb(237, 237, 238); 
  overflow-y: scroll; /* Fuerza la "canaleta" de la barra siempre */
  height: 100%;       /* Importante para que el cálculo sea exacto */
  }
body { 
  display: grid;
   min-height: 100%;
    margin: 0px;
    overflow-x: hidden; /* Evita que la barra vertical empuje el diseño hacia los lados */
     font-family: "Open Sans", sans-serif;
      line-height: 1.6;
    }
.grid-container {
    display: grid;
    grid-template-areas: 
        "header header"
        "XXX    YYY"
        "footer footer";
    grid-template-columns: 190px 1fr;
    grid-template-rows: auto 1fr auto;
    
    /* CAMBIO CLAVE: */
    min-height: 100vh; /* Ocupa al menos toda la pantalla */
    height: auto;      /* Permite que crezca con el contenido */
}
.XXX { grid-area: XXX; padding: 10px; background: rgb(237, 237, 238); width: 170px; }
.YYY {
    grid-area: YYY;
    padding: 10px;
    margin: 10px;
    background: rgb(255, 255, 255);
    border-radius: 10px;
  }
.YYYe { position: absolute; width: calc(100% - 40px); height: 60%; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgb(255, 255, 255); border-radius: 10px; align-content: center; }
.header { 
  display: grid; 
  align-items: center; 
  grid-area: header; 
  height: 60px; 
  background: #ffe610; 
  gap: 2%; 
  grid-template-columns: 300px 1fr 20px 20px 20px 1px; 
}
.search-container { display: none; position: fixed; top: 0px; left: 0px; width: 100%; padding: 15px; z-index: 1002; }
.footer { display: flex; flex-wrap: wrap; font-size: 14px; color: rgb(102, 102, 102); justify-content: center; align-items: center; text-align: center; padding-top: 30px; grid-area: footer; margin-top: auto; }
.copyright { text-align: center; width: 100%; margin-top: 5px; font-size: 0.85em; color: rgb(136, 136, 136); }
.menu { align-items: center; position: absolute; bottom: 5px; right: 10px; display: flex; gap: 10px; }
h1, h2 { font-family: Rajdhani, sans-serif; text-align: center; }
.centrar { display: flex; justify-content: center; font-weight: bold; font-size: 15px; background: rgb(52, 131, 250); color: rgb(255, 255, 255); padding-top: 12px; padding-bottom: 12px; border-radius: 5px; border: none; width: 100%; cursor: pointer; }
.centrar2 {

  justify-content: center;
  font-weight: bold;
  text-align: center;
  font-size: 14px;
  background: rgb(52, 131, 250);
  color: rgb(255, 255, 255);
  padding: 10px;
  border-radius: 5px;
  left: 50%;
  bottom: 0px;
  width: 80%;
  cursor: pointer;
  transform: translate(-50%, -50%);
  margin-top: 10px;
}
.aright { display: grid; justify-items: end; width: 100%; }
.lsvg { display: grid; place-items: center; width: 230px; margin: 0 auto;}
.isvg { display: grid; place-items: center; width: 23px; height: 23px; }
.isvg:hover { cursor: pointer; }
.icvg:hover { cursor: pointer; }
.icsvg { position: relative; display: grid; place-items: center; width: 23px; height: 23px; }
.productos { margin: 20px 0px; font-size: 14px; display: grid; gap: 15px; grid-template-columns: repeat(auto-fill, minmax(152px, 1fr)); }
.producto { cursor: pointer; position: relative; place-items: center; border: 1px solid rgb(204, 204, 204); border-radius: 5px; padding: 10px; transition: transform 0.2s; }
.producto:hover { transform: translateY(-5px); box-shadow: rgba(0, 0, 0, 0.1) 0px 5px 15px; }
.container { display: flex; align-items: center; justify-content: space-between; }
.icono { margin-left: 10px; height: 40px; }
.producto img { display: block; max-width: 85%; height: auto; margin: 0px auto; }
.ul { font-family: "Courier New", Courier, monospace; text-align: right; list-style: none; padding-right: 10px; }
.pre_pro { position: absolute; right: 15px; top: 15px; font-size: 14px; font-weight: bold; border-radius: 20px; background-color: rgb(250, 250, 250); border: 1px solid rgb(207 201 201); padding: 6px;     box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.visible { visibility: visible; }
.oculto { visibility: hidden; }
.listaproductos {
  border: 1px solid #b6b6b6;
  border-radius: 4px;
  font-size: 12px;
  position: fixed;
  top: 40px; right: 2px;
  width: 350px;
  bottom: 10px;
  max-height: 300px;
  background-color: rgb(255, 255, 255);
  color: rgb(0, 0, 0);
  display: flex;
  flex-direction: column;
}
.listpb {
flex-grow: 1;
overflow-y: auto;
}
.listpf {
  height: 70px;
  display: flex;
  align-items: center;      /* Centra verticalmente el total con el botón */
  justify-content: space-between; /* Empuja el total a la izquierda y el botón a la derecha */
  gap: 15px;                /* Espacio de separación entre las dos columnas */
}
.listpfd {
  flex-grow: 1;             /* Hace que el botón ocupe el resto del espacio disponible */
}
.listpfi {
  width: 130px ;
}
.trun2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;    /* Máximo 2 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2em;       /* Controla el espacio entre líneas */
  max-height: 2.4em;        /* Debe ser line-height * 2 */}
.info-producto {
    display: flex;
    align-items: center;    /* Centra el texto verticalmente */
    justify-content: center; /* Centra el texto horizontalmente (si quieres) */
    height: 3.2em;          /* Altura fija para 2 líneas (ajusta según tu font-size) */
    margin-bottom: 10px;
    text-align: center;
    overflow: hidden;
}
.trun { width: 100%; padding-bottom: 10px; overflow: hidden; text-overflow: ellipsis; }
.CY { display: flex; justify-content: center; align-items: center; }
.ma-container { border: 1px solid rgb(204, 204, 204); padding: 50px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px; }
.Isesion { display: block; margin-bottom: 10px; }
input[type="number"] { width: 50px; padding: 5px; }
input[type="text"].nav-search-input { font-size: 14px; margin: 0px; border-radius: 2px; background-color: rgb(255, 255, 255); box-shadow: gray 0px 1px 2px 0px; height: 25px; width: 90%; max-width: 500px; border-style: solid; border-color: rgb(127, 140, 141); border-width: 1.5px; }
a.negrita:hover { font-size: 14px; font-weight: bold; }
a.estil { font-size: 14px; text-decoration: none; background: rgb(238, 237, 236); color: rgb(0, 0, 0); padding: 8px; }
a.estil:hover { font-size: 14px; background: rgb(0, 0, 0); color: rgb(255, 255, 255); padding: 10px; border-radius: 10px; cursor: pointer; }
.footert { font-size: 15px; text-decoration: none; color: rgb(0, 0, 0); padding: 5px; white-space: nowrap; }
a.footert:hover { font-size: 16px; cursor: pointer; font-weight: bold; }
@keyframes floatToCart { 
  0% { transform: translate(0px, 0px); opacity: 1; }
  100% { transform: translate(0px, -100px); opacity: 0; }
}
.floating-image { position: absolute; width: 80px; height: 80px; background-size: contain; background-repeat: no-repeat; animation: 1s ease-out 0s 1 normal forwards running floatToCart; pointer-events: none; }
.container { margin: 0px auto; padding: 20px; border-radius: 8px; box-shadow: rgba(0, 0, 0, 0.1) 0px 0px 10px; }
.header h1 { color: rgb(44, 62, 80); margin-bottom: 10px; }
.content { display: flex; flex-direction: column; padding: 10px; gap: 20px; }
.d-row { display: flex; align-items: stretch; }
.d-item { flex: 1 1 0%; box-sizing: border-box; display: flex; }
.full-width { flex: 0 0 100%; }
.image-container { background: rgb(255, 255, 255); padding: 20px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 5px; text-align: center; }
.image-container img { width: 100%; height: auto; border-radius: 3px; }
.details-box { width: 100%; padding: 15px; box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 5px; }
.price { font-size: 1.8em; color: rgb(231, 76, 60); font-weight: bold; margin: 20px 0px; text-align: center; }
.specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 15px; margin-top: 20px; }
.spec-item { font-family: Rajdhani, sans-serif; background: rgb(240, 240, 240); padding: 10px; border-radius: 5px; }
.spec-label { font-weight: bold; color: rgb(44, 62, 80); font-size: 0.9em; }
.spec-value { margin-top: 5px; }
.description { margin-top: 20px; }
.applies-to { margin-top: 20px; padding: 15px; background: rgb(232, 244, 252); border-radius: 5px; }
.applies-to h3 { margin-top: 0px; color: rgb(41, 128, 185); }
.menu-toggle { display: none; }
@media (max-width: 799px) {
  .d-row { flex-direction: column; }
  .overlay { display: none; position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 998; }
  .overlay.active { display: block; }
  #IMu { height: 100%; z-index: 999; visibility: hidden; transform: translateX(-100%); transition: transform 0.5s; overflow-y: auto; }
  #IMu.active { visibility: visible; transform: translateX(0%); }
  .XXX { position: absolute; z-index: 1000; }
  .grid-container { grid-template: "header header" "YYY YYY" "footer footer" 100px / 100% 0px; }
  .header { display: grid; align-items: center; grid-area: header; height: 60px; background: rgb(255, 230, 16); gap: 2%; grid-template-columns: 50px 1fr 20px 20px 20px 1px; }
  /* .aright { display: none; } */
  .lsvg { display: none; }
  .menu-toggle { display: inline; margin: 0px auto; background: none; border: none; color: black; font-size: 24px; cursor: pointer; padding: 5px; }
}
.tbody { display: flex; justify-content: center; align-items: center; margin: 0px; }
.register-container { padding: 30px; border-radius: 8px; width: 100%; max-width: 800px; }
.register-container h2 { text-align: center; margin-bottom: 20px; color: rgb(51, 51, 51); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 30px; }
.column { display: flex; flex-direction: column; }
.form-group { margin-bottom: 15px; }
.form-group label { margin-bottom: 5px; color: rgb(85, 85, 85); }
.form-group input, .form-group textarea { width: calc(100% - 20px); padding: 10px; border: 1px solid rgb(221, 221, 221); border-radius: 4px; box-sizing: border-box; }
.form-group input:focus, .form-group textarea:focus { border-color: rgb(0, 123, 255); outline: none; }
.full-width-field { grid-column: auto; margin-top: 10px; }
.full-width-button {
    width: 100%;
    display: block;
    margin-top: 10px; /* Un poco de aire arriba */
}
.full-width-button button { font-family: Rajdhani, sans-serif; font-size: large; width: 100%; padding: 10px; background-color: rgb(0, 123, 255); color: rgb(255, 255, 255); border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; }
.full-width-button button:hover { background-color: #0056b3; }
.error-message { color: red; font-size: 0.9em; margin-top: -10px; margin-bottom: 10px; display: none; }
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
}


.paginacion { margin: 20px 0px; text-align: center; }
.btn-paginacion, .paginacion span { display: inline-block; padding: 8px 12px; margin: 0px 2px; border: 1px solid rgb(221, 221, 221); background: white; cursor: pointer; }
.btn-paginacion:hover { background-color: rgb(245, 245, 245); }
.pagina-actual { color: rgb(85, 83, 83); }
.payment-option { border: 1px solid rgb(221, 221, 221); border-radius: 8px; padding: 15px; margin-bottom: 15px; cursor: pointer; transition: 0.3s; }
.payment-option:hover { border-color: var(--accent-color); box-shadow: rgba(52, 152, 219, 0.2) 0px 0px 10px; }
.payment-option.selected { border-color: var(--accent-color); }
.payment-form { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid rgb(238, 238, 238); }
.product-lr { width: 80px; border-radius: 5px; align-items: center; justify-content: center; text-align: center; }
.product-t { flex: 1 1 0%; margin-left: 15px; margin-right: 15px; }
.fb { font-weight: bold; }
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px; z-index: 1000; transition: 0.4s; }
.whatsapp-float:hover { transform: scale(1.25); }
.precio-bs { color: #27ae60; font-weight: bold; font-size: 1.2em; }
.precio-usd { color: #7f8c8d; font-size: 0.9em; }
.btn-agregar { background: #f1c40f; border: none; padding: 5px 10px; cursor: pointer; width: 100%; border-radius: 5px; }
.cart-badge {
    position: absolute;
    top: -7px;
    right: -10px;
    background-color: black;
    color: white;
    font-size: 9px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}






/* Checkout */
        .checkout-card {
            background: white;
            padding: 20px;
        }

        .lista-productos { margin-top: 20px; }

        /* CADA FILA DE PRODUCTO */
        .producto-fila {
            display: flex;
            align-items: center;
            padding: 10px;
            gap: 20px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            margin: 20px 0px;
            border-radius: 8px;
        }

        /* 1. Imagen a la izquierda */
        .prod-img {
            width: 60px;
            height: 60px;
            object-fit: cover;
            background: #fff;
        }

        /* 2. Info central (Nombre y Precio) */
        .prod-info {
            flex-grow: 1; /* Ocupa el espacio central */
        }

        .prod-nombre {
            font-weight: bold;
            display: block;
            margin-bottom: 4px;
            font-size: 0.95rem;
        }

        .prod-precio {
            color: #666;
            font-size: 0.85rem;
        }

        /* 3. Controles + y - a la derecha */
        .controles-qty {
            display: flex;
            align-items: center;
            background: var(--gris-claro);
            border-radius: 20px;
            padding: 5px;
            border: 1px solid #ddd;
        }

        .btn-qty {
            width: 30px;
            height: 30px;
            border: none;
            background: white;
            border-radius: 50%;
            cursor: pointer;
            font-weight: bold;
            font-size: 1.2rem;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            color: var(--texto);
        }

        .btn-qty:active { transform: scale(0.9); }

        .qty-numero {
            margin: 0 12px;
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }

        .resumen {
            margin-top: 25px;
            padding: 20px;
            background: var(--gris-claro);
            border-radius: 12px;
        }

        .total-fila {
            display: flex;
            justify-content: space-between;
            font-size: 1.4rem;
            font-weight: bold;
        }

        .btn-whatsapp {
            width: 100%;
            padding: 15px;
            background: var(--verde);
            color: white;
            border: none;
            border-radius: 10px;
            margin-top: 20px;
            font-size: 1.1rem;
            font-weight: bold;
            cursor: pointer;
        }
        .removeFromCart {
            position: relative;
            top: -20px;
            font-size: 9px;
            cursor: pointer;
        }
@media (max-width: 480px) {
    .producto-fila {
        display: grid;
        /* Definimos 2 columnas: el contenido y la imagen a la derecha */
        /* Definimos las filas para Nombre, Monto/Cant y Subtotal */
        grid-template-areas: 
            "nombre nombre"
            "imagen controles"
            "imagen subtotal";
        gap: 0;
        padding: 15px;
        align-items: center;
        position: relative; /* Para la 'X' de eliminar */
    }

    /* Asignamos cada div a su área correspondiente */
    .prod-img { 
        grid-area: imagen; 
    }

    .prod-info { 
        grid-area: nombre; 
        display: flex;
        flex-direction: column;
    }

    .controles-qty { 
        grid-area: controles; 
        display: flex;
        width: 100px;
        justify-content: center; 
        align-items: center;
        }

    .prod-subtotal { 
        grid-area: subtotal; 
    }

    /* Posicionamos la X arriba a la izquierda o donde prefieras */
    .removeFromCart {
        position: absolute;
        top: 5px;
        right: 8px;
        font-size: 12px;
        cursor: pointer;
    }
}