/* ===== Cart Page Styles ===== */

main {
    min-height: calc(100vh - 85px);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.section__cart {
    display: flex;
    padding: 6rem 1.5rem 3rem;
    justify-content: center;
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    gap: 1.5rem;
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

a {
    text-decoration: none;
}

/* ---- Top button ---- */
.container__btn__add__more__products {
    display: flex;
    justify-content: flex-start;
    width: 100%;
}

.btn__add__more__products {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-transform: uppercase;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: 8px;
    background: linear-gradient(to right, rgb(54, 209, 220) 0%, rgb(91, 134, 229) 51%, rgb(54, 209, 220) 100%);
    background-size: 200% auto;
    border: none;
    transition: .4s;
    cursor: pointer;
}

.btn__add__more__products:hover {
    background-position: 100%;
    box-shadow: 0 4px 16px rgba(91, 134, 229, 0.35);
    transform: translateY(-2px);
}

/* ---- Step indicators ---- */
.container__state__cart {
    border-radius: 12px;
    display: flex;
    font-size: 1rem;
    width: 100%;
    justify-content: space-around;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.state__cart {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 33.33%;
    padding: 1.5rem;
    gap: 0.5rem;
    border-right: 1px solid #eee;
    transition: background 0.2s;
}

.state__cart:last-child {
    border-right: none;
}

.state__cart:hover {
    background: rgba(91, 134, 229, 0.06);
}

.method__cart {
    width: 28px;
    height: 28px;
    opacity: 0.7;
}

.text__cart {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgb(15, 0, 68);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ---- Product list ---- */
.container__list__products__cart {
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.container__title__list__products__cart {
    background: rgb(15, 0, 68);
    padding: 1rem 1.5rem;
}

.title__list__products__cart {
    color: white;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    margin: 0;
}

.container__products__and__more__options {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 1.5rem;
    gap: 1.5rem;
}

.container__list__products {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    list-style: none;
    gap: 0.5rem;
}

.text__header__list__products {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 1rem;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

.list__products {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.products__added {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: 1rem;
    align-items: center;
    background: #f9f9ff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: box-shadow 0.2s;
}

.products__added:hover {
    box-shadow: 0 2px 12px rgba(91, 134, 229, 0.12);
}

.img__products__added {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
}

.name__products__added {
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.price__products__added {
    font-weight: 700;
    color: rgb(54, 99, 209);
    white-space: nowrap;
}

.input__products__added {
    width: 60px;
    padding: 0.4rem;
    font-size: 1rem;
    text-align: center;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s;
}

.input__products__added:focus {
    border-color: rgb(91, 134, 229);
}

.container__subtotal__delete__products__added {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: flex-end;
}

.img__delete__products__added {
    width: 22px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s, transform 0.15s;
}

.img__delete__products__added:hover {
    opacity: 1;
    transform: scale(1.15);
}

/* ---- Sidebar (more options) ---- */
.more__options {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    width: 240px;
    flex-shrink: 0;
}

.btn__add__products {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    background: linear-gradient(to right, rgb(54, 209, 220) 0%, rgb(91, 134, 229) 51%, rgb(54, 209, 220) 100%);
    background-size: 200% auto;
    border: none;
    transition: .4s;
    cursor: pointer;
    width: 100%;
}

.btn__add__products:hover {
    background-position: 100%;
    box-shadow: 0 4px 16px rgba(91, 134, 229, 0.35);
    transform: translateY(-2px);
}

.arrow__left {
    width: 20px;
    filter: brightness(10);
}

.container__price__total {
    border-radius: 10px;
    background: rgb(15, 0, 68);
    color: white;
    display: flex;
    flex-wrap: wrap;
    padding: 1rem 1.2rem;
}

.text__price__total {
    width: 100%;
    text-transform: uppercase;
    font-size: 0.85rem;
    opacity: 0.7;
    margin-bottom: 0.4rem;
}

.price__total {
    width: 100%;
    text-align: right;
    font-size: 1.6rem;
    font-weight: 700;
}

/* ---- Delivery method ---- */
.container__method__delivery {
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.container__title__method__delivery {
    background: rgb(15, 0, 68);
    padding: 1rem 1.5rem;
}

.title__delivery {
    color: white;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    margin: 0;
}

.container__table__method__delivery {
    padding: 1.5rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

td {
    padding: 1rem;
    vertical-align: top;
}

.title__method__delivery {
    font-size: 0.95rem;
    font-weight: 700;
    color: rgb(15, 0, 68);
    margin: 0 0 0.3rem;
}

.subtitle__method__delivery {
    font-size: 0.82rem;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: rgb(91, 134, 229);
}

/* ---- Summary ---- */
.container__shopping__summary {
    width: 100%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.container__title__shopping__summary {
    background: rgb(15, 0, 68);
    padding: 1rem 1.5rem;
}

.title__shopping__summary {
    color: white;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    margin: 0;
}

.container__table__shopping__summary {
    padding: 1.5rem;
}

#table__summary {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

#table__summary td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #eee;
    font-size: 1rem;
}

#table__summary tr:last-child td {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: rgb(15, 0, 68);
}

.terminos {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #444;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: rgb(91, 134, 229);
}

.btn__start__pay {
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.9rem;
    border-radius: 8px;
    background: linear-gradient(to right, rgb(54, 209, 220) 0%, rgb(91, 134, 229) 51%, rgb(54, 209, 220) 100%);
    background-size: 200% auto;
    border: none;
    transition: .4s;
    width: 100%;
    cursor: pointer;
    letter-spacing: 0.5px;
}

.btn__start__pay:hover {
    background-position: 100%;
    box-shadow: 0 6px 20px rgba(91, 134, 229, 0.4);
    transform: translateY(-2px);
}

/* ===== Responsive ===== */
@media screen and (max-width: 900px) {
    .section__cart {
        padding: 5.5rem 1rem 2rem;
    }

    .container__state__cart {
        font-size: 0.82rem;
    }

    .text__cart {
        font-size: 0.75rem;
    }

    .container__products__and__more__options {
        flex-direction: column;
    }

    .more__options {
        width: 100%;
    }

    .products__added {
        grid-template-columns: 60px 1fr auto;
        grid-template-rows: auto auto;
        gap: 0.5rem;
        font-size: 0.78rem;
    }

    .img__products__added {
        width: 55px;
        height: 55px;
        grid-row: 1 / 3;
    }

    .name__products__added {
        grid-column: 2 / 4;
        white-space: normal;
    }

    .price__products__added {
        grid-column: 2;
    }

    .input__products__added {
        width: 50px;
        font-size: 0.9rem;
    }

    .container__subtotal__delete__products__added {
        grid-column: 3;
        grid-row: 2;
        flex-direction: column;
        gap: 0.3rem;
    }

    .text__header__list__products {
        display: none;
    }
}

@media screen and (max-width: 600px) {
    .state__cart {
        padding: 1rem 0.5rem;
    }

    .method__cart {
        width: 22px;
        height: 22px;
    }

    .text__cart {
        font-size: 0.7rem;
    }
}