/* ========================================================
   SANESCA PRO - DISEÑO GEOMÉTRICO Y REGLAS DE ETIQUETAS
   Formatos Oficiales: 2-UP (190x124mm) y 4-UP (126x90mm)
   Archivo: css/etiquetas_diseno.css
   ======================================================== */

/* ========================================================
   HOJAS DE IMPRESIÓN CALIBRADAS
   ======================================================== */

/* HOJA 4-UP (Carta Landscape: 279.4 x 215.9mm) */
.page-4up {
    width: 279.4mm;
    height: 215.9mm;
    min-height: 215.9mm;
    max-height: 215.9mm;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 126mm 126mm;
    grid-template-rows: 90mm 90mm;
    gap: 8mm 10mm;
    justify-content: center;
    align-content: center;
    justify-items: center;
    align-items: center;
    page-break-after: always;
    break-after: page;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

/* HOJA 2-UP (Carta Portrait: 215.9 x 279.4mm) */
.page-2up {
    width: 215.9mm;
    height: 279.4mm;
    min-height: 279.4mm;
    max-height: 279.4mm;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8mm;
    page-break-after: always;
    break-after: page;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    box-sizing: border-box;
}

/* ========================================================
   TARJETA FORMATO 4-UP (126mm x 90mm)
   ======================================================== */
.etiqueta-pro-card-4up {
    width: 126mm;
    max-width: 126mm;
    min-width: 126mm;
    height: 90mm;
    max-height: 90mm;
    min-height: 90mm;
    border: 2.5px solid #0f2b48;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    background: #ffffff;
    position: relative;
    box-sizing: border-box;
    page-break-inside: avoid;
    break-inside: avoid;
}

.brand-rail-4up {
    width: 19mm;
    min-width: 19mm;
    max-width: 19mm;
    border-right: 2.5px solid #0f2b48;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.brand-rail-logo-img-4up {
    height: 15mm;
    max-width: 76mm;
    transform: rotate(-90deg);
    transform-origin: center center;
    object-fit: contain;
}

.card-content-4up {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 5px 9px;
    overflow: hidden;
}

.section-header-4up {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #94a3b8;
    padding-bottom: 3px;
    gap: 6px;
    flex-shrink: 0;
}

.header-col-left-4up {
    max-width: 64%;
    gap: 2px;
    display: flex;
    flex-direction: column;
}

.header-col-right-4up {
    max-width: 36%;
    text-align: right;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    display: flex;
    flex-direction: column;
}

.meta-inline-field-4up {
    display: flex;
    align-items: baseline;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-label-4up {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    line-height: 1;
}

.meta-val-4up {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-val-stacked-4up {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.section-body-4up {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2px 0;
    gap: 2px;
    overflow: hidden;
}

.product-title-4up {
    font-size: 23px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.08;
    text-transform: uppercase;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title-4up.title-short {
    font-size: 23px;
    line-height: 1.08;
}

.product-title-4up.title-medium {
    font-size: 17.5px;
    line-height: 1.12;
}

.product-title-4up.title-long {
    font-size: 14px;
    line-height: 1.14;
}

.badge-color-4up {
    background: #f1f5f9;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 900;
    color: #0f2b48;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.badge-pieces-4up {
    background: #e0f2fe;
    border: 1.5px solid #7dd3fc;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 13px;
    font-weight: 900;
    color: #0369a1;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.section-footer-4up {
    border-top: 2.5px solid #0f2b48;
    padding-top: 3px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    flex-shrink: 0;
}

.footer-group-4up {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4px;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.footer-divider-4up {
    width: 3px;
    height: 36px;
    background-color: #0f2b48;
    border-radius: 2px;
}

.footer-cell-4up {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.footer-meta-4up {
    font-size: 8.5px;
    color: #64748b;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.footer-val-main-4up {
    font-size: 31px;
    font-weight: 900;
    color: #0f172a;
    line-height: 0.95;
    margin-top: 1px;
}

.footer-val-code-4up {
    font-weight: 900;
    color: #0f172a;
    line-height: 0.95;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    letter-spacing: -0.3px;
}

.footer-val-code-4up.code-short {
    font-size: 26px;
}

.footer-val-code-4up.code-medium {
    font-size: 17px;
}

.footer-val-code-4up.code-long {
    font-size: 12.5px;
}

.bulto-pill-4up {
    display: inline-block;
    background: #fef08a;
    border: 1.5px solid #eab308;
    border-radius: 14px;
    padding: 2px 7px;
    font-size: 15px;
    font-weight: 900;
    color: #854d0e;
    margin-top: 1px;
    white-space: nowrap;
}

/* ========================================================
   TARJETA FORMATO 2-UP (190mm x 124mm)
   ======================================================== */
.etiqueta-pro-card-2up {
    width: 190mm;
    max-width: 190mm;
    min-width: 190mm;
    height: 124mm;
    max-height: 124mm;
    min-height: 124mm;
    border: 3px solid #0f2b48;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    background: #ffffff;
    position: relative;
    box-sizing: border-box;
    page-break-inside: avoid;
    break-inside: avoid;
}

.brand-rail-2up {
    width: 26mm;
    min-width: 26mm;
    max-width: 26mm;
    border-right: 3px solid #0f2b48;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.brand-rail-logo-img-2up {
    height: 20mm;
    max-width: 100mm;
    transform: rotate(-90deg);
    transform-origin: center center;
    object-fit: contain;
}

.card-content-2up {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 7px 14px;
    overflow: hidden;
}

.section-header-2up {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2.5px dashed #94a3b8;
    padding-bottom: 5px;
    gap: 12px;
    flex-shrink: 0;
}

.header-col-left-2up {
    max-width: 64%;
    gap: 3px;
    display: flex;
    flex-direction: column;
}

.header-col-right-2up {
    max-width: 36%;
    text-align: right;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    display: flex;
    flex-direction: column;
}

.meta-inline-field-2up {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-label-2up {
    font-size: 15px;
    color: #64748b;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}

.meta-val-2up {
    font-size: 34px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.meta-val-stacked-2up {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1;
}

.section-body-2up {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4px 0;
    gap: 3px;
    overflow: hidden;
}

.product-title-2up {
    font-size: 34px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    text-transform: uppercase;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-title-2up.title-short {
    font-size: 34px;
    line-height: 1.1;
}

.product-title-2up.title-medium {
    font-size: 26px;
    line-height: 1.12;
}

.product-title-2up.title-long {
    font-size: 20px;
    line-height: 1.14;
}

.badge-color-2up {
    background: #f1f5f9;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 3px 12px;
    font-size: 18px;
    font-weight: 900;
    color: #0f2b48;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.badge-pieces-2up {
    background: #e0f2fe;
    border: 2px solid #7dd3fc;
    border-radius: 8px;
    padding: 3px 12px;
    font-size: 18px;
    font-weight: 900;
    color: #0369a1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.section-footer-2up {
    border-top: 3px solid #0f2b48;
    padding-top: 5px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.footer-group-2up {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.footer-divider-2up {
    width: 3.5px;
    height: 50px;
    background-color: #0f2b48;
    border-radius: 2px;
}

.footer-cell-2up {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.footer-meta-2up {
    font-size: 13px;
    color: #64748b;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.footer-val-main-2up {
    font-size: 46px;
    font-weight: 900;
    color: #0f172a;
    line-height: 0.95;
    margin-top: 2px;
}

.footer-val-code-2up {
    font-weight: 900;
    color: #0f172a;
    line-height: 0.95;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
    letter-spacing: -0.3px;
}

.footer-val-code-2up.code-short {
    font-size: 38px;
}

.footer-val-code-2up.code-medium {
    font-size: 26px;
}

.footer-val-code-2up.code-long {
    font-size: 16.5px;
}

.bulto-pill-2up {
    display: inline-block;
    background: #fef08a;
    border: 2px solid #eab308;
    border-radius: 18px;
    padding: 4px 12px;
    font-size: 21px;
    font-weight: 900;
    color: #854d0e;
    margin-top: 2px;
    white-space: nowrap;
}
