/* ===== Página de carrito local ===== */
body.cart-page {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cart-page main {
    flex: 1;
}

.cart-page * {
    box-sizing: border-box;
}

.cart-header {
    background: #ffffff;
    border-bottom: 1px solid #e9edf3;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.cart-header-inner {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cart-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.cart-brand:hover {
    color: inherit;
}

.cart-brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #e9edf3;
    background: #ffffff;
    flex-shrink: 0;
}

.cart-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.cart-brand-text strong {
    font-size: 0.98rem;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.cart-brand-text small {
    color: #64748b;
    font-size: 0.72rem;
    margin-top: 3px;
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 17px;
    border: 1px solid #ff69b4;
    border-radius: 50px;
    color: #0f172a;
    background: #ff69b4;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.cart-continue-link:hover {
    background: #f5eef8;
    border-color: #d7c5e2;
    color: #0f172a;
}

.cart-main {
    padding: 42px 0 64px;
}

.cart-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.cart-heading h1 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    font-weight: 700;
    margin: 0;
    line-height: 1.15;
}

.cart-heading p {
    color: #64748b;
    margin: 5px 0 0;
    font-size: 0.92rem;
}

.cart-badge {
    background: #efe7f4;
    color: #ff69b4;
    border-radius: 50px;
    padding: 8px 15px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
    align-items: start;
}

.cart-items-col {
    min-width: 0;
}

.cart-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 0.83rem;
}

.cart-clear-btn {
    border: 0;
    background: none;
    color: #ff69b4;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 6px 0;
}

.cart-clear-btn:hover {
    text-decoration: underline;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.035);
}

.cart-item-image {
    width: 98px;
    height: 98px;
    border-radius: 14px;
    object-fit: cover;
    background: #f1f3f6;
    flex-shrink: 0;
}

.cart-item-image.is-fallback {
    object-fit: contain;
    padding: 12px;
}

.cart-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cart-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cart-item-title {
    margin: 0;
    color: #1e293b;
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.cart-item-remove {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border: 0;
    border-radius: 50%;
    background: #fff1f3;
    color: #ff69b4;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.cart-item-remove:hover {
    background: #ffe1e6;
    color: #ff69b4;
}

.cart-item-options {
    list-style: none;
    margin: 8px 0 0;
    padding: 0 0 0 11px;
    border-left: 2px solid #ece3f1;
    color: #64748b;
    font-size: 0.77rem;
    line-height: 1.45;
}

.cart-item-options li+li {
    margin-top: 3px;
}

.cart-item-options strong {
    color: #475569;
    font-weight: 600;
}

.cart-option-extra {
    color: #8a5c9f;
    font-weight: 600;
}

.cart-item-unit {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 8px;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 12px;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid #dde3ea;
    border-radius: 50px;
    background: #ffffff;
}

.cart-qty button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 0.78rem;
    transition: background-color 0.2s ease;
}

.cart-qty button:hover {
    background: #f3eef7;
}

.cart-qty span {
    min-width: 32px;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
}

.cart-item-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.cart-summary {
    position: sticky;
    top: 96px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e9edf3;
    border-radius: 20px;
    box-shadow: 0 10px 30px #ff69b4;
}

.cart-summary h2 {
    margin: 0 0 20px;
    font-size: 1.05rem;
    font-weight: 700;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 0.86rem;
}

.cart-summary-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e9edf3;
    font-size: 1rem;
    font-weight: 700;
}

.cart-summary-total strong {
    font-size: 1.45rem;
    color: #0f172a;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 20px;
    padding: 13px 18px;
    border: 0;
    border-radius: 50px;
    background: #25d366;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cart-checkout-btn:hover {
    background: #1ebe5b;
    color: #ffffff;
    transform: translateY(-1px);
}

.cart-summary-note {
    display: flex;
    gap: 6px;
    margin: 14px 0 0;
    color: #64748b;
    font-size: 0.74rem;
    line-height: 1.5;
}

