/* ================================================================
   Equipomex – Ficha Técnica PDF  |  ficha-tecnica.css
   ================================================================ */

/* ── Botón estilo del sitio (alta especificidad para sobreescribir tema) ── */
.emx-ficha-btn-wrap {
    margin-top: 16px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: auto !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
}

button.emx-btn-ficha,
.emx-btn-ficha {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    font-family: inherit !important;
    text-decoration: none !important;
    width: auto !important;
    min-width: 0 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: inherit !important;
}

button.emx-btn-ficha:hover,
.emx-btn-ficha:hover {
    background: none !important;
    background-color: transparent !important;
}

button.emx-btn-ficha:hover .emx-btn-icon,
.emx-btn-ficha:hover .emx-btn-icon { background: #CC0000 !important; }

button.emx-btn-ficha:disabled,
.emx-btn-ficha:disabled { opacity: 0.6 !important; cursor: not-allowed !important; }

.emx-btn-icon {
    width: 48px !important;
    height: 48px !important;
    background: #CC0000 !important;
    border-radius: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background 0.2s !important;
    padding: 0 !important;
    margin: 0 !important;
}

.emx-btn-icon svg {
    width: 24px !important;
    height: 24px !important;
    color: #fff !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.emx-btn-label {
    font-size: 14px !important;
    color: #888 !important;
    font-weight: 400 !important;
    line-height: 1.2 !important;
    background: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

/* ── Status ── */
.emx-ficha-status { font-size: 13px; color: #555; }

/* ── Overlay ── */
#emx-pdf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#emx-pdf-overlay .emx-spinner-box {
    background: #fff;
    border-radius: 8px;
    padding: 28px 36px;
    text-align: center;
    font-family: sans-serif;
    color: #333;
}

#emx-pdf-overlay .emx-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #eee;
    border-top-color: #1e8c6e;
    border-radius: 50%;
    animation: emx-spin 0.7s linear infinite;
    margin: 0 auto 14px;
}

@keyframes emx-spin { to { transform: rotate(360deg); } }

/* ── Plantilla PDF oculta ── */
#emx-pdf-template {
    position: absolute;
    left: -9999px;
    top: 0;
    width: 794px;
    background: #fff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    line-height: 1.5;
}

.emx-ft-wrap {
    width: 794px;
    background: #fff;
    padding: 0;
    box-sizing: border-box;
}

/* Header blanco */
.emx-ft-header {
    background: #ffffff;
    padding: 20px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #1e8c6e;
}

.emx-ft-header img.emx-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.emx-ft-header .emx-ft-label {
    color: #1e8c6e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

/* Body */
.emx-ft-body { padding: 32px 40px 40px; }

.emx-ft-name {
    font-size: 20px;
    font-weight: 700;
    color: #111;
    margin: 0 0 4px;
    line-height: 1.3;
}

.emx-ft-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 13px;
    color: #555;
}

.emx-ft-meta span strong { color: #333; }

.emx-ft-divider {
    height: 2px;
    background: linear-gradient(90deg, #1e8c6e 0%, #5ec8a8 60%, #eee 100%);
    border: none;
    margin: 0 0 24px;
}

/* Galería de imágenes */
.emx-ft-gallery {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.emx-ft-gallery-single {
    text-align: center;
    margin-bottom: 24px;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 16px;
}

.emx-ft-gallery-single img {
    max-height: 240px;
    max-width: 100%;
    object-fit: contain;
}

.emx-ft-gallery-item {
    background: #f9f9f9;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.emx-ft-gallery-item img {
    max-height: 200px;
    max-width: 100%;
    object-fit: contain;
}

/* Sección */
.emx-ft-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #1e8c6e;
    margin: 0 0 10px;
}

.emx-ft-description {
    font-size: 13px;
    color: #333;
    line-height: 1.65;
    margin-bottom: 24px;
}

.emx-ft-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 24px;
}

.emx-ft-cat-tag {
    background: #f0faf6;
    border: 1px solid #b8e0d4;
    color: #1e8c6e;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.emx-ft-attrs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 24px;
}

.emx-ft-attrs-table tr:nth-child(even) td { background: #f8f8f8; }

.emx-ft-attrs-table td {
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    vertical-align: top;
}

.emx-ft-attrs-table td:first-child {
    font-weight: 600;
    color: #333;
    width: 35%;
    background: #f0faf6;
}
