/* Shortcode: Enlace volver a pedidos */
.wd-endpoint-wrapper .wd-back-link {
    color: inherit;
    transition: color 0.3s ease;
}
.wd-endpoint-wrapper .wd-back-link:hover {
    color: #be0d57;
}

/* Tarjeta: Pendiente de Acción (On-Hold) */
.mongo-on-hold-card {
    margin-top: 30px;
}
.mongo-on-hold-text {
    color: #555555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
}
.mongo-on-hold-ref {
    background: rgba(190, 13, 87, 0.05);
    border-left: 4px solid #be0d57;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    color: #333333;
}
.mongo-on-hold-ref strong {
    color: inherit;
}
.mongo-on-hold-ref strong:last-child {
    color: #be0d57;
}


/* ============================================================
   MI CUENTA
   ============================================================ */

.wd-endpoint-title-text {
	font-weight: 700;
	color: #000;
}




/* ==========================================================================
   TIPOGRAFÍA INTRODUCTORIA (PEDIDO ÚNICO)
   ========================================================================== */

.woocommerce-MyAccount-content > p:first-of-type {
    font-size: 15px;
    color: #555555;
    line-height: 1.6;
}

.woocommerce-MyAccount-content > p:first-of-type mark {
    background: transparent;
    color: #111111;
    font-weight: 600;
    padding: 0;
}

/* ==========================================================================
   BADGES DE ESTADOS UNIFICADOS (Tabla y Pedido Único)
   ========================================================================== */

.woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .order-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
}

.woocommerce-MyAccount-content > p:first-of-type mark.order-status {
    margin-left: 5px;
    padding: 4px 12px; 
}

/* ==========================================================================
   PALETA DE ESTADOS DINÁMICA (Unificada para Tabla y Pedido Único)
   ========================================================================== */

body.order-status-processing .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-processing {
    background-color: #e8f5e9; 
    color: #2e7d32;
}

body.order-status-completed .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-completed {
    background-color: #dceff6;
    color: #1f93b4;
}

body.order-status-en_reparto .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-en_reparto {
    background-color: #fff8e1; 
    color: #f57f17; 
}

body.order-status-en_transito .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-en_transito {
    background-color: #e3f2fd; 
    color: #1565c0; 
}

body.order-status-listo_para_enviar .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-listo_para_enviar {
    background-color: #f3e5f5; 
    color: #6a1b9a; 
}

body.order-status-cancelled .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-cancelled,
body.order-status-failed .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-failed {
    background-color: #f5f5f5; 
    color: #616161; 
}

body.order-status-refunded .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-refunded {
    background-color: #eceff1; 
    color: #455a64; 
}

body.order-status-on-hold .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-on-hold,
body.order-status-pending .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-pending {
    background-color: #ffffff; 
    color: #616161; 
    box-shadow: inset 0 0 0 2px #e0e0e0;
}

body.order-status-incidencia .woocommerce-MyAccount-content > p:first-of-type mark.order-status,
table.woocommerce-orders-table .status-incidencia {
    background-color: #ffebee; 
    color: #d32f2f;
    box-shadow: inset 0 0 0 1px #d32f2f;
}

/* ==========================================================================
   RESETEOS Y ESTRUCTURA DE DIRECCIONES Y OTROS TÍTULOS DE MI CUENTA
   ========================================================================== */

.woocommerce-customer-details {
    background: transparent;
    padding: 0;
    box-shadow: none;
    border: none;
    border-bottom: 0 !important;
    margin-bottom: 0;
}

.woocommerce-customer-details address,
.woocommerce-Addresses address {
    font-style: normal;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
}



@media (max-width:1024px) {
    table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number a:not(.button) {
        position: relative;
        padding-left: 20px;
    }
    table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number a:not(.button)::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 8px;
        height: 8px;
        background-color: var(--wd-primary-color);
        border-radius: 50%;
        box-shadow: 0 0 0 4px rgba(190, 13, 87, 0.15);
    }
}

.woocommerce-edit-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset legend {
    font-size: 1.2rem;
}

