@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@300&display=swap");
@import url("https://fonts.googleapis.com/css?family=Caveat|Lato:400,700|Patua+One&display=swap");

html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    font-family: poppins, "Helvetica Neue";
    background-color: #f6f2ed;
    box-sizing: border-box;
}

main {
    flex: 1;
}
.container2-carro, .container3-carro, .listadoCompras {
    width: 100%;
    overflow: hidden;
}
.tituloCarro{
    display: block;
    flex-direction: row;
    justify-content: space-around;
    box-sizing: border-box;
    background-color: #23305B;
    color: white;
    margin: 12px;
    margin-left: 15px;
    margin-right: 15px;
    padding: 15px;
    padding-left: 70px;
    padding-right: 70px;
}

.tituloCarro h2 {
    text-align: center;
}

.container1-carro{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    box-sizing: border-box;
}

.container1-carro button{
    background-color: #E1A5CA;
    color: #23305B;
    padding: 10px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.detalle-compras{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    box-sizing: border-box;
}
.listadoCompras1 {
    /*height: 100%;*/
    display: flex;
    flex-direction: column;
    /*justify-content: center;*/
    align-items: flex-start;
    padding: 20px;
    width: 100%;
}

.listadoCompras {
    border-bottom: 1px solid #ddd;
}

.row-listado {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.listadoCompras {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #ddd;

overflow: hidden;
}
.rowProduct {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    margin: 15px;
}

/*.listadoCompras, tbody, tr{
    border-bottom: 1px solid #23305B;
}*/
.alert-alert-info{
    margin-top: 8px;
      text-align:center;
}
.container2-carro{
    
  flex: 1;
  width: 75%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
}


.product {
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    margin-left: 20px;
    margin-right: 20px;
}  
.product-name {
     width: 250px;
}
.product-subtotal{
    width: 180px;
}

/*.product-remove{
    width: 120px;
}*/

.product-remove {
    display: flex;
        width: 100%;
    justify-content: center;
    align-items: center;
}

.btn-eliminar {
    margin: 0;
}

.product-remove form {
    display: flex;
    justify-content: center;
    align-items: center;
}

 /*.product img{
    max-width: 150px; /* Tamaño máximo deseado para las imágenes 
    max-height: 150px; /* Tamaño máximo deseado para las imágenes 
    width: auto; /* Para mantener la proporción de la imagen 
    height: auto; /* Para mantener la proporción de la imagen 
 }*/

 .product img {
    width: 100%;
 
}


.descripcion{
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px
}

.container3-carro{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 25%;
    height: 30%;
    font-size: 1em;
    padding: 20px;
    margin: 15px;
    margin-top: 35px;
    background-color: #77abb689;
    border-radius: 5px;

    gap: 20px;
    box-sizing: border-box;
}

.casillas-carro {
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}
.casillas-carro h3 {
    margin: 0;
}

#ciudad {
    width: 65%
}
#costoEnvio, #total {
    word-wrap: break-word;
}


.container3-carro button{
    width: 100%;
    background-color: #E1A5CA;
    color: #23305B;
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    align-content: center;   
}

.btn {
    display: inline-block;
    padding: 5px 10px;
    margin-top: 3px;
    background-color: #23305B; /* o el color que prefieras */
    color: white;
    text-decoration: none; /* quita el subrayado */
    border-radius: 5px; /* opcional, da un borde redondeado */
    text-align: center;
}
.btn:hover {
    background-color: #0056b3; /* cambio de color al pasar el ratón */
}

.btn-eliminar {
    display: inline-block;
    padding: 4px;
    background-color: #00A4BD; /* o el color que prefieras */
    color: white;
    text-decoration: none; /* quita el subrayado */
    border: none;
    border-radius: 5px; /* opcional, da un borde redondeado */
    text-align: center;
    cursor: pointer;
}


.datos-envio{
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 20px;
    margin-bottom: 23.5px;
    box-sizing: border-box;
}

