
/* ==========================================
   COMBOS EKSEL
   CARRITO DE COMPRAS PROFESIONAL
========================================== */

.carrito-pagina {
    padding-top: 40px;
    padding-bottom: 75px;
}

/* ==========================================
   ENCABEZADO DEL CARRITO
========================================== */

.carrito-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 32px;
}

.carrito-subtitulo {
    display: block;
    margin-bottom: 10px;
    color: #e52b39;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
}

.carrito-titulo {
    margin: 0 0 10px;
    color: #073b83;
    font-size: clamp(27px, 3.5vw, 38px);
    font-weight: 900;
    line-height: 1.2;
}

.carrito-descripcion {
    margin: 0;
    color: #64748b;
    font-size: 15px;
    line-height: 1.7;
}

.carrito-enlace-volver {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    color: #073b83;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.2s ease;
}

.carrito-enlace-volver:hover {
    background: #eff6ff;
    border-color: #073b83;
}

/* ==========================================
   DISTRIBUCIÓN PRINCIPAL
========================================== */

.carrito-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    align-items: start;
    gap: 25px;
}

.carrito-lista {
    min-width: 0;
    padding: 25px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(7, 59, 131, 0.06);
}

.carrito-lista-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid #e2e8f0;
}

.carrito-lista-encabezado h2 {
    margin: 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

.carrito-contador-productos {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    background: #eaf2ff;
    border-radius: 20px;
    color: #073b83;
    font-size: 12px;
    font-weight: 800;
}

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

.carrito-producto {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr) 125px;
    align-items: start;
    gap: 20px;
    padding: 25px 0;
    border-bottom: 1px solid #e2e8f0;
}

