.carrito-main {
    max-width: 820px;
    margin: 115px auto 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(34,34,34,0.09);
    padding: 32px 20px 30px 20px;
}
.carrito-titulo {
    text-align: center;
    font-size: 2rem;
    color: #1976d2;
    font-weight: 700;
    margin-bottom: 28px;
}
.alerta-stock {
    background: #fff4e5;
    color: #e67c13;
    padding: 12px;
    border-radius: 7px;
    margin-bottom: 20px;
    text-align: center;
    border: 1.5px solid #ffbe78;
    font-weight: 600;
}
.carrito-vacio {
    text-align: center;
    color: #e53935;
    font-size: 1.13rem;
    margin: 20px 0 35px 0;
    font-weight: 600;
}
.tabla-carrito-wrapper {
    overflow-x: auto;
    margin-bottom: 24px;
}
.tabla-carrito {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 13px;
    overflow: hidden;
    font-size: 1.04rem;
}
.tabla-carrito th,
.tabla-carrito td {
    padding: 12px 8px;
    text-align: center;
}
.tabla-carrito th {
    background: #1976d2;
    color: #fff;
    font-weight: 600;
    border-bottom: 2px solid #155a9a;
}
.tabla-carrito td {
    border-bottom: 1px solid #eaeaea;
}
.tabla-carrito tr:last-child td {
    border-bottom: none;
}
input[type="number"] {
    border-radius: 6px;
    border: 1.3px solid #d0d7df;
    padding: 5px 0 5px 7px;
    background: #f7fafd;
    color: #222;
    font-size: 1rem;
    width: 60px;
}
.stock-limitado {
    color: #e53935;
    font-size: 0.92em;
    font-weight: 600;
}
.btn-eliminar {
    background: #e53935;
    color: #fff;
    border-radius: 8px;
    padding: 7px 13px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.17s;
    text-decoration: none;
    display: inline-block;
}
.btn-eliminar:hover {
    background: #b71c1c;
}
.form-cupon {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
    margin-top: 10px;
}
.form-cupon label {
    font-weight: 600;
}
.form-cupon input[type="text"] {
    padding: 7px 9px;
    border-radius: 6px;
    border: 1.3px solid #d0d7df;
    background: #f7fafd;
    font-size: 1rem;
    color: #222;
    width: 160px;
}
.btn-aplicar-cupon {
    background: #1976d2;
    color: #fff;
    border-radius: 7px;
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.17s;
    cursor: pointer;
}
.btn-aplicar-cupon:hover {
    background: #155a9a;
}
.cupon-aplicado {
    background: #e3f0fb;
    color: #1976d2;
    border-radius: 7px;
    padding: 9px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
    border: 1.5px solid #bbdefb;
}
.total-pagar-box {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    background: #f3f6fa;
    padding: 14px 24px;
    border-radius: 12px;
    margin: 18px 0 24px 0;
    font-size: 1.3rem;
    font-weight: bold;
}
.total-txt { color: #1976d2; }
.total-num { color: #e53935; }
.pago-botones {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.btn-pago-mate {
    border-radius: 9px;
    padding: 11px 27px;
    font-size: 1.1rem;
    font-weight: 700;
    background: #1976d2;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.19s;
    margin-bottom: 2px;
}
.btn-pago-mate:hover {
    background: #155a9a;
}
.modal {
    display: none;
    position: fixed;
    z-index: 1002;
    left: 0; top: 0; width: 100vw; height: 100vh;
    background: rgba(30,30,30,0.29);
    justify-content: center;
    align-items: center;
}
.modal-contenido {
    background: #fff;
    border-radius: 15px;
    padding: 30px 22px 18px 22px;
    max-width: 350px;
    box-shadow: 0 2px 12px rgba(34,34,34,0.12);
    position: relative;
}
.modal-contenido h3 { color: #1976d2; margin-top: 0; }
.modal-contenido input,
.modal-contenido textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 11px;
    border: 1.2px solid #d0d7df;
    border-radius: 6px;
    background: #f7fafd;
    color: #222;
    font-size: 1rem;
}
.productos-relacionados {
    margin-top: 34px;
}
.productos-relacionados h3 {
    color: #1976d2;
    font-size: 1.18rem;
    margin-bottom: 13px;
    text-align: left;
}
.productos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 17px;
    margin-bottom: 20px;
}
.producto-card {
    background: #f7fafd;
    border-radius: 17px;
    box-shadow: 0 1.5px 8px rgba(34,34,34,0.06);
    display: flex;
    flex-direction: column;
    padding: 13px 12px 13px 12px;
    min-height: 230px;
    justify-content: flex-start;
    border: 1.7px solid #eaf3fb;
    position: relative;
    transition: box-shadow 0.17s, border 0.17s;
}
.producto-card:hover {
    box-shadow: 0 6px 24px rgba(34,34,34,0.12);
    border-color: #1976d2;
}
.producto-imagen {
    width: 100%;
    height: 80px;
    background: #f3f6fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
}
.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.producto-info {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nombre-producto {
    font-size: 1.03rem;
    color: #1976d2;
    font-weight: 700;
    margin-bottom: 6px;
    margin-top: 0;
    text-align: center;
}
.producto-desc {
    color: #444;
    font-size: 0.93rem;
    margin-bottom: 6px;
    min-height: 19px;
    max-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}
.precio-normal {
    color: #e53935;
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}
.producto-acciones.cuadrado {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    justify-content: center;
    width: 100%;
}
.btn-cuadrado.btn-carrito {
    border-radius: 8px;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 8px 0;
    background: #1976d2;
    color: #fff;
    border: 2px solid #1976d2;
    width: 100%;
    transition: background 0.17s, color 0.17s, border 0.17s;
    cursor: pointer;
}
.btn-cuadrado.btn-carrito:hover {
    background: #155a9a;
    border-color: #155a9a;
    color: #fff;
}

/* Carrito flotante (mismo diseño que tienda.css) */
.carrito-flotante {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 1100;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.13);
    padding: 20px 38px 16px 20px;
    display: flex;
    align-items: center;
    animation: flotarCarrito 0.4s;
    min-width: 300px;
    max-width: 96vw;
}
@keyframes flotarCarrito {
    from { opacity: 0; transform: translateX(-50%) translateY(20px);}
    to   { opacity: 1; transform: translateX(-50%) translateY(0);}
}
.carrito-flotante-contenido {
    display: flex;
    align-items: center;
    gap: 19px;
    position: relative;
    width: 100%;
}
.carrito-titulo {
    font-size: 1.08rem;
    color: #1976d2;
    font-weight: bold;
    margin-right: 20px;
}
.carrito-flotante-botones {
    display: flex;
    gap: 10px;
}
.btn-carrito-flotante, .btn-pagar-flotante {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
    border: none;
    outline: none;
    display: inline-block;
    margin: 0;
}
.btn-carrito-flotante {
    background: #1976d2;
    color: #fff;
}
.btn-carrito-flotante:hover {
    background: #155a9a;
}
.btn-pagar-flotante {
    background: #fff;
    color: #1976d2;
    border: 2px solid #1976d2;
}
.btn-pagar-flotante:hover {
    background: #1976d2;
    color: #fff;
}
.cerrar-carrito {
    font-size: 1.8rem;
    color: #888;
    cursor: pointer;
    position: absolute;
    right: -12px;
    top: -12px;
    font-weight: 700;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 50%;
    background: #f4f4f4;
    border: 1px solid #e6e6e6;
    transition: background 0.12s;
}
.cerrar-carrito:hover {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}

@media (max-width: 700px) {
    .carrito-main {
        padding: 12px 2vw 12px 2vw;
        margin-top: 85px;
    }
    .carrito-titulo {
        font-size: 1.2rem;
    }
    .tabla-carrito th,
    .tabla-carrito td {
        padding: 8px 4px;
    }
    .productos-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 7px;
    }
    .carrito-flotante {
        padding: 12px 8vw 12px 6vw;
        min-width: 0;
        bottom: 18px;
    }
    .carrito-flotante-contenido {
        flex-direction: column;
        align-items: flex-start;
        gap: 9px;
    }
    .btn-carrito-flotante, .btn-pagar-flotante {
        font-size: 0.99rem;
        padding: 7px 13vw;
    }
    .carrito-titulo {
        margin-right: 0;
        margin-bottom: 5px;
    }
    .cerrar-carrito {
        right: -2px;
        top: -16px;
    }
}