span#account_display_name_description em {
    display: inline-block;
    line-height: 1.2;
    margin-top: 7px;
    vertical-align: top;
    font-style: normal;
    font-size: 0.8rem;
}

span#account_display_name_description {
    display: block;
}

.woocommerce-customer-details .woocommerce-columns,
.woocommerce-Addresses.col2-set {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.woocommerce-customer-details .woocommerce-column,
.woocommerce-Addresses .woocommerce-Address {
    flex: 1 1 calc(50% - 10px);
    margin-bottom: 0;
    width: auto;
    float: none;
}

/* ==========================================================================
   BOTONERÍA ESPECÍFICA (Volver a pedidos y Formularios)
   ========================================================================== */

.mongo-back-to-orders-bottom {
    margin-top: 40px;
    display: flex;
    justify-content: flex-start;
    border-top: 0 !important; 
    padding-top: 0 !important;
}

.mongo-back-btn {
    display: inline-flex;
    align-items: var(--wd-center);
    gap: 8px;
    padding: 12px 24px;
    background-color: var(--color-white);
    color: var(--wd-primary-color);
    border: 1px solid var(--wd-primary-color); 
    border-radius: 50px; 
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(190, 13, 87, 0.1); 
    transition: all 0.3s ease;
}

.mongo-back-btn:hover {
    background-color: var(--wd-primary-color);
    color: var(--color-white) !important;
    box-shadow: 0 4px 12px rgba(190, 13, 87, 0.25);
}

.mongo-back-btn .mongo-back-svg {
    stroke: currentColor; 
}

/* ==========================================================================
   TABLAS INTERNAS DE WOOCOMMERCE (Ver Pedido Único)
   ========================================================================== */

.woocommerce-table--order-details tfoot tr:last-child th,
.woocommerce-table--order-details tfoot tr:last-child td,
.woocommerce-table--order-details tbody:last-child tr:last-child th,
.woocommerce-table--order-details tbody:last-child tr:last-child td {
    border-bottom: 0;
}

.woocommerce-table--order-details .button {
    margin-bottom: 5px;
}

.woocommerce-table--order-details .button:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   TABLAS DE DATOS NATIVAS (Historial de Pedidos y Métodos de Pago)
   ========================================================================== */

table.woocommerce-orders-table,
table.woocommerce-MyAccount-paymentMethods {
    width: 100%;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-collapse: separate; 
    border-spacing: 0 16px; 
    margin-bottom: 40px;
}

table.woocommerce-orders-table thead th,
table.woocommerce-MyAccount-paymentMethods thead th {
    background-color: transparent;
    color: #888888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 24px 8px;
    border: none;
    font-weight: 600;
    text-align: var(--wd-center);
}

table.woocommerce-orders-table thead th:first-child,
table.woocommerce-MyAccount-paymentMethods thead th:first-child {
    padding-left: 40px;
}

table.woocommerce-orders-table thead th:last-child,
table.woocommerce-MyAccount-paymentMethods thead th:last-child {
    padding-right: 40px;
}

table.woocommerce-orders-table tbody tr,
table.woocommerce-MyAccount-paymentMethods tbody tr {
    background-color: var(--color-white);
    border: 1px solid var(--brdcolor-gray-300); 
    border-radius: var(--wd-brd-radius); 
    transition: box-shadow 0.3s ease-in-out, transform 0.2s ease;
}

@media (min-width:1024px) {
    table.woocommerce-orders-table tbody tr:hover,
    table.woocommerce-MyAccount-paymentMethods tbody tr:hover {
        background-color: var(--color-white); 
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px); 
    }
}

table.woocommerce-orders-table tbody td,
table.woocommerce-orders-table tbody th,
table.woocommerce-MyAccount-paymentMethods tbody td,
table.woocommerce-MyAccount-paymentMethods tbody th {
    padding: 20px 24px;
    border: none;
    vertical-align: middle;
    color: #555555;
    font-size: 15px;
    text-align: var(--wd-center); 
    background-color: transparent; 
    border: 1px solid var(--brdcolor-gray-300); 
    border-left: none;
    border-right: none;
}

