/* =========================================================
   Mini Cart Drawer — Revedoux
   ========================================================= */

   #rvx-mini-cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 999997;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease;
    touch-action: none;
}
#rvx-mini-cart-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.rvx-mcd {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 92vw;
    background: #fff;
    z-index: 999998;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,.12);
    font-family: Inter, Arial, sans-serif;
    overscroll-behavior: contain;
}
.rvx-mcd.is-open {
    transform: translateX(0);
}
html.rvx-mcd-lock { overflow: hidden; overscroll-behavior: none; }
body.rvx-mcd-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
/* ---------- Header ---------- */
.rvx-mcd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.rvx-mcd-header h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 0;
    color: #111;
}
.rvx-mcd-close {
    background: none;
    border: none;
    line-height: 1;
    cursor: pointer;
    color: #222;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rvx-mcd-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain; 
    -webkit-overflow-scrolling: touch; 
    padding: 0 22px;
    display: flex;
    flex-direction: column;
}

/* ---------- Estado vacío ---------- */
.rvx-mcd-zero-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 36px 60px;
}
.rvx-mcd-zero-icon {
    color: #222;
    margin-bottom: 22px;
}
.rvx-mcd-zero-icon svg {
    display: block;
}
.rvx-mcd-zero-title {
    font-size: 19px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
}
.rvx-mcd-zero-text {
    font-size: 14px;
    color: #777;
    line-height: 1.5;
    margin: 0 0 26px;
    max-width: 280px;
}
.rvx-mcd-zero-btn {
    display: inline-block;
    background: #111;
    color: #fff !important;
    text-decoration: none;
    padding: 15px 34px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 6px;
}

/* ---------- Progreso ---------- */
.rvx-mcd-progress-wrapper {
    padding: 18px 4px 34px;
    margin-bottom: 15px;
}
.rvx-mcd-progress-text {
    text-align: center;
    font-size: 13.5px;
    color: #333;
    margin: 0 0 42px;
}
.rvx-mcd-progress-text strong {
    font-weight: 700;
}
.rvx-mcd-progress-complete {
    color: #1a9c56;
    font-weight: 600;
}

.rvx-mcd-progress-bar {
    position: relative;
    height: 8px;
    background: #e6e6e6;
    border-radius: 4px;
    margin: 0 20px;
}
.rvx-mcd-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #111;
    border-radius: 4px;
    transition: width .3s ease;
}

.rvx-mcd-milestone {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 40px;
}
.rvx-mcd-milestone-icon {
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    position: relative;
    color: #9a9fae;
}
.rvx-mcd-milestone-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}
.rvx-mcd-milestone.is-active .rvx-mcd-milestone-icon {
    background: #111;
    border-color: #111;
    color: #fff;
}
.rvx-mcd-milestone-label {
    font-size: 10.5px;
    line-height: 1.15;
    text-align: center;
    color: #666;
    white-space: nowrap;
}

/* ---------- Items ---------- */
.rvx-mcd-empty {
    text-align: center;
    color: #777;
    padding: 40px 0;
}
.rvx-mcd-item {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 16px 0;
}
.rvx-mcd-item-remove {
    position: absolute;
    top: 10px;
    left: 4px;
    background: #1a1a1a;
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rvx-mcd-item-image {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f4f4f4;
    margin-left: 14px;
}
.rvx-mcd-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rvx-mcd-item-info {
    flex: 1;
    min-width: 0;
}
.rvx-mcd-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
}
.rvx-mcd-gift-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    background: #eafbe7;
    color: #1a9c56;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 6px;
    vertical-align: middle;
}
.rvx-mcd-item-meta {
    font-size: 12.5px;
    color: #888;
    margin: 0 0 8px;
}
.rvx-mcd-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    width: fit-content;
}
.rvx-mcd-qty button {
    background: #fafafa;
    border: none;
    width: 28px;
    height: 28px;
    font-size: 15px;
    cursor: pointer;
    color: #333;
}
.rvx-mcd-qty-input {
    width: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    height: 28px;
    font-size: 13px;
    -moz-appearance: textfield;
}
.rvx-mcd-qty-input::-webkit-outer-spin-button,
.rvx-mcd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.rvx-mcd-item-price {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}
.rvx-mcd-gift-price {
    color: #1a9c56;
    font-weight: 700;
}

