.cart-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cart-count {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding: 0 5px;
    border-radius: 50px;
    background: var(--brand, #6c5ce7);
    color: white;
    font-size: .75rem;
}

.cart-nav:hover .cart-count {
    background: white;
    color: #6c5ce7;
}

.cart-add-primary {
    width: 100%;
    padding: 15px;
    margin-bottom: 12px;
    border: 0;
    border-radius: 12px;
    background: #6c5ce7;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

.cart-add-primary:hover {
    filter: brightness(.95);
}

.cart-add-primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.cart-card-add {
    width: 100%;
    border: 1px solid #6c5ce7;
    border-radius: 12px;
    background: white;
    color: #6c5ce7;
    padding: 11px;
    margin-top: 10px;
    font-weight: 600;
    cursor: pointer;
}

.cart-card-add:hover {
    background: #f4f5f9;
}

.cart-dialog {
    width: min(1060px, calc(100% - 32px));
    max-height: 90dvh;
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 24px;
    color: #2d3436;
    background: #fff;
    box-shadow: 0 24px 90px #20203533;
    overflow: auto;
}

.cart-dialog::backdrop {
    background: #24203988;
    backdrop-filter: blur(5px);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 32px;
    border-bottom: 1px solid #e2e8f0;
}

.cart-eyebrow {
    font-size: .65rem;
    letter-spacing: .12em;
    color: #6c5ce7;
    font-weight: 700;
}

.cart-header h2 {
    font-size: 1.9rem;
    margin-top: 8px;
}

.cart-close {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: #eef2f5;
    color: #636e72;
    cursor: pointer;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}

.cart-products {
    padding: 28px 32px;
    min-width: 0;
}

.cart-limit {
    color: #636e72;
    font-size: .78rem;
    margin-bottom: 18px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 16px;
    padding: 20px 0;
    border-bottom: 1px solid #e2e8f0;
}

.cart-item:first-child {
    padding-top: 0;
}

.cart-item img {
    width: 80px;
    height: 88px;
    object-fit: contain;
    background: #f4f5f9;
    border-radius: 12px;
}

.cart-item h3 {
    font-size: 1rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.cart-item-meta {
    color: #636e72;
    font-size: .75rem;
    margin: 6px 0;
    line-height: 1.5;
}

.cart-item-price {
    font-weight: 700;
    margin: 8px 0;
}

.cart-item-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.cart-item .quantity-control input {
    width: 34px;
}

.cart-item .quantity-control button {
    width: 30px;
    height: 30px;
}

.cart-text-button {
    color: #636e72;
    border: 0;
    background: none;
    padding: 10px 0;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-size: .78rem;
}

#clearCartButton {
    margin-top: 12px;
}

.cart-checkout {
    padding: 28px 32px;
    background: #f8f9fc;
    border-left: 1px solid #e2e8f0;
    min-width: 0;
}

.cart-checkout h3 {
    font-size: 1.15rem;
}

.cart-help {
    font-size: .8rem;
    color: #636e72;
    line-height: 1.6;
    margin: 9px 0 20px;
}

.cart-checkout .shipping-option {
    padding: 14px 12px;
    gap: 9px;
}

.cart-checkout .shipping-option strong {
    font-size: .8rem;
}

.cart-preparation {
    padding: 15px;
    background: #eef2f5;
    border-radius: 12px;
    margin: 20px 0;
}

.cart-preparation strong {
    color: #6c5ce7;
    font-size: .8rem;
}

.cart-preparation p {
    font-size: .75rem;
    color: #636e72;
    line-height: 1.6;
    margin-top: 6px;
}

.cart-cost-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .9rem;
    margin: 14px 0;
}

.cart-cost-line > span {
    color: #636e72;
}

.cart-total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
    padding: 20px 0;
}

#cartTotal {
    font-size: 1.6rem;
    white-space: nowrap;
}

#cartWhatsapp {
    padding: 15px;
}

#cartWhatsapp[aria-disabled=true] {
    opacity: .5;
    cursor: not-allowed;
}

.cart-empty {
    text-align: center;
    padding: 60px 24px;
}

.cart-empty > i {
    font-size: 2.5rem;
    color: #6c5ce7;
    display: block;
    margin-bottom: 22px;
}

.cart-empty h3 {
    font-size: 1.4rem;
}

.cart-empty p {
    color: #636e72;
    line-height: 1.7;
    max-width: 380px;
    margin: 14px auto 24px;
}

.cart-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px 22px;
    border-radius: 14px;
    background: #2d3436;
    color: #fff;
    box-shadow: 0 8px 30px #0002;
    z-index: 100;
    max-width: calc(100% - 24px);
    font-size: .85rem;
}

.cart-toast button {
    border: 0;
    background: none;
    color: #c4baff;
    cursor: pointer;
    white-space: nowrap;
    font-weight: 700;
}

@media(max-width: 760px) {
    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-checkout {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .cart-header,
    .cart-products,
    .cart-checkout {
        padding: 22px;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }
}

@media(max-width: 420px) {
    .cart-dialog {
        width: calc(100% - 16px);
        max-height: 94dvh;
        border-radius: 18px;
    }

    .cart-header,
    .cart-products,
    .cart-checkout {
        padding: 18px;
    }

    .cart-header h2 {
        font-size: 1.6rem;
    }

    .cart-item {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 12px;
    }

    .cart-item img {
        width: 62px;
        height: 76px;
    }

    .cart-toast {
        width: calc(100% - 24px);
        gap: 10px;
        padding: 14px;
    }

    #cartTotal {
        font-size: 1.4rem;
    }
}