table.woocommerce-orders-table tbody td:first-child,
table.woocommerce-orders-table tbody th:first-child,
table.woocommerce-MyAccount-paymentMethods tbody td:first-child {
    border-left: 1px solid var(--brdcolor-gray-300);
    border-radius: var(--wd-brd-radius) 0 0 var(--wd-brd-radius); 
    padding-left: 40px;
}

table.woocommerce-orders-table tbody td:last-child,
table.woocommerce-orders-table tbody th:last-child,
table.woocommerce-MyAccount-paymentMethods tbody td:last-child {
    border-right: 1px solid var(--brdcolor-gray-300);
    border-radius: 0 var(--wd-brd-radius) var(--wd-brd-radius) 0;
    padding-right: 40px;
}

table.woocommerce-orders-table tbody a:not(.button),
table.woocommerce-MyAccount-paymentMethods tbody a:not(.button) {
    color: var(--wd-primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

table.woocommerce-orders-table tbody a:not(.button):hover,
table.woocommerce-MyAccount-paymentMethods tbody a:not(.button):hover {
    opacity: 0.8;
}

table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions,
table.woocommerce-MyAccount-paymentMethods tbody td.payment-method-actions {
    white-space: normal; 
}

table.woocommerce-orders-table a.button,
table.woocommerce-MyAccount-paymentMethods a.button {
    display: inline-flex;
    align-items: var(--wd-center);
    justify-content: var(--wd-center);
    background-color: var(--bgcolor-gray-200);
    color: #000000; 
    border-radius: var(--wd-brd-radius);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 4px; 
    text-decoration: none;
}

table.woocommerce-orders-table a.button:hover,
table.woocommerce-MyAccount-paymentMethods a.button:hover {
    background-color: var(--wd-primary-color);
    color: var(--color-white);
}

table.woocommerce-orders-table a.button.order-again {
    background-color: var(--wd-primary-color);
    color: var(--color-white);
}

table.woocommerce-orders-table a.button.order-again:hover {
    background-color: #9c0a47;
    box-shadow: 0 4px 12px rgba(190, 13, 87, 0.25);
}

/* ==========================================================================
   BOTÓN PRINCIPAL: AÑADIR MÉTODO DE PAGO (CTA Primario)
   ========================================================================== */

.woocommerce-MyAccount-content > a.button[href*="crear-metodo-pago"] {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    background-color: var(--wd-primary-color);
    color: var(--color-white);
    border: none;
    border-radius: var(--wd-brd-radius);
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(190, 13, 87, 0.2); 
    transition: all 0.3s ease;
    margin-top: 10px;
}

.woocommerce-MyAccount-content > a.button[href*="crear-metodo-pago"]:hover {
    background-color: #9c0a47; 
    color: var(--color-white);
    box-shadow: 0 6px 16px rgba(190, 13, 87, 0.3);
    transform: translateY(-1px);
}

tr.default-payment-method a.button.default {
    display: none !important;
}

/* ==========================================================================
   DISEÑO RESPONSIVE Y ADAPTABILIDAD ESTRUCTURAL (Tablas Nativas Woo)
   ========================================================================== */

@media (max-width: 1024px) {
    .woocommerce-edit-account .woocommerce-MyAccount-content form.woocommerce-EditAccountForm fieldset legend {
        font-size: var(--wd-text-font-size);
    }

    .woocommerce-MyAccount-content > p:first-of-type {
        font-size: 14px;
        line-height: 1.8;
        margin-top: 10px;
    }
    
    .woocommerce-MyAccount-content > p:first-of-type mark.order-status {
        display: inline-block; 
    }
}

@media (max-width: 1024px) {
    .woocommerce-customer-details .woocommerce-column,
    .woocommerce-Addresses .woocommerce-Address {
        flex: 1 1 100%;
    }
    
    .mongo-ui-card,
    .woocommerce-MyAccount-content > p:first-of-type,
    .woocommerce-order-details,
    .woocommerce-customer-details .woocommerce-column,
    .woocommerce-Addresses .woocommerce-Address {
        padding: 20px;
    }

    table.woocommerce-orders-table thead,
    table.woocommerce-MyAccount-paymentMethods thead {
        display: none;
    }
    
    table.woocommerce-orders-table tbody tr,
    table.woocommerce-MyAccount-paymentMethods tbody tr {
        display: block;
        padding: 15px 20px;
        margin-bottom: 20px; 
        border: 1px solid var(--brdcolor-gray-300);
        border-radius: var(--wd-brd-radius); 
    }
    
    table.woocommerce-orders-table tbody td,
    table.woocommerce-orders-table tbody th,
    table.woocommerce-MyAccount-paymentMethods tbody td {
        display: flex !important; 
        justify-content: space-between;
        align-items: var(--wd-center);
        padding: 12px 0;
        border: none; 
        border-bottom: 1px solid var(--brdcolor-gray-200); 
        text-align: right;
        border-radius: 0; 
    }
    
    table.woocommerce-orders-table tbody td:first-child,
    table.woocommerce-orders-table tbody th:first-child,
    table.woocommerce-orders-table tbody td:last-child,
    table.woocommerce-orders-table tbody th:last-child,
    table.woocommerce-MyAccount-paymentMethods tbody td:first-child,
    table.woocommerce-MyAccount-paymentMethods tbody td:last-child {
        border-left: none;
        border-right: none;
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }

    table.woocommerce-orders-table tbody td::before,
    table.woocommerce-orders-table tbody th::before,
    table.woocommerce-MyAccount-paymentMethods tbody td::before {
        content: attr(data-title);
        font-weight: 600;
        color: #333333;
        font-size: 13px;
        text-transform: uppercase;
        margin-right: 15px; 
    }

    table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
        justify-content: flex-start !important; 
        padding-bottom: 16px; 
    }

    table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number::before {
        display: none;
    }

    table.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number a:not(.button) {
        color: #111111;
        font-size: 18px;
        font-weight: 700;
    }

    table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-total {
        border-bottom: none !important;
    }

    table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions,
    table.woocommerce-MyAccount-paymentMethods tbody td.payment-method-actions {
        display: flex !important; 
        flex-direction: column;
        gap: 5px; 
        margin-top: 25px;
        margin-bottom: 0; 
        padding-top: 0; 
        border-top: none !important; 
        border-bottom: none; 
        font-size: 0; 
        line-height: 0;
    }
    
    table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-actions::before,
    table.woocommerce-MyAccount-paymentMethods tbody td.payment-method-actions::before {
        display: none; 
    }
    
    table.woocommerce-orders-table a.button,
    table.woocommerce-MyAccount-paymentMethods a.button {
        width: 100%;
        padding: 12px;
        margin: 0; 
        font-size: 13px; 
        line-height: 1.5; 
    }
}

/* ==========================================================================
   TABLAS WOODMART: LISTA DE ESPERA Y SEGUIMIENTO PRECIOS (AISLADAS)
   ========================================================================== */

table.wd-wtl-table,
table.wd-pt-table {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-collapse: separate !important; 
    border-spacing: 0 16px !important;
    margin-bottom: 40px;
}

table.wd-wtl-table thead th,
table.wd-pt-table thead th {
    background-color: transparent;
    color: #888888;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 24px 8px;
    border: none;
    font-weight: 600;
    text-align: var(--wd-center) !important;
}

table.wd-wtl-table tbody tr,
table.wd-pt-table tbody tr {
    background-color: var(--color-white);
    transition: box-shadow 0.3s ease-in-out, transform 0.2s ease;
	  border-radius: var(--wd-brd-radius);
}

@media (min-width: 1024px) {
    table.wd-wtl-table tbody tr:hover,
    table.wd-pt-table tbody tr:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }
}

