/* Carrito VERSION-ACTUAL */

.cart-floating {
    position: fixed;
    bottom: 82px;
    right: 16px;
    z-index: 950;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: #fff;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    border: 3px solid #5a4ee4;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(44, 52, 120, 0.18);
}

.cart-floating:hover {
    transform: translateY(-4px) scale(1.05);
}

.cart-floating img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    background: #fff;
}

.cart-floating.cart-attention {
    animation: cart-bounce 0.8s ease;
}

@keyframes cart-bounce {
    0% { transform: scale(1) translateY(0); }
    20% { transform: scale(1.1) translateY(-6px); }
    45% { transform: scale(0.98) translateY(0); }
    70% { transform: scale(1.05) translateY(-3px); }
    100% { transform: scale(1) translateY(0); }
}

#cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: #e74a3b;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid #fff;
}

.cart-notification {
    position: fixed;
    bottom: 160px;
    right: 16px;
    background: #333;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1600;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.cart-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--motion-duration-ui) var(--motion-ease-ui), visibility var(--motion-duration-ui) var(--motion-ease-ui);
}

.cart-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-modal {
    background: #fff;
    width: min(92vw, 420px);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 20px 0 0 20px;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--motion-duration-ui) var(--motion-ease-ui);
    overflow: hidden;
}

.cart-modal-overlay.active .cart-modal {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .cart-modal-overlay,
    .cart-modal {
        transition: none;
    }
}

.cart-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.cart-modal-title {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #222;
}

.cart-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-step {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #d6deef;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #7a88a6;
    background: #fff;
}

.cart-step--active {
    background: #1f2a44;
    color: #fff;
    border-color: #1f2a44;
}

.cart-step-line {
    width: 110px;
    height: 2px;
    background: linear-gradient(90deg, #1f2a44 0%, #d6deef 100%);
    border-radius: 999px;
}

.cart-stepper-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #7a88a6;
    max-width: 160px;
}

.cart-step-label--active {
    color: #1f2a44;
    font-weight: 700;
}

.cart-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.cart-promo-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-bottom: 1px solid #a5d6a7;
    color: #2e7d32;
    font-size: 13px;
}

.cart-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

.cart-modal.cart-view-animate .cart-modal-body {
    animation: cart-view-sweep 0.55s ease both;
}

.cart-modal.cart-view-animate[data-view="checkout"] .cart-modal-body {
    animation: cart-view-sweep 0.55s ease both;
}

.cart-modal.cart-view-animate[data-view="cart"] .cart-modal-body {
    animation: cart-view-return 0.5s ease both;
}

