/* ============================================================
   assets/css/checkout-upsell.css
   Carrusel "Agregar algo más" en el checkout
   ============================================================ */

/* ── Wrapper ── */
.mcm-upsell-wrap {
    width: 100%;
    margin-bottom: 24px;
    box-sizing: border-box;
    max-width: 100vw;
}

@media (min-width: 769px) {
    .mcm-upsell-wrap {
        width: 40vw !important;
        max-width: 100%;
    }
}

.mcm-upsell-title {
    font-family: "Montserrat", sans-serif !important;
    font-size: 45px !important;
    font-weight: 300 !important;
    color: #ED7136 !important;
    margin: 0 0 12px;
    text-transform: uppercase;
    line-height: 1.1;
    word-break: break-word;
}

@media (max-width: 768px) {
    .mcm-upsell-title {
        font-size: 24px !important;
        text-align: center;
    }
}

/* ── Carrusel ── */
.mcm-carrusel-outer {
    display: flex;
    align-items: center;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    padding: 0 20px;
    /* espacio para las flechas absolutas */
}

.mcm-carrusel-viewport {
    overflow: hidden;
    /* corta cualquier card que sobresalga */
    flex: 1;
    min-width: 0;
}

.mcm-carrusel-track {
    display: flex;
    align-items: stretch;
    transition: transform .4s ease;
    will-change: transform;
}

/* ── Tarjeta ── */
.mcm-card {
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    background: #fff;
    border: none;
    border-radius: 0 !important;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
    transition: transform .2s, box-shadow .2s;
    font-size: .78rem;
    margin-right: 8px;
    display: flex;
    flex-direction: column;
}

.mcm-card:last-child {
    margin-right: 0;
}

.mcm-card:hover {
    transform: translateY(-1px);
}

.mcm-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.mcm-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mcm-card-body {
    padding: 15px 14px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.mcm-card-name {
    font-size: 17px;
    font-weight: 400;
    color: #999;
    margin: 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 1.4em;
}

.mcm-card-price {
    font-size: .82rem;
    font-weight: 700;
    color: #ED7136;
    margin: 0 0 2px;
}

/* ── Select variaciones ── */
.mcm-select-variation {
    height: 30px;
    width: 100%;
    padding: 3px 4px;
    font-size: .72rem;
    border: 1px solid #fc5e41;
    border-radius: 0 !important;
    margin-bottom: 4px;
    background: #fafafa;
    color: #999;
    cursor: pointer;
}

.mcm-select-variation:focus {
    outline: none;
    border-color: #ED7136 !important;
}

/* ── Fila acción ── */
.mcm-action-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
}

/* ── Cantidad ── */
.mcm-qty-wrap {
    height: 40px !important;
    display: flex;
    align-items: center;
    flex: 0 0 70px !important;
    border-radius: 4px;
    overflow: hidden;
    background: #f9f9f9;
}

.mcm-qty-btn {
    width: 20px !important;
    border: none;
    background: transparent;
    font-size: .8rem !important;
    cursor: pointer;
    color: #999;
    padding: 0 !important;
    transition: background .15s;
}

.mcm-qty-btn:hover {
    background: #ececec;
}

button.mcm-qty-btn {
    height: 100% !important;
}

.mcm-qty-input {
    height: 40px;
    flex: 1 !important;
    min-width: 0 !important;
    width: 100% !important;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-size: .7rem !important;
    font-weight: 700;
    padding: 0 !important;
    margin: 0 !important;
    color: #999;
    background: #fff;
    -moz-appearance: textfield;
}

.mcm-qty-input::-webkit-inner-spin-button,
.mcm-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

