
html {
    overflow-x: hidden;
}

/********** Template CSS **********/
:root {
    --primary: #FF5E14;
    --secondary: #5F656F;
    --light: #F5F5F5;
    --dark: #3b3b3b;
    --semidark : #494848;
}

.topbar {
  background-color: var(--dark);
}

.proveedor {
    background-color: var(--light);
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
}

h1,
h2,
.h1,
.h2,
.fw-bold {
    font-weight: 700 !important;
}

h3,
h4,
.h3,
.h4,
.fw-medium {
    font-weight: 600 !important;
}

h5,
h6,
.h5,
.h6,
.fw-semi-bold {
    font-weight: 500 !important;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    transition: .5s;
    font-weight: 500;
}

.btn-primary,
.btn-outline-primary:hover {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}


.topbar-right {
    position: relative;
    background: var(--primary);
}

.topbar-right::before {
    position: absolute;
    content: "";
    width: 30px;
    height: 100%;
    top: 0;
    left: -15px;
    transform: skewX(-30deg);
    background-color: var(--primary);
}


/*** Navbar ***/
.navbar.sticky-top {
    top: -100px;
    transition: .5s;
}

.navbar .navbar-brand {
    position: relative;
    padding-right: 50px;
    height: 75px;
    display: flex;
    align-items: center;
    background: var(--primary);
}

.navbar .navbar-brand::after {
    position: absolute;
    content: "";
    width: 50px;
    height: 100%;
    top: 0;
    right: -25px;
    transform: skewX(-30deg);
    background-color: var(--primary);
}

.navbar .navbar-nav .nav-link {
    margin-right: 35px;
    padding: 20px 0;
    color: var(--dark);
    font-size: 18px;
    font-weight: 500;
    outline: none;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--primary);
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

@media (max-width: 991.98px) {
    .navbar-toggler {
        position: relative;
        left: 27px;
    }

    .navbar-brand {
        padding-left: 1rem !important; 
    }

    .navbar-brand img {
        margin-left: 10px; 
    }

    .navbar-brand h1 {
        margin-left: 10px;
    }
}

@media (min-width: 992px) {
    .nav-item.dropdown .dropdown-menu {
        display: block;
        visibility: hidden;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 1000;
        min-width: 220px;
        background-color: #fff;
        border: 1px solid rgba(0, 0, 0, 0.15);
        padding: 0.5rem 0;
    }

    .nav-item.dropdown:hover .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    /* Previene que se active el colapso por clic en pantallas grandes */
    .nav-item.dropdown > a[data-bs-toggle="collapse"] {
        pointer-events: none;
    }
}


@media screen and (max-width: 1199.98px) {
    .cotiza {
        display: none !important;
    }
}

@media screen and (max-width: 1199.98px) {
    .separacion-nosotros{
        margin-top: 15px;
    }
}

/* Línea sutil debajo del navbar */
.nav-border-bottom {
    border-bottom: 1px solid #d3d3d3; /* gris muy claro */
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    background: linear-gradient(to right, rgb(31, 31, 31) 0%, rgba(91, 2, 2, 0) 100%);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 15%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: var(--primary);
    border: 15px solid var(--primary);
    border-radius: 3.5rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 450px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    background: linear-gradient(to right, rgb(31, 31, 31) 0%, rgba(91, 2, 2, 0) 100%), url(../img/carousel-2.jpg) center center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: var(--light);
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    font-size: 18px;
    color: var(--light);
}

@media (max-width: 1202px) {
        .dejame {
        margin-right: 100px;
        margin-top: 10px;
    }
}


/*** Facts ***/
.facts {
    position: relative;
    margin: 6rem 0;
    background: var(--dark);
}

.facts .border {
    border-color: rgba(255, 255, 255, .1) !important;
}


/*** Features ***/
.btn-play {
    position: absolute;
    top: 50%;
    right: -30px;
    transform: translateY(-50%);
    display: block;
    box-sizing: content-box;
    width: 16px;
    height: 26px;
    border-radius: 100%;
    border: none;
    outline: none !important;
    padding: 18px 20px 20px 28px;
    background: var(--primary);
}

@media (max-width: 992px) {
    .btn-play {
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%);
    }
}

.btn-play:before {
    content: "";
    position: absolute;
    z-index: 0;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    animation: pulse-border 1500ms ease-out infinite;
}