/* ESCRITORIO: Bordes perimetrales aplicados en los TD para simular la tarjeta */
table.wd-wtl-table tbody td,
table.wd-pt-table tbody td {
    background-color: var(--color-white);
    border-top: 1px solid var(--brdcolor-gray-300) !important;
    border-bottom: 1px solid var(--brdcolor-gray-300) !important;
    border-left: none !important;
    border-right: none !important;
    vertical-align: middle;
}

/* Centrado selectivo en escritorio: aplicamos text-align: center a todas las columnas,
   EXCEPTO miniatura y remover, preservando así la maquetación nativa de WoodMart */
@media (min-width: 769px) {
    table.wd-wtl-table tbody td:not(.product-thumbnail):not(.product-remove),
    table.wd-pt-table tbody td:not(.product-thumbnail):not(.product-remove) {
        text-align: var(--wd-center);
    }
}

table.wd-wtl-table tbody td:first-child,
table.wd-pt-table tbody td:first-child {
    border-left: 1px solid var(--brdcolor-gray-300) !important;
    border-radius: var(--wd-brd-radius) 0 0 var(--wd-brd-radius);
}

table.wd-wtl-table tbody td:last-child,
table.wd-pt-table tbody td:last-child {
    border-right: 1px solid var(--brdcolor-gray-300) !important;
    border-radius: 0 20px 20px 0;
}