/* ── Botón Agregar ── */
.mcm-btn-agregar {
    height: 40px !important;
    flex: 1;
    padding: 4px !important;
    background: #fff;
    color: #ED7136 !important;
    border: 1px solid #ED7136 !important;
    box-sizing: border-box !important;
    border-radius: 5px;
    font-size: .7rem !important;
    font-weight: 400 !important;
    cursor: pointer;
    transition: background .2s, color .2s, opacity .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mcm-btn-agregar:hover,
.mcm-btn-agregar.added {
    background: #ED7136;
    color: #fff;
}

.mcm-btn-agregar:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* ── Flechas ── */
.mcm-arrow {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #ED7136;
    border-radius: 50%;
    width: 30px !important;
    height: 30px !important;
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, border-color .2s;
    color: #ED7136;
    padding: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.mcm-arrow-prev {
    left: -10px;
    width: 30px !important;
    height: 30px !important;
}

.mcm-arrow-next {
    right: -10px;
    width: 30px !important;
    height: 30px !important;
}

.mcm-arrow:hover {
    background: #ED7136;
    color: #fff;
    border-color: #ED7136;
}

.mcm-arrow:disabled {
    opacity: .3;
    cursor: default;
}

.mcm-arrow.mcm-hidden {
    display: none !important;
}

/* ── Anular estilos globales del tema que pisan los botones del carrusel ── */

/* Flechas - estado normal */
/* ── Override máxima especificidad contra el tema ── */
[type=button].mcm-arrow,
[type=button].mcm-btn-agregar,
[type=button].mcm-qty-btn,
button.mcm-arrow,
button.mcm-btn-agregar,
button.mcm-qty-btn {
    border-color: #ED7136 !important;
    color: #ED7136 !important;
}

/* Flechas */
[type=button].mcm-arrow,
button.mcm-arrow {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid #ED7136 !important;
    border-radius: 50% !important;
    color: #ED7136 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}

[type=button].mcm-arrow:hover,
[type=button].mcm-arrow:focus,
button.mcm-arrow:hover,
button.mcm-arrow:focus {
    background: #ED7136 !important;
    border-color: #ED7136 !important;
    color: #fff !important;
}

[type=button].mcm-arrow:disabled,
button.mcm-arrow:disabled {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: #ED7136 !important;
    color: #ED7136 !important;
    opacity: .3 !important;
}

/* Botón Agregar */
[type=button].mcm-btn-agregar,
button.mcm-btn-agregar {
    background: #fff !important;
    border: 1px solid #ED7136 !important;
    border-radius: 5px !important;
    color: #ED7136 !important;
    padding: 4px !important;
}

[type=button].mcm-btn-agregar:hover,
[type=button].mcm-btn-agregar:focus,
button.mcm-btn-agregar:hover,
button.mcm-btn-agregar:focus,
button.mcm-btn-agregar.added {
    background: #ED7136 !important;
    border-color: #ED7136 !important;
    color: #fff !important;
}

[type=button].mcm-btn-agregar:disabled,
button.mcm-btn-agregar:disabled {
    background: #fff !important;
    color: #ED7136 !important;
    opacity: .55 !important;
    cursor: not-allowed !important;
}

/* Botones qty */
[type=button].mcm-qty-btn,
button.mcm-qty-btn {
    background: transparent !important;
    border: none !important;
    color: #999 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

[type=button].mcm-qty-btn:hover,
[type=button].mcm-qty-btn:focus,
button.mcm-qty-btn:hover,
button.mcm-qty-btn:focus {
    background: #ececec !important;
    border: none !important;
    color: #999 !important;
}

#mcm-upsell-wrap [type=button],
#mcm-upsell-wrap button {
    border: 1px solid #ED7136 !important;
    color: #ED7136 !important;
    background: rgba(255, 255, 255, 0.85) !important;
}



/* Ahora sí aplicamos los estilos reales */
button.mcm-arrow {
    background: rgba(255, 255, 255, 0.85) !important;

    border-radius: 50% !important;
    color: #ED7136 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

button.mcm-arrow:hover,
button.mcm-arrow:focus {
    background: #ED7136 !important;
    border-color: #ED7136 !important;
    color: #fff !important;
}

button.mcm-btn-agregar {
    background: #fff !important;
    border: 1px solid #ED7136 !important;
    border-radius: 5px !important;
    color: #ED7136 !important;
}

button.mcm-btn-agregar:hover,
button.mcm-btn-agregar:focus,
button.mcm-btn-agregar.added {
    background: #ED7136 !important;
    border-color: #ED7136 !important;
    color: #fff !important;
}

button.mcm-qty-btn {
    background: transparent !important;
    border: none !important;
    color: #999 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

button.mcm-qty-btn:hover {
    background: #ececec !important;
    color: #999 !important;
}




/* ── Responsive ── */
@media (min-width: 769px) {
    .mcm-card {
        flex: 0 0 calc(33.333% - 5.33px);
    }
}

@media (max-width: 768px) {
    .mcm-card {
        flex: 0 0 calc(50% - 4px);
    }
}

/* ── Botón X para eliminar (carrito + checkout) ── */
.woocommerce a.remove.mcm-remove-x,
.woocommerce-page a.remove.mcm-remove-x,
.mcm-remove-checkout {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 1px solid #FC5E41 !important;
    border-radius: 50% !important;
    color: #fff !important;
    background: #FC5E41 !important;
    font-size: 18px;
    line-height: 18px;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none !important;
    margin-right: 8px;
    margin-left: 0;
    vertical-align: middle;
    padding: 0;
}

.woocommerce a.remove.mcm-remove-x:hover,
.woocommerce-page a.remove.mcm-remove-x:hover,
.mcm-remove-checkout:hover {
    background: #fff !important;
    color: #FC5E41 !important;
    border-color: #FC5E41 !important;
}

.mcm-remove-checkout:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}