.btn-play:after {
    content: "";
    position: absolute;
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    display: block;
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 100%;
    transition: all 200ms;
}

.btn-play span {
    display: block;
    position: relative;
    z-index: 3;
    width: 0;
    height: 0;
    left: -1px;
    border-left: 16px solid #FFFFFF;
    border-top: 11px solid transparent;
    border-bottom: 11px solid transparent;
}

@keyframes pulse-border {
    0% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(-50%) translateZ(0) scale(2);
        opacity: 0;
    }
}

.modal-video .modal-dialog {
    position: relative;
    max-width: 800px;
    margin: 60px auto 0 auto;
}

.modal-video .modal-body {
    position: relative;
    padding: 0px;
}

.modal-video .close {
    position: absolute;
    width: 30px;
    height: 30px;
    right: 0px;
    top: -30px;
    z-index: 999;
    font-size: 30px;
    font-weight: normal;
    color: #FFFFFF;
    background: #000000;
    opacity: 1;
}


/*** Service ***/

.service-item {
    position: relative;
    margin: 65px 0 25px 0;
    box-shadow: 0 0 45px rgba(0, 0, 0, .07);
    margin-top: 0px;
}

.service-item .service-img {
    position: absolute;
    padding: 12px;
    width: 130px;
    height: 130px;
    top: -65px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    box-shadow: 0 0 45px rgba(0, 0, 0, .09);
    z-index: 2;
}

.service-item .service-detail {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 1;
}

.service-item .service-title {
    position: absolute;
    padding: 65px 30px 25px 30px;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover .service-title {
    top: -100%;
}

.service-item .service-text {
    position: absolute;
    overflow: hidden;
    padding: 65px 30px 25px 30px;
    width: 100%;
    height: 100%;
    top: 100%;
    left: 0;
    display: flex;
    align-items: center;
    text-align: center;
    background: rgba(2, 36, 91, .7);
    transition: .5s;
}

.service-item:hover .service-text {
    top: 0;
}

.service-item .service-text::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100px;
    top: -100%;
    left: 0;
    transform: skewY(-12deg);
    background: #FFFFFF;
    transition: .5s;
}

.service-item:hover .service-text::before {
    top: -55px;
}

.service-item .btn {
    position: absolute;
    width: 130px;
    height: 50px;
    left: 50%;
    bottom: -25px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
    background: #FFFFFF;
    border: none;
    box-shadow: 0 0 45px rgba(0, 0, 0, .09);
    z-index: 2;
}

.service-item .btn:hover {
    color: #FFFFFF;
    background: var(--primary);
}

.imagen-1 {
  width: 100%;
  max-width: 1200px; 
  height: auto;
  display: block;
  margin: 0 auto;
  margin-top: -45px;
  left: -1.8px;
}

@media (max-width: 576px) {
  .imagen-1 {
    max-width: 1200px;
  }
  
  .descripcion-producto {
    font-size: 13px; /* Ajusta este valor según lo que necesites */
  }
}


/*** Project ***/
.project-carousel {
    position: relative;
    background: var(--dark);
}

.project-item {
    position: relative;
    display: block;
}

.project-item img {
    transition: .5s;
}

.project-item:hover img,
.project-carousel .owl-item.center img {
    margin-top: -60px;
}

.project-item .project-title {
    position: absolute;
    padding: 0 15px;
    width: 100%;
    height: 80px;
    bottom: -110px;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--dark);
    transition: .5s;
}

.project-item:hover .project-title,
.project-carousel .owl-item.center .project-title  {
    bottom: -60px;
}

.project-item .project-title::before {
  position: absolute;
  content: "";
  width: 100%;
  height: 30px;
  top: 0;
  left: 0;
  transform: translateY(-15px) skewY(-1.5deg);
  background: var(--dark);
  transition: transform .5s ease;
}

.project-carousel .owl-nav {
    position: absolute;
    width: 100%;
    height: 45px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    transition: .5s;
    opacity: 0;
    z-index: 1;
}

.project-carousel:hover .owl-nav {
    opacity: 1;
}

.project-carousel .owl-nav .owl-prev,
.project-carousel .owl-nav .owl-next {
    margin: 0 30px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: var(--primary);
    border-radius: 45px;
    font-size: 22px;
    transition: .5s;
}

/*** Team ***/
.team-item .team-social {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    display: flex;
    align-items: center;
    background: var(--primary);
    transition: .5s;
}

