/**
 * ENTERPRISE PRODUCT MODULE STYLES v8.1
 * Estilos específicos del módulo de productos. No contiene reglas globales.
 * 
 * @version 8.1.0-Enterprise
 */

/* ============================================
   PRODUCT CARDS (ESPECÍFICO DEL MÓDULO)
   ============================================ */
.product-card {
    animation: fadeInUp 0.5s ease forwards;
    animation-delay: calc(var(--animation-order, 0) * 0.1s);
    opacity: 0;
}

.product-card-inner {
    position: relative;
    border-radius: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-status-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.stock-high { background: linear-gradient(135deg, #28a745, #20c997); }
.stock-medium { background: linear-gradient(135deg, #ffc107, #fd7e14); }
.stock-low { background: linear-gradient(135deg, #dc3545, #e83e8c); }
.stock-out { background: linear-gradient(135deg, #6c757d, #495057); }
.product-inactive .product-status-badge { background: linear-gradient(135deg, #6c757d, #343a40); }

.product-avatar { margin-top: 10px; }
.avatar-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
}

.product-active .avatar-circle { background: linear-gradient(135deg, #007bff, #6610f2); }
.product-inactive .avatar-circle { background: linear-gradient(135deg, #6c757d, #495057); }

.product-title {
    font-weight: 600;
    color: #343a40;
    line-height: 1.4;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.product-title a {
    color: inherit;
    transition: color 0.2s;
}
.product-title a:hover { color: #007bff; text-decoration: none; }

.product-indicators {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.indicator-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}
.indicator-row:last-child { border-bottom: none; }
.indicator-label { color: #6c757d; font-size: 0.875rem; }
.indicator-value { font-weight: 600; font-size: 1rem; }

.new-product-card {
    border: 2px dashed #dee2e6;
    background: #f8f9fa;
    transition: all 0.3s ease;
    cursor: pointer;
}
.new-product-card:hover {
    border-color: #007bff;
    background: #e7f1ff;
    transform: translateY(-3px);
}
.new-product-icon { opacity: 0.7; transition: all 0.3s ease; }
.new-product-card:hover .new-product-icon { opacity: 1; transform: scale(1.1); }

/* ============================================
   NUEVOS ESTILOS PARA DISEÑOS / FORMULACIONES
   ============================================ */
.design-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 20px;
}

.design-product-panel {
    flex: 1 1 300px;
    background: linear-gradient(145deg, #f8faff 0%, #f0f4fd 100%);
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 20, 60, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    height: fit-content;
}

.design-form-panel {
    flex: 3 1 600px;
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.finished-product-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-left: 6px solid #4361ee;
}

.product-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eef2ff;
    color: #4361ee;
    letter-spacing: 0.3px;
}

.design-items-table {
    border-collapse: separate;
    border-spacing: 0 8px;
    width: 100%;
}

.design-items-table thead th {
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    padding: 8px 12px;
}

.design-items-table tbody tr {
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.2s;
}
.design-items-table tbody tr:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.design-items-table tbody td {
    padding: 16px 12px;
    border: none;
    vertical-align: middle;
}
.design-items-table tbody td:first-child { border-radius: 16px 0 0 16px; }
.design-items-table tbody td:last-child { border-radius: 0 16px 16px 0; }

.btn-float-add {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    border: none;
    box-shadow: 0 8px 16px rgba(67, 97, 238, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    margin: 20px 0;
}
.btn-float-add:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 24px rgba(67, 97, 238, 0.4);
}
.btn-float-add i { font-size: 1.2rem; }

/* ============================================
   TARJETAS DE PRODUCTO EN LISTADO (DPL) - MEJORADAS
   ============================================ */
.design-product-card {
    background: white;
    border-radius: 24px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}
.design-product-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.design-product-header {
    background: white;
    padding: 16px 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid transparent;
    transition: background-color 0.2s;
}
.design-product-header:hover {
    background-color: #f8f9fa;
}
.design-product-header[aria-expanded="true"] {
    border-bottom-color: #e9ecef;
}
.design-product-header[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

.design-product-header .product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #212529;
}
.design-product-header .product-meta {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 0.85rem;
}

.design-product-body {
    padding: 24px;
    background: #f8f9fc;
}

.insumos-table {
    width: 100%;
}
.insumos-table th {
    padding: 8px 12px;
    color: #495057;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}
.insumos-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e9ecef;
}

/* ============================================
   ANIMACIONES (ESPECÍFICAS)
   ============================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}
.fluent-btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
}

/* ============================================
   RESPONSIVE (ESPECÍFICO)
   ============================================ */
@media (max-width: 768px) {
    .design-layout { flex-direction: column; }
    .design-product-panel, .design-form-panel { flex: 1 1 auto; width: 100%; }
    .design-product-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .design-product-header .product-meta { flex-wrap: wrap; gap: 10px; }
}