/* Carrito de compra — identidad Paulina */

#shop-cart {
    background: #F8F7F5;
    padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 5vw, 4.5rem);
}

#shop-cart > .container {
    max-width: 1100px;
}

#shop-cart .shop-cart {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#shop-cart .error {
    display: block;
    margin: 0 0 0.75rem;
    color: #8b1e3f;
    font-size: 0.95rem;
}

.carrito-table-wrapper {
    background: #FFFFFF;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(183, 154, 181, 0.28);
    box-shadow:
        0 16px 40px rgba(61, 0, 38, 0.08),
        0 1px 0 rgba(198, 167, 107, 0.35);
}

.carrito-table {
    width: 100%;
    margin: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: transparent;
}

.carrito-th {
    background: linear-gradient(135deg, #3D0026 0%, #5a1740 100%) !important;
    padding: 1rem 1.15rem !important;
    font-family: Inter, system-ui, sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none !important;
    color: #FFFFFF !important;
    white-space: nowrap;
}

.carrito-th-cursos {
    width: 30%;
}

.carrito-th-descripcion {
    width: 40%;
}

.carrito-th-precio,
.carrito-th-total {
    width: 15%;
    text-align: right !important;
}

.carrito-td {
    padding: 1.15rem 1.15rem !important;
    border-bottom: 1px solid rgba(183, 154, 181, 0.22) !important;
    border-top: 0 !important;
    vertical-align: middle !important;
    background: #FFFFFF;
}

.carrito-table tbody tr:last-child .carrito-td {
    border-bottom: 0 !important;
}

.carrito-table tbody tr:hover .carrito-td {
    background: rgba(248, 247, 245, 0.85);
}

.carrito-td-precio,
.carrito-td-total {
    text-align: right !important;
    white-space: nowrap;
}

.carrito-td.cart-product-thumbnail {
    position: relative;
    padding-left: 3.35rem !important;
}

.carrito-curso {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 100%;
}

.carrito-remove-btn {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #3D0026 !important;
    background: rgba(183, 154, 181, 0.18);
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.carrito-remove-btn:hover {
    background: rgba(61, 0, 38, 0.12);
    color: #3D0026 !important;
    transform: translateY(-50%) scale(1.05);
}

.carrito-img {
    display: block;
    border-radius: 10px;
    max-width: 72px;
    height: auto;
    margin: 0 0 0.45rem;
    box-shadow: 0 6px 16px rgba(61, 0, 38, 0.12);
}

.carrito-product-title {
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-weight: 600 !important;
    font-size: 1.15rem !important;
    line-height: 1.3;
    color: #3D0026 !important;
}

.carrito-desc-text {
    display: block;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: rgba(29, 29, 29, 0.72) !important;
    line-height: 1.55;
    font-size: 0.92rem;
}

.carrito-price-text,
.carrito-total-text {
    font-family: Inter, system-ui, sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.01em;
    color: #3D0026 !important;
}

.carrito-resumen-wrap {
    display: flex;
    justify-content: flex-end;
}

.carrito-resumen {
    width: min(100%, 22rem);
    background: #FFFFFF;
    border-radius: 18px;
    border: 1px solid rgba(183, 154, 181, 0.28);
    box-shadow: 0 14px 32px rgba(61, 0, 38, 0.08);
    padding: 1.35rem 1.4rem 1.25rem;
}

.carrito-resumen__titulo {
    margin: 0 0 0.85rem;
    font-family: "Cormorant Garamond", Georgia, serif !important;
    font-size: 1.45rem !important;
    font-weight: 600 !important;
    color: #3D0026 !important;
    letter-spacing: 0.01em;
}

.carrito-resumen__tabla {
    width: 100%;
    margin: 0 0 1.1rem !important;
    border-collapse: separate;
    border-spacing: 0;
}

.carrito-resumen__tabla td {
    padding: 0.7rem 0.85rem !important;
    border: 0 !important;
    background: #F8F7F5 !important;
    color: #1D1D1D !important;
    font-size: 0.95rem;
    vertical-align: middle;
}

.carrito-resumen__tabla tr:first-child td:first-child {
    border-radius: 10px 0 0 0;
}

.carrito-resumen__tabla tr:first-child td:last-child {
    border-radius: 0 10px 0 0;
}

.carrito-resumen__tabla tr:last-child td {
    background: rgba(183, 154, 181, 0.16) !important;
    border-top: 1px solid rgba(198, 167, 107, 0.35) !important;
    font-weight: 700;
    color: #3D0026 !important;
}

.carrito-resumen__tabla tr:last-child td:first-child {
    border-radius: 0 0 0 10px;
}

.carrito-resumen__tabla tr:last-child td:last-child {
    border-radius: 0 0 10px 0;
}

.carrito-resumen__tabla .text-right {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.carrito-resumen__cta {
    display: flex;
    justify-content: stretch;
}

.carrito-btn-pagar {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 1.4rem !important;
    border-radius: 999px !important;
    border: 2px solid #3D0026 !important;
    background: #3D0026 !important;
    color: #FFFFFF !important;
    font-family: Inter, system-ui, sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none !important;
    float: none !important;
    box-shadow: 0 10px 24px rgba(61, 0, 38, 0.18);
    transition:
        background-color 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.carrito-btn-pagar:hover,
.carrito-btn-pagar:focus {
    background: #C6A76B !important;
    border-color: #C6A76B !important;
    color: #3D0026 !important;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(61, 0, 38, 0.16);
    outline: none;
}

#shop-cart .hr.space,
#shop-cart hr.space {
    display: none;
}

@media (max-width: 991px) {
    .carrito-th-descripcion {
        min-width: 12rem;
    }

    .carrito-resumen-wrap {
        justify-content: stretch;
    }

    .carrito-resumen {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .carrito-th,
    .carrito-td {
        padding: 0.85rem 0.75rem !important;
    }

    .carrito-product-title {
        font-size: 1.05rem !important;
    }

    .carrito-price-text,
    .carrito-total-text {
        font-size: 0.98rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .carrito-remove-btn,
    .carrito-btn-pagar {
        transition: none !important;
    }

    .carrito-remove-btn:hover,
    .carrito-btn-pagar:hover,
    .carrito-btn-pagar:focus {
        transform: none !important;
    }
}