.alert-alert-info {
    flex: 1;
    text-align: right;
    font-size: 14px;
    font-weight: bold;
    color: blueviolet;
    white-space: nowrap;
}
/*------------------------------------paymentDetails--------------------------------------*/
.container1-payment {
    width: 80%;
    padding: 10px;
    margin-left: 15px;
    margin-right: 15px;
    background-color: white;
    border-style: solid;
    border-width: 1px 1px 3px 1px;
    border-color: #DDDDDD;
    border-radius: 5px 5px 5px 5px;
}

.facturacion-titulo h3{
    text-align: center;
}
.center-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 10px;
    box-sizing: border-box;
    border: solid 1px color #0056b3;
}

.row-payment {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.row-payment input {
    width: 80%;
    padding: 12px 5px 12px 5px;
    border-color: #DDDDDD;
    border-radius: 5px 5px 5px 5px;
}

.row-payment-dir {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    width: 100%; /* Ajusta según sea necesario */
    /* height: 100vh; Para centrar verticalmente en toda la ventana */
    box-sizing: border-box;
}

.row-payment-dir input {
    width: 100%; /* Cambia a 100% para evitar desbordamiento */
            padding: 12px 5px;
            border-color: #DDDDDD;
            border-radius: 5px;
            box-sizing: border-box; /* Asegura que el padding y border se incluyan en el ancho */
}

.row-payment-document {
    display: flex;
    flex-direction:row;
    flex-wrap: nowrap;
    justify-content: space-around;
    text-align: center;
    width: 100%; /* Ajusta según sea necesario */
    /* height: 100vh; Para centrar verticalmente en toda la ventana */
    box-sizing: border-box;
    gap: 5px
}
.container3-payment {
    width: 50%;
    height: 50%;
    padding: 10px;
    margin: 15px;
    margin-top: 20px;
    background-color: #77abb689;
    border-radius: 5px;
}

.container3-payment button{
    width: 100%;
    background-color: #E1A5CA;
    color: #23305B;
    margin-top: 15px;
    padding: 10px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    align-content: center;   
}

.botones h4{
    text-align: center;
}
.botones {
    display: flex;
    flex-direction: column; /* Cambia a row si prefieres los botones en fila */
    align-items: center;
    justify-content: center;
    text-align: center;
    
     /* Ajusta según sea necesario */
}

.botones .editar {
    margin-top: 5px; /* Espacio entre los botones */
   margin-bottom: 15px;
    background-color: #77acb6; /* Ajusta el color según sea necesario */
    border: none;
    color: black;
    cursor: pointer;
    border-radius: 5px 5px 5px 5px;
}

.botones .editar a {
    text-decoration: none;
    color: white;
}

.botones .editar:hover {
    background-color: #0056b3; /* Ajusta el color hover según sea necesario */
}

/*------------------------------------media Queries--------------------*/

@media (max-width: 480px){
    .listadoCompras {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 10px;
        gap: 10px;
        width:100%
    }

    .container2-carro, .container3-carro {
        width: 90%;
        margin: 10px;
        padding: 10px;
    }

     .product {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-top: 10px;
    padding-bottom: 10px;
}

 .product img {
        width: 100%;

    }



    .tituloCarro {
        padding: 10px;
        margin: 10px;
    }

    .container1-carro button {
        padding: 8px;
        font-size: 13px;
    }
    .container3-carro {
        width: 90%;
        margin: 10px;
        padding: 10px;
    }
    .descripcion {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }
    .rowProduct {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/*******************PROMOCIONES CARRO***********************/

.promocion-carrito {
        padding: 10px;
    }

    .promocion-carrito-contenido h3 {
        font-size: 0.95rem;
    }

    .cupon-form {
        gap: 7px;
    }

    .cupon-form input {
        font-size: 13px;
        padding: 9px;
    }

    .cupon-form button {
        padding: 9px 12px;
        font-size: 13px;
    }

    .promocion-incentivo {
        font-size: 13px;
        padding: 9px 10px;
    }
}

@media (max-width: 769px)  {
    .detalle-compras {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        box-sizing: border-box;
    }

    .container2-carro {
        width: 80%;
        box-sizing: border-box;
        align-items: flex-start; 
    }
    .container3-carro {
        min-width: 60%;
        height: 30%;
        padding: 20px;
        margin: 15px;
        margin-top: 35px;
        background-color: #77abb689;
        border-radius: 5px;
        align-self: center;
        box-sizing: border-box;
    }

    .listadoCompras {
      
    display: flex;
    flex-direction: column; /* 👈 clave */
    align-items: flex-start; /* 👈 clave */
    justify-content: flex-start;
    width: 100%;

    }

}

/* ========================================================================================
                                      PRODUCTOS RELACIONADOS
========================================================================================== */

.productos-relacionados {

    width: 100%;

    max-width: 1200px;

    margin: 55px auto 35px;

    padding: 0 25px;

    box-sizing: border-box;

}


/* ---------------------------------------------------------
   ENCABEZADO
--------------------------------------------------------- */

.productos-relacionados-header {

    text-align: center;

    margin-bottom: 30px;

}

.productos-relacionados-header h2 {

    margin: 0;

    font-family: "Patua One",
        Georgia,
        "Times New Roman",
        Times,
        serif;

    font-size: 1.8rem;

    color: #61234a;

}

.productos-relacionados-header p {

    margin: 8px 0 0;

    font-size: 0.95rem;

    color: #777;

}


/* ---------------------------------------------------------
   CARRUSEL
--------------------------------------------------------- */

.relacionados-carrusel {

    position: relative;

    display: flex;

    align-items: center;

    gap: 12px;

}


/* ---------------------------------------------------------
   CONTENEDOR DE TARJETAS
--------------------------------------------------------- */

.relacionados-track {

    display: flex;

    gap: 22px;

    width: 100%;

    overflow-x: auto;

    scroll-behavior: smooth;

    scrollbar-width: none;

    padding: 10px 5px 20px;

}

.relacionados-track::-webkit-scrollbar {

    display: none;

}


/* ---------------------------------------------------------
   TARJETA
--------------------------------------------------------- */

.producto-relacionado {

    flex: 0 0 220px;

    background: #fff;

    border-radius: 16px;

    padding: 12px;

    box-sizing: border-box;

    box-shadow:
        0 5px 18px rgba(97, 35, 74, 0.12);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;

}

.producto-relacionado:hover {

    transform: translateY(-6px);

    box-shadow:
        0 10px 25px rgba(97, 35, 74, 0.20);

}


/* ---------------------------------------------------------
   IMAGEN
--------------------------------------------------------- */

.producto-relacionado-imagen {

    display: block;

    width: 100%;

    text-decoration: none;

}

.producto-relacionado-imagen img {

    display: block;

    width: 100%;

    aspect-ratio: 1 / 1;

    object-fit: cover;

    border-radius: 12px;

}


/* ---------------------------------------------------------
   INFORMACIÓN
--------------------------------------------------------- */

.producto-relacionado-info {

    text-align: center;

    padding: 10px 5px 5px;

}

.producto-relacionado-info h3 {

    margin: 5px 0 8px;

    color: #61234a;

    font-family: "Patua One",
        Georgia,
        "Times New Roman",
        Times,
        serif;

    font-size: 1rem;

    line-height: 1.3;

}


/* ---------------------------------------------------------
   PRECIO
--------------------------------------------------------- */

.producto-relacionado-precio {

    margin: 0 0 12px;

    color: #1f7a3d;

    font-size: 1rem;

    font-weight: 700;

}

.producto-relacionado-simbolo {

    margin: 0 0 8px;

    color: #777;

    font-size: 0.85rem;

    min-height: 18px;

}
/* ---------------------------------------------------------
   BOTÓN
--------------------------------------------------------- */

.producto-relacionado-btn {

    display: inline-block;

    padding: 8px 14px;

    border-radius: 8px;

    background: #77AAB6;

    color: white;

    text-decoration: none;

    font-size: 0.85rem;

    font-weight: 600;

    transition:
        background-color 0.3s ease,
        transform 0.2s ease;

}

.producto-relacionado-btn:hover {

    background: #23305B;

    transform: translateY(-2px);

}


/* ---------------------------------------------------------
   FLECHAS
--------------------------------------------------------- */

.relacionados-prev,
.relacionados-next {

    flex-shrink: 0;

    width: 38px;

    height: 38px;

    border: none;

    border-radius: 50%;

    background: white;

    color: #23305b;

    font-size: 18px;

    font-weight: bold;

    cursor: pointer;

    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.15);

    z-index: 2;

    transition:
        background-color 0.3s ease,
        color 0.3s ease,
        transform 0.2s ease;

}

.relacionados-prev:hover,
.relacionados-next:hover {

    background: #23305b;

    color: white;

    transform: scale(1.05);

}

@media (max-width: 769px) {

    /* =====================================
       CONTENEDOR GENERAL
    ===================================== */

    .detalle-compras {
        width: 100%;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        box-sizing: border-box;
    }


    /* =====================================
       COLUMNA IZQUIERDA
       PRODUCTOS DEL CARRITO
    ===================================== */

    .container2-carro {
        width: calc(100% - 30px);
        max-width: none;
        min-width: 0;
        flex: none;

        margin: 0 auto;
        padding: 0;

        box-sizing: border-box;
    }


    .listadoCompras1 {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }


    /* =====================================
       PRODUCTOS DEL CARRITO
    ===================================== */

        .row-listado {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }


    .listadoCompras {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }


    .rowProduct {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px 10px;
        box-sizing: border-box;
    }


    .product {
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        box-sizing: border-box;
    }

    .product-name {
        margin: 0;
        padding: 0;
    }


    .product-name h4 {
        margin: 5px 8px;
    }


    .product-subtotal {
        margin: 0;
        padding: 0;
    }


   


    .product-remove {
        margin: 0;
        padding: 0;
    }


    .product-remove form {
        margin: 0;
    }

    .product img {
        width: 100%;
    }


    /* =====================================
       PRODUCTOS RELACIONADOS
    ===================================== */

    .productos-relacionados {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        margin: 30px 0 20px;
        padding: 0;

        box-sizing: border-box;

        overflow: hidden;
    }


    .productos-relacionados-header {
        width: 100%;
        text-align: center;

        padding: 0 10px;

        box-sizing: border-box;
    }


    .productos-relacionados-header h2 {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }


    .productos-relacionados-header p {
        font-size: 0.95rem;
        line-height: 1.4;

        margin-bottom: 20px;
    }


    .relacionados-carrusel {
        position: relative;

        width: 100%;
        max-width: 100%;

        display: flex;
        align-items: center;

        box-sizing: border-box;
    }


    .relacionados-track {
        width: 100%;
        max-width: 100%;

        display: flex;

        overflow-x: auto;

        scroll-snap-type: x mandatory;

        gap: 15px;

        padding: 10px 35px;

        box-sizing: border-box;

        scrollbar-width: none;
    }


    .relacionados-track::-webkit-scrollbar {
        display: none;
    }


    .producto-relacionado {
        flex: 0 0 100%;
        max-width: 100%;

        box-sizing: border-box;

        scroll-snap-align: center;
    }


    .relacionados-prev,
    .relacionados-next {
        position: absolute;
        z-index: 5;

        top: 50%;

        transform: translateY(-50%);
    }


    .relacionados-prev {
        left: 0;
    }


    .relacionados-next {
        right: 0;
    }


    /* =====================================
       COLUMNA DERECHA
       RESUMEN DE COMPRA
    ===================================== */

    .container3-carro {
        width: calc(100% - 30px);
        max-width: none;
        min-width: 0;

        height: auto;
        min-height: 0;

        margin: 25px auto 20px;

        padding: 20px 15px;

        box-sizing: border-box;

        flex: none;

        /* IMPORTANTE */
    align-self: center;
    justify-content: flex-start;
    }

}

/* =========================================================
   PRODUCTOS RELACIONADOS - CELULAR
========================================================= */

@media (max-width: 480px) {

    .productos-relacionados {
        padding: 0 10px;
        margin-top: 35px;
    }

    .productos-relacionados-header {
        margin-bottom: 20px;
    }

    .productos-relacionados-header h2 {
        font-size: 1.25rem;
    }

    .productos-relacionados-header p {
        font-size: 0.8rem;
    }

    .relacionados-track {
        gap: 12px;
        padding: 10px 3px 20px;
    }

    .producto-relacionado {
        flex: 0 0 145px;
        max-width: 145px;
        padding: 8px;
        border-radius: 12px;
    }

    .producto-relacionado-info h3 {
        font-size: 0.82rem;
    }

    .producto-relacionado-precio {
        font-size: 0.82rem;
    }

    .producto-relacionado-btn {
        font-size: 0.75rem;
        padding: 6px 9px;
    }

    .relacionados-prev,
    .relacionados-next {
        width: 28px;
        height: 28px;
        font-size: 13px;
    }
}

/* =====================================
   MENSAJES ERROR VALIDACION CIUDAD
    ===================================== */

.mensaje-error {
    display: block;
    min-height: 18px;
    margin-top: 4px;
    color: #d62828;
    font-size: 0.85rem;
    font-weight: 500;
}

.input-error {
    border: 1px solid #d62828 !important;
    outline: none;
}

/* =========================================================
   CARRITO - LISTADO COMPACTO SOLO EN CELULAR
   ========================================================= */

@media (max-width: 480px) {

        .rowProduct {
        display: grid;
        grid-template-columns: 55px minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        row-gap: 4px;
        width: 100%;
        margin-top: 8px;
        padding: 25px 8px;
        box-sizing: border-box;
        border-bottom: 1px solid #ddd;
    }

.btn {
    display: inline-block;
    padding: 3px 3px;
    margin-top: 4px;
    margin-bottom: 4px;
    background-color: #23305B;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 9px;
    text-align: center;
    }
    /* ==========================================
       FOTO
       ========================================== */

    .rowProduct .product {

        width: 55px;
        height: 55px;

        margin: 0;

        grid-column: 1;
        grid-row: 1 / span 2;

        display: flex;

        align-items: center;
        justify-content: center;
    }


    .rowProduct .product img {

        width: 60px;
        height: 70px;

        object-fit: cover;

        border-radius: 6px;
    }


    /* ==========================================
       NOMBRE
       ========================================== */

    .rowProduct .product-name {

        grid-column: 2;
        grid-row: 1;

        width: auto;

        min-width: 0;

        margin: 0;

        text-align: left;
    }


    .rowProduct .product-name h4 {

        margin: 0;

        font-size: 0.88rem;

        line-height: 1.3;

        color: #23305B;
    }


    /* ==========================================
       PRECIO
       ========================================== */

    .rowProduct .product-subtotal {

        grid-column: 3;
        grid-row: 1;

        width: auto;

        margin: 0;

        text-align: right;

        white-space: nowrap;
    }


    .rowProduct .product-subtotal h4 {

        margin: 0;

        font-size: 0.88rem;

        font-weight: 600;
    }


    /* ==========================================
       ELIMINAR
       ========================================== */

    .rowProduct .product-remove {

        grid-column: 2;
        grid-row: 2;

        width: auto;

        margin: 3px 0 0;

        display: flex;

        justify-content: flex-start;

        align-items: center;
    }


    .rowProduct .product-remove form {

        margin: 0;
    }


    .rowProduct .btn-eliminar {

        font-size: 0.72rem;

        padding: 4px 8px;

        white-space: nowrap;
    }

}

/* =========================================================
   CUPÓN DE DESCUENTO
========================================================= */

.promocion-carrito {
    width: 100%;
    box-sizing: border-box;
}

.promocion-carrito-contenido {
    width: 100%;
}

.promocion-carrito-contenido h3 {
    margin: 0 0 10px;
}

.cupon-form {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.cupon-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 7px;
    font-size: 14px;
    box-sizing: border-box;
}

.cupon-form input:focus {
    outline: none;
    border-color: #77AAB6;
}

.cupon-form button {
    width: auto;
    margin: 0;
    padding: 10px 16px;
    background-color: #23305B;
    color: white;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 14px;
}

.cupon-form button:hover {
    background-color: #61234a;
}

.mensaje-cupon {
    min-height: 20px;
    margin-top: 8px;
    font-size: 13px;
}

/* =========================================================
   INCENTIVO DE PROMOCIÓN
========================================================= */

.promocion-incentivo {
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    box-sizing: border-box;

    color: #1f5c42;
    background-color: #dff3e7;

    border-radius: 8px;

    font-size: 14px;
    line-height: 1.4;

    text-align: center;
}

.promocion-incentivo strong {
    font-weight: 700;
}