/* Estilos frontend para Fichas Técnicas - Diseño Moderno y Profesional */

.ft-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ft-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
}

/* Banner Single - Mismo estilo que archive */
.ft-single-banner {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 40px;
    margin-bottom: 60px;
}

.ft-single-banner .ft-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.ft-single-banner .ft-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: #fff;
}

.ft-single-banner .ft-banner-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #fff;
    letter-spacing: -1px;
}

.ft-single-banner .ft-banner-description {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}

/* Sidebar */
.ft-sidebar {
    background: #fff;
}

.ft-back-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ft-back-arrow {
    color: #F1733C;
    font-size: 20px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.ft-back-arrow:hover {
    transform: translateX(-3px);
}

.ft-back-link a:last-child {
    color: #F1733C;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
}

.ft-back-link a:last-child:hover {
    text-decoration: underline;
}

.ft-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ft-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #F1733C;
}

.ft-product-card.active {
    border-color: #F1733C;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
    box-shadow: 0 4px 12px rgba(241, 115, 60, 0.15);
}

.ft-product-card a {
    text-decoration: none;
    color: inherit;
}

.ft-product-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #707070;
    font-weight: 600;
}

.ft-product-card p {
    margin: 0;
    font-size: 14px;
    color: #707070;
    line-height: 1.6;
}

/* Main Content */
.ft-main-content {
    background: #fff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ft-product-header {
    margin-bottom: 50px;
    padding-bottom: 25px;
    border-bottom: 3px solid #f0f0f0;
}

.ft-product-title {
    font-size: 42px;
    color: #F1733C;
    margin: 0 0 15px 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.ft-product-subtitle {
    font-size: 18px;
    color: #707070;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

.ft-variantes-section {
    margin-bottom: 50px;
}

.ft-section-title {
    font-size: 28px;
    color: #707070;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #F1733C;
    font-weight: 700;
    letter-spacing: -0.3px;
}

/* Variantes en Lista (sin accordion) */
.ft-variante-block {
    margin-bottom: 40px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.ft-variante-block:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border-color: #F1733C;
}

.ft-variante-header {
    background: linear-gradient(135deg, #F1733C 0%, #d85a2a 100%);
    padding: 20px 30px;
    border-bottom: none;
}

.ft-variante-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Tabla de países - Estilo Moderno */
.ft-paises-table-wrapper {
    overflow-x: auto;
    margin: 0;
}

.ft-paises-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

.ft-paises-table thead {
    background: #f8f9fa;
}

.ft-paises-table th {
    padding: 18px 20px;
    text-align: left;
    font-weight: 700;
    color: #707070;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.2px;
    border-bottom: 2px solid #e8e8e8;
    white-space: nowrap;
}

.ft-paises-table th:first-child {
    border-top-left-radius: 0;
}

.ft-paises-table th:last-child {
    border-top-right-radius: 0;
}

.ft-paises-table td {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    color: #707070;
}

.ft-paises-table tbody tr {
    transition: background 0.2s ease;
}

.ft-paises-table tbody tr:hover {
    background: #f8f9fa;
}

.ft-paises-table tbody tr:last-child td {
    border-bottom: none;
}

/* Celdas específicas */
.ft-product-image-cell {
    vertical-align: middle;
}
.ft-product-image-cell img {
    max-width: 80px;
    height: auto;
    border-radius: 6px;
    border: 1px solid #eee;
}
.ft-no-image {
    color: #bbb;
    font-style: italic;
}
.ft-country-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ft-flag {
    font-size: 28px;
    line-height: 1;
}

.ft-country-name {
    color: #707070;
    font-weight: 600;
    font-size: 15px;
}

.ft-pdf-link {
    color: #F1733C;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.ft-pdf-link:hover {
    background: #fff5f0;
    color: #d85a2a;
    transform: translateX(2px);
}

.ft-pdf-icon {
    font-size: 16px;
}

.ft-contact-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ft-contact-link,
.ft-phone {
    color: #F1733C;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 14px;
}

.ft-contact-link:hover,
.ft-phone:hover {
    color: #d85a2a;
    transform: translateX(2px);
}

.ft-contact-icon,
.ft-phone-icon {
    font-size: 16px;
}

.ft-no-data {
    padding: 30px;
    text-align: center;
    color: #999;
    font-style: italic;
}

.ft-content {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 3px solid #f0f0f0;
}

/* Archive Banner */
.ft-archive-banner {
    position: relative;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 80px 40px;
    margin-bottom: 60px;
}

.ft-archive-banner .ft-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.ft-archive-banner .ft-banner-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    color: #fff;
}

.ft-banner-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 20px 0;
    color: #fff;
    letter-spacing: -1px;
}

.ft-banner-description {
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    color: #fff;
}

.ft-archive-intro {
    margin-bottom: 50px;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #F1733C;
}

.ft-archive-intro p {
    font-size: 16px;
    line-height: 1.8;
    color: #707070;
    margin: 0 0 15px 0;
}

.ft-archive-intro p:last-child {
    margin-bottom: 0;
}

/* Buscador en listado de fichas */
.ft-archive-search-wrapper {
    margin-bottom: 30px;
}
.ft-fichas-search-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
}
.ft-fichas-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
}
.ft-fichas-search-input:focus {
    border-color: #F1733C;
    outline: none;
}
.ft-fichas-search-submit {
    padding: 12px 24px;
    background: #F1733C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.ft-fichas-search-submit:hover {
    background: #d85a2a;
}

