﻿.container {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

h1{
    margin-bottom: 20px;
}

.card {
    background-color: #282b2d6d;
    border: none;
    text-align: center;
    border-radius: 35px;
    box-shadow: none;
}

.card-header {
    background-color: transparent;
    border-bottom: none;
}

.card-body {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 35px;
    color: #F7F0E2;
    padding-top: 0;
}

.card-body form .col-10 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.card-body form .col-2 {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.card-body .form__field {
    flex: 1 1 0;
    max-width: 33.33%;
    height: 40px;
}


@media (max-width: 1420px) {
    .card-body form .col-10 {
        flex-direction: column;
        align-items: stretch;
    }

    .card-body .form__field {
        max-width: 100%;
    }

    .card-body form .col-2 {
        flex-direction: column;
        justify-content: center;
    }

}

.card-body .row{
    background-color: transparent;
}

.row {
    background-color: #282b2d6d;
    border-radius: 10px;
    padding-top: 10px;
}
/* Tarjetas de productos */
.product-item {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    animation: fadeIn 0.3s ease-out;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.precioVenta{
    font-weight: bold;
}
/* Imagen del producto */
.product-img {
    position: relative;
    overflow: hidden;
    background-color: white;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.imga {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-img:hover .imga {
    transform: scale(1.05);
}

/* Botones de acción del producto */
.product-action {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(134, 134, 134, 0.9);
    padding: 0.95rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    transform: translateY(100%);
    transition: all 0.3s ease;
    border: none
}

.product-img:hover .product-action {
    transform: translateY(0);
}

.btn-outline-dark {
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-outline-dark:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    color: rgb(14, 83, 231);
}

.btn-outline-dark i {
    font-size: 2rem;
    color: #000;
}

.btn-outline-dark .icon {
    font-size: 2rem;
    color: #f50909;
    min-height: 30px;
    min-width: 30px;
    display: block;
}


/* Información del producto */
.text-center {
    padding: 1rem;
    border: none;
}


/* Alertas */
.alert {
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {

    .col-lg-3,
    .col-md-3,
    .col-sm-3 {
        flex: 0 0 50%;
        max-width: 80%;
    }


}

@media (max-width: 760px) {

    .col-lg-3,
    .col-md-3,
    .col-sm-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
/* Form layout usando flexbox */
.modal-body form {
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.form__group {
    position: relative;
    margin-bottom: 0.5rem;
    width: calc(50% - 10px);
    flex: 0 0 calc(50% - 10px);
    text-align: center;
    /* ancho fijo para 2 por fila */
}

.descipcion {
    width: 100%;
    display: flex;
    align-content: space-between;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: nowrap;
    flex-direction: column-reverse;
}

#Descripcion, #DescripcionUpdate {
    resize: none;
    max-height: 40px;
    border-radius: 8px;
    width: 100%;
    border: 2px solid #e9ecef;
}

/* Clase para elementos que deben ocupar el ancho completo */
.form__group--full {
    width: 100%;
    flex: 0 0 100%;
}

/* Anular el margen derecho que ya no necesitamos con flexbox */
.form__group:nth-child(odd) {
    margin-right: 0;
}

.descripcionUdpateLabel {
    transform: translateY(20px);
}


/* Botones alineados al final */
.form-buttons {
    width: 100%;
    gap: 10px;
    text-align: center;
}

@media (max-width: 568px) {
    .form__group {
        width: 100%;
        flex: 0 0 100%;
        margin-right: 0;
    }
}


/* Upload de imagen */

.imagen-field{
    display: inline-flex;
    width: 100%;
    gap: 10px;
    height: 300px;
}

/* Contenedor para la vista previa de imagen */
.imagen-preview-container {
    display: flex;
    justify-content: center;
     width: 50%;
}

#imagen-preview, #imagen-preview-update {
    display: flex;
    justify-content: center;
    margin: 0 auto;
    max-width: 400px;
    min-width: 100px;
    max-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px dashed #282b2d6d;
}

.custum-file-upload {
    border: 3px dashed #282b2d6d;
    background-color: #f8f9fa;
    border-radius: 10px;
    margin: auto;
    padding: 2rem;
    transition: all 0.3s ease;
    text-align: center;
    height: 300px;
    width: 40%;
    display: flex;
    align-content: center;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.custum-file-upload:hover {
    border-color: #0056b3;
    background-color: #e9f2fb;
    cursor: alias;
}

#file, #fileUpdate{
    display: none;
}

#imagen-modal .modal-dialog {
    max-width: clamp(50vw, 800px, 70vw);
    /* ancho responsive y centrado */
    width: auto;
    margin: 0 auto;
    margin-top: 1%;
    text-align: center;
    justify-content: center;
    min-height: fit-content;
}


#imagen-modal .modal-content {
    background-color: transparent;
    border: none;
    box-shadow: none;
}


#modalCrearProducto .modal-dialog {
    max-width: clamp(80vw, 900px, 90vw);
}

#modalEditarProducto .modal-dialog {
    max-width: clamp(80vw, 900px, 90vw);
}

.text-danger {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    color: #dc3545;
    display: block;
}

.form-check{
    display: flex;
    /* min-height: 1.5rem; */
    /* padding-left: 1.5em; */
    /* margin-bottom: .125rem; */
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.622);
    margin-top: 5px;
    gap: 10px;
    border-radius: 30px;
    color: #000;
}

.percent:hover {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.percent:hover .form-check-label {
    background-color: #000;
    width: 20px;
    height: 20px;
}

