/* ====== CONTENEDOR DE COMPRA ====== */
.row-carrito{
    position: relative;
}
.to-contain-comprar {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;

    @media (width <=992px) {
        padding: 1.5rem !important;
    }

    h3 {
        font-weight: bold;
        color: #4b2354;
        margin-bottom: 1rem;
    }

    .to-comprar-text,
    .to-comprar-precio,
    h3 {
        width: auto;
    }

    .to-comprar-text {
        font-size: 1rem;
        color: #555;
    }

    .to-comprar-precio {
        font-size: 1.2rem;
        font-weight: bold;
        color: #6a1b9a;
    }

    .comprar-after {
        position: relative;

        &::after {
            content: "";
            background-color: #d1c4e9;
            /* lavanda suave */
            width: 100%;
            height: 2px;
            position: absolute;
            bottom: 0;
        }
    }

    .to-pago {
        display: flex;
        text-decoration: none;
        color: #fff;
        background: linear-gradient(90deg, #6a1b9a, #8e24aa);
        border-radius: 10px;
        width: 100%;
        justify-content: center;
        padding: 1rem 0;
        font-weight: bold;
        transition: transform 0.2s ease, background 0.3s ease;
    }

    .to-pago:hover {
        background: linear-gradient(90deg, #4b2354, #6a1b9a);
        transform: translateY(-2px);
    }
}

/* ====== LISTADO DE ARTÍCULOS ====== */
.to-carrito-art {
    padding-right: 10rem;

    @media (width <=992px) {
        padding-right: 1.5rem;
    }
}

.article-carrito {
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.article-carrito:hover {
    transform: scale(1.01);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.article-carrito .to-article-body {
    width: 100%;
}

.article-carrito .to-article-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    background: #f3e5f5;
    /* fondo lavanda detrás del producto */
    padding: 0.5rem;
}

.to-article-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4b2354;
}

.to-article-text {
    font-size: 0.95rem;
    color: #666;
}

.to-article-precio {
    font-size: 1.2rem;
    font-weight: bold;
    color: #6a1b9a;
}

.to-article-btn-quitar {
    font-size: 0.9rem;
    color: #d32f2f;
    text-decoration: none;
    font-weight: 500;
}

.to-article-btn-quitar:hover {
    text-decoration: underline;
}

/* ====== ACCORDION ====== */
.accordion-header button {
    background-color: #f3e5f5;
    /* lavanda claro */
    color: #4b2354;
    font-weight: 600;
    /* border-radius: 8px; */
    padding: 0.75rem 1rem;

    &:focus {
        box-shadow: 0 0 0 2px #d1c4e9;
        border-color: transparent;
    }
}

.accordion-button:not(.collapsed) {
    background-color: #e1bee7;
    /* lavanda más intenso */
    color: #4b2354;
    box-shadow: none;
}

.accordion-item {
    border: none;
    background-color: transparent;
    margin-bottom: 0.5rem;
}

.accordion-body {
    font-size: 0.9rem;
    color: #444;
    background: #fafafa;
    /* border-radius: 8px; */
    padding: 1rem;
}

/* ====== BOTÓN SEGUIR COMPRANDO ====== */
.btn-seguir {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(90deg, #8e24aa, #6a1b9a);
    color: #fff;
    transition: transform 0.2s ease, background 0.3s ease;
}

.btn-seguir:hover {
    background: linear-gradient(90deg, #6a1b9a, #4b2354);
    transform: translateY(-2px);
    color: #fff;
    /* asegura que el texto siga siendo blanco */
}

/* ====== OFF CANVAS ====== */
.offcanvas {
    background: linear-gradient(90deg, #6a1b9a, #4b2354);

    .offcanvas-title {
        color: #f2f2f2;
        font-family: "Press Start 2P", system-ui;
    }

    .to-close {
        border: none;
        background: transparent;
    }

    .to-close i {
        font-size: 2rem;
        color: #f2f2f2;
    }

    #total {
        font-size: .8rem;
        font-weight: bold;
        color: #f2f2f2;
        font-family: "Press Start 2P", system-ui;
    }

    #vaciar {
        font-family: "Press Start 2P", cursive;
        background: #FFD700;
        color: #0D0D0D;
        border: 2px solid #0D0D0D;
        text-shadow: 0 0 6px #6A0DAD;
        transition: all 0.2s ease;
        padding: 1rem 0rem;

        &:hover {
            background: #0D0D0D;
            color: #FFD700;
        }
    }

    #to-pagar {
        font-family: "Press Start 2P", cursive;
        background: #FFD700;
        color: #0D0D0D;
        border: 2px solid #0D0D0D;
        text-shadow: 0 0 6px #6A0DAD;
        transition: all 0.2s ease;
        padding: 1rem 0rem;
        border-radius: 0;

        &:hover {
            background: #0D0D0D;
            color: #FFD700;
        }
    }
}

::-webkit-scrollbar {
    width: 10px;               /* ancho de la barra vertical */           /* alto de la barra horizontal */
}

::-webkit-scrollbar-track {
    background: transparent;       /* fondo de la pista del scroll */    /* bordes redondeados */
}

::-webkit-scrollbar-thumb {
    background-color: #6A0DAD;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #FFD700;    /* color al pasar el mouse */
}


/* ====== ARTICLE BUTTONS ====== */

.to-article-btn {
    border: none;
    background: transparent;

    i {
        font-size: 2rem;
    }
}

.to-article-btn-sumar {
    color: #6a1b9a;
}

.to-carrito-vaciar {
    color: #fff;
    background: linear-gradient(90deg, #6a1b9a, #8e24aa);
    border-radius: 10px;
    width: 100%;
    justify-content: center;
    padding: 1rem 0;
    font-weight: bold;
    transition: transform 0.2s ease, background 0.3s ease;
    border: none;

    &:hover {
        background: linear-gradient(90deg, #4b2354, #6a1b9a);
        transform: translateY(-2px);
    }
}