/* ---------- Cupón ---------- */
.rvx-mcd-coupon {
    margin-top: auto;
    padding: 16px 0;
    margin-top: 6px;
}
.rvx-mcd-coupon-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    font-size: 13.5px;
    color: #222;
    cursor: pointer;
    padding: 0;
}
.rvx-mcd-coupon-arrow {
    transition: transform .2s ease;
}
.rvx-mcd-coupon.is-collapsed .rvx-mcd-coupon-arrow {
    transform: rotate(180deg);
}
.rvx-mcd-coupon-body {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    max-height: 60px;
    overflow: hidden;
    transition: max-height .25s ease, margin-top .25s ease;
}
.rvx-mcd-coupon.is-collapsed .rvx-mcd-coupon-body {
    max-height: 0;
    margin-top: 0;
}
.rvx-mcd-coupon-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0 12px;
    height: 42px;
    font-size: 13px;
}
.rvx-mcd-coupon-apply {
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0 18px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .03em;
    cursor: pointer;
}
.rvx-mcd-coupon-message {
    font-size: 12.5px;
    margin: 8px 0 0;
    color: #c0392b;
}
.rvx-mcd-coupon-message.is-success {
    color: #1a9c56;
}

/* ---------- Footer ---------- */
.rvx-mcd-footer {
    flex-shrink: 0;
    padding: 18px 22px 22px;
    border-top: 1px solid #eee;
}
.rvx-mcd-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    color: #111;
    margin-bottom: 8px;
}
.rvx-mcd-subtotal strong {
    font-weight: 700;
}
.rvx-mcd-note {
    font-size: 11.5px;
    color: #999;
    margin: 0 0 16px;
    line-height: 1.4;
}
.rvx-mcd-note-link {
    color: #2b6cb0; /* cambia este hex al color que quieras */
    text-decoration: underline;
}
.rvx-mcd-note-link:hover {
    color: #1a4d85;
}


.rvx-mcd-checkout-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #111;
    color: #fff !important;
    text-decoration: none;
    padding: 15px 0;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .04em;
    border-radius: 6px;
    box-sizing: border-box;
}
.rvx-mcd-continue {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: #333;
    font-size: 12.5px;
    text-decoration: underline;
    margin-top: 14px;
    cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .rvx-mcd { width: 100%; max-width: 100vw; }
}


:root {
    --rvx-badge-color: #21c4dd;
}

.rvx-mcd-icon-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    text-decoration: none;
    line-height: 0;
}

.rvx-mcd-icon-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    border-radius: 50%;
    background: var(--rvx-badge-color);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
}

.rvx-mcd-icon-badge.is-zero {
    display: none; /* oculta el badge si el carrito está vacío; quita esta regla si prefieres mostrar el "0" siempre */
}


.rvx-mcd-icon-trigger svg {
    width: 34px;
    height: 34px;
    display: block;
}

@media (max-width: 480px) {
    .rvx-mcd-icon-trigger svg {
        width: 30px;
        height: 30px;
    }
}


/* Precio con descuento por producto */
.rvx-mcd-item-price-now {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #111;
    white-space: nowrap;
}
.rvx-mcd-item-price-was {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #999;
    text-decoration: line-through;
    white-space: nowrap;
    margin-top: 2px;
}

/* Filas de Descuentos y Total en el footer */
.rvx-mcd-discount-row,
.rvx-mcd-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #111;
    margin-bottom: 8px;
}
.rvx-mcd-discount-row strong {
    color: #1a9c56; /* verde, igual que en tu referencia */
    font-weight: 700;
}
.rvx-mcd-total-row strong {
    font-weight: 700;
}


/* ---------- Fila de envío ---------- */
.rvx-mcd-shipping-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    color: #111;
    margin-bottom: 8px;
}
.rvx-mcd-shipping-label {
    display: inline-flex;
    align-items: center;
}
.rvx-mcd-shipping-free {
    color: #1a9c56;
    font-weight: 700;
}

/* ---------- Ícono + tooltip de info ---------- */
.rvx-mcd-info-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: 5px;
    color: #999;
    cursor: pointer;
    vertical-align: middle;
}
.rvx-mcd-info-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.rvx-mcd-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 0;
    transform: translateY(4px);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
    padding: 10px 14px;
    border-radius: 8px;
    width: 180px;
    max-width: min(230px, calc(100vw - 60px));
    text-align: left;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    z-index: 5;
}
.rvx-mcd-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 10px;
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
}

/* Hover (desktop) */
.rvx-mcd-info-icon:hover .rvx-mcd-tooltip,
/* Tap (móvil, vía JS) */
.rvx-mcd-info-icon.is-active .rvx-mcd-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}


/* ---------- Aviso de cantidad no disponible ---------- */
.rvx-mcd-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    max-width: 420px;
    margin: 0 auto;
    background: #FF595E;
    color: #fff;
    padding: 16px 42px 16px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.45;
    z-index: 1000000;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .2s ease, transform .2s ease;
    pointer-events: none;
}
.rvx-mcd-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.rvx-mcd-toast-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 480px) {
    .rvx-mcd-toast { max-width: none; }
}