:root {
    --eon-bg: #ffffff;
    --eon-fg: #111827;
    --eon-muted: #6b7280;
    --eon-border: #e5e7eb;
    --eon-border-strong: #d1d5db;
    --eon-accent: #2563eb;
    --eon-accent-600: #1d4ed8;
    --eon-surface: #f8fafc;
}

/* CONTENEDOR GENERAL */

.eon-pt {
    position: relative;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
    color: var(--eon-fg);
}

.eon-pt__card {
    position: relative;
    background: var(--eon-bg);
    border: 1px solid var(--eon-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    overflow: hidden;
}

/* AVISO MÍNIMO */

.eon-pt__minnotice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    padding: 10px 12px;
    border-radius: 6px;
    margin: 12px;
    font-size: 14px;
    color: #856404;
}

/* SUMMARY SUPERIOR */

.eon-pt__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--eon-border);
    font-size: 14px;
    color: #374151;
    gap: 10px;
    flex-wrap: wrap;
}

.eon-pt__summary .eon-pt__count {
    font-weight: 600;
}

.eon-pt__summary-right {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.eon-pt__cart-total-value {
    font-weight: 700;
}

.eon-pt__btn-checkout.disabled {
    opacity: .4;
    pointer-events: none;
}

/* TOOLBAR */

.eon-pt__toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--eon-surface);
    border-bottom: 1px solid var(--eon-border);
}

.eon-pt__toolbar-left {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 280px;
}

.eon-pt__toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eon-pt__searchbox .label,
.eon-pt__catbox .label,
.eon-pt__orderby .label {
    display: block;
    font-size: 12px;
    color: var(--eon-muted);
    margin-bottom: 2px;
}

.eon-pt__search {
    flex: 1;
    max-width: 460px;
    padding: 10px 12px;
    border: 1px solid var(--eon-border);
    border-radius: 10px;
    background: #fff;
    transition: box-shadow .15s, border-color .15s;
}

.eon-pt__search:focus {
    outline: 0;
    border-color: var(--eon-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .2);
}

.eon-pt__catbox select,
.eon-pt__orderby select {
    padding: 10px 12px;
    border: 1px solid var(--eon-border);
    border-radius: 10px;
    background: #fff;
}

/* TABLA */

.eon-pt__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.eon-pt__table th {
    background: var(--eon-surface);
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid var(--eon-border);
    padding: 10px 12px;
}

.eon-pt__table td {
    border-bottom: 1px solid var(--eon-border);
    padding: 14px 28px;
    vertical-align: middle;
}

.eon-pt__table tr:hover td {
    background: #fafafa;
}

.eon-pt__img {
    max-width: 80px;
    height: auto;
    border-radius: 8px;
    border: 1px solid var(--eon-border-strong);
}

/* STEPPER CANTIDAD */

.eon-pt__qtywrap {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--eon-border);
    border-radius: 10px;
    overflow: hidden;
}

.eon-pt__qtybtn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 0;
    cursor: pointer;
    font-size: 16px;
    transition: background .15s;
}

.eon-pt__qtybtn:hover {
    background: #f3f4f6;
}

.eon-pt__qtybtn[disabled] {
    opacity: .5;
    cursor: not-allowed;
}

.eon-pt__qty {
    width: 50px;
    padding: 8px 4px;
    border: 0;
    border-left: 1px solid var(--eon-border);
    border-right: 1px solid var(--eon-border);
    text-align: center;
}

.eon-pt__qty:focus {
    outline: 0;
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, .2);
}

/* BOTONES GENERALES */

.eon-pt__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--eon-border-strong);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all .15s;
    font-size: 13px;
}

.eon-pt__btn:hover {
    border-color: #9ca3af;
}

.eon-pt__btn[disabled] {
    opacity: .6;
    cursor: not-allowed;
}

.eon-pt__btn--ghost {
    background: #fff;
    color: #111827;
}

.eon-pt__details {
    font-size: 12px;
    padding: 6px 10px;
    text-transform: capitalize;
}

/* PAGINACIÓN */

.eon-pt__pagination {
    display: flex;
    align-items: center;
    gap: 6px;
}

.eon-pt__pager-nums {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.eon-pt__pnum {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--eon-border-strong);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 13px;
    transition: all .15s;
}

.eon-pt__pnum:hover {
    border-color: #9ca3af;
}

.eon-pt__pnum.is-active {
    border-color: var(--eon-accent);
    background: rgba(37, 99, 235, .08);
    color: var(--eon-accent);
    font-weight: 700;
}

/* OVERLAY / LOADER */

.eon-pt__overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(2px);
    z-index: 10;
}

.eon-pt__loader {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--eon-border);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .08);
    font-size: 14px;
}

.eon-pt__spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #e5e7eb;
    border-top-color: var(--eon-accent);
    animation: eon-spin .7s linear infinite;
}

@keyframes eon-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================
   MODAL + SLICK (OPCIÓN A)
   ========================== */

.eon-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
    animation: eon-fadeIn .2s ease-out;
}

@keyframes eon-fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.eon-modal {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 16px;
    overflow: scroll;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
    display: flex;
    flex-direction: column;
    animation: eon-slideUp .25s ease-out;
}

@keyframes eon-slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Botón cerrar (X) arriba a la derecha */

.eon-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.06);
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.eon-modal__close:hover {
    background: rgba(15, 23, 42, 0.12);
}

/* Galería (Slick) - imagen arriba */

.eon-modal__gallery {
    background: #f9fafb;
    padding: 16px;
}

