﻿/* ========================================================= */
/* TIENDAROPA - GESTIÓN DE IMÁGENES */
/* ========================================================= */


/* ========================================================= */
/* CONTENEDOR DE PRODUCTOS */
/* ========================================================= */

.images-products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


/* ========================================================= */
/* TARJETA DEL PRODUCTO */
/* ========================================================= */

.image-product-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

    .image-product-card:hover {
        transform: translateY(-2px);
        border-color: #dbe3ef;
        box-shadow: 0 8px 24px rgba(0,0,0,.08);
    }


/* ========================================================= */
/* ENCABEZADO */
/* ========================================================= */

.image-product-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
}

    .image-product-header h5 {
        margin: 0;
        color: #111827;
        font-size: 16px;
        font-weight: 700;
    }

    .image-product-header small {
        display: block;
        margin-top: 4px;
        color: #6b7280;
        font-size: 11px;
    }


/* ========================================================= */
/* ICONO */
/* ========================================================= */

.image-count-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 9px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 18px;
}


/* ========================================================= */
/* PREVISUALIZACIÓN */
/* ========================================================= */

.product-images-preview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 0 18px;
}


/* ========================================================= */
/* MINIATURAS */
/* ========================================================= */

.product-image-thumb,
.product-image-more {
    position: relative;
    height: 120px;
    overflow: hidden;
    border-radius: 9px;
    background: #f3f4f6;
}


    /* ========================================================= */
    /* IMAGEN */
    /* ========================================================= */

    .product-image-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .25s ease;
    }

    .product-image-thumb:hover img {
        transform: scale(1.04);
    }


/* ========================================================= */
/* BADGE PRINCIPAL */
/* ========================================================= */

.principal-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    font-size: 11px;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
    z-index: 2;
}


/* ========================================================= */
/* MÁS IMÁGENES */
/* ========================================================= */

.product-image-more {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient( 145deg, #f1f5f9, #e8eef5 );
    color: #475569;
    border: 1px solid #e2e8f0;
    transition: background .2s ease, transform .2s ease;
}

    .product-image-more:hover {
        background: #e8eef5;
        transform: translateY(-1px);
    }

    .product-image-more span {
        font-size: 20px;
        font-weight: 700;
        line-height: 1.1;
    }

    .product-image-more small {
        margin-top: 2px;
        color: #64748b;
        font-size: 11px;
    }


/* ========================================================= */
/* INFORMACIÓN PRINCIPAL */
/* ========================================================= */

.principal-info {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 14px 18px 0;
    color: #64748b;
    font-size: 13px;
}

    .principal-info i {
        color: #2563eb;
    }


/* ========================================================= */
/* ACCIONES */
/* ========================================================= */

.image-product-actions {
    display: flex;
    gap: 8px;
    padding: 16px 18px 18px;
}

    .image-product-actions .btn:first-child {
        flex: 1;
    }

    .image-product-actions .btn {
        border-radius: 8px;
        font-size: 13px;
        transition: transform .15s ease, box-shadow .15s ease;
    }

        .image-product-actions .btn:hover {
            transform: translateY(-1px);
        }


/* ========================================================= */
/* RESPONSIVE TABLET */
/* ========================================================= */

@media (max-width: 1000px) {

    .images-products-grid {
        grid-template-columns: 1fr;
    }
}


/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */

@media (max-width: 700px) {

    .product-images-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-image-thumb,
    .product-image-more {
        height: 110px;
    }
}


@media (max-width: 500px) {

    .image-product-header {
        padding: 15px;
    }

    .product-images-preview {
        padding: 0 15px;
    }

    .principal-info {
        margin-left: 15px;
        margin-right: 15px;
    }

    .image-product-actions {
        padding: 14px 15px 15px;
        flex-wrap: wrap;
    }

        .image-product-actions .btn {
            flex: 1 1 100%;
        }
}
