﻿body {
  /*  display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;*/


}

.conte_parent {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px 0px
}
.conte {
    position: relative;
    height: 100px;
    width: 160px;
    box-shadow: 0 0 7px #111;
    margin: 5px 3px;
}



/*---------------------------------Estilo de botonera------------------------------------------*/

.contenedor-scroll {
    max-height: 100px;
    overflow-y: auto;
    scrollbar-width: thin; /* Grosor del scrollbar */
   
}

#contenedorTarjetas {
    height: calc(100vh - 152px); /* Ajusta 150px según tu header/menu */
    overflow-y: auto; /* Habilita scroll vertical */
     
}



/*-----------------botones estilo calculadora-----------------------------------------*/
 

.seleccionado {
    background-color: #1ABB9C !important;
    /*background-color: #4CAF50 !important;*/
}


#botonesContainer {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    grid-template-areas:
        "siete ocho nueve opc"
        "cuatro cinco seis pag"
        "uno dos tres pag"
        "c cero punto aceptar";
}

button {
    background-color: rgba(255, 255, 255, 0.54);
    border-radius: 50%;
    background-color: #000; /* Color de fondo gris */
    color: #fff;
    font-size: 1.0rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25); /* sombra suave */
}
    button:active {
        transform: scale(0.95);
    }

#cero {
    grid-area: cero;
}

#uno {
    grid-area: uno;
}

#dos {
    grid-area: dos;
}

#tres {
    grid-area: tres;
}

#cuatro {
    grid-area: cuatro;
}

#cinco {
    grid-area: cinco;
}

#seis {
    grid-area: seis;
}

#siete {
    grid-area: siete;
}

#ocho {
    grid-area: ocho;
}

#nueve {
    grid-area: nueve;
}

#mas {
    grid-area: mas;
}

#aceptar {
    grid-area: aceptar;
}

#opc {
    grid-area: opc;
}
#precio {
    grid-area: precio;
}
#desc {
    grid-area: desc;
}
 

#clear {
    grid-area: c;
}
#pag {
    grid-area: pag;
    border-radius: 10px;
}
#opcbotones {
    grid-area: opcbotones;
    width: 90%;
    height: 90%;
}

/*----------------------------------------input table de ventas ---------------*/

/*----------------------------------------input table de ventas ---------------*/

.custom_input_Js_desc {
    font-size: 15px;
    display: block;
    line-height: 1;
    font-weight: bold
}

.custom_input_Js_desc_ca {
    font-size: 13px;
    display: block;
    line-height: 1;
    padding: 1px 1px 1px 8px;
}

.sys-simulador-boton3 {
    display: inline-block;
    border-radius: 5px;
    transition: background 0.2s;
    font-size: 2em;
}

    .sys-simulador-boton3:hover {
        background: #d8d8d8; /* solo cubre el área del icono */
        cursor: pointer;
    }

/*----------------------------TARJETAS-----------------------------------*/

.product-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 170px;
    height: 220px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    user-select: none;
    cursor: pointer;

}
    .product-card * {
        cursor: pointer;
    }

    /* =========================
   IMAGEN
========================= */
    .product-card img {
        width: 60px;
        height: 60px;
        object-fit: contain;
        margin-bottom: 4px;
    }

/* =========================
   DESCRIPCIÓN (2 LÍNEAS FIJAS)
========================= */
.descripcion {
    height: 2.6em; /* 2 líneas fijas */
    overflow: hidden;
    margin-bottom: 4px;
}

    .descripcion p {
        font-size: 13px;
        color: #333;
        line-height: 1.3em;
        margin: 0;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* =========================
   PRECIOS
========================= */
.prices {
    margin: 0;
    text-align: right;
}

    .prices p {
        margin: 2px 0;
        font-size: 14px;
        font-weight: bold;
        color: #111;
    }

/* =========================
   PIE DE TARJETA
========================= */
.icon-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto; /* CLAVE para fijar al fondo */
}

.product-code {
    font-size: 12px;
    color: #555;
}

/*----------------------------------------------------------------------------------*/
.tabs-line {
    display: flex;
    width: 100%;
    border-bottom: 2px solid #e5e7eb;
}

.tab-line {
    flex: 1; /* 50% cada tab */
    text-align: center;
    padding: 1px 0;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
    user-select: none;
}

    .tab-line.active {
        color: #2563eb;
    }

        .tab-line.active::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -2px;
            width: 100%; /* 👈 ocupa todo el 50% */
            height: 3px;
            background: #2563eb;
        }

    .tab-line:hover {
        background: #f9fafb;
    }


.tabs-content {
    margin-top: 12px;
}

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }
/*------------------------------------------*/

.swipe-row {
    position: relative;
    transition: transform .25s ease;
    background: #fff;
}

/* Swipe delete (táctil) */
.swipe-delete {
    position: absolute;
    right: 0;
    top: 0;
    width: 90px;
    height: 100%;
    background: #ff3b30;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    z-index: 2;
}




/* Última columna */
#tabladetallefact td:last-child {
    position: relative;
    padding: 0 !important; /* 👈 elimina el margen interno */
}