/* MÓVIL: Re-parametrización de la Card para respetar el padding y la imagen nativa */
@media (max-width: 768px) {
    table.wd-wtl-table thead,
    table.wd-pt-table thead {
        display: none;
    }

    table.wd-wtl-table tbody tr,
    table.wd-pt-table tbody tr {
        position: relative;
        border: 1px solid var(--brdcolor-gray-300) !important;
        border-radius: var(--wd-brd-radius);
        background-color: var(--color-white);
        margin-bottom: 20px;
        /* Matemáticas del padding: 25px top/bottom, 20px right. 
           Left: 20px de diseño + 115px nativos de WoodMart para la imagen = 135px */
        padding: 25px 20px 25px 135px !important;
        min-height: 140px; 
    }

    /* Limpieza de bordes en los TD para que el contenedor TR asuma la forma visual */
    table.wd-wtl-table tbody td,
    table.wd-pt-table tbody td {
        border: none !important;
        padding: 4px 0 !important; /* Espaciado sutil entre líneas de texto */
    }

    /* Corrección de coordenadas de la miniatura para respetar el padding de 20px de la Card */
    table.wd-wtl-table tbody td.product-thumbnail,
    table.wd-pt-table tbody td.product-thumbnail {
        position: absolute !important;
        top: 50% !important;
        left: 20px !important; /* Padding izquierdo real */
        transform: translateY(-50%) !important; /* Centrado vertical fluido mediante aceleración por hardware */
        padding: 0 !important;
    }

    /* Corrección de coordenadas del botón eliminar (X) respecto a la Card */
    table.wd-wtl-table tbody td.product-remove,
    table.wd-pt-table tbody td.product-remove {
        position: absolute !important;
        top: 2px !important;
        right: 4px !important;
        padding: 0 !important;
        width: auto !important;
        border: none !important;
    }
}

/*Whishlist section*/
@media (max-width: 1024px) {
    .wd-group-enable .wd-wishlist-head {
        margin-top: 10px !important;
    }
}
@media (max-width: 576px) {
    .wd-wishlist-head .title {
        display: none;
    }
    .btn.wd-wishlist-create-group-btn {
        width: 100%;
        margin-bottom: 10px;
    }
}


/* ==========================================================================
   BOTÓN "VOLVER A MIS PEDIDOS" (ZONA INFERIOR)
   ========================================================================== */

.mongo-back-to-orders-bottom {
    margin-top: 40px; /* Separación amplia desde las direcciones */
    padding-top: 20px;
    border-top: 1px solid var(--brdcolor-gray-300); /* Línea divisoria superior */
    display: flex;
    justify-content: flex-start; /* Se alinea a la izquierda */
}

.mongo-back-btn {
    display: inline-flex;
    align-items: var(--wd-center);
    gap: 6px;
    font-size: 16px; /* Un poco más grande al estar abajo */
    font-weight: 600;
    color: var(--wd-primary-color); /* Tu color corporativo */
    text-decoration: none;
    transition: all 0.3s ease;
}

.mongo-back-btn .mongo-back-svg {
    transition: transform 0.3s ease;
    margin-right: 4px;
}

/* Efectos Hover */
.mongo-back-btn:hover {
    color: #333;
}
.mongo-back-btn:hover .mongo-back-svg {
    transform: translateX(-5px); /* Desliza la flecha */
}

