/* =========================================================
   DIDEMEX - Mi Cuenta Base
   Arquitectura: [dmx_account_nav] + [dmx_account_content]
========================================================= */

body.woocommerce-account {
    background: #f6f7f9;
}

/* Evitar que Divi/Woo limite raro el área */
body.woocommerce-account #left-area,
body.woocommerce-account .et_pb_post,
body.woocommerce-account .entry-content {
    width: 100%;
}

/* Wrappers de shortcodes */
body.woocommerce-account .dmx-account-nav-wrap,
body.woocommerce-account .dmx-account-content-wrap {
    width: 100%;
}

/* Evitar floats nativos de Woo */
body.woocommerce-account .dmx-account-nav-wrap .woocommerce-MyAccount-navigation,
body.woocommerce-account .dmx-account-content-wrap .woocommerce-MyAccount-content {
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
    clear: none !important;
}

/* =========================================================
   DIDEMEX - Mi Cuenta: Iconos en navegación
========================================================= */

/* Link con espacio para icono */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Icono base */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a::before {
    content: var(--dmx-account-icon, "");
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    color: #344054;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover icono */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover::before {
    color: #c9605e;
    transform: translateX(2px);
}

/* Activo */
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a::before,
body.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a:hover::before {
    color: #ffffff;
}

/* Inicio */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dashboard {
    --dmx-account-icon: "\f015";
}

/* Mis pedidos */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--orders {
    --dmx-account-icon: "\f291";
}

/* Mis cursos */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--members-area {
    --dmx-account-icon: "\f19d";
}

/* Mis cupones */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--cupones {
    --dmx-account-icon: "\f02c";
}

/* Monedero DIDEMEX */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--monedero {
    --dmx-account-icon: "\f555";
}

/* Direcciones */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-address {
    --dmx-account-icon: "\f3c5";
}

/* Datos de cuenta */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--edit-account {
    --dmx-account-icon: "\f007";
}

/* Garantía DIDEMEX */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--garantia {
    --dmx-account-icon: "\f3ed";
}

/* Soporte WhatsApp */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--dmx-soporte {
    --dmx-account-icon: "\f4ad";
}

/* Cerrar sesión */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
    --dmx-account-icon: "\f2f5";
}

/* =========================================================
   DIDEMEX - Mi Cuenta: Iconos en navegación de membresía
========================================================= */

/* Links con icono */
body.woocommerce-account .wc-memberships-members-area-navigation ul li a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

/* Icono base */
body.woocommerce-account .wc-memberships-members-area-navigation ul li a::before {
    content: var(--dmx-membership-icon, "");
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-width: 22px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
    color: #344054;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover icono */
body.woocommerce-account .wc-memberships-members-area-navigation ul li a:hover::before {
    color: #c9605e;
    transform: translateX(2px);
}

/* Activo */
body.woocommerce-account .wc-memberships-members-area-navigation ul li.is-active a::before,
body.woocommerce-account .wc-memberships-members-area-navigation ul li.is-active a:hover::before {
    color: #ffffff;
}

/* Volver A Mi Cuenta */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--back-to-memberships {
    --dmx-membership-icon: "\f060"; /* arrow-left */
}

/* Contenido */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--my-membership-content {
    --dmx-membership-icon: "\f518"; /* book-open */
}

/* Productos */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--my-membership-products {
    --dmx-membership-icon: "\f49e"; /* box-open */
}

/* Descuentos */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--my-membership-discounts {
    --dmx-membership-icon: "\f02b"; /* tag */
}

/* Notas */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--my-membership-notes {
    --dmx-membership-icon: "\f249"; /* sticky-note */
}

/* Administrar */
body.woocommerce-account .woocommerce-MyAccount-navigation-link--my-membership-details {
    --dmx-membership-icon: "\f013"; /* cog */
}

/* =========================================================
   Layout general
========================================================= */

body.woocommerce-account .dmx-account-content-wrap {
    background: #ffffff;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 12px 34px rgba(20, 31, 48, 0.10);
    border: 1px solid rgba(20, 31, 48, 0.08);
    min-height: 320px;
}

/* Contenido Woo nativo dentro del wrapper */
body.woocommerce-account .dmx-account-content-wrap .woocommerce-MyAccount-content {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* Texto base */
body.woocommerce-account .dmx-account-content-wrap p {
    color: #344054;
    font-size: 16px;
    line-height: 1.75;
}

/* Links base */
body.woocommerce-account .dmx-account-content-wrap a {
    color: #b90000;
    font-weight: 650;
    text-decoration: none;
}

body.woocommerce-account .dmx-account-content-wrap a:hover {
    color: #930000;
    text-decoration: underline;
}


/* =========================================================
   Menú lateral
========================================================= */

body.woocommerce-account .woocommerce-MyAccount-navigation {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(20, 31, 48, 0.10);
    overflow: hidden;
    border: 1px solid rgba(20, 31, 48, 0.08);
}

/* Quitar bullets */
body.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 14px !important;
}

/* Items */
body.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin: 0 0 6px 0 !important;
    padding: 0 !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation li:last-child {
    margin-bottom: 0 !important;
}

/* Links */
body.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 16px !important;
    border-radius: 12px;
    color: #102033;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.2;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

/* Hover */
body.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: #fff3f3;
    color: #b90000;
}

