﻿/*==========================================
    PRODUCTOS
==========================================*/

.dulko-productos {
    width: 100%;
}

/*==========================================
    TITULO
==========================================*/

.dulko-titulo {
    margin-bottom: 35px;
}

    .dulko-titulo h2 {
        font-size: 32px;
        font-weight: 700;
        color: var(--color-principal);
    }

    .dulko-titulo p {
        color: #777;
        margin-top: 8px;
    }

/*==========================================
    TARJETA
==========================================*/

.producto-card {
    background: #FFF;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    transition: .30s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

    .producto-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 45px rgba(75,43,114,.20);
    }

/*==========================================
    IMAGEN
==========================================*/

.producto-imagen {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 0 20px;
    background: #FFF;
}

    .producto-imagen img {
        max-width: 100%;
        max-height: 180px;
        object-fit: contain;
    }

/*==========================================
    INFO
==========================================*/

.producto-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

    .producto-info h3 {
        font-size: 17px;
        font-weight: 600;
        color: #333;
        min-height: 38px;
    }

/*==========================================
    CODIGO Y PRECIO
==========================================*/

.producto-datos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 0;
}

.codigo {
    color: #888;
    font-size: 14px;
}

.precio {
    color: var(--color-principal);
    font-size: 22px;
    font-weight: 700;
}

/*==========================================
    BOTON
==========================================*/

.btn-ver {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    background: var(--color-principal);
    color: #FFF;
    text-decoration: none;
    transition: .30s;
}

    .btn-ver:hover {
        background: var(--color-principal-hover);
        color: #FFF;
    }

/*==========================================
    RESPONSIVE
==========================================*/

@media(max-width:768px) {

    .producto-imagen {
        height: 170px;
    }

        .producto-imagen img {
            max-height: 130px;
        }

    .producto-info {
        padding: 15px;
    }

        .producto-info h3 {
            font-size: 15px;
        }

    .precio {
        font-size: 18px;
    }
}

/*==========================================
    ACCIONES PRODUCTO ULTRA COMPACTAS
==========================================*/

.acciones-producto {
    display: flex;
    align-items: stretch;
    width: 100%;
    margin-top: 12px;
}

.selector-cantidad {
    display: grid;
    grid-template-columns: 50px minmax(42px, 1fr) 50px;
    flex: 1;
    height: 50px;
    border: 1px solid #D8C8EE;
    border-right: none;
    border-radius: 12px 0 0 12px;
    overflow: hidden;
    background: #fff;
}

.btn-cantidad {
    width: 60px;
    height: 50px;
    border: none;
    background: #FAF7FD;
    color: #5B2D86;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    transition: .18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-cantidad i {
        font-size: 21px;
    }

    .btn-cantidad:hover {
        background: #EEE4FA;
    }

    .btn-cantidad:active {
        transform: scale(.92);
    }

.txtCantidad {
    width: 100%;
    height: 50px;
    border: none;
    outline: none;
    background: #fff;
    text-align: center;
    font-size: 15px;
    font-weight: 900;
    color: #2f2f2f;
    min-width: 38px;
}

.btn-agregar {
    width: 78px;
    height: 50px;
    border: 1px solid #D8C8EE;
    border-left: 1px solid #D8C8EE;
    border-radius: 0 12px 12px 0;
    background: #F3ECFB;
    color: #5B2D86;
    font-size: 20px;
    cursor: pointer;
    transition: all .20s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .btn-agregar i {
        font-size: 25px;
    }

    .btn-agregar:hover {
        background: #5B2D86;
        color: #fff;
    }

    .btn-agregar:active {
        transform: scale(.94);
    }

    .btn-agregar.agregado {
        background: #28A745 !important;
        color: #fff !important;
        border-color: #28A745 !important;
        animation: carritoOK .35s;
    }

    .btn-agregar:disabled {
        cursor: default;
    }

@keyframes carritoOK {
    0% {
        transform: scale(.90);
    }

    55% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

/* CELULAR */
@media (max-width: 576px) {

    .acciones-producto {
        margin-top: 10px;
    }

    .selector-cantidad {
        grid-template-columns: 36px minmax(34px, 1fr) 36px;
        height: 40px;
        border-radius: 10px 0 0 10px;
    }

    .btn-cantidad {
        width: 36px;
        height: 40px;
    }

        .btn-cantidad i {
            font-size: 14px;
        }

    .txtCantidad {
        height: 40px;
        font-size: 14px;
        min-width: 34px;
    }

    .btn-agregar {
        width: 44px;
        height: 40px;
        border-radius: 0 10px 10px 0;
    }

        .btn-agregar i {
            font-size: 17px;
        }

    .producto-datos {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .codigo {
        width: 100%;
        font-size: 13px;
        line-height: 1.2;
    }

    .precio {
        font-size: 18px;
        line-height: 1.2;
    }
}

.acciones-admin-producto {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #efefef;
}

.btn-admin {
    flex: 1;
    height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    text-decoration: none;
    transition: .20s;
    font-size: 18px;
}

    .btn-admin.editar {
        background: #F2EDFF;
        color: #6D4CC2;
    }

    .btn-admin.baja {
        background: #FFF6D8;
        color: #C99500;
    }

    .btn-admin.eliminar {
        background: #FFE8EC;
        color: #D64D68;
    }

    .btn-admin:hover {
        transform: translateY(-2px);
        filter: brightness(.97);
    }