/* Buscador en listado de productos (single) */
.ft-productos-buscador-wrapper {
    margin-bottom: 16px;
}
.ft-productos-buscador {
    width: 100%;
    max-width: 400px;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}
.ft-productos-buscador:focus {
    border-color: #F1733C;
    outline: none;
}

/* Listado tipo banners (productos) */
.ft-productos-banners {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.ft-producto-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s ease;
}
.ft-producto-banner:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.ft-producto-banner-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ft-producto-banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ft-producto-banner-placeholder {
    font-size: 12px;
    color: #999;
}
.ft-producto-banner-body {
    flex: 1;
    min-width: 0;
}
.ft-producto-banner-name {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}
.ft-producto-banner-desc {
    margin: 0 0 6px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #707070;
}
.ft-producto-banner-codigo {
    margin: 0;
    font-size: 13px;
}
.ft-producto-banner-codigo code {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #555;
}
.ft-producto-banner-right {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.ft-producto-banner-flag img,
.ft-producto-banner-flag {
    display: block;
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}
.ft-producto-banner-pais {
    font-size: 13px;
    color: #707070;
}
.ft-btn-ver-ficha {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #F1733C;
    color: #fff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}
.ft-btn-ver-ficha:hover {
    background: #d85a2a;
    color: #fff !important;
}
.ft-descripcion-cell {
    max-width: 280px;
    font-size: 14px;
    line-height: 1.4;
}
.ft-codigo {
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
}

/* Archive */
.ft-archive-header {
    margin-bottom: 40px;
    text-align: center;
}

.ft-archive-header h1 {
    font-size: 42px;
    color: #707070;
    margin: 0;
}

.ft-products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.ft-archive-content .ft-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
}

.ft-archive-content .ft-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
    border-color: #F1733C;
}

.ft-archive-content .ft-product-card .ft-product-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ft-archive-content .ft-product-card .ft-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.ft-archive-content .ft-product-card:hover .ft-product-image img {
    transform: scale(1.1);
}

.ft-archive-content .ft-product-card .ft-product-info {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.ft-archive-content .ft-product-card h2 {
    font-size: 22px;
    color: #F1733C;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.ft-archive-content .ft-product-card-skus {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 12px 0;
    flex: 0 0 auto;
}

.ft-archive-content .ft-sku-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #555;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    line-height: 1.3;
}

.ft-archive-content .ft-product-card:hover .ft-sku-badge {
    border-color: #F1733C;
    color: #333;
    background: #fff8f5;
}

.ft-archive-content .ft-product-card .ft-product-info > p {
    color: #707070;
    line-height: 1.6;
    margin: 0;
}

.ft-archive-content .ft-product-card .ft-product-info > p:not(.ft-product-card-pais) {
    flex: 1;
}

.ft-archive-content .ft-product-card .ft-product-card-pais {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -4px 0 12px 0;
    font-size: 14px;
    color: #555;
    flex: 0 0 auto;
}

.ft-archive-content .ft-product-card .ft-product-card-flag img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    border-radius: 2px;
}

.ft-archive-content .ft-product-card .ft-product-card-pais-text {
    font-weight: 600;
    color: #707070;
}

