.cart-page {
    padding: 24px 0 48px;
}

.cart-page .container {
    max-width: 1240px;
}

.cart-page__mobile-bar {
    display: none;
}

.cart-page__back {
    width: 40px;
    height: 40px;
    border: 1px solid #dfe3e8;
    border-radius: 12px;
    background: #fff;
    color: #101828;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(16, 24, 40, 0.08);
    cursor: pointer;
}

.cart-page__back i {
    font-size: 20px;
}

.cart-page__header {
    margin-bottom: 22px;
}

.cart-page__eyebrow {
    margin: 0 0 8px;
    color: #667085;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cart-page__header h1 {
    margin: 0;
    color: #101828;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.08;
}

.cart-page__lead {
    max-width: 680px;
    margin: 10px 0 0;
    color: #475467;
    font-size: 15px;
    line-height: 1.6;
}

.cart-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.85fr);
    gap: 20px;
    align-items: start;
}

.cart-page__panel {
    background: #fff;
    border: 1px solid #e4e7ec;
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(16, 24, 40, 0.035);
}

.cart-page__loading {
    min-height: 220px;
    padding: 20px;
}

.cart-page__loading-line,
.cart-page__loading-item span,
.cart-page__loading-item i {
    display: block;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
    background-size: 220% 100%;
    animation: cartLoadingPulse 1.3s ease-in-out infinite;
}

.cart-page__loading-line--title {
    width: 150px;
    height: 18px;
    margin-bottom: 18px;
}

.cart-page__loading-item {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #eef2f7;
}

.cart-page__loading-item span {
    width: 64px;
    height: 64px;
    border-radius: 14px;
}

.cart-page__loading-item div {
    display: grid;
    align-content: center;
    gap: 12px;
}

.cart-page__loading-item i {
    height: 14px;
}

.cart-page__loading-item i:first-child {
    width: 72%;
}

.cart-page__loading-item i:last-child {
    width: 44%;
}

.cart-page[data-state="loading"] .cart-page__summary-row span:last-child,
.cart-page[data-state="loading"] .cart-page__summary-row strong,
.cart-page[data-state="loading"] .cart-page__summary-head span {
    color: transparent;
    border-radius: 999px;
    background: linear-gradient(90deg, #eef2f7 0%, #f8fafc 48%, #eef2f7 100%);
    background-size: 220% 100%;
    animation: cartLoadingPulse 1.3s ease-in-out infinite;
}

.cart-page[data-state="loading"] .cart-page__summary-actions,
.cart-page[data-state="loading"] .cart-page__summary-note {
    visibility: hidden;
}

@keyframes cartLoadingPulse {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.cart-page__panel--empty {
    padding: 40px 28px;
    text-align: center;
}

.cart-page__empty-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: #f5f7fa;
    color: #0157fe;
    display: grid;
    place-items: center;
    font-size: 26px;
}

.cart-page__panel--empty h2 {
    margin: 0 0 8px;
    color: #101828;
    font-size: 21px;
}

.cart-page__panel--empty p {
    max-width: 500px;
    margin: 0 auto 18px;
    color: #475467;
    font-size: 14px;
    line-height: 1.65;
}

.cart-page__panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid #eaecf0;
}

.cart-page__panel-header h2,
.cart-page__summary-head h2 {
    margin: 0;
    color: #101828;
    font-size: 21px;
}

.cart-page__panel-header p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 14px;
}

.cart-page .btn {
    gap: 6px;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.2;
    border-radius: 12px;
}

.cart-page .btn i {
    font-size: 14px;
}

.cart-page .btn-outline {
    border-width: 1px;
}

.cart-page__panel-header .btn {
    padding: 9px 12px;
    font-size: 12px;
}

.cart-page__items {
    display: flex;
    flex-direction: column;
}

.cart-page__origin-group {
    border-bottom: 1px solid #eaecf0;
}

.cart-page__origin-group:last-child {
    border-bottom: 0;
}

.cart-page__origin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #eaecf0;
}

.cart-page__origin-header span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.cart-page__origin-header span:last-child {
    text-align: right;
}

.cart-page__origin-header small {
    color: #667085;
    font-size: 11px;
    line-height: 1.25;
}