@keyframes cart-view-sweep {
    0% {
        opacity: 0;
        transform: translateX(26px) scale(0.98);
        filter: blur(4px);
    }
    60% {
        opacity: 1;
        transform: translateX(0) scale(1.01);
        filter: blur(0);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes cart-view-return {
    0% {
        opacity: 0;
        transform: translateX(-18px) scale(0.98);
        filter: blur(3px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

.cart-modal-footer {
    padding: 16px 24px calc(24px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-empty {
    text-align: center;
    padding: 48px 24px;
}

.cart-empty p {
    color: #666;
    font-size: 16px;
    margin: 0 0 24px;
}

.btn-cart-continue {
    padding: 12px 32px;
    background: linear-gradient(135deg, #5578b8 0%, #3e5f97 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 72px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.cart-item-talla,
.cart-item-variante {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 6px;
}

.cart-item-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.cart-item-patron {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    object-fit: cover;
}

.cart-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #5578b8;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.cart-item-subtotal {
    width: 100%;
    font-size: 12px;
    font-weight: 600;
    color: #1f2a44;
}

.cart-item-mayorista {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.08) 0%, rgba(37, 211, 102, 0.03) 100%);
    border-left: 3px solid #25d366;
    border-radius: 10px 0 0 10px;
}

.precio-tachado {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 500;
}

.precio-mayor {
    color: #25d366;
    font-weight: 800;
}

.badge-mayor {
    background: #25d366;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #5578b8;
    color: #fff;
    border-color: #5578b8;
}

.cart-item-quantity span {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 17px;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cart-item-remove:hover {
    opacity: 1;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 18px;
}

.cart-client-form {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid #6a35c6;
    border-radius: 12px;
    background: #6a35c6;
    box-shadow: 0 0 0 1px rgba(120, 86, 200, 0.2), 0 0 26px rgba(120, 86, 200, 0.45);
}

.cart-checkout-banner {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0;
    margin-bottom: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #ffe9d2 0%, #ffe1f0 100%);
    border: 1px solid #f7c9d9;
    overflow: hidden;
}

.cart-checkout-banner__image {
    width: 100%;
    height: auto;
    border-radius: 0;
    display: block;
    object-fit: cover;
    aspect-ratio: 3 / 1;
    background: #f5f2f0;
}

.cart-client-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    padding: 8px 10px;
    border-radius: 10px;
}

.cart-client-benefit {
    display: none;
}

.cart-client-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cart-client-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cart-client-field span {
    font-size: 12px;
    color: #f7f3ff;
    font-weight: 700;
}

.cart-client-field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 14px;
    color: #1f2a44;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-client-field input:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}

.cart-client-field-full {
    grid-column: 1 / -1;
}

.cart-client-error {
    min-height: 16px;
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #d14343;
}

.cart-checkout-note {
    margin-bottom: 12px;
    font-size: 12px;
    color: #4a5a7f;
    background: #f2f5fb;
    border: 1px dashed #c9d5f0;
    padding: 10px 12px;
    border-radius: 10px;
}

.cart-client-consent {
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #f7f3ff;
    font-size: 12px;
    line-height: 1.4;
}

.cart-client-consent input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    accent-color: #5578b8;
}

.cart-client-consent a {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.cart-total-amount {
    font-size: 24px;
    font-weight: 700;
    color: #5578b8;
}

.cart-actions {
    display: flex;
    gap: 12px;
}

.btn-cart-clear {
    flex: 1;
    padding: 14px 16px;
    background: linear-gradient(135deg, #ef5350 0%, #d32f2f 100%);
    color: #fff;
    border: 1px solid #c62828;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 18px rgba(211, 47, 47, 0.22);
}

.btn-cart-clear:hover {
    background: linear-gradient(135deg, #f0625f 0%, #c62828 100%);
}

.btn-cart-clear__icon {
    font-size: 16px;
    line-height: 1;
}

.btn-cart-secondary {
    flex: 1;
    padding: 14px 16px;
    background: #fff;
    color: #666;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-cart-secondary:hover {
    background: #f5f5f5;
}

.btn-cart-whatsapp {
    flex: 2;
    padding: 14px 24px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-cart-whatsapp:hover {
    background: #1fb855;
}

.btn-cart-whatsapp:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-cart-whatsapp img {
    filter: brightness(0) invert(1);
}

.cta-buttons .btn-add-to-cart:hover {
    filter: brightness(1.06);
}

.cta-buttons .btn-add-to-cart .cart-icon {
    font-size: 20px;
    line-height: 1;
}

.selection-error-msg {
    color: #d84315;
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0 0;
}

@media (min-width: 640px) {
    .cart-modal-overlay {
        padding: 0;
    }

    .cart-modal {
        border-radius: 24px 0 0 24px;
    }
}

@media (max-width: 767px) {
    .cart-floating {
        bottom: 68px;
        right: 12px;
        width: 54px;
        height: 54px;
        padding: 5px;
    }

    .cart-modal-body {
        padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .cart-modal-footer {
        padding: 12px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .cart-modal-header {
        padding: 16px 16px 14px;
        gap: 10px;
    }

    .cart-modal-header h2 {
        font-size: 18px;
    }

    .cart-modal-title {
        gap: 4px;
    }

    .cart-stepper-labels {
        font-size: 10px;
        max-width: 136px;
    }

    .cart-promo-banner {
        padding: 10px 16px;
        font-size: 12px;
        line-height: 1.35;
    }

    .cart-item {
        gap: 10px;
    }

    .cart-item-image {
        width: 60px;
        height: 80px;
    }

    .cart-item-info h4 {
        font-size: 13px;
    }

    .cart-step-line {
        width: 70px;
    }

    .cart-checkout-banner {
        margin-bottom: 10px;
        border-radius: 12px;
    }

    .cart-client-form {
        margin-bottom: 12px;
        padding: 10px;
        border-radius: 10px;
        box-shadow: 0 0 0 1px rgba(120, 86, 200, 0.18), 0 0 18px rgba(120, 86, 200, 0.32);
    }

    .cart-client-title {
        margin-bottom: 10px;
        font-size: 12px;
        padding: 7px 9px;
    }

    .cart-client-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .cart-client-field {
        gap: 5px;
    }

    .cart-client-field span {
        font-size: 11px;
    }

    .cart-client-field input {
        padding: 9px 11px;
        font-size: 13px;
        border-radius: 9px;
    }

    .cart-client-consent {
        margin-top: 8px;
        gap: 7px;
        font-size: 11px;
        line-height: 1.3;
    }

    .cart-client-consent input {
        width: 15px;
        height: 15px;
    }

    .cart-total {
        margin-bottom: 12px;
        font-size: 16px;
    }

    .cart-total-amount {
        font-size: 21px;
    }

    .cart-actions {
        gap: 10px;
    }

    .btn-cart-whatsapp {
        font-size: 14px;
        padding: 12px 16px;
    }

    .btn-cart-clear,
    .btn-cart-secondary {
        padding: 12px 14px;
        font-size: 13px;
    }
}

