/* =====================================================================
   CARRITO DE COMPRAS
   Mismos colores y tipografía que el resto de la tienda (sidebar_cliente.css)
   ===================================================================== */

:root {
    --verde: #2F9E6E;
    --verde-oscuro: #268257;
    --texto: #1F2937;
    --texto-suave: #6B7280;
    --fondo: #F7F8FA;
    --borde: #EDEFF2;
}

body {
    margin: 0;
    padding: 0;
    background: var(--fondo);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: var(--texto);
}

/* ---------- HEADER ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.topbar {
    background: #095d57;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 12px;
}

.navbar {
    padding: 12px 0;
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.03);
}

.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

.navbar-brand img {
    height: 46px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.volver-tienda {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    background: var(--fondo);
    border: 1px solid #E5E7EB;
    color: var(--texto);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.volver-tienda:hover {
    background: #fff;
    border-color: var(--verde);
    color: var(--verde);
}

/* ---------- PÁGINA ---------- */
.carrito-pagina {
    max-width: 1100px;
    margin-top: 32px;
    margin-bottom: 60px;
}

.carrito-encabezado {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.carrito-encabezado h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.carrito-cantidad {
    color: var(--texto-suave);
    font-size: 15px;
}

.panel {
    background: #fff;
    border: 1px solid #F0F1F3;
    border-radius: 20px;
    padding: 8px 24px;
}

/* ---------- PRODUCTO DEL CARRITO ---------- */
.carrito-item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--borde);
}

.carrito-item:last-child {
    border-bottom: none;
}

.img-carrito {
    width: 96px;
    height: 96px;
    object-fit: contain;
    background: #F3F4F6;
    border-radius: 14px;
    padding: 6px;
    margin: 0;
}

.img-vacia {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #C7CBD1;
    font-size: 32px;
}

.car-title {
    font-size: 16.5px;
    font-weight: 600;
    text-align: left;
    margin: 0 0 4px;
}

.car-desciption {
    font-size: 14px;
    color: var(--texto-suave);
    text-align: left;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.car-precio {
    font-size: 14px;
    color: var(--texto-suave);
    text-align: left;
    margin: 0;
}

.carrito-acciones {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Selector de cantidad: [ − 2 + ] */
.cantidad-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.cantidad-box button {
    width: 36px;
    height: 36px;
    border: none;
    background: #fff;
    color: var(--texto);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease;
}

.btn-menos:hover,
.btn-more:hover {
    background: #F3F4F6;
}

.cantidad-valor {
    min-width: 34px;
    text-align: center;
    font-weight: 600;
}

.carrito-subtotal {
    margin: 0;
    min-width: 88px;
    text-align: right;
    font-size: 17px;
    font-weight: 700;
    color: var(--verde);
}

.btn-eliminar {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.btn-eliminar:hover {
    background: #FEE2E2;
    color: #DC2626;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--verde);
    outline-offset: 2px;
}

/* ---------- CARRITO VACÍO ---------- */
.carrito-vacio {
    text-align: center;
    padding: 64px 20px;
    color: var(--texto-suave);
}

.carrito-vacio i {
    font-size: 48px;
    color: #C7CBD1;
    display: block;
    margin-bottom: 12px;
}

.carrito-vacio p {
    margin: 0;
    font-size: 17px;
}

.carrito-vacio a {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 22px;
    border-radius: 12px;
    background: var(--verde);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.carrito-vacio a:hover {
    background: var(--verde-oscuro);
}

/* ---------- RESUMEN ---------- */
.resumen {
    position: sticky;
    top: 110px;
    padding: 24px;
}

.resumen h2 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 16px;
}

.resumen-fila {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: var(--texto-suave);
}

.resumen-fila-total {
    margin-top: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--borde);
    color: var(--texto);
    font-size: 20px;
    font-weight: 700;
}

.btn-confirmar {
    width: 100%;
    margin-top: 18px;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: var(--verde);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}

.btn-confirmar:hover {
    background: var(--verde-oscuro);
}

.btn-confirmar:disabled {
    background: #D1D5DB;
    cursor: not-allowed;
}

.resumen-nota {
    margin: 14px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--texto-suave);
}

.resumen-nota i {
    color: var(--verde);
}

/* ---------- MODAL DE DATOS DEL CLIENTE ---------- */
.modal-content {
    border: none;
    border-radius: 20px;
}

.modal-header {
    border-bottom: 1px solid var(--borde);
    padding: 20px 24px;
}

.modal-title {
    font-size: 19px;
    font-weight: 700;
}

.modal-body {
    padding: 20px 24px;
}

.modal-body .form-label {
    font-size: 14px;
    font-weight: 500;
}

.modal-body .form-control {
    padding: 11px 14px;
    border-radius: 10px;
    border-color: #E5E7EB;
}

.modal-body .form-control:focus {
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(47, 158, 110, .15);
}

.modal-footer {
    background: #fff;
    border-top: 1px solid var(--borde);
    padding: 16px 24px;
    justify-content: space-between;
    border-radius: 0 0 20px 20px;
}

.mensaje {
    margin: 0;
    font-size: 13.5px;
    color: var(--texto-suave);
}

.modal-footer .btn-confirmar {
    width: auto;
    margin: 0;
    padding: 11px 24px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .resumen {
        position: static;
    }
}

@media (max-width: 640px) {
    .navbar .container-fluid {
        padding: 0 16px;
    }

    .carrito-encabezado h1 {
        font-size: 24px;
    }

    .panel {
        padding: 4px 16px;
    }

    .carrito-item {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px 14px;
    }

    .img-carrito {
        width: 72px;
        height: 72px;
    }

    /* En celular los controles pasan a una fila debajo de la información */
    .carrito-acciones {
        grid-column: 1 / -1;
        justify-content: space-between;
    }

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

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 10px;
    }

    .modal-footer .btn-confirmar {
        width: 100%;
    }
}

/* =====================================================================
   LOGO MÁS GRANDE (index, detalle y carrito)
   ===================================================================== */
.navbar-brand img {
    height: 64px;
    width: auto;
    max-width: 220px;
}

@media (max-width: 600px) {
    .navbar-brand img {
        height: 48px;
    }
}

/* Caja con los datos del pago móvil */
.pago-movil-info {
    background: #f6faf7;
    border: 1px solid #d7ebe0;
    border-radius: 8px;
    padding: 12px 14px;
}

.pago-fila {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 0.9rem;
}

.pago-label {
    color: #6c757d;
    font-weight: 500;
}

.pago-valor {
    color: #212529;
    font-weight: 600;
    text-align: right;
}

/* ---------- MAPA DE ENVÍO (dentro del modal) ---------- */
#mapa-envio {
    height: 280px;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    z-index: 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    height: auto; 
    margin-right: 20px;
    padding: 0;
}

.navbar-brand img { 
    height: 55px;       /* <-- Reducido a 55px */
    width: auto;        
    max-width: none;    
    object-fit: contain;
    transform: none;    
}

@media (max-width: 600px) {
    .navbar-brand img { 
        height: 45px; /* <-- Reducido a 45px en celular */
    }
}