.carrito-producto:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.carrito-foto {
    width: 125px;
    height: 125px;
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.carrito-foto a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.carrito-foto img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 8px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.carrito-foto a:hover img {
    transform: scale(1.06);
}

.carrito-sin-foto {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #94a3b8;
    font-size: 52px;
}

/* ==========================================
   INFORMACIÓN DEL PRODUCTO
========================================== */

.carrito-datos {
    min-width: 0;
}

.carrito-categoria {
    display: inline-block;
    margin-bottom: 9px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.carrito-datos h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.carrito-nombre-enlace {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.carrito-nombre-enlace:hover {
    color: #e52b39;
}

.carrito-precio-unitario {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.carrito-precio-unitario strong {
    color: #073b83;
    font-size: 15px;
    font-weight: 900;
}

/* ==========================================
   ACTUALIZAR CANTIDAD
========================================== */

.cantidad-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.cantidad-form label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.cantidad-form input[type="number"] {
    width: 72px;
    height: 40px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.cantidad-form input[type="number"]:focus {
    outline: 2px solid #93c5fd;
    outline-offset: 2px;
}

.boton-actualizar-cantidad {
    min-height: 40px;
    padding: 9px 14px;
    background: #073b83;
    border: none;
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boton-actualizar-cantidad:hover {
    background: #e52b39;
}

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

.carrito-form-eliminar {
    margin: 0;
}

.boton-eliminar {
    padding: 8px 0;
    background: transparent;
    border: none;
    color: #dc2626;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: color 0.2s ease;
}

.boton-eliminar:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* ==========================================
   SUBTOTAL POR PRODUCTO
========================================== */

.carrito-subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-align: right;
}

.carrito-subtotal span {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.carrito-subtotal strong {
    color: #073b83;
    font-size: 21px;
    font-weight: 900;
    white-space: nowrap;
}

.carrito-subtotal small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

/* ==========================================
   RESUMEN DE COMPRA
========================================== */

.resumen-compra {
    position: sticky;
    top: 25px;
    padding: 27px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(7, 59, 131, 0.08);
}

.resumen-encabezado {
    padding-bottom: 23px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.resumen-encabezado > span {
    display: block;
    margin-bottom: 8px;
    color: #e52b39;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.3px;
}

.resumen-encabezado h2 {
    margin: 0 0 8px;
    color: #073b83;
    font-size: 24px;
    font-weight: 900;
}

.resumen-encabezado p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.resumen-linea {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 17px;
    color: #475569;
    font-size: 13px;
}

.resumen-linea strong {
    color: #0f172a;
    font-weight: 900;
    text-align: right;
}

.resumen-linea.total {
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

.resumen-linea.total span {
    color: #0f172a;
    font-size: 15px;
    font-weight: 900;
}

.resumen-linea.total strong {
    color: #073b83;
    font-size: 20px;
    font-weight: 900;
}

/* ==========================================
   INFORMACIÓN DE ENTREGA
========================================== */

.resumen-informacion-entrega {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 23px 0;
    padding: 14px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 10px;
}

.resumen-informacion-entrega > span {
    flex-shrink: 0;
    font-size: 20px;
}

.nota-envio {
    margin: 0;
    color: #475569;
    font-size: 12px;
    line-height: 1.65;
}

/* ==========================================
   CONTINUAR CON EL PEDIDO
========================================== */

.boton-finalizar,
.enlace-finalizar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    padding: 13px 15px;
    background: #073b83;
    border: none;
    border-radius: 10px;
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boton-finalizar:hover,
.enlace-finalizar:hover {
    background: #e52b39;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 7px 18px rgba(229, 43, 57, 0.18);
}

/* ==========================================
   SEGUIR COMPRANDO
========================================== */

.seguir-comprando {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    color: #073b83;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.seguir-comprando:hover {
    background: #eaf2ff;
    border-color: #bfdbfe;
}

/* ==========================================
   VACIAR CARRITO
========================================== */

.formulario-vaciar-carrito {
    margin-top: 18px;
    text-align: center;
}

.vaciar-carrito {
    padding: 9px 12px;
    background: transparent;
    border: none;
    color: #dc2626;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.vaciar-carrito:hover {
    color: #991b1b;
    text-decoration: underline;
}

/* ==========================================
   MENSAJES DE CONFIANZA
========================================== */

.carrito-confianza {
    display: grid;
    gap: 10px;
    margin-top: 23px;
    padding-top: 22px;
    border-top: 1px solid #e2e8f0;
}

.carrito-confianza p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.5;
}

/* ==========================================
   CARRITO VACÍO
========================================== */

.carrito-vacio {
    max-width: 650px;
    margin: 20px auto;
    padding: 65px 35px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(7, 59, 131, 0.06);
    text-align: center;
}

.carrito-vacio-icono {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 95px;
    height: 95px;
    margin: 0 auto 25px;
    background: #eaf2ff;
    border-radius: 50%;
    font-size: 48px;
}

.carrito-vacio h2 {
    margin: 0 0 13px;
    color: #073b83;
    font-size: 27px;
    font-weight: 900;
}

.carrito-vacio p {
    max-width: 440px;
    margin: 0 auto 26px;
    color: #64748b;
    font-size: 15px;
    line-height: 1.8;
}

.carrito-vacio .boton-rojo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 24px;
    text-decoration: none;
}

/* ==========================================
   TABLETS Y PANTALLAS MEDIANAS
========================================== */

@media (max-width: 1100px) {

    .carrito-layout {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 18px;
    }

    .carrito-lista {
        padding: 20px;
    }

    .carrito-producto {
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 16px;
    }

    .carrito-foto {
        width: 100px;
        height: 100px;
    }

    .carrito-subtotal {
        grid-column: 2;
        align-items: flex-start;
        text-align: left;
        margin-top: -4px;
    }
}

@media (max-width: 850px) {

    .carrito-layout {
        grid-template-columns: 1fr;
    }

    .resumen-compra {
        position: static;
    }

    .carrito-producto {
        grid-template-columns: 125px minmax(0, 1fr) 125px;
    }

    .carrito-foto {
        width: 125px;
        height: 125px;
    }

    .carrito-subtotal {
        grid-column: auto;
        align-items: flex-end;
        text-align: right;
        margin-top: 0;
    }
}

/* ==========================================
   CELULARES
========================================== */

@media (max-width: 600px) {

    .carrito-pagina {
        padding-top: 25px;
        padding-bottom: 45px;
    }

    .carrito-encabezado {
        margin-bottom: 23px;
    }

    .carrito-titulo {
        font-size: 27px;
    }

    .carrito-descripcion {
        font-size: 13px;
    }

    .carrito-enlace-volver {
        width: 100%;
    }

    .carrito-lista {
        padding: 17px;
        border-radius: 13px;
    }

    .carrito-lista-encabezado h2 {
        font-size: 17px;
    }

    .carrito-producto {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 13px;
        padding: 22px 0;
    }

    .carrito-foto {
        width: 90px;
        height: 90px;
    }

    .carrito-datos h3 {
        font-size: 15px;
    }

    .carrito-precio-unitario {
        font-size: 12px;
    }

    .cantidad-form {
        gap: 8px;
    }

    .cantidad-form label {
        width: 100%;
    }

    .carrito-subtotal {
        grid-column: 2;
        align-items: flex-start;
        text-align: left;
        margin-top: 0;
    }

    .carrito-subtotal strong {
        font-size: 19px;
    }

    .resumen-compra {
        padding: 23px 19px;
        border-radius: 13px;
    }

    .carrito-vacio {
        padding: 45px 22px;
    }

    .carrito-vacio h2 {
        font-size: 23px;
    }
}

@media (max-width: 380px) {

    .carrito-producto {
        grid-template-columns: 1fr;
    }

    .carrito-foto {
        width: 115px;
        height: 115px;
    }

    .carrito-subtotal {
        grid-column: 1;
    }

    .cantidad-form input[type="number"] {
        width: 65px;
    }
}

/* ==========================================
   ACCESIBILIDAD
========================================== */

.carrito-enlace-volver:focus-visible,
.carrito-nombre-enlace:focus-visible,
.boton-actualizar-cantidad:focus-visible,
.boton-eliminar:focus-visible,
.boton-finalizar:focus-visible,
.seguir-comprando:focus-visible,
.vaciar-carrito:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {

    .carrito-foto img,
    .carrito-enlace-volver,
    .boton-actualizar-cantidad,
    .boton-finalizar,
    .seguir-comprando {
        transition: none;
    }
}
