﻿/* Transiciones y Base */
.custom-card {
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 15px;
    border: 1px solid rgba(0,0,0,0.05);
    overflow: hidden;
    background: #fff;
}

    .custom-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
    }

.img-utileria {
    height: 120px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    padding: 10px;
}

/* --- CONTROL DE TEXTO (Alineación) --- */
.text-truncate-custom {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.5rem;
}

.clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Máximo 2 líneas */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3rem; /* Fija la altura para que no se desfasen */
    line-height: 1.5rem;
    margin-bottom: 0;
}

/* --- CONFIGURACIÓN DE CUADRÍCULA (GRID) --- */
.view-grid .item-wrapper {
    width: 33.33%;
}

.view-grid .card-layout-row {
    display: flex;
    flex-direction: column;
}

/* --- CONFIGURACIÓN DE LISTA (LIST) --- */
.view-list .item-wrapper {
    width: 100% !important;
}

.view-list .card-layout-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

.view-list .visual-section {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #eee;
}

.view-list .content-section {
    flex-grow: 1;
    text-align: left;
}

.view-list .card-body {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.view-list .text-truncate-custom {
    -webkit-line-clamp: 2;
    width: 25%;
    min-height: auto;
    margin-bottom: 0;
    padding-right: 15px;
}

.view-list .clamp-text {
    flex-grow: 1;
    height: auto;
    -webkit-line-clamp: 2;
    margin-right: 20px;
}

.view-list .btn-container {
    width: 140px;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* --- VARIACIONES DE TAMAÑO --- */
/* Pequeño en Grid */
.size-small.view-grid .item-wrapper {
    width: 20%;
}

.size-small.view-grid .img-utileria {
    height: 70px;
}

.size-small.view-grid .clamp-text {
    display: none;
}

.size-small.view-grid .card-title {
    font-size: 0.9rem;
    min-height: auto;
}

.size-small.view-grid .badge-container {
    display: none !important;
}

/* Pequeño en Lista */
.size-small.view-list .visual-section {
    width: 120px;
}

.size-small.view-list .img-utileria {
    height: 50px;
}

.size-small.view-list .description-text {
    font-size: 0.85rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .view-grid .item-wrapper {
        width: 50%;
    }

    .size-small.view-grid .item-wrapper {
        width: 33.33%;
    }
}

@media (max-width: 576px) {
    .view-grid .item-wrapper, .size-small.view-grid .item-wrapper {
        width: 100%;
    }

    .view-list .card-layout-row {
        flex-direction: column;
    }

    .view-list .visual-section {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .view-list .card-body {
        flex-direction: column !important;
        text-align: center;
    }

    .view-list .clamp-text {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .view-list .btn-container {
        width: 100%;
    }

    .view-list .text-truncate-custom {
        width: 100%;
        padding-right: 0;
        margin-bottom: 10px;
    }
}
