/**
 * Estilos Frontend - Plantilla B2B Institucional
 * Diseño idéntico a las especificaciones del cliente
 */

/* Override de estilos de WooCommerce y Tema */
.hb2bt-product-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}

.hb2bt-product-wrapper .summary,
.hb2bt-product-wrapper .product-images,
.hb2bt-product-wrapper .entry-summary {
    display: none !important;
}

.hb2bt-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================
   CONTENEDOR PRINCIPAL
   ============================ */

.hb2bt-container {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================
   SIDEBAR CON TABS VERTICALES
   ============================ */

.hb2bt-sidebar {
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    padding: 20px 0;
    min-height: 600px;
}

.hb2bt-tabs-navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hb2bt-tab-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 10px;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 80px;
}

.hb2bt-tab-button:hover {
    background: rgba(74, 144, 226, 0.1);
    border-left-color: #4A90E2;
}

.hb2bt-tab-button.active {
    background: #fff;
    border-left-color: #005CB9;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
}

.hb2bt-tab-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    color: #4A90E2;
    transition: all 0.3s ease;
}

.hb2bt-tab-button.active .hb2bt-tab-icon {
    color: #005CB9;
    transform: scale(1.1);
}

.hb2bt-tab-icon svg {
    width: 100%;
    height: 100%;
}

.hb2bt-tab-title {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    color: #666;
    line-height: 1.2;
    word-wrap: break-word;
    max-width: 60px;
}

.hb2bt-tab-button.active .hb2bt-tab-title {
    color: #005CB9;
    font-weight: 600;
}

/* ============================
   CONTENIDO PRINCIPAL
   ============================ */

.hb2bt-main-content {
    padding: 0;
    background: #fff;
}

.hb2bt-header {
    background: linear-gradient(135deg, #005CB9 0%, #0073E6 100%);
    padding: 20px 30px;
    border-bottom: 3px solid #004A99;
}

.hb2bt-product-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}

.hb2bt-content-area {
    padding: 30px;
}

/* ============================
   SHOWCASE DE PRODUCTO
   ============================ */

.hb2bt-product-showcase {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 30px;
}

/* ============================
   GALERÍA DE IMÁGENES
   ============================ */

.hb2bt-images-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hb2bt-main-image {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hb2bt-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 20px;
}

.hb2bt-zoom-button {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.hb2bt-zoom-button:hover {
    background: #fff;
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.hb2bt-zoom-button svg {
    color: #005CB9;
}

.hb2bt-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
}

.hb2bt-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hb2bt-thumbnail:hover {
    border-color: #4A90E2;
    transform: scale(1.05);
}

.hb2bt-thumbnail.active {
    border-color: #005CB9;
    box-shadow: 0 0 0 2px rgba(0, 92, 185, 0.2);
}

/* ============================
   PANEL DE ESPECIFICACIONES
   ============================ */

.hb2bt-specs-panel {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.hb2bt-specs-header {
    background: linear-gradient(135deg, #4A90E2 0%, #5BA3F5 100%);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hb2bt-specs-icon {
    width: 28px;
    height: 28px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hb2bt-specs-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.hb2bt-specs-table {
    max-height: 500px;
    overflow-y: auto;
}

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

.hb2bt-specs-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.hb2bt-specs-table tbody tr:last-child {
    border-bottom: none;
}

.hb2bt-specs-table tbody tr:nth-child(even) {
    background: #f9f9f9;
}

.hb2bt-specs-table td {
    padding: 12px 15px;
    font-size: 13px;
    vertical-align: top;
}

.hb2bt-spec-name {
    width: 40%;
    font-weight: 600;
    color: #333;
}

.hb2bt-spec-value {
    width: 60%;
    color: #555;
}

.hb2bt-no-specs {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

/* ============================
   DESCRIPCIÓN DEL PRODUCTO
   ============================ */

.hb2bt-product-description {
    background: #f8f9fa;
    border-left: 4px solid #4A90E2;
    padding: 20px 25px;
    margin-bottom: 30px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

.hb2bt-product-description p {
    margin: 0 0 10px 0;
}

.hb2bt-product-description p:last-child {
    margin-bottom: 0;
}

/* ============================
   CONTENIDO DE TABS
   ============================ */

.hb2bt-tabs-content {
    margin-bottom: 30px;
}

.hb2bt-tab-panel {
    display: none;
}

.hb2bt-tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hb2bt-tab-content {
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    min-height: 200px;
}

/* ============================
   BOTONES DE ACCIÓN
   ============================ */

.hb2bt-action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.hb2bt-download-button,
.hb2bt-quote-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hb2bt-download-button {
    background: linear-gradient(135deg, #666 0%, #444 100%);
    color: #fff;
    border: 2px solid #444;
}

.hb2bt-download-button:hover {
    background: linear-gradient(135deg, #555 0%, #333 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hb2bt-download-button svg {
    width: 20px;
    height: 20px;
}

.hb2bt-quote-button {
    background: linear-gradient(135deg, #0066CC 0%, #0052A3 100%);
    color: #fff;
    border: 2px solid #0052A3;
}

.hb2bt-quote-button:hover {
    background: linear-gradient(135deg, #0052A3 0%, #004080 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 82, 163, 0.3);
}

/* ============================
   SKU DEL PRODUCTO
   ============================ */

.hb2bt-sku {
    display: inline-block;
    background: #f0f7ff;
    padding: 10px 20px;
    border-left: 4px solid #0066CC;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.hb2bt-sku strong {
    color: #0066CC;
    margin-right: 8px;
}

/* ============================
   MODAL DE IMAGEN
   ============================ */

.hb2bt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
}

.hb2bt-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.hb2bt-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    margin: 5% auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hb2bt-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.hb2bt-modal-close:hover {
    background: #fff;
    transform: rotate(90deg);
}

#hb2bt-zoomed-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 1024px) {
    .hb2bt-product-showcase {
        grid-template-columns: 1fr;
    }
    
    .hb2bt-specs-panel {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .hb2bt-container {
        grid-template-columns: 60px 1fr;
    }
    
    .hb2bt-sidebar {
        padding: 15px 0;
    }
    
    .hb2bt-tab-button {
        padding: 12px 5px;
        min-height: 70px;
    }
    
    .hb2bt-tab-icon {
        width: 24px;
        height: 24px;
        margin-bottom: 6px;
    }
    
    .hb2bt-tab-title {
        font-size: 9px;
        max-width: 50px;
    }
    
    .hb2bt-content-area {
        padding: 20px;
    }
    
    .hb2bt-product-title {
        font-size: 20px;
    }
    
    .hb2bt-action-buttons {
        flex-direction: column;
    }
    
    .hb2bt-download-button,
    .hb2bt-quote-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hb2bt-container {
        grid-template-columns: 1fr;
    }
    
    .hb2bt-sidebar {
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        padding: 10px;
    }
    
    .hb2bt-tabs-navigation {
        flex-direction: row;
        overflow-x: auto;
        gap: 5px;
    }
    
    .hb2bt-tab-button {
        flex-direction: row;
        min-height: auto;
        padding: 10px 15px;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .hb2bt-tab-button.active {
        border-left: none;
        border-bottom-color: #005CB9;
    }
    
    .hb2bt-tab-icon {
        margin-bottom: 0;
        margin-right: 8px;
    }
    
    .hb2bt-tab-title {
        max-width: none;
    }
}