.team-item:hover .team-social {
    left: 0;
}

/*** Vitrina ***/

.vitrina {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 15px; 
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.vitrina-item {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding: 10px;
    cursor: pointer;
}

.vitrina-item:hover {
    transform: scale(1.04);
    box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.3);
}

.vitrina-name {
    font-size: 1rem;
    color: #333;
    margin-top: 10px;
    margin-bottom: 0px;
}

.vitrina-subname {
    font-size: 0.75rem;
    color: #6a6a6a;
}

.vitrina-image {
    width: 100%;
    height: auto;
    border-bottom: 2px solid #f0f0f0;
    display: block;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.vitrina-image-2 {
    width: 100%;
    height: auto;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.vitrina-image-2:hover {
    opacity: 1;
}

.vitrina-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.marca-catalogo {
    margin-top: 0px;
    padding: 0px;
    background-color: #ffffff;
}

.marca-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.marca-header {
    display: flex;
    align-items: center;
    gap: 25px;
}

.marca-logo {
    height: 60px;
}

.marca-logo-emecx {
    height: 85px;
    margin-top: 15px;
}

.marca-titulo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 4px;
}

.marca-header-emecx {
    display: flex;
    justify-content: space-between; /* Distribuye a los extremos y centro */
    align-items: center;
    width: 100%;
    gap: 25px;
}

.marca-titulo-emecx {
    flex: 1; /* Que cada uno ocupe el mismo espacio */
    text-align: center; /* Centra el texto dentro de su espacio */
    font-size: 1.1rem;
    font-weight: bold;
    border: none;      
    outline: none;     
    border-bottom: 2px solid #007bff; /* Mantiene la raya azul */
    color: #007bff;
    padding-bottom: 4px;
}

.marca-titulo-emecx:hover {
    background-color: #eaf2ff;
}

.marca-titulo-emecx.activo {
    background-color: #eaf2ff;
}

.marca-separador {
    margin-top: 10px;
    margin-bottom: 20px;
    border: none;
    border-bottom: 1px solid #ccc;
}

.marca-faster-anim {
    animation-duration: 0.5s !important; 
}

@media (max-width: 768px) {
    .marca-catalogo {
        margin-top: 30px;
        margin-bottom: 0px;
        padding-bottom: 0px;
    }

    .marca-header {
        gap: 10px;
    }

    .marca-logo {
        height: 50px;
    }

    .marca-titulo {
        font-size: 1.2rem;
    }

    .marca-separador {
        margin-bottom: 0px;
        padding-bottom: 0px;
    }
}

@media (max-width: 768px) {
    .vitrina {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }

    .vitrina-texto {
        margin-bottom: -40px;
    }

    .vitrina-name {
        font-size: 0.8rem;
        color: #333;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .vitrina-item {
        background-color: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
        padding: 10px 10px 5px 10px;
        cursor: pointer;
    }

    .vitrina-item:hover {
        transform: scale(1.04);
        box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.3);
    }   

    .vitrina-subname {
        display: none;
    }

    .vitrina-image {
        width: 100%;
        height: auto; 
        object-fit: cover;
        border-bottom: 2px solid #f0f0f0;
    }

    .vitrina-image-2:hover {
        display: none;
    }
}

@media (max-width: 480px) {
    .vitrina {
        grid-template-columns: repeat(2, 1fr); 
        gap: 10px;
    }

    .vitrina-texto {
        margin-bottom: -40px;
    }

    .vitrina-name {
        font-size: 0.8rem;
        color: #333;
        margin-top: 10px;
        margin-bottom: 5px;
    }

    .vitrina-item {
        background-color: #fff;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        text-align: center;
        padding: 10px 10px 5px 10px;
        cursor: pointer;
    }

    .vitrina-item:hover {
        transform: scale(1.04);
        box-shadow: 0 -12px 24px rgba(0, 0, 0, 0.15), 0 12px 24px rgba(0, 0, 0, 0.3);
    }   

    .vitrina-subname {
        display: none;
    }

    .vitrina-image {
        width: 100%;
        height: auto; 
        object-fit: cover;
        border-bottom: 2px solid #f0f0f0;
    }

    .vitrina-image-2:hover {
        display: none;
    }
}

/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

.testimonial-carousel .owl-nav {
    position: absolute;
    width: 350px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: space-between;
    opacity: 0;
    transition: .5s;
    z-index: 1;
}

