/* Estilos Base */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}

.logo {
    height: 70px;
}

/* Navbar */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.navbar-brand img {
    height: 70px;
}

/* Sección del Catálogo */
.catalog {
    background-color: #f8f9fa;
    padding: 50px 0;
}

.catalog h1 {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 30px;
}

/* Estilos para los cards */
.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: none;
    padding: 15px;
    margin: 10px;
    transition: transform 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 8px 16px 0 rgba(0, 0, 0, 0.2);
    transform: translateY(-5px);
}

.card-title {
    color: #0056b3;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 15px;
}

.card-text {
    color: #333333;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
}

/* Estilos para las imágenes del carrusel */
.carousel-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

/* Estilos para los controles del carrusel */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 100%;
}

.card-body {
    padding: 15px;
    text-align: center;
    overflow: hidden;
}

/* Estilo para pantallas medianas y grandes */
@media (min-width: 768px) {
    .card-custom {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

/* Estilo para pantallas más pequeñas */
@media (max-width: 767.98px) {
    .card-custom {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

.container {
    max-width: 90%;
}

/* Estilos para las miniaturas en el modal */
.miniatura {
    width: 60px;
    height: 45px;
    object-fit: cover;
    margin: 5px;
    opacity: 0.6;
    cursor: pointer;
}

.miniatura:hover {
    opacity: 1;
}

.miniaturas-container {
    overflow-x: auto;
    white-space: nowrap;
}

/* Estilos adicionales para el modal */
.modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

.modal-header .close {
    margin-top: -20px;
    margin-right: -20px;
}

.btn-block {
    margin-bottom: 10px;
}

.image-container {
    position: relative;
}

.machine-id {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px;
    border-radius: 5px;
    z-index: 10;
}

#filtros-categorias button {
    margin: 5px;
}

#filtros-categorias button.active {
    background-color: #007bff;
    color: white;
}

/* Estilo para botones en pantallas pequeñas */
@media (max-width: 768px) {
    .btn {
        font-size: 0.8em;
        padding: 10px 5px;
    }
}

/* Contenedor de botones con flexibilidad */
.contenedor-botones {
    display: flex;
    flex-wrap: wrap;
}

/* Ajustes para el modal en pantallas grandes */
@media (min-width: 992px) {
    .modal-xl {
        max-width: 80%;
    }
}

@media (max-width: 767.98px) {
    .card .btn-block {
        width: 100%;
    }
}

.modal-super-xl {
    max-width: 90%;
}

.modal-super-xl .carousel-item img {
    height: 80vh;
    object-fit: contain;
}

@media (max-width: 768px) {
    .modal-super-xl {
        max-width: 100%;
    }
}

@media (min-width: 768px) {
    .modal-super-xl {
        max-width: 80%;
    }
}

.carousel-inner {
    height: 200px;
    object-fit: cover;
}

.info-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.btn {
    margin-top: 10px;
}

.carousel-item {
    height: 200px;
}

.carousel-container .carousel-item img {
    height: 100%;
    width: auto;
    object-fit: scale-down;
}

.machine-details {
    text-align: left;
}

.machine-details p {
    margin-bottom: 5px;
    padding: 0;
}

.card-body-link,
.card-body-link:hover,
.card-body-link:visited {
    text-decoration: none;
    color: inherit;
}

.card-body-link .card-title,
.card-body-link .machine-details {
    color: #333;
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card-placeholder {
    border-radius: 10px;
    background-color: #e0e0e0;
    height: 200px;
    width: 100%;
    margin-bottom: 20px;
}

.card-placeholder > div {
    background-color: rgba(255, 255, 255, 0.2);
    height: 100%;
    width: 100%;
    animation: pulse 1.5s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        background-color: rgba(255, 255, 255, 0.2);
    }
    50% {
        background-color: rgba(255, 255, 255, 0.3);
    }
    100% {
        background-color: rgba(255, 255, 255, 0.2);
    }
}

.maquina-propia,
.maquina-aliado {
    text-align: left;
    margin-top: 5px;
    font-size: 0.9em;
}

#descripcion-maquina {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding: 10px;
}

.product-detail {
    background-color: #f8f9fa;
}

.card-title {
    font-size: 2rem;
    font-weight: 600;
}

.precio {
    font-size: 1.5rem;
    font-weight: 600;
    color: #28a745;
}

.list-unstyled li {
    margin-bottom: 10px;
}

#contenedor-miniaturas img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

#contenedor-miniaturas img:hover {
    transform: scale(1.1);
}

#galeria-imagenes .carousel-item {
    height: 70vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#galeria-imagenes .carousel-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

@media (max-width: 767px) {
    #galeria-imagenes .carousel-item {
        height: 50vh;
    }
}

#contenedor-miniaturas img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
}

#contenedor-miniaturas img.active {
    border: 2px solid #007bff;
    transform: scale(1.1);
}