.cart-page__origin-header strong {
    color: #101828;
    font-size: 13px;
    line-height: 1.25;
}

.cart-page__origin-items .cart-page__item:last-child {
    border-bottom: 0;
}

.cart-page__item {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eaecf0;
}

.cart-page__item:last-child {
    border-bottom: 0;
}

.cart-page__item-media {
    display: block;
    width: 96px;
    height: 96px;
    overflow: hidden;
    border-radius: 16px;
    background: #f8fafc;
}

.cart-page__item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-page__item-body {
    min-width: 0;
}

.cart-page__item-name {
    display: inline-block;
    margin: 0 0 6px;
    color: #101828;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.32;
    text-decoration: none;
}

.cart-page__item-name:hover {
    color: #0157fe;
}

.cart-page__item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
    color: #667085;
    font-size: 12px;
}

.cart-page__item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.cart-page__item-location-tag {
    padding: 3px 8px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    background: #f8fbff;
    color: #35516f;
}

.cart-page__item-location-tag strong {
    color: #101828;
    font-size: 11px;
}

.cart-page__item-pricing {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #101828;
}

.cart-page__item-price {
    font-size: 16px;
    font-weight: 700;
}

.cart-page__item-subtotal {
    color: #667085;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cart-page__item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.cart-page__qty {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px;
    border: 1px solid #d0d5dd;
    border-radius: 999px;
}

.cart-page__qty button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 999px;
    background: #f5f7fa;
    color: #101828;
    cursor: pointer;
    font-size: 12px;
}

.cart-page__qty button:hover:not(:disabled) {
    background: #0157fe;
    color: #fff;
}

.cart-page__qty button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cart-page__qty span {
    min-width: 20px;
    text-align: center;
    font-weight: 700;
    color: #101828;
    font-size: 13px;
}

.cart-page__remove {
    border: 0;
    background: transparent;
    color: #b42318;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
}

.cart-page__remove:hover {
    color: #912018;
}

.cart-page__summary {
    position: sticky;
    top: 120px;
    padding: 22px;
}

.cart-page__summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.cart-page__summary-head span {
    color: #667085;
    font-size: 13px;
}

.cart-page__summary-rows {
    display: grid;
    gap: 12px;
    padding: 14px 0 18px;
    border-top: 1px solid #eaecf0;
    border-bottom: 1px solid #eaecf0;
}

.cart-page__summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #101828;
    font-size: 14px;
}

.cart-page__summary-row strong {
    font-size: 21px;
    line-height: 1;
}

.cart-page__summary-row--muted {
    color: #667085;
    font-size: 13px;
}

.cart-page__summary-row--total {
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px solid #dfe3e8;
    font-weight: 700;
}

.cart-page__summary-row--total span:first-child {
    color: #101828;
}

.cart-page__summary-actions {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.cart-page__summary-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    font-size: 13px;
}

.cart-page__summary-actions .btn.is-disabled,
.cart-page__summary-actions .btn:disabled {
    opacity: 0.55;
    pointer-events: none;
    box-shadow: none;
}

.cart-page__summary-note {
    margin: 14px 0 0;
    color: #667085;
    font-size: 13px;
    line-height: 1.6;
}

.cart-page__quote-modal {
    max-width: 700px;
}

.cart-page__quote-body {
    display: grid;
    gap: 18px;
}

.cart-page__quote-section {
    display: grid;
    gap: 12px;
}

.cart-page__quote-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #101828;
    font-weight: 600;
    font-size: 14px;
}

.cart-page__quote-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.cart-page__quote-helper {
    margin: 0;
    color: #667085;
    font-size: 12px;
}

.cart-page__quote-helper a {
    color: #0157fe;
    text-decoration: none;
}

.cart-page__quote-helper a:hover {
    text-decoration: underline;
}

.cart-page__quote-modal .modal__footer .btn {
    padding: 10px 14px;
    font-size: 12px;
}

@media (max-width: 1080px) {
    .cart-page__layout {
        grid-template-columns: 1fr;
    }

    .cart-page__summary {
        position: static;
    }
}