.eon-modal__slide {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.eon-modal__mainimg {
    max-width: 100%;
    max-height: 55vh;
    object-fit: contain;
    border-radius: 8px;
}

/* Ajustes Slick dentro del modal */

.eon-modal__gallery .slick-slider {
    margin-bottom: 0;
}

.eon-modal__gallery .slick-dots {
    bottom: 0;
    position: static;
    margin-top: 8px;
}

.eon-modal__gallery .slick-prev,
.eon-modal__gallery .slick-next {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #FFCC33;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    z-index: 1;
    padding: 6px 13px 0px 11px !important;
    margin: 32px !important;
}


/* CONTENIDO TEXTO ABAJO */

.eon-modal__content {
    padding: 20px 24px 18px 24px;
    display: flex;
    flex-direction: column;
    max-height: 35vh;
}

.eon-modal__title {
    font-size: 22px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
    line-height: 1.3;
}





/* Footer abajo */

.eon-modal__footer {
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

.eon-modal__close-btn {
    padding: 9px 18px;
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .1s;
}

.eon-modal__close-btn:hover {
    background: #1f2937;
}

.eon-modal__close-btn:active {
    transform: scale(0.98);
}

.eon-pt__table-wrap {
    width: 100%;
    overflow-x: auto;
}

.eon-pt__table-wrap::-webkit-scrollbar {
    height: 8px;
}

.eon-pt__table-wrap::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.eon-pt__table-wrap::-webkit-scrollbar-track {
    background: #f1f1f1;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .eon-pt__table-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
        border: 1px solid var(--eon-border);
        border-radius: 8px;
    }

    .eon-pt__table {
        min-width: 1000px !important;
        /* Forzamos scroll horizontal con un ancho mayor */
        table-layout: auto;
    }

    .eon-pt__table th {
        white-space: nowrap;
    }

    /* Control de visibilidad por clase (más robusto que nth-child) */
    .eon-pt__col-img,
    .eon-pt__col-product,
    .eon-pt__col-price,
    .eon-pt__col-net-price,
    .eon-pt__col-qty,
    .eon-pt__col-add {
        display: table-cell !important;
    }



    a.eon-pt__product-link {
        font-size: 11px;
        white-space: normal;
        display: block;
        max-width: 150px;
    }

    .eon-pt__toolbar-left {
        min-width: 100%;
    }

    .eon-modal-backdrop {
        padding: 10px;
    }

    .eon-modal {
        max-height: 95vh;
    }

    .eon-modal__gallery {
        padding: 12px;
    }

    .eon-modal__mainimg {
        max-height: 55vh;
    }

    .eon-modal__content {
        padding: 16px;
        max-height: 45vh;
    }

    .eon-modal__title {
        font-size: 16px !important;
    }

    /* Resaltar precio neto */
    .eon-pt__col-net-price {
        font-weight: 600;
        color: var(--eon-accent);
    }
}

/* Estilos adicionales que deberían aplicar siempre o al final */
h2.eon-modal__title {
    font-size: 18px !important;
}

.eon-modal__slide {
    min-height: 300px;
}

button.eon-pt__btn.eon-pt__btn--ghost.eon-pt__details {
    font-size: 13px;
    padding: 5px 5px;
}

a.button.add_to_cart_button.ajax_add_to_cart.eon-pt__addcart,
a.button.eon-pt__btn-cart,
a.button.eon-pt__btn-checkout {
    background: black;
    color: #FFCC33;
}

.eon-pt__qtywrap {
    border: none;
}

.eon-pt__qty {
    padding: 2px !important;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

button.eon-pt__qtybtn {
    padding: 0px 11px !important;
    font-size: 16px;
}

input.eon-pt__search {
    border: 1px solid black !important;
}

a.eon-pt__product-link {
    font-size: 12px !important;
}

td.eon-pt__col-product {
    font-size: 12px;
}

td.eon-pt__col-net-price del {
    width: 100% !important;
    font-size: 14px !important;
}

/* --- ESTILOS CARRITO / CHECKOUT --- */

/* Columna Precio Neto en tabla */
.product-net-price {
    white-space: nowrap;
}

.product-net-price del {
    color: #999;
    font-size: 0.85em;
    margin-right: 4px;
}

.product-net-price ins {
    text-decoration: none;
    color: var(--eon-fg);
    font-weight: 500;
}

/* Totales en 2 Columnas */
.eon-custom-totals {
    display: flex;
    gap: 30px;
    margin: 40px 0;
    font-family: inherit;
}

.eon-totals-col {
    flex: 1;
    background: #fff;
    border: 1px solid var(--eon-border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.eon-totals-col h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--eon-surface);
}

.eon-totals-col--net h3 {
    color: #4b5563;
}

.eon-totals-col--tax h3 {
    color: #111827;
}

.eon-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: #4b5563;
}

.eon-totals-row strong {
    color: #111827;
    font-size: 16px;
}

.eon-totals-row--total {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--eon-border);
}

.eon-totals-row--total span {
    font-weight: 700;
    color: #111827;
}

.eon-totals-row--total strong {
    font-size: 22px;
    color: #000;
}

@media (max-width: 768px) {
    .eon-custom-totals {
        flex-direction: column;
        gap: 20px;
    }

    .shop_table.cart .product-net-price {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
    }
}

.woocommerce-cart .qty {
    padding: 0px !important;
}

.woocommerce-cart th.product-net-price {
    text-align: left !important;
}

td.eon-pt__col-net-price {
    padding: 0px 11px;
}