/* --- Containers & Layouts --- */
.texto-centrado{
    text-align: center;
}
.tablero_containter {
   display: flex;
  /* 'align-items: stretch' ya viene implícito, pero puedes ponerlo explícitamente */
  align-items: stretch; 
  flex-wrap: wrap;
  gap:1rem;
  justify-content: space-around;
}

.tablero_containter a {
    text-decoration: none;
}
.child-box {
  width: 460px;
  min-width: 460px;
  max-width: 460px;
    flex: 1; /* Opcional: hace que todas las cajas tengan también el mismo ancho distribuido */
  border: 1px solid #000;
}

.contenedor {
    margin-left: 15px;
    margin-right: 15px;
}

.compra_detalle {
    padding: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

/* --- Cards & Interactive Elements --- */
.big {
    width: 420px;
    height: 420px;
    border: 2px green solid;
}
.big_2 {
    width: 420px;
    height: auto;
    border: 2px green solid;
}
.small {
    width: 200px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
    border: 2px green solid;
    padding: 1rem;
}
.tablero_containter a{
    text-decoration: none;
    color: green;
    font-weight: bold;
}

.card .small:hover, 
.card .big:hover {
    border: 5px green solid;
    font-weight: bold;
}

.pcard {
    padding: 2px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

/* --- Forms & Inputs --- */
.login-form {
    width: 90%;
    margin: 0 auto;
}

.login-form label,
.login-form input[type="text"],
.login-form input[type="email"],
.login-form input[type="password"] {
    display: block;
    padding: 5px 5px 5px 0px;
    margin: 5px;
    width: 100%;
}

input[type="submit"],
.submit-btn {
    background-color: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ccc;
}

.detail-row {
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.item_form {
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    padding: 5px;
    align-items: center;
}

.item_form h3 {
    font-size: 15px;
    font-weight: bold;
}

.add-to-order-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    font-weight: bold;
}

.add-to-order-form p {
    font-size: 15px;
    width: 100%; /* Fixed missing unit */
}

.add-to-order-form img {
    width: 280px;
    height: 186px;
    margin: 0 auto;
    object-fit: contain;
}

/* --- Grids --- */
.grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 2fr));
    gap: 2rem;
    max-width: 600px;
}

.grid-form-2 {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 1rem; 
}


.grid-form-3 {
    display: grid; 
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 1rem; 
}

.grid-form-4 {
        
    display: grid; 
    grid-template-columns: repeat(2, 1fr); /* 4 columns */
    gap: 1rem; 
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.full-width, 
.submit-btn {
    grid-column: 1 / -1;
}

input {
    width: 100%;
    padding: 0.75rem;
    box-sizing: border-box;
}

/* --- Catalogs & Tables --- */
.tag_catalogo {
    display: none;    
    border: 2px blue solid;
    padding: 5px;
    width: 450px;
}

.tag_detalle {
    flex: 1;
}

#btn_catalogo {
    width: 100px;
}

.ancho_total {
    display: block;
    width: 100%;  
    margin: 0 auto;
}

.hidden-col {
    display: none;
}

.select2-table-header {
    background-color: #f8f9fa;
    font-weight: bold;
    border-bottom: 2px solid #dee2e6;
    padding: 8px;
}

.select2-table-row {
    border-bottom: 1px solid #eee;
    padding: 6px 8px;
}

.col-code { width: 25%; display: inline-block; font-family: monospace; }
.col-name { width: 45%; display: inline-block; }
.col-cat  { width: 15%; display: inline-block; }
.col-price{ width: 15%; display: inline-block; text-align: right; }

/* --- Modern Dialog Modal & Backdrop Animations --- */
dialog {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease, display 0.4s ease allow-discrete;
}

dialog[open] {
    opacity: 1;
    transform: scale(1);
}

@starting-style {
    dialog[open] {
        opacity: 0;
        transform: scale(0.9);
    }
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0);
    transition: background-color 0.4s ease, display 0.4s ease allow-discrete;
}

dialog[open]::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

@starting-style {
    dialog[open]::backdrop {
        background-color: rgba(0, 0, 0, 0);
    }
}