/* Botón eliminar */
.btn-del-desktop {
    position: absolute;
    bottom: 2px; /* 👈 totalmente abajo */
    right: 2px; /* 👈 totalmente a la derecha */

  
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #e74c3c;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

    .btn-del-desktop:hover {
        transform: scale(1.1);
    }

#tabladetallefact td.text-right span {
    display: inline-block;
    margin-top: 8px; /* ajusta a tu gusto */
}


/*------------------------*/
@media (max-width: 576px) {
    /* =========================
       Card principal (altura compacta)
    ========================= */


    .product-card {
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        width: 240px; /* ancho de la card */
        height: auto; /* altura automática según contenido */
        padding: 6px 6px 6px 42px; /* padding izquierdo para la imagen */
        display: flex;
        flex-direction: column;
        user-select: none;
        cursor: pointer;
        position: relative;
        /*margin: 6px 0;*/ /* separación vertical */
    }

        .product-card * {
            cursor: pointer;
        }

        /* =========================
       IMAGEN SOLO EN PRIMERA LÍNEA
    ========================= */
        .product-card img {
            position: absolute;
            top: 6px;
            left: 6px; /* pequeño margen desde el borde */
            width: 30px;
            height: 30px; /* solo altura de una línea */
            object-fit: contain;
        }

    /* =========================
       DESCRIPCIÓN (1 LÍNEA)
    ========================= */
    .descripcion {
        height: 1.2em; /* solo una línea */
        overflow: hidden;
        text-align: left;
        margin-bottom: 0;
    }

        .descripcion p {
            font-size: 13px;
            color: #333;
            line-height: 1.2em;
            margin: 0;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1; /* Limitar a 1 línea */
            overflow: hidden;
            text-overflow: ellipsis; /* Mostrar "..." si excede */
            white-space: normal;
        }

    /* =========================
       PRECIOS
    ========================= */
    .prices {
        display: flex;
        justify-content: space-between;
        margin-left: 0; /* para que no quede debajo de la imagen */
        font-size: 10px; /* tamaño más pequeño */
        line-height: 1.1em; /* más compacto */
    }

        .prices p {
            margin: 0;
            font-weight: bold;
            color: #111;
        }

    /* =========================
       PIE DE TARJETA: ICONO + CÓDIGO
    ========================= */
    .icon-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        padding-right: 4px;
    }

        /* Botón de opciones (icono) */
        .icon-container .shoping {
            width: 16px; /* ancho mínimo */
            height: 16px; /* alto mínimo */
            font-size: 10px; /* icono más pequeño */
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
        }

            /* Icono dentro del botón */
            .icon-container .shoping i {
                font-size: 10px; /* icono más pequeño */
                display: block;
            }

    /* Código del producto */
    .product-code {
        font-size: 10px;
        color: #555;
    }
}



/*------------------------------------------------------*/
/* 🔹 CONTENEDOR GENERAL */
#generalContainer {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 65px;
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    grid-template-areas:
        "resumen opcGeneral"
        "resumen pagGeneral"
        "resumen pagGeneral"
        "resumen pagGeneral";
}

/* 🔹 RESUMEN */
#resumenGeneral {
    grid-area: resumen;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 1fr); /* ocupa todo el alto */
    height: 100%;
    gap: 0; /* 🔥 sin separación */
   
}

    /* 🔹 cada bloque */
    #resumenGeneral div {
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0; /* 🔥 quitar */
        padding: 0; /* 🔥 quitar */
       
    }

    /* 🔹 label */
    #resumenGeneral span {
        font-size: 12px;
       
        margin: 0; /* 🔥 quitar */
        line-height: 1.1; /* 🔥 compacto */

        color: #000; /* 🔥 negro */
        font-weight: 500; /* opcional para que se vean mejor */
    }

    /* 🔹 valor */
    #resumenGeneral strong {
        font-size: 15px;
        font-weight: 600;
        margin: 0; /* 🔥 quitar */
        line-height: 1.2;
        white-space: nowrap;

    }

    /* 🔹 total */
    #resumenGeneral .total-line {
        border-top: 1px solid #ddd;
        padding-top: 4px;
        margin: 0; /* 🔥 quitar margin-top */
    }

        #resumenGeneral .total-line strong {
            font-size: 15px;
        }
/* 🔹 BOTONES */
#opcGeneral {
    grid-area: opcGeneral;
    border-radius: 14px;
    background-color: #343a40;
    color: #fff;
    width: 100%;
    height: 100%;
}

#pagGeneral {
    grid-area: pagGeneral;
    border-radius: 14px;
    background-color: #6c757d;
    color: #fff;
    width: 100%;
    height: 100%;
}

/* 🔥 PANTALLAS GRANDES */
@media (min-width: 1024px) {

    #generalContainer {
        grid-template-columns: minmax(0, 1fr) 80px;
    }

    /* 🔹 cambia a horizontal SOLO si hay espacio */
    #resumenGeneral div {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        column-gap: 10px;

    }

    #resumenGeneral span {
        font-size: 13px;
    }

    #resumenGeneral strong {
        font-size: 16px;
        text-align: right;
    }

    #resumenGeneral .total-line strong {
        font-size: 20px;
    }
}