/* 📱 Ajuste para móvil */
@media (max-width: 1024px) {
    .mongo-back-to-orders-bottom {
        margin-top: 30px;
        justify-content: var(--wd-center); /* En móvil queda mucho más pro centrado abajo del todo */
    }
}





/* --------------------------------------------------------------------------
   2. TABLA DE PRODUCTOS EN SINGLE ORDER (BASE / MOBILE FIRST)
   -------------------------------------------------------------------------- */

/* APISONADORA DE TABLA: Forzamos el bloque al 100% sobreescribiendo a WooCommerce */
.responsive-table, 
table.order_details {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Transformación estructural de tabla a bloques (Solo en < 1024px) */
@media (max-width: 1024px) {
    table.order_details,
    table.order_details tbody,
    table.order_details tr.order_item,
    table.order_details td.product-name {
        display: block !important;
        width: 100% !important;
        min-width: 100% !important;
        box-sizing: border-box !important;
        margin: 0 !important;
    }

    table.order_details thead,
    table.order_details td.product-total,
    table.order_details td::before { 
        display: none !important; 
    }

    table.order_details tr.order_item {
        padding: 15px 0 !important;
        border-bottom: 1px solid var(--brdcolor-gray-300) !important;
    }

    table.order_details td.product-name {
        padding: 0 !important;
        border: none !important;
    }
    
    /* Botón Volver (Exclusivo de móvil según tu diseño) */
    .mongo-back-to-orders {
        margin-top: -10px;
        margin-bottom: 15px;
        border-bottom: none;
    }
    .mongo-back-btn {
        font-size: 16px;
    }
}

/* --------------------------------------------------------------------------
   ESTRUCTURA DEL ITEM (Reglas comunes consolidadas sin !important innecesarios)
   -------------------------------------------------------------------------- */
.mongo-item-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.mongo-item-image {
    width: 80px;
    flex: 0 0 80px; /* Propiedad shorthand corregida para prevenir colapsos en flex */
}

.mongo-item-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--wd-brd-radius);
    border: 1px solid var(--brdcolor-gray-300);
    display: block;
}