/* Activo */
body.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
    background: #c40000;
    color: #ffffff !important;
    box-shadow: 0 10px 24px rgba(196, 0, 0, 0.24);
}


/* =========================================================
   Botones WooCommerce base
========================================================= */

body.woocommerce-account .woocommerce .button,
body.woocommerce-account .button,
body.woocommerce-account button.button,
body.woocommerce-account input.button {
    background: #c40000 !important;
    color: #ffffff !important;
    border-radius: 999px !important;
    padding: 11px 20px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border: 0 !important;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

body.woocommerce-account .woocommerce .button:hover,
body.woocommerce-account .button:hover,
body.woocommerce-account button.button:hover,
body.woocommerce-account input.button:hover {
    background: #930000 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}


/* =========================================================
   Inputs WooCommerce
========================================================= */

/*
 * `:not(.et-vb-root-ancestor)` — no lo borres al editar estas reglas.
 *
 * El Visual Builder se abre SOBRE esta misma pagina, asi que su ventana
 * superior conserva `body.woocommerce-account`. Sin esta guarda, estos
 * selectores de elemento alcanzan los <label>, <select> y <textarea> que Divi
 * pinta dentro de su panel de ajustes, y le ganan por especificidad a los suyos
 * (`.et-vb-field-label` usa `color: var(--gray)` en el contenedor, y el <label>
 * lo hereda). El panel entero se ve entonces en azul marino sobre fondo oscuro
 * — todos los modulos, no solo los nuestros.
 *
 * Tiene que ser `et-vb-root-ancestor` y no `et-fb`: `et-fb` tambien esta en el
 * canvas, y excluir el canvas haria que la vista previa dejara de parecerse al
 * frontend. `et-vb-root-ancestor` marca unicamente la ventana superior.
 */
body.woocommerce-account:not(.et-vb-root-ancestor) input.input-text,
body.woocommerce-account:not(.et-vb-root-ancestor) textarea,
body.woocommerce-account:not(.et-vb-root-ancestor) select {
    border: 1px solid #d8dde3;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    background: #ffffff;
}

body.woocommerce-account:not(.et-vb-root-ancestor) label {
    color: #263241;
    font-weight: 700;
    font-size: 14px;
}


/* =========================================================
   Notices WooCommerce
========================================================= */

body.woocommerce-account .woocommerce-notices-wrapper {
    margin-bottom: 0;
}

body.woocommerce-account .woocommerce-notices-wrapper:not(:empty) {
    margin-bottom: 18px;
}

body.woocommerce-account .woocommerce-message,
body.woocommerce-account .woocommerce-info,
body.woocommerce-account .woocommerce-error {
    border-radius: 14px;
    padding: 16px 18px;
    font-size: 15px;
    line-height: 1.5;
    border: 0;
    box-shadow: none;
}

body.woocommerce-account .woocommerce-message {
    background: #e7f8ef;
    color: #16794c;
}

body.woocommerce-account .woocommerce-info {
    background: #eef4ff;
    color: #245fc7;
}

body.woocommerce-account .woocommerce-error {
    background: #fff0f0;
    color: #b90000;
}


/* =========================================================
   Divi Layouts inyectados
========================================================= */

body.woocommerce-account .dmx-account-divi-layout {
    width: 100%;
    max-width: 100%;
}

body.woocommerce-account .dmx-account-divi-layout .et_pb_section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
}

body.woocommerce-account .dmx-account-divi-layout .et_pb_row {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body.woocommerce-account .dmx-account-divi-layout .et_pb_column {
    width: 100% !important;
    max-width: 100% !important;
}


/* =========================================================
   Endpoint: Inicio
========================================================= */

body.dmx-account-dashboard {
    
}


/* =========================================================
   Endpoint: Mis pedidos
========================================================= */
/* =========================================================
   Mi Cuenta / Títulos de página
========================================================= */

body.dmx-account-page .dmx-account-page-title {
    margin-bottom: 24px;
}

body.dmx-account-page .dmx-account-page-title h2 {
    color: #102033;
    font-size: 26px;
    font-weight: 850;
    line-height: 1.15;
    margin: 0 0 8px 0;
}

body.dmx-account-page .dmx-account-page-title p {
    color: #667085;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    margin: 0;
}

@media (max-width: 768px) {
    body.dmx-account-page .dmx-account-page-title {
        margin-bottom: 18px;
    }

    body.dmx-account-page .dmx-account-page-title h2 {
        font-size: 23px;
    }

    body.dmx-account-page .dmx-account-page-title p {
        font-size: 14px;
    }
}

/* =========================================================
   Base Mis Pedidos
========================================================= */
body.dmx-account-orders .dmx-account-content-wrap {
    padding: 34px 42px;
}

/* Tabla principal */
body.dmx-account-orders table.woocommerce-orders-table,
body.dmx-account-orders table.my_account_orders {
    width: 100%;
    border: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(20, 31, 48, 0.08);
}

/* Cambiar ancho de columnas */
body.dmx-account-orders .woocommerce-orders-table__header-order-status,
body.dmx-account-orders .woocommerce-orders-table__cell-order-status {
    width: 140px;
}

body.dmx-account-orders .woocommerce-orders-table__header-order-total,
body.dmx-account-orders .woocommerce-orders-table__cell-order-total {
    width: 220px;
}

/* Header */
body.dmx-account-orders table.woocommerce-orders-table thead th,
body.dmx-account-orders table.my_account_orders thead th {
    background: #f3f4f6 !important;
    color: #102033 !important;
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 17px 20px !important;
    border: 0 !important;
    white-space: nowrap;
    text-align: center;
}

/* Celdas */
body.dmx-account-orders table.woocommerce-orders-table tbody th,
body.dmx-account-orders table.woocommerce-orders-table tbody td,
body.dmx-account-orders table.my_account_orders tbody th,
body.dmx-account-orders table.my_account_orders tbody td {
    background: #ffffff !important;
    color: #102033;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.25em;
    padding: 18px 15px !important;
    border: 0 !important;
    border-bottom: 1px solid #edf0f3 !important;
    vertical-align: middle;
}

/* =========================================================
   Endpoint: Mis pedidos / Status Pills
========================================================= */

/* Celda de estado */
body.dmx-account-orders .woocommerce-orders-table__cell-order-status {
    color: transparent !important;
    font-size: 0 !important;
    text-align: center;
}

/* Pill base */
body.dmx-account-orders .woocommerce-orders-table__cell-order-status::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 85px;
    padding: 5px 0px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 650;
    line-height: 1;
    white-space: nowrap;
}

/* Pill Completado */
body.dmx-account-orders .woocommerce-orders-table__row--status-completed 
.woocommerce-orders-table__cell-order-status::before {
    content: "Completado";
    background: #e7f8ef;
    color: #16794c;
}

/* Pill Cancelado */
body.dmx-account-orders .woocommerce-orders-table__row--status-cancelled 
.woocommerce-orders-table__cell-order-status::before {
    content: "Cancelado";
    background: #fff0f0;
    color: #b90000;
}

/* Pill Procesando */
body.dmx-account-orders .woocommerce-orders-table__row--status-processing 
.woocommerce-orders-table__cell-order-status::before {
    content: "Procesando";
    background: #eef4ff;
    color: #245fc7;
}

/* Pill Pendiente de pago */
body.dmx-account-orders .woocommerce-orders-table__row--status-pending 
.woocommerce-orders-table__cell-order-status::before {
    content: "Pendiente";
    background: #fff7e6;
    color: #a15c00;
}

/* Pill En espera */
body.dmx-account-orders .woocommerce-orders-table__row--status-on-hold 
.woocommerce-orders-table__cell-order-status::before {
    content: "En espera";
    background: #f4f4f5;
    color: #52525b;
}

/* Pill Reembolsado */
body.dmx-account-orders .woocommerce-orders-table__row--status-refunded 
.woocommerce-orders-table__cell-order-status::before {
    content: "Reembolsado";
    background: #f3e8ff;
    color: #7e22ce;
}

/* Pill Fallido */
body.dmx-account-orders .woocommerce-orders-table__row--status-failed 
.woocommerce-orders-table__cell-order-status::before {
    content: "Fallido";
    background: #fff0f0;
    color: #b90000;
}

/* Última fila sin borde */
body.dmx-account-orders table.woocommerce-orders-table tbody tr:last-child th,
body.dmx-account-orders table.woocommerce-orders-table tbody tr:last-child td,
body.dmx-account-orders table.my_account_orders tbody tr:last-child th,
body.dmx-account-orders table.my_account_orders tbody tr:last-child td {
    border-bottom: 0 !important;
}

/* Hover */
body.dmx-account-orders table.woocommerce-orders-table tbody tr:hover th,
body.dmx-account-orders table.woocommerce-orders-table tbody tr:hover td,
body.dmx-account-orders table.my_account_orders tbody tr:hover th,
body.dmx-account-orders table.my_account_orders tbody tr:hover td {
    background: #fafbfc !important;
}

/* Columna pedido */
body.dmx-account-orders .woocommerce-orders-table__cell-order-number a,
body.dmx-account-orders table.my_account_orders .order-number a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #248fff !important;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
}