.testimonial-carousel:hover .owl-nav {
    width: 300px;
    opacity: 1;
}

.testimonial-carousel .owl-nav .owl-prev,
.testimonial-carousel .owl-nav .owl-next {
    position: relative;
    color: var(--primary);
    font-size: 45px;
    transition: .5s;
}

.testimonial-carousel .owl-nav .owl-prev:hover,
.testimonial-carousel .owl-nav .owl-next:hover {
    color: var(--dark);
}

.testimonial-carousel .testimonial-img img {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .testimonial-img .btn-square {
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
}

.testimonial-carousel .owl-item .testimonial-text {
    margin-bottom: 30px;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
    transform: scale(.8);
    transition: .5s;
}

.testimonial-carousel .owl-item.center .testimonial-text {
    transform: scale(1);
}

.testimonial-contenedor {
    margin-bottom: -70px;
}

.testimonial-faster-anim {
        animation-duration: 0.5s !important; 
    }

/*** Footer ***/
.footer {
    color: #B0B9AE;
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 5px;
    padding: 0;
    text-align: left;
    color: #B0B9AE;
    font-weight: normal;
    text-transform: capitalize;
    transition: .3s;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 10px;
}

.footer .btn.btn-link:hover {
    color: var(--light);
    letter-spacing: 1px;
    box-shadow: none;
}

.copyright {
    color: #B0B9AE;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

/*** Productos ***/

@media (max-width: 575.98px) {
  .wa1 .pipol {
    position: relative;
    top: 20px;
    font-size: 19px !important;
    line-height: 1 !important;
    display: inline-block;
    vertical-align: middle;
  }

  .wa1 .logo-share {
    position: relative;
    top: 20px;
    font-size: 1rem !important;
    margin-right: 6px !important;
    display: inline-block;
    vertical-align: middle;
  }
}

@media (max-width: 420px) {
  .wa1 .pipol {
    position: relative;
    top: 20px;
    font-size: 19px !important;
    line-height: 1 !important;
    display: inline-block;
    vertical-align: middle;
  }

  .wa1 .logo-share {
    position: relative;
    top: 20px;
    font-size: 1rem !important;
    margin-right: 6px !important;
    display: inline-block;
    vertical-align: middle;
  }
}

@media (max-width: 370px) {
  .wa1 {
    margin-right: 10px !important;
    padding: 5px 6px !important;
    font-size: 14px !important;
    max-width: calc(100% - 20px) !important;
  }

  .wa1 .pipol {
    position: relative;
    top: 14px;
    font-size: 14px !important;
    line-height: 1 !important;
  }

  .wa1 .logo-share {
    position: relative;
    top: 14px;
    font-size: 0.9rem !important;
    margin-right: 5px !important;
  }
}

/* Solo para móviles (≤576px) */
@media (max-width: 575.98px) {
    .shift-right-sm {
        margin-left: 13px; /* ajusta la distancia */
    }

    .shift-right-sm-2 {
        margin-left: 8px; /* ajusta la distancia */
    }
}

/* opcional: ayuda al navegador a optimizar la animación */
.card {
  will-change: opacity, transform!important;
}

#wishlist-btn i {
  color: gray;
  transition: color 0.3s ease, transform 0.2s ease;
}

#wishlist-btn.activo i {
  color: red;
  transform: scale(1.2); /* pequeño pop */
}

#wishlist-btn:focus,
.add-to-cart:focus,
#share-btn:focus {
  outline: none !important;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2); /* sombra inferior difusa */
}

/* Toast pequeño en la parte inferior (emerge y se desvanece) */
.add-feedback-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  bottom: 24px;
  background: rgba(0, 0, 0, 0.86);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 0.95rem;
  z-index: 2050;
  opacity: 0;
  pointer-events: none;
  transition: transform .32s cubic-bezier(.2,.9,.3,1), opacity .32s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
  max-width: 92%;
  text-align: center;
}

.add-feedback-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/*** Carrito ***/

.cart-item {
  overflow: hidden;
  transition: opacity 350ms ease, max-height 350ms ease, margin 350ms ease, padding 350ms ease;
}