.mongo-item-info {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mongo-item-title-qty {
    margin-bottom: 4px;
    line-height: 1.3;
}

.mongo-item-title-qty a {
    font-weight: 500;
    color: #333333;
    font-size: 15px;
    display: inline;
    transition: color 0.2s ease;
}

/* Integración sutil de color de marca al interactuar */
.mongo-item-title-qty a:hover {
    color: var(--wd-primary-color);
}

/* Cantidad de producto (Unificado el color para todas las resoluciones) */
.mongo-item-title-qty strong {
    color: var(--wd-primary-color);
    margin-left: 5px;
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.mongo-item-meta-sku {
    font-size: 13px;
    color: #777777;
    margin-bottom: 8px; /* Unificado con la versión móvil original */
}

/* Corrección de márgenes nativos (Consolidado) */
.mongo-item-meta-sku .wc-item-meta, 
.mongo-item-meta-sku .wd-product-sku {
    margin: 2px 0 !important;
}

/* PRECIO INYECTADO (Aplica por defecto como bloque en móvil) */
.mongo-item-price-mobile { 
    display: block; 
    font-size: 16px; 
    font-weight: 600; 
    color: #111111; 
    margin-top: auto; /* Empuja el precio a la zona inferior del flex-container */
}


/* --------------------------------------------------------------------------
   3. ESCRITORIO (+1025px) (Exclusivamente sobreescrituras)
   -------------------------------------------------------------------------- */
@media (min-width: 1025px) {
    
    /* Reducimos la imagen. Al haber más espacio horizontal, la info respira mejor */
    .mongo-item-image {
        width: 80px;
        flex: 0 0 80px;
    }
    
    .mongo-item-image img {
        height: 80px; 
    }

    /* Ocultamos el precio inyectado de la versión móvil */
    .mongo-item-price-mobile { 
        display: none; 
    }
    
    /* Mantenemos la columna nativa de precio de escritorio de WooCommerce */
    td.woocommerce-table__product-total { 
        vertical-align: middle; 
        text-align: right; 
        font-weight: 600; 
        font-size: 16px; 
    }
}







/**
 * SISTEMA DE SEGUIMIENTO DE PEDIDOS V2 - MONGO.ES
 * Enfoque: Alineación vertical superior y ondas centradas.
 */

.mongo-tracker-wrapper {
    max-width: 900px;
    margin: 80px auto 60px !important; /* Más margen superior para las etiquetas */
    padding: 0 40px;
    --mongo-progress: 0%;
}

.mongo-progress-line {
    height: 4px;
    background-color: #eee;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: var(--wd-center);
    border-radius: 4px;
}

/* Relleno con animación */
.mongo-progress-fill {
    position: absolute;
    height: 100%;
    background-color: #00a896;
    z-index: 1;
    border-radius: 4px;
    width: 0;
    animation: mongoFill 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mongoFill {
    from { width: 0; }
    to { width: var(--mongo-progress); }
}

/* Nodos y Etiquetas */
.mongo-step-node {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: var(--wd-center);
    z-index: 2;
}

.mongo-step-label {
    position: absolute;
    bottom: 22px; /* Posiciona el texto sobre el círculo */
    white-space: nowrap;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: color 0.3s ease 0.8s;
    text-align: var(--wd-center);
}

.is-current .mongo-step-label {
    color: #00a896;
    font-weight: 800;
}

.is-past .mongo-step-label {
    color: #444;
}

/* Círculos */
.mongo-node-circle {
    width: 14px;
    height: 14px;
    background-color: #ddd;
    border-radius: 50%;
    border: 2px solid var(--color-white);
    transition: background-color 0.3s ease 0.8s;
    position: relative; /* Importante para el centrado de la onda */
}

.is-past .mongo-node-circle,
.is-current .mongo-node-circle {
    background-color: #00a896;
}

/* Ondas Verdes - Corrección de Centrado Absoluto */
.is-current .mongo-node-circle::after {
    content: '';
    position: absolute;
    /* Centrado perfecto independientemente de otros elementos */
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px; /* Mitad del alto */
    margin-left: -7px; /* Mitad del ancho */
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(0, 168, 150, 0.6);
    animation: mongoPulseGreen 2s infinite;
}

@keyframes mongoPulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(0, 168, 150, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(0, 168, 150, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 168, 150, 0); }
}

/* Optimizaciones para Móviles (Responsive) */
@media (max-width: 768px) {
    .mongo-tracker-wrapper {
        margin: 40px auto !important;
    }
    
    .mongo-step-label {
        font-size: 8px; /* Texto mínimo para evitar solapamientos */
        bottom: 18px;
        letter-spacing: -0.2px;
    }
    
    /* Ocultamos etiquetas no actuales en móviles muy pequeños si se amontonan */
    /* Descomentar si prefieres que solo se lea el actual en móviles */
    /* .mongo-step-node:not(.is-current):not(.is-past) .mongo-step-label { opacity: 0.5; } */

    .mongo-node-circle {
        width: 12px;
        height: 12px;
    }
    
    .is-current .mongo-node-circle::after {
        width: 12px;
        height: 12px;
        margin-top: -6px;
        margin-left: -6px;
    }
	
    /* Ajuste del contenedor para evitar que el texto se corte */
    .mongo-tracker-wrapper {
        padding-top: 35px !important;
        padding-bottom: 35px !important;
    }

    /* Los círculos (nodos) siempre se ven por encima del texto */
    .mongo-node-circle {
        z-index: 10 !important;
        position: relative;
    }

    /* Texto más pequeño y sin saltos de línea */
    .mongo-step-label {
        font-size: 10px !important; 
        z-index: 1;
        white-space: nowrap;
    }

    /* Estados IMPARES (1º, 3º, 5º...): ABAJO */
    .mongo-progress-line .mongo-step-node:nth-child(odd) .mongo-step-label {
        top: 18px !important;
        bottom: auto !important;
    }

    /* Estados PARES (2º, 4º...): ARRIBA */
    .mongo-progress-line .mongo-step-node:nth-child(even) .mongo-step-label {
        top: auto !important;
        bottom: 18px !important;
    }
}