/**
 * PRODUCTO-DETALLE.CSS
 * Estilos para página de detalle de producto
 * MR Constructor
 */

.producto-detalle {
    padding: 2rem 0;
    margin-top: var(--navbar-height-desktop, 130px);
}

/* ========================================
   IMÁGENES DEL PRODUCTO
   ======================================== */
.producto-imagen-principal {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.producto-imagen-principal:hover {
    transform: scale(1.02);
}

.producto-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s;
    flex-shrink: 0;
}

.thumbnail:hover {
    border-color: #8B4513;
    transform: scale(1.05);
}

.thumbnail.active {
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

/* ========================================
   INFORMACIÓN DEL PRODUCTO
   ======================================== */
.producto-info-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    height: 100%;
}

.producto-badges {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.producto-badges .badge {
    font-size: 0.875rem;
    padding: 6px 12px;
    font-weight: 600;
}

/* ========================================
   PRECIO
   ======================================== */
.producto-precio {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #8B4513;
    margin: 1.5rem 0;
}

.precio-final {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8B4513;
    margin: 0;
    line-height: 1;
}

.precio-original {
    font-size: 1.2rem;
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 1rem;
}

.descuento-badge {
    background: #ef4444;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

/* ========================================
   META INFORMACIÓN
   ======================================== */
.producto-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.meta-item {
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s;
}

.meta-item:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.meta-label {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.5rem;
}

.meta-value {
    font-size: 1.125rem;
    color: #111827;
    font-weight: 600;
}

/* ========================================
   CANTIDAD Y STOCK
   ======================================== */
.cantidad-selector {
    margin: 1.5rem 0;
}

.cantidad-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    display: block;
}

.cantidad-controls {
    display: inline-flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.cantidad-controls button {
    border: none;
    background: white;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #6b7280;
    font-weight: 600;
    font-size: 1rem;
}

.cantidad-controls button:hover {
    background: #f9fafb;
    color: #8B4513;
}

.cantidad-controls button:active {
    background: #f3f4f6;
}

.cantidad-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cantidad-controls input {
    border: none;
    width: 80px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    padding: 0.75rem 0;
    background: white;
}

.cantidad-controls input:focus {
    outline: none;
    background: #f9fafb;
}

.stock-info {
    margin-top: 0.75rem;
    font-size: 0.875rem;
}

.stock-disponible {
    color: #059669;
    font-weight: 600;
}

.stock-limitado {
    color: #f59e0b;
    font-weight: 600;
}

/* ========================================
   BOTONES
   ======================================== */
.btn-agregar-principal {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: #8B4513;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1.5rem;
}

.btn-agregar-principal:hover {
    background: #6d3410;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

.btn-agregar-principal:active {
    transform: translateY(0);
}

.btn-agregar-principal:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.btn-cotizar-principal {
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    border: 2px solid #8B4513;
    background: white;
    color: #8B4513;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.btn-cotizar-principal:hover {
    background: #8B4513;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

/* ========================================
   TABS
   ======================================== */
.producto-tabs {
    margin-top: 3rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.nav-tabs {
    border-bottom: 2px solid #e5e7eb;
}

.nav-tabs .nav-link {
    color: #6b7280;
    font-weight: 600;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 1rem 1.5rem;
    transition: all 0.3s;
}

.nav-tabs .nav-link:hover {
    color: #8B4513;
    border-color: transparent;
    background: #f9fafb;
}

.nav-tabs .nav-link.active {
    color: #8B4513;
    border-color: #8B4513;
    background: transparent;
}

.tab-content {
    padding: 2rem 0;
}

/* ========================================
   CARACTERÍSTICAS
   ======================================== */
.caracteristicas-list {
    list-style: none;
    padding: 0;
}

.caracteristicas-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.caracteristicas-list li:last-child {
    border-bottom: none;
}

.caracteristica-label {
    font-weight: 600;
    color: #374151;
}

.caracteristica-value {
    color: #6b7280;
}

/* ========================================
   PRODUCTOS RELACIONADOS
   ======================================== */
.productos-relacionados {
    margin-top: 4rem;
}

.productos-relacionados h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2rem;
}

.productos-relacionados .card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
}

.productos-relacionados .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ========================================
   BREADCRUMB
   ======================================== */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: #6b7280;
}

.breadcrumb-item a {
    color: #8B4513;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6b7280;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .producto-detalle {
        margin-top: 70px;
    }
    
    .producto-info-section {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .producto-imagen-principal {
        height: 300px;
    }
    
    .precio-final {
        font-size: 2rem;
    }
    
    .producto-meta {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .btn-agregar-principal,
    .btn-cotizar-principal {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .producto-tabs {
        padding: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
    
    .cantidad-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .cantidad-controls input {
        flex: 1;
    }
}

@media (max-width: 576px) {
    .producto-detalle {
        padding: 1rem 0;
    }
    
    .producto-info-section {
        padding: 1.5rem;
    }
    
    .producto-meta {
        grid-template-columns: 1fr;
    }
    
    .precio-final {
        font-size: 1.75rem;
    }
    
    .producto-badges {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .caracteristicas-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .productos-relacionados .col-md-3 {
        margin-bottom: 1rem;
    }
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.producto-info-section,
.producto-tabs {
    animation: fadeIn 0.5s ease-out;
}

/* ========================================
   UTILIDADES
   ======================================== */
.text-industrial {
    color: #8B4513 !important;
}

.bg-industrial {
    background-color: #8B4513 !important;
}

.border-industrial {
    border-color: #8B4513 !important;
}