.cart-item.removing {
  opacity: 0;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.empty-cart {
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  text-align: center;
  transition: opacity 400ms ease, max-height 400ms ease, padding 400ms ease, margin 400ms ease;
  color: #666;
  font-weight: 500;
  font-size: 1rem;
}

.empty-cart.visible {
  opacity: 1;
  max-height: 120px;     
  padding: 1.25rem 0;    
  margin: 0.5rem 0;      
}

.cart-item .card { width: 100%; box-sizing: border-box; }
.cart-item img { display: block; } 

.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220,53,69,.15) !important;
}
.form-message { margin-bottom: .75rem; }

.cart-empty-message-inline { 
  z-index: 1055; 
  border-left-width: 4px;
}

/* resaltado temporal del contador del carrito */
.badge-highlight-temp {
  animation: badge-pulse 1s ease;
}
@keyframes badge-pulse {
  0% { transform: scale(1); box-shadow: none; }
  50% { transform: scale(1.15); box-shadow: 0 0 0.5rem rgba(255,193,7,0.35); }
  100% { transform: scale(1); box-shadow: none; }
}

/* variables opcionales */
:root {
  --cart-title-lines: 3;        /* <- ahora 3 líneas */
  --cart-sub-lines: 1;
  --cart-line-height: 1.15;     /* puede ajustarse */
  --cart-min-font-size: 12px;
}

/* Layout: imagen columna fija, contenido flexible */
.cart-item .card .row {
  align-items: stretch;
}

/* Imagen: tamaño fijo para mantener consistencia */
.cart-item img {
  width: 125px;
  height: 125px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Contenido: usar flex column para alinear elementos */
.cart-item .col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ---------- TITULO (máx. 3 líneas con fallback) ---------- */
.cart-item h5 {
  display: -webkit-box;               /* necesario para -webkit-line-clamp */
  -webkit-box-orient: vertical;       /* necesario para -webkit-line-clamp */

  /* TRUNCATE: prefijo + estándar */
  -webkit-line-clamp: 3;
  line-clamp: 3;

  overflow: hidden;
  text-overflow: ellipsis;

  /* Fallback para navegadores que no soporten line-clamp:
     limitamos la altura en base a line-height * líneas */
  line-height: var(--cart-line-height);
  max-height: calc(var(--cart-line-height) * 3em); /* ahora 3 líneas */
  margin-bottom: 0.35rem;
  font-weight: 600;
}

/* ---------- SUBTEXTO (1 línea) ---------- */
.cart-item p.text-muted.small {
  display: -webkit-box;
  -webkit-box-orient: vertical;

  -webkit-line-clamp: 1;
  line-clamp: 1;

  overflow: hidden;
  text-overflow: ellipsis;

  line-height: 1.1;
  max-height: calc(1.1 * 1em);
}

/* Botones / acciones a la derecha alineados al centro-vertical */
.cart-item .col-auto.text-end {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
}

/* Opcional: fuerza una altura mínima para la card */
.cart-item .card {
  min-height: 150px;
}

/*** Boton-Subir ***/

#ir-arriba {
  position: fixed;
  bottom: 37.5px;
  right: 25px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#ir-arriba.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/*** Boton-WhatsApp ***/

#whatsapp-btn {
  position: fixed;
  bottom: 37.5px;
  left: 25px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/*** Boton-WhatsApp ***/

#whatsapp-btn.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/*** Responsive adicionales ***/

@media (max-width: 420px) {
  .navbar .navbar-collapse {
    margin-top: 0 !important;
  }
  .navbar .navbar-nav {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

@media (max-width: 370px) {
  .navbar .navbar-brand img {
    height: 36px !important;
    max-height: 36px !important;
  }
  .navbar .navbar-brand h1 {
    font-size: 1.5rem !important;
  }
}

.ficha-card {
  opacity: 1 !important;
  animation: none !important;
  transition: none !important;
  will-change: auto;
}

.ficha-card .card {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: 1rem;
}

.ficha-card .card:hover {
  transform: none;
  box-shadow: none;
}

.ficha-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0;
  min-height: 48px;
}

.ficha-card > .card > .mx-3,
.ficha-card .download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ficha-card .download-btn {
  padding: .28rem .5rem;
  font-size: .86rem;
}

.ficha-card .card-title {
  line-height: 1.12;
  margin-bottom: .12rem;
}

@media (max-width: 576px) {
  .ficha-card .card {
    flex-direction: column;
    align-items: stretch;
  }

  .ficha-card .download-btn {
    width: 100%;
    margin-top: .5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  .ficha-card {
    opacity: 1 !important;
  }
}