/* Responsive */
@media (max-width: 1024px) {
    .ft-layout {
        grid-template-columns: 1fr;
    }
    
    .ft-sidebar {
        margin-bottom: 40px;
    }
    
    .ft-main-content {
        padding: 30px;
    }
    
    .ft-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .ft-container {
        padding: 20px 15px;
    }
    
    .ft-single-banner {
        min-height: 300px;
        padding: 40px 20px;
    }
    
    .ft-single-banner .ft-banner-title {
        font-size: 32px;
    }
    
    .ft-single-banner .ft-banner-description {
        font-size: 16px;
    }
    
    .ft-archive-banner {
        min-height: 300px;
        padding: 40px 20px;
    }
    
    .ft-banner-title {
        font-size: 32px;
    }
    
    .ft-banner-description {
        font-size: 16px;
    }
    
    .ft-main-content {
        padding: 25px 20px;
    }
    
    .ft-product-title {
        font-size: 32px;
    }
    
    .ft-section-title {
        font-size: 24px;
    }
    
    .ft-producto-banner {
        flex-wrap: wrap;
    }
    .ft-producto-banner-image {
        width: 80px;
        height: 80px;
    }
    .ft-producto-banner-right {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 16px;
        padding-top: 12px;
        border-top: 1px solid #eee;
    }
    
    .ft-variante-name {
        font-size: 20px;
    }
    
    .ft-paises-table {
        font-size: 14px;
    }
    
    .ft-paises-table th,
    .ft-paises-table td {
        padding: 12px 10px;
    }
    
    .ft-paises-table th {
        font-size: 10px;
    }
    
    .ft-products-grid {
        grid-template-columns: 1fr;
    }
    
    .ft-variante-header {
        padding: 15px 20px;
    }
}

/* Gate: modal de contraseña */
.ft-gate-page {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ft-gate-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1000;
}

.ft-gate-overlay.ft-gate-visible {
    opacity: 1;
}

.ft-gate-modal {
    position: relative;
    z-index: 1001;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.ft-gate-modal.ft-gate-visible {
    opacity: 1;
    transform: scale(1);
}

.ft-gate-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #707070;
    font-weight: 700;
}

.ft-gate-desc {
    margin: 0 0 20px 0;
    color: #707070;
    font-size: 14px;
}

.ft-gate-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ft-gate-input {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    color: #333;
}

.ft-gate-input:focus {
    border-color: #F1733C;
    outline: none;
}

.ft-gate-error {
    margin: 0;
    color: #c00;
    font-size: 14px;
}

.ft-gate-submit {
    padding: 14px 24px;
    background: #F1733C;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.ft-gate-submit:hover {
    background: #d85a2a;
}

.ft-gate-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Modal PDF */
.ft-pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ft-pdf-modal-overlay.ft-pdf-modal-visible {
    opacity: 1;
}

.ft-pdf-modal-box {
    position: relative;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    max-width: 95vw;
    max-height: 90vh;
    width: 900px;
    height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.ft-pdf-modal-overlay.ft-pdf-modal-visible .ft-pdf-modal-box {
    transform: scale(1);
}

/* Barra propia: el cierre ya no flota encima del visor PDF del navegador */
.ft-pdf-modal-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 8px 12px;
    background: #2d2d2d;
    border-bottom: 1px solid #444;
}

.ft-pdf-modal-title {
    font-size: 14px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ft-pdf-modal-body {
    flex: 1;
    min-height: 0;
    background: #525659;
    position: relative;
}

.ft-pdf-modal-body iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Cerrar: círculo fijo y × centrada (el tema a veces deforma los button) */
#ft-pdf-modal-overlay .ft-pdf-modal-close {
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
    aspect-ratio: 1 / 1;
    border: 1px solid #555;
    border-radius: 50%;
    background: #3a3a3a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    line-height: 0;
    color: transparent;
    font-size: 0;
    overflow: hidden;
    vertical-align: middle;
    transition: background 0.2s ease, border-color 0.2s ease;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

#ft-pdf-modal-overlay .ft-pdf-modal-close::before {
    content: '\00d7';
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    inset: 0;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    color: #fff;
    pointer-events: none;
}

#ft-pdf-modal-overlay .ft-pdf-modal-close:hover,
#ft-pdf-modal-overlay .ft-pdf-modal-close:focus {
    background: #F1733C;
    border-color: #F1733C;
    outline: none;
}

#ft-pdf-modal-overlay .ft-pdf-modal-close:hover::before,
#ft-pdf-modal-overlay .ft-pdf-modal-close:focus::before {
    color: #fff;
}

/* Si quedó HTML antiguo con span dentro del botón */
#ft-pdf-modal-overlay .ft-pdf-modal-close span {
    display: none !important;
}