@media (max-width: 767px) {
    body[data-page="carrito"] .header,
    body[data-page="carrito"] .header__nav,
    body[data-page="carrito"] .header__mobile-search,
    body[data-page="carrito"] .bottom-bar {
        display: none !important;
    }

    body[data-page="carrito"] {
        background: #f6f7fb;
    }

    .cart-page {
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 0 24px;
    }

    .cart-page[data-state="filled"] {
        padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
    }

    .cart-page .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cart-page__mobile-bar {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }

    .cart-page__back {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        box-shadow: 0 8px 18px rgba(16, 24, 40, 0.07);
    }

    .cart-page__back i {
        font-size: 20px;
    }

    .cart-page__header {
        display: none;
    }

    .cart-page__layout {
        gap: 10px;
    }

    .cart-page__panel,
    .cart-page__summary {
        border-radius: 16px;
        box-shadow: 0 10px 22px rgba(16, 24, 40, 0.04);
    }

    .cart-page__loading {
        min-height: 188px;
        padding: 16px;
    }

    .cart-page__loading-line--title {
        width: 130px;
        height: 16px;
        margin-bottom: 14px;
    }

    .cart-page__loading-item {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 10px;
        padding: 10px 0;
    }

    .cart-page__loading-item span {
        width: 56px;
        height: 56px;
        border-radius: 12px;
    }

    .cart-page__panel-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px 16px 12px;
    }

    .cart-page__panel-header h2,
    .cart-page__summary-head h2 {
        font-size: 18px;
    }

    .cart-page__panel-header p,
    .cart-page__summary-head span {
        font-size: 12px;
    }

    .cart-page .btn,
    .cart-page__summary-actions .btn,
    .cart-page__quote-modal .modal__footer .btn {
        padding: 9px 10px;
        font-size: 11px;
        border-radius: 10px;
    }

    .cart-page__item {
        grid-template-columns: 68px minmax(0, 1fr);
        gap: 8px;
        padding: 10px;
    }

    .cart-page__origin-header {
        padding: 10px;
    }

    .cart-page__origin-header strong {
        font-size: 12px;
    }

    .cart-page__item-media {
        width: 68px;
        height: 68px;
        border-radius: 12px;
    }

    .cart-page__item-name {
        margin-bottom: 4px;
        font-size: 13px;
        line-height: 1.28;
    }

    .cart-page__item-meta {
        gap: 5px 6px;
        margin-bottom: 6px;
        font-size: 11px;
    }

    .cart-page__item-location-tag {
        padding: 2px 6px;
    }

    .cart-page__item-location-tag strong,
    .cart-page__item-subtotal {
        font-size: 10px;
    }

    .cart-page__item-price {
        font-size: 14px;
    }

    .cart-page__item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }

    .cart-page__qty {
        gap: 4px;
        padding: 2px;
    }

    .cart-page__qty button {
        width: 26px;
        height: 26px;
    }

    .cart-page__qty span {
        min-width: 18px;
        font-size: 12px;
    }

    .cart-page__remove {
        font-size: 11px;
    }

    .cart-page__summary {
        padding: 14px 14px 16px;
    }

    .cart-page__summary-head {
        margin-bottom: 10px;
    }

    .cart-page__summary-rows {
        gap: 8px;
        padding: 10px 0 12px;
    }

    .cart-page__summary-row {
        font-size: 12px;
    }

    .cart-page__summary-row--muted {
        font-size: 12px;
    }

    .cart-page__summary-row--total {
        padding-top: 9px;
    }

    .cart-page__summary-row strong {
        font-size: 18px;
    }

    .cart-page__summary-note {
        display: none;
    }

    .cart-page[data-state="filled"] .cart-page__summary-actions {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
        z-index: 90;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 0;
        padding: 8px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid #e4e7ec;
        border-radius: 16px;
        box-shadow: 0 14px 30px rgba(16, 24, 40, 0.14);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .cart-page[data-state="filled"] .cart-page__summary-actions .btn {
        min-width: 0;
        min-height: 42px;
        padding: 8px 10px;
        font-size: 10px;
        white-space: nowrap;
    }

    .cart-page__quote-grid {
        grid-template-columns: 1fr;
    }
}