/* Botón Ver */
body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view,
body.dmx-account-orders table.my_account_orders td.order-actions a.button.view {
    background: #c40000 !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 999px !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(196, 0, 0, 0.18);
}

body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view:hover,
body.dmx-account-orders table.my_account_orders td.order-actions a.button.view:hover {
    background: #930000 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    text-decoration: none !important;
}

/* =========================================================
   Endpoint: Mis pedidos / Mobile Cards
   (versión limpia y consolidada, sin bloques duplicados)
========================================================= */

@media (max-width: 768px) {

    body.dmx-account-orders .dmx-account-content-wrap {
        padding: 16px;
    }

    body.dmx-account-orders table.woocommerce-orders-table,
    body.dmx-account-orders table.my_account_orders {
        display: block;
        width: 100%;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    body.dmx-account-orders table.woocommerce-orders-table thead,
    body.dmx-account-orders table.my_account_orders thead {
        display: none !important;
    }

    body.dmx-account-orders table.woocommerce-orders-table tbody,
    body.dmx-account-orders table.my_account_orders tbody {
        display: grid;
        gap: 14px;
        width: 100%;
    }

    body.dmx-account-orders table.woocommerce-orders-table tbody tr,
    body.dmx-account-orders table.my_account_orders tbody tr {
        display: grid !important;
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "order status"
            "date date"
            "total total"
            "actions actions";
        gap: 10px 12px;
        width: 100%;
        padding: 16px;
        background: #ffffff !important;
        border: 1px solid #edf0f3;
        border-radius: 18px;
        box-shadow: 0 10px 26px rgba(20, 31, 48, 0.07);
    }

    body.dmx-account-orders table.woocommerce-orders-table tbody th,
    body.dmx-account-orders table.woocommerce-orders-table tbody td,
    body.dmx-account-orders table.my_account_orders tbody th,
    body.dmx-account-orders table.my_account_orders tbody td {
        display: block !important;
        padding: 0 !important;
        border: 0 !important;
        background: transparent !important;
        text-align: left !important;
        line-height: 1.35;
    }

    /* Quitar etiquetas nativas de Woo en mobile: "Fecha:", "Total:", etc. */
    body.dmx-account-orders table.woocommerce-orders-table tbody th::before,
    body.dmx-account-orders table.woocommerce-orders-table tbody td::before,
    body.dmx-account-orders table.my_account_orders tbody th::before,
    body.dmx-account-orders table.my_account_orders tbody td::before {
        display: none !important;
        content: none !important;
    }

    /* ---------- Pedido ---------- */
    body.dmx-account-orders .woocommerce-orders-table__cell-order-number {
        grid-area: order;
        align-self: center;
    }

    body.dmx-account-orders .woocommerce-orders-table__cell-order-number a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: #eef4ff;
        color: #248fff !important;
        border-radius: 999px;
        padding: 6px 11px;
        font-size: 14px;
        font-weight: 650;
        line-height: 1;
        text-decoration: none !important;
    }

    /* ---------- Estado (pill con el texto real de Woo) ---------- */
    body.dmx-account-orders table.woocommerce-orders-table tbody td.woocommerce-orders-table__cell-order-status,
    body.dmx-account-orders table.my_account_orders tbody td.woocommerce-orders-table__cell-order-status {
        grid-area: status !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        justify-self: end !important;
        align-self: center !important;
        width: fit-content !important;
        min-width: auto !important;
        padding: 6px 10px !important;
        border-radius: 999px !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1 !important;
        white-space: nowrap !important;
        text-align: center !important;
        border: 0 !important;
        box-shadow: none !important;
    }

    /* ---------- Fecha ---------- */
    body.dmx-account-orders .woocommerce-orders-table__cell-order-date {
        grid-area: date;
        color: #667085;
        font-size: 13.5px;
        font-weight: 650;
        margin-top: 2px;
    }

    body.dmx-account-orders .woocommerce-orders-table__cell-order-date time {
        color: #667085;
        font-size: 13.5px;
        font-weight: 650;
    }

    /* ---------- Total ---------- */
    body.dmx-account-orders .woocommerce-orders-table__cell-order-total {
        grid-area: total;
        color: #102033;
        font-size: 15px;
        font-weight: 800;
        margin-top: 2px;
    }

    body.dmx-account-orders .woocommerce-orders-table__cell-order-total .woocommerce-Price-amount {
        color: #102033;
        font-size: 15px;
        font-weight: 700;
    }

/* ---------- Acciones ---------- */

body.dmx-account-orders .woocommerce-orders-table__cell-order-actions {
    grid-area: actions;
    margin-top: 4px;
}

body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    min-height: 44px;
    background: #c40000 !important;
    color: transparent !important;
    border-radius: 999px !important;
    padding: 12px 18px !important;
    border: 0 !important;
    text-align: center;
    text-decoration: none !important;
    box-shadow: 0 8px 18px rgba(196, 0, 0, 0.14);
    line-height: 1 !important;
    font-size: 0 !important;
    font-weight: 600 !important;
}

