/* Estilo base del card */
.card-material {
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    background-color: #fff;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-material:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.card-material-header {
    background: linear-gradient(135deg, #1976d2, #42a5f5);
    color: white;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-material-header h5 {
    margin: 0;
    font-weight: 500;
}

.card-material-body {
    padding: 16px 20px;
}



.icon-btn {
    cursor: pointer;
    font-size: 1.3rem;
    color: white;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.15);
    opacity: 0.9;
}

.spinnerC {
    width: 40px;
    height: 40px;
    border: 4px solid #42a5f5;
    border-top: 4px solid transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: auto;
}

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

.no-results-material {
    text-align: center;
    color: #9e9e9e;
    padding: 20px;
}



.product-item {
    border-radius: 12px;
    background: #f1f5f9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
   padding: 32px 24px 12px 12px; /* Top y Right aumentados para dar espacio al ícono */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.3s ease;
}

.product-item:hover {
    transform: translateY(-2px); /* menos elevación para coherencia */
    box-shadow: 0 3px 8px rgba(0,0,0,0.10);
}

.product-header {
    font-weight: 600;
    font-size: 0.95rem; /* antes 1rem */
    text-align: center;
    color: #333;
    margin-bottom: 6px; /* antes 8px */
}

.product-info {
    font-size: 0.8rem; /* antes 0.9rem */
    color: #555;
    text-align: center;
    margin-bottom: 3px; /* antes 4px */
}

.product-measure {
    font-size: 1.2rem; /* antes 1.4rem */
    font-weight: 600;
    color: #298cf0;
    text-align: center;
    margin: 6px 0; /* antes 8px */
}

.product-quantity {
    font-size: 1.2rem; /* antes 1.8rem */
    font-weight: 600;
    color: #d25d19;
    margin-right: 6px; /* antes 8px */
}

.product-status {
    font-size: 0.85rem; /* antes 1rem */
    font-weight: 600;
    color: #388e3c;
    margin-right: 6px; /* antes 8px */
    padding: 2px 6px; /* antes 2px 8px */
    border-radius: 12px;
    background-color: #e8f5e9;
}
.product-quantity-container,
.product-status-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 6px 0;
}



.status-N/A {
    color: #757575;
    background-color: #f5f5f5;
}

.icon-btn-small {
    font-size: 1.2rem;
    cursor: pointer;
    color: #555;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icon-btn-small:hover {
    color: #1976d2;
    transform: scale(1.2);
}

.edit-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.product-measure {
    font-size: 1.4rem;             /* más grande que el texto normal */
    font-weight: 600;              /* negrita */
    color: #1976d2;                /* un rojo Material para resaltar */
    text-align: center;
    margin: 8px 0;
}

.product-observaciones {
    background-color: #f1f5f9; /* gris azul claro más neutral */
    border-left: 3px solid #1976d2; /* barra azul sutil */
    padding: 4px 8px; /* más compacto */
    font-size: 0.7rem; /* más pequeño */
    color: rgba(0, 0, 0, 0.5); /* opaco */
    border-radius: 6px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.product-observaciones:hover {
    background-color: #e0e7ef; /* un poco más claro al pasar el mouse */
    transform: translateY(-1px);
}

.product-observaciones-text {
    flex: 1;
    word-break: break-word;
}

.icon-btn-notas {
    font-size: 1rem; /* más pequeño */
    cursor: pointer;
    color: #1976d2;
    transition: transform 0.2s ease, color 0.2s ease;
}

.icon-btn-notas:hover {
    transform: scale(1.15);
    color: #0d47a1;
}

.product-quantity-badge {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e3f2fd;
    color: #1976d2;
    padding: 4px 10px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1.5rem;
    gap: 4px;
}
.status-warning {
    color: #fbc02d !important; /* amarillo material */
    font-weight: 600;
}

.icon-btn-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    color: #d32f2f;
    transition: transform 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    padding: 4px;
    border-radius: 20%;
}

.icon-btn-delete:hover {
    transform: scale(1.2);
    color: #b71c1c;
    background-color: rgba(0,0,0,0.05);
}

/* Media query para pantallas más pequeñas (tablets/móviles) */
@media (max-width: 768px) {
    .product-item {
        padding-top: 40px;   /* Más espacio arriba para el ícono */
        padding-right: 40px; /* Más espacio a la derecha */
    }

    .icon-btn-delete {
        top: 10px;  /* Alejar un poco más del borde */
        right: 10px;
        font-size: 1.1rem;
    }
}

/* Color teal oscuro para el header alternativo */
.card-material-header-alt {
    background: linear-gradient(135deg, #00695c, #00897b); /* tonos teal oscuros */
    border-bottom: 3px solid #004d40; /* borde un poco más oscuro */
    color: white;
}

/* Borde teal para el card para que resalte */
.border-teal {
    border-color: #00897b !important;
}

/* Opcional: sombra suave para resaltar */
#datosBobinaCard {
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.3);
}
#datosBobinaCard .card-material-header-alt {
    justify-content: flex-start !important; /* anula justify-content-between heredado */
    gap: 0.5rem; /* espacio entre ícono y texto */
}




/* Estilo general para todos los dispositivos */
.totales-card-material {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 0.75rem; /* Ajuste para un diseño más compacto */
    margin-top: 1rem;
    font-family: 'Roboto', sans-serif;
}

.totales-body-material {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 1rem; /* Reducir el espacio para hacerlo más compacto */
}

/* Estilo para cada métrica individual (escritorio por defecto) */
.totales-item-material {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ❗ Ajuste de tamaño de texto para escritorio ❗ */
.totales-label-material {
    font-size: 0.8rem; /* Reducción de tamaño */
    color: #616161;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* ❗ Ajuste de tamaño de número para escritorio ❗ */
.totales-value-material {
    font-size: 1.25rem; /* Reducción de tamaño */
    color: #212121;
    font-weight: bold;
    margin-top: 0.25rem;
}

/* ------------------------------------------- */
/* Media Query para dispositivos móviles  */
/* ------------------------------------------- */
@media (max-width: 576px) {
    .totales-card-material {
        padding: 0.5rem 0.5rem; /* Reducir aún más el padding en móviles */
    }

    .totales-body-material {
        justify-content: space-between; /* Justificar el espacio entre los elementos */
        gap: 0.25rem; /* Reducir el espacio para evitar saltos de línea innecesarios */
    }

    /* ❗ Mejor justificación para móviles ❗ */
    .totales-item-material {
        flex-direction: column; /* Apilar elementos para mejor legibilidad */
        align-items: flex-start; /* Alinear a la izquierda para una mejor justificación */
        flex-basis: auto;
        padding: 0.25rem 0.5rem; /* Pequeño padding para cada item */
        border-radius: 4px;
        background-color: #fafafa;
    }
    
    .totales-label-material {
        font-size: 0.7rem; /* Reducir el tamaño de la etiqueta */
        white-space: normal;
    }

    .totales-value-material {
        font-size: 1rem; /* Reducir el tamaño del valor */
    }
}