/* Mosaics Technical Sheet - Modern Print Styles */

@font-face {
    font-family: 'Roca';
    src: url('/wp-content/uploads/et-fonts/roca-regular-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'ROCA-BOLD';
    src: url('/wp-content/uploads/et-fonts/roca-bold-webfont.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Roca';
    src: url('/wp-content/uploads/et-fonts/roca-bold-webfont.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

body.technical-sheet-body {
    background-color: #000;
    margin: 0;
    padding: 40px 0;
    font-family: 'Questrial', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #fff;
}

.ts-container {
    background: #000;
    width: 210mm;
    /* A4 Width */
    min-height: 297mm;
    /* A4 Height */
    margin: 0 auto;
    padding: 20mm;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* Header */
.ts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #fff;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.ts-logo img {
    max-height: 60px;
    width: auto;
    /* Hace que el logo se vea blanco si es negro */
}

.ts-title h2 {
    margin: 0;
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #ccc;
    font-family: 'ROCA-BOLD', 'Roca', sans-serif;
}

/* Grid Layout */
.ts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.ts-product-image img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    background: #fff;
    /* Fondo blanco para la imagen por si es PNG transparente */
}

.ts-product-name {
    margin: 0 0 10px 0;
    font-size: 2.2rem;
    color: #fff;
    font-family: 'ROCA-BOLD', 'Roca', sans-serif;
}

.ts-sku {
    color: #aaa;
    margin-bottom: 20px;
}

/* Sections & Tables */
.ts-section h3 {
    font-size: 1rem;
    text-transform: uppercase;
    padding-bottom: 5px;
    margin-bottom: 15px;
    color: #fff;
    font-family: 'ROCA-BOLD', 'Roca', sans-serif;
    letter-spacing: 1px;
}

.ts-table {
    width: 100%;
    border-collapse: collapse;
}

.ts-table th,
.ts-table td {
    text-align: left;
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #222;
    color: #fff;
}

.ts-table th {
    width: 40%;
    color: #aaa;
    font-weight: 500;
}

.ts-packaging-table {
    text-align: center;
}

.ts-packaging-table th,
.ts-packaging-table td {
    text-align: center;
    border: 1px solid #333;
    padding: 12px;
}

.ts-packaging-table thead th {
    background: #111;
}

/* Usage Icons */
.ts-usage {
    margin-top: 40px;
}

.ts-usage-icons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ts-usage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
}

.ts-usage-item img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
    object-fit: contain;
}

.ts-usage-item span {
    font-size: 0.75rem;
    color: #ccc;
}

/* Footer */
.ts-footer {
    margin-top: 100px;
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    font-size: 0.8rem;
    color: #666;
}

/* Esconder inyecciones de extensiones o LocalWP (ej. BrowserSync o LiveReload) */
body>*:not(.ts-container):not(.ts-no-print-actions),
#__bs_notify__ {
    display: none !important;
}

/* Actions */
.ts-no-print-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.ts-print-btn {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

/* Print Overrides */
@media print {
    @page {
        margin: 0;
    }

    body.technical-sheet-body {
        background-color: #000;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 0;
        margin: 0;
    }

    .ts-full-width {
        page-break-before: always;
        break-before: page;
        padding-top: 15mm;
        /* Añade margen superior en la segunda hoja impresa */
    }

    .ts-container {
        width: 100%;
        box-shadow: none;
        margin: 0;
        padding: 15mm;
        /* Añade un poco de relleno interno porque quitamos el margen de la página */
        background: #000;
        color: #fff;
    }

    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .ts-no-print-actions {
        display: none;
    }
}