/* Apagar pseudo-elementos raros de Divi/Woo */
body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view::before {
    display: none !important;
    content: none !important;
}

/* Nuevo texto */
body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view::after {
    content: "Ver pedido" !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    position: static !important;
    margin: 0 !important;
    opacity: 1 !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 550 !important;
    line-height: 1 !important;
    text-transform: none !important;
}

body.dmx-account-orders .woocommerce-orders-table__cell-order-actions a.button.view:hover {
    background: #930000 !important;
    color: transparent !important;
    text-decoration: none !important;
    transform: translateY(-1px);
}

    /* =====================================================
       Estados / Colores de cada pill
    ===================================================== */

    body.dmx-account-orders .woocommerce-orders-table__row--status-completed
    .woocommerce-orders-table__cell-order-status {
        background: #e7f8ef !important;
        color: #16794c !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-cancelled
    .woocommerce-orders-table__cell-order-status {
        background: #fff0f0 !important;
        color: #b90000 !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-processing
    .woocommerce-orders-table__cell-order-status {
        background: #eef4ff !important;
        color: #245fc7 !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-pending
    .woocommerce-orders-table__cell-order-status {
        background: #fff7e6 !important;
        color: #a15c00 !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-on-hold
    .woocommerce-orders-table__cell-order-status {
        background: #f4f4f5 !important;
        color: #52525b !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-refunded
    .woocommerce-orders-table__cell-order-status {
        background: #f3e8ff !important;
        color: #7e22ce !important;
    }

    body.dmx-account-orders .woocommerce-orders-table__row--status-failed
    .woocommerce-orders-table__cell-order-status {
        background: #fff0f0 !important;
        color: #b90000 !important;
    }
}

/* =========================================================
   Endpoint: Mis Cupones
========================================================= */

/* =========================================================
   DIDEMEX - Mi Cuenta: Fix contenedor para cupones WebToffee
========================================================= */

body.woocommerce-account.dmx-account-cupones .dmx-account-content-wrap {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flow-root;
    padding-bottom: 48px;
}

body.woocommerce-account.dmx-account-cupones .dmx-account-native-coupons-wrap {
    width: 100%;
    max-width: 100%;
    display: flow-root;
    clear: both;
    margin-top: 32px;
}

body.woocommerce-account.dmx-account-cupones .wt-mycoupons {
    width: 100%;
    max-width: 100%;
    display: flow-root;
    clear: both;
}

body.woocommerce-account.dmx-account-cupones .wt_coupon_wrapper {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 28px 36px;
    clear: both;
    margin-top: 28px;
}

body.woocommerce-account.dmx-account-cupones .wt_sc_single_coupon {
    margin: 0 !important;
    flex: 0 1 380px;
}

@media (max-width: 768px) {

    body.woocommerce-account.dmx-account-cupones .wt_coupon_wrapper {
        display: flex;
        flex-direction: column;
        gap: 22px;
    }

    body.woocommerce-account.dmx-account-cupones .wt_sc_single_coupon {
        width: 100% !important;
        max-width: 100% !important;
        flex: none;
    }
}

/* =========================================================
   Endpoint: Ver pedido
========================================================= */

body.dmx-account-view-order {
    
}


/* =========================================================
   Endpoint: Garantía DIDEMEX
========================================================= */

body.dmx-account-garantia {
    
}


/* =========================================================
   Endpoint: Direcciones
========================================================= */

body.dmx-account-address {
    
}


/* =========================================================
   Endpoint: Datos de cuenta
========================================================= */

body.dmx-account-edit-account {
    
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 980px) {
    body.woocommerce-account .dmx-account-content-wrap {
        padding: 24px;
    }
}

@media (max-width: 640px) {
    body.woocommerce-account .woocommerce-MyAccount-navigation,
    body.woocommerce-account .dmx-account-content-wrap {
        border-radius: 14px;
    }

    body.woocommerce-account .dmx-account-content-wrap {
        padding: 20px;
    }

    body.woocommerce-account .woocommerce-MyAccount-navigation a {
        min-height: 44px;
        font-size: 14px;
    }
}

/* =========================================================
   DIDEMEX - MY ACCOUNT / MEMBERSHIPS
   Índice:
   1. Memberships Page / Hub de cursos
      Endpoint: /mi-cuenta/membresias/
      Template: my-memberships.php
      Clases propias: .dmx-membership-card

   2. Membership Content / Contenido interno del curso
      Endpoint: /mi-cuenta/membresias/{membership_id}/my-membership-content/
      Template: my-membership-content.php
      Clases Woo: table.my_membership_content tr.membership-content
========================================================= */



/* =========================================================
   1. MEMBERSHIPS PAGE - Hub de cursos
   Endpoint: /mi-cuenta/membresias/
========================================================= */

body.woocommerce-account .dmx-memberships-page {
    width: 100%;
}

body.woocommerce-account .dmx-memberships-header {
    margin-bottom: 26px;
}

body.woocommerce-account .dmx-memberships-header h2 {
    margin: 0 0 8px;
    color: #001b3f;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

body.woocommerce-account .dmx-memberships-header p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    font-weight: 600;
}

/* Grid de cursos */
body.woocommerce-account .dmx-memberships-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* Card principal del curso */
body.woocommerce-account .dmx-membership-card {
    overflow: hidden;
    border: 1px solid rgba(217, 0, 0, 0.16);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.08);
}

/* Imagen 1:1 de la card */
body.woocommerce-account .dmx-membership-card-media {
    display: block;
    aspect-ratio: 1.5 / 1;
    margin: 24px 24px 0;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(135deg, #d90000 0%, #7a001f 55%, #001b3f 100%);
    text-decoration: none;
}

body.woocommerce-account .dmx-membership-card-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback si no hay imagen ACF */
body.woocommerce-account .dmx-membership-card-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 58px;
}

/* Cuerpo de la card */
body.woocommerce-account .dmx-membership-card-body {
    padding: 22px 24px 24px;
}

body.woocommerce-account .dmx-membership-card-topline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

/* Badges / estado */
body.woocommerce-account .dmx-membership-card-badge,
body.woocommerce-account .dmx-membership-card-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
}

/* Badge default: Disponible */
body.woocommerce-account .dmx-membership-card-badge,
body.woocommerce-account .dmx-membership-card-badge--available {
    background: #e9f8ef;
    color: #027a48;
}

/* Badge: Nuevo */
body.woocommerce-account .dmx-membership-card-badge--new {
    background: #fff4e5;
    color: #b54708;
}

/* Badge: Próximamente */
body.woocommerce-account .dmx-membership-card-badge--soon {
    background: #f2f4f7;
    color: #344054;
}

/* Badge: VIP */
body.woocommerce-account .dmx-membership-card-badge--vip {
    background: #f4ebff;
    color: #6941c6;
}

/* Estado de membresía */
body.woocommerce-account .dmx-membership-card-status {
    background: #f2f4f7;
    color: #344054;
}

/* Título del curso */
body.woocommerce-account .dmx-membership-card-title {
    margin: 0 0 10px;
    color: #d90000;
    font-size: 23px;
    font-weight: 900;
    line-height: 1.12;
    min-height: 54px;
}

body.woocommerce-account .dmx-membership-card-title a {
    color: inherit;
    text-decoration: none;
}

/* Subtítulo ACF */
body.woocommerce-account .dmx-membership-card-subtitle {
    margin: 0 0 18px;
    color: #344054;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.45;
}

/* Metadata: inicio / vence */
body.woocommerce-account .dmx-membership-card-meta {
    display: grid;
    gap: 9px;
    margin-bottom: 20px;
}

body.woocommerce-account .dmx-membership-card-meta-row {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    color: #667085;
    font-size: 14px;
    font-weight: 700;
}

body.woocommerce-account .dmx-membership-card-meta-row strong {
    color: #001b3f;
    font-weight: 900;
    text-align: right;
}

/* Botón principal */
body.woocommerce-account .dmx-membership-card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 26px;
    border-radius: 999px;
    background: #d90000;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 16px 34px rgba(217, 0, 0, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.woocommerce-account .dmx-membership-card-button:hover {
    background: #b80000;
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(217, 0, 0, 0.28);
}

/* Botón deshabilitado */
body.woocommerce-account .dmx-membership-card-button--disabled {
    background: #f2f4f7;
    color: #667085 !important;
    box-shadow: none;
    cursor: not-allowed;
}

/* Estado vacío */
body.woocommerce-account .dmx-memberships-empty {
    padding: 32px;
    border: 1px solid rgba(52, 64, 84, 0.12);
    border-radius: 24px;
    background: #ffffff;
    text-align: center;
}

body.woocommerce-account .dmx-memberships-empty h2 {
    margin: 0 0 8px;
    color: #001b3f;
    font-size: 26px;
    font-weight: 900;
}

body.woocommerce-account .dmx-memberships-empty p {
    margin: 0;
    color: #667085;
    font-size: 15px;
    font-weight: 600;
}



/* =========================================================
   2. MEMBERSHIP CONTENT - Lista compacta de contenidos
   Endpoint: /mi-cuenta/membresias/{id}/my-membership-content/
========================================================= */

/* Tabla base */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0 16px;
    background: transparent;
}