.cart-empty {
    padding: 64px 24px;
    text-align: center;
    background: #ffffff;
    border: 1px dashed #d9d2e3;
    border-radius: 20px;
}

.cart-empty-icon {
    display: grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #f3eef7;
    color: #ff69b4;
    font-size: 2rem;
}

.cart-empty h2 {
    margin: 0 0 8px;
    font-size: 1.3rem;
    font-weight: 700;
}

.cart-empty p {
    max-width: 420px;
    margin: 0 auto 22px;
    color: #64748b;
    font-size: 0.9rem;
}

.cart-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 24px;
    border-radius: 50px;
    background: #ff69b4;
    color: #111111;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.cart-primary-link:hover {
    background: #f98ec3;
    color: #111111;
}

.cart-footer {
    padding: 20px 0;
    background: #ffffff;
    border-top: 1px solid #e9edf3;
    color: #64748b;
    font-size: 0.78rem;
    text-align: center;
}

/* ===== Modal de finalización ===== */
.cart-modal {
    border: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.cart-modal-header {
    align-items: flex-start;
    padding: 14px 20px 0;
    border: 0;
}

.cart-modal-header .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.cart-modal-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 0.78rem;
}

.cart-modal-body {
    padding: 8px 20px;
}

.cart-form-group {
    margin-bottom: 8px;
}

.cart-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.79rem;
    font-weight: 600;
}

.cart-form-control {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.82rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-form-control[type="file"] {
    padding: 7px;
    font-size: 0.78rem;
}

.cart-form-control[type="file"]::file-selector-button {
    padding: 6px 10px;
    margin-right: 10px;
    border: 0;
    border-radius: 8px;
    background: #f3eef7;
    color: #6b4a7c;
    font-family: inherit;
    cursor: pointer;
}

.cart-form-control:focus {
    outline: none;
    border-color: #bf9ccf;
    box-shadow: 0 0 0 3px rgba(191, 156, 207, 0.2);
}

.cart-form-group small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 0.71rem;
}

.cart-radio-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.cart-radio input {
    accent-color: #9e72b5;
}

.cart-modal-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid #e9edf3;
    font-weight: 700;
}

.cart-modal-total strong {
    font-size: 17px;
}

.cart-modal-footer {
    gap: 10px;
    padding: 8px 20px 12px;
    border: 0;
}

.cart-secondary-btn {
    padding: 8px 14px;
    border: 1px solid #e9edf3;
    border-radius: 50px;
    background: #ffffff;
    color: #0f172a;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

.cart-secondary-btn:hover {
    background: #f8f9fa;
}

.cart-modal-footer .cart-checkout-btn {
    width: auto;
    margin-top: 0;
    padding: 9px 16px;
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .cart-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 575.98px) {
    .cart-header-inner {
        min-height: 64px;
    }

    .cart-brand-logo {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .cart-brand-text small {
        display: none;
    }

    .cart-brand-text strong {
        font-size: 0.9rem;
    }

    .cart-continue-link {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .cart-continue-link span {
        display: none;
    }

    .cart-main {
        padding: 26px 0 40px;
    }

    .cart-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }

    .cart-item {
        gap: 12px;
        padding: 12px;
        border-radius: 16px;
    }

    .cart-item-image {
        width: 78px;
        height: 78px;
        border-radius: 12px;
    }

    .cart-item-title {
        font-size: 0.87rem;
    }

    .cart-item-bottom {
        flex-wrap: wrap;
        row-gap: 10px;
    }

    .cart-item-price {
        font-size: 0.95rem;
    }

    .cart-empty {
        padding: 44px 18px;
    }

    .cart-modal-header,
    .cart-modal-body {
        padding-left: 18px;
        padding-right: 18px;
    }

    .cart-modal-footer {
        padding: 0 18px 20px;
    }

    .cart-modal-footer .cart-checkout-btn {
        flex: 1;
    }
}