/* Ocultar encabezados nativos */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content thead {
    display: none;
}

/* Fila como card horizontal */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: 10px 8px;
    border: 1px solid rgba(217, 0, 0, 0.16);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.08);
}

/* Celdas */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

/* Membership Content - reducir ancho mínimo de acciones */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content td.membership-content-actions,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content th.membership-content-actions {
    min-width: 0 !important;
}

/* Ocultar columnas secundarias si Woo las imprime */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-type,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-excerpt,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-accessible,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-image,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-thumbnail {
    display: none;
}

/* Título del contenido */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title {
    min-width: 0;
}

body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title a {
    color: #102033;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.15;
    text-decoration: none;
}

/* Acciones a la derecha */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions {
    justify-self: end;
    white-space: nowrap;
}

/* Botón/píldora */
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content .button,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content a.button,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 24px;
    border-radius: 999px;
    background: #d90000;
    color: #ffffff !important;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 16px 34px rgba(217, 0, 0, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content .button:hover,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content a.button:hover,
body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions a:hover {
    background: #b80000;
    transform: translateY(-1px);
    box-shadow: 0 20px 38px rgba(217, 0, 0, 0.28);
}

/* Mobile: título arriba, botón abajo */
@media (max-width: 640px) {
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 24px 22px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title a {
        font-size: 21px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions {
        justify-self: stretch;
        width: 100%;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content .button,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content a.button,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions a {
        width: 100%;
    }
}

/* Membership Content - ocultar label "Título:" en responsive */
body.woocommerce-account .dmx-account-content-wrap 
table.my_membership_content tr.membership-content 
td.membership-content-title::before {
    display: none !important;
    content: "" !important;
}

/* =========================================================
   3. Responsive compartido
========================================================= */

@media (max-width: 980px) {

    /* Memberships Page */
    body.woocommerce-account .dmx-memberships-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {

    body.woocommerce-account .dmx-account-content-wrap 
    table.my_membership_content tr.membership-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    body.woocommerce-account .dmx-account-content-wrap 
    table.my_membership_content tr.membership-content 
    td.membership-content-actions {
        justify-self: stretch;
        width: 100%;
    }

    body.woocommerce-account .dmx-account-content-wrap 
    table.my_membership_content tr.membership-content 
    td.membership-content-actions a {
        width: 100%;
    }
}

@media (max-width: 480px) {

    /* Memberships Page */
    body.woocommerce-account .dmx-memberships-header h2 {
        font-size: 24px;
    }

    body.woocommerce-account .dmx-membership-card-media {
        margin: 18px 18px 0;
        border-radius: 18px;
    }

    body.woocommerce-account .dmx-membership-card-body {
        padding: 20px 18px 22px;
    }

    body.woocommerce-account .dmx-membership-card-title {
        font-size: 21px;
    }

    body.woocommerce-account .dmx-membership-card-button {
        width: 100%;
    }

    /* Membership Content */
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content {
        border-radius: 22px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-image,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-thumbnail {
        margin: 18px 18px 0;
        border-radius: 18px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content img {
        border-radius: 18px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions {
        padding-left: 18px;
        padding-right: 18px;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-title a {
        font-size: 26px;
        line-height: 1.15;
    }

    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content .button,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content a.button,
    body.woocommerce-account .dmx-account-content-wrap table.my_membership_content tr.membership-content td.membership-content-actions a {
        width: 100%;
    }
}