/* ——— Página pedidos (estilo distribuidora385 / carrito) ——— */

.pagina-pedidos {
    background: #e8ecf2;
}

.pagina-pedidos .cabecera {
    background: linear-gradient(180deg, #0b1f4a 0%, #091444 100%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

/* Misma base que /contacto/ (.div-cabeceracarrito en encabezado.css) */
.pagina-pedidos .div-cabeceracarrito.eja-ped-cab {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0.5rem;
    box-sizing: border-box;
}

.eja-ped-cab__user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    justify-content: center;
    min-width: 0;
}

/* Casita / inicio: mismo tamaño que el logo (src real, sin content:url) */
.pagina-pedidos .eja-ped-cab__home {
    flex-shrink: 0;
    display: block;
    line-height: 0;
    width: 120px;
    height: 120px;
}

.pagina-pedidos .eja-ped-cab__home-icon {
    display: block;
    width: 120px;
    height: 120px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 0;
    border: 0;
}

.eja-ped-cab__nombre {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    word-break: break-word;
}

/* Logo igual que contacto (cuerpocontacto.css) */
.pagina-pedidos .imgcablogo {
    width: 120px;
    height: 120px;
}

/* Título debajo de la cabecera fija (logo 120px + padding cabecera) */
.eja-ped-titulo-wrap {
    margin-top: calc(120px + 3rem);
    padding: 1rem 0.75rem 0;
    background: #e8ecf2;
}

.eja-ped-main {
    padding-top: 0;
    padding-bottom: 2rem;
    min-height: 40vh;
}

.eja-ped-wrap {
    width: min(1100px, calc(100% - 1.5rem));
    margin: 0 auto;
}

/* Título como en captura: caja blanca, sombra, línea naranja */
.eja-ped-titulo-box {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 1.35rem 2rem 1.1rem;
    margin: 0 auto 1.25rem;
    max-width: 560px;
    text-align: center;
}

.eja-ped-titulo {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #08074e;
    text-align: center;
    line-height: 1.15;
    letter-spacing: 0.01em;
}

.eja-ped-titulo-line {
    display: block;
    width: 72px;
    height: 3px;
    margin: 0.65rem auto 0;
    background: #df7f31;
    border-radius: 2px;
}

.eja-ped-vacio {
    text-align: center;
    padding: 2rem 1rem;
    background: #fff;
    border-radius: 12px;
    color: #555;
    font-family: Arial, Helvetica, sans-serif;
    box-shadow: 0 4px 20px rgba(9, 20, 68, 0.08);
}

.eja-ped-bloque {
    margin-bottom: 1.5rem;
}

.eja-ped-cabecera-pedido {
    border-radius: 0;
    padding: 0.55rem 0.75rem;
    font-family: Arial, Helvetica, sans-serif;
    border: none;
    border-bottom: none;
}

.eja-ped-cabecera-pedido__texto {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 400;
}

.eja-ped-cabecera-pedido__texto strong {
    font-weight: 700;
}

.eja-ped-cabecera-pedido__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    flex-wrap: wrap;
}

.eja-ped-cabecera-pedido__texto {
    flex: 1 1 12rem;
    min-width: 0;
}

.eja-ped-repetir {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border: 1px solid rgba(9, 20, 68, 0.25);
    border-radius: 10px;
    background: linear-gradient(180deg, #fff 0%, #f4f6fb 100%);
    color: #091444;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.eja-ped-repetir:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18);
    background: linear-gradient(180deg, #fff8e8 0%, #ffe8b8 100%);
    border-color: #e8a830;
}

.eja-ped-repetir:active {
    transform: translateY(0);
}

.eja-ped-repetir__icon {
    flex-shrink: 0;
}

.eja-ped-cab--procesado .eja-ped-repetir {
    background: rgba(255, 255, 255, 0.96);
    color: #1b5e20;
    border-color: rgba(255, 255, 255, 0.6);
}

.eja-ped-cab--procesado .eja-ped-repetir:hover {
    background: #fff;
    color: #091444;
}

.eja-ped-modal-repetir {
    width: min(26rem, calc(100vw - 2rem));
    text-align: center;
}

.eja-ped-modal-repetir__nota {
    margin: 0 0 0.5rem;
    padding: 0.65rem 0.75rem;
    background: #f0f4fa;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #444;
    text-align: left;
}

.eja-ped-modal-repetir__acc {
    margin-top: 0.35rem;
}

.eja-ped-modal-repetir__acc .btn-auth {
    min-width: 8.5rem;
}

/* Cabecera del pedido: verde vibrante + texto blanco (como imagen) */
.eja-ped-cab--procesado {
    background: #4caf50;
    color: #fff;
}

.eja-ped-cab--procesado .eja-ped-cabecera-pedido__texto {
    color: #fff;
}

.eja-ped-cab--pendiente {
    background: #eaf455;
    color: #1a1a2e;
}

.eja-ped-cab--pendiente .eja-ped-cabecera-pedido__texto {
    color: #1a1a2e;
}

.eja-ped-cab--anulado {
    background: #f79e9c;
    color: #1a1a2e;
}

.eja-ped-cab--anulado .eja-ped-cabecera-pedido__texto {
    color: #1a1a2e;
}

.eja-ped-tabla-wrap {
    background: #fff;
    border-radius: 0;
    box-shadow: none;
    overflow-x: auto;
    border: 1px solid #c5d0dc;
    border-top: none;
}

.eja-ped-tabla {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    margin: 0;
}

.eja-ped-tabla thead {
    background: #9dc2d4;
    color: #08074e;
}

.eja-ped-tabla thead th {
    padding: 0.55rem 0.45rem;
    font-weight: 700;
    text-align: center;
    border: 1px solid #8eb5c9;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #08074e;
}

.eja-ped-tabla tbody td {
    padding: 0.45rem;
    border: 1px solid #b8d4be;
    vertical-align: middle;
    color: #08074e;
}

.eja-ped-tabla tbody tr:last-child td {
    border-bottom: none;
}

.eja-ped-col-foto {
    width: 64px;
    text-align: center;
}

.eja-ped-foto-btn {
    padding: 0;
    border: none;
    background: transparent;
    cursor: zoom-in;
    line-height: 0;
    display: block;
    margin: 0 auto;
}

.eja-ped-foto {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #f0f0f0;
    display: block;
    pointer-events: none;
}

.eja-ficha-producto__pedido-ref {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    opacity: 0.9;
    font-family: Arial, Helvetica, sans-serif;
}

.eja-ped-col-prod {
    text-align: left;
    min-width: 140px;
}

.eja-ped-prod-cod {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #091444;
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.eja-ped-prod-des {
    display: block;
    color: #333;
    line-height: 1.3;
}

/* Cantidad y precio bajo la descripción (solo móvil) */
.eja-ped-prod-meta {
    display: none;
}

.eja-ped-col-can {
    width: 56px;
    text-align: center;
    font-weight: 600;
}

.eja-ped-col-pre,
.eja-ped-col-tot {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.eja-ped-col-tot {
    font-weight: 600;
    color: #091444;
}

.eja-ped-item--pendiente {
    background: #e7ebb2;
}

.eja-ped-item--procesado {
    background: #c8e6c9;
}

.eja-ped-item--anulado {
    background: #f5d0cf;
}

.h3prod {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.5rem;
    line-height: 1.5rem;
}

@media only screen and (max-width: 767px) {
    .pagina-pedidos .div-cabeceracarrito.eja-ped-cab {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        gap: 0.4rem 0.5rem;
        padding: 0.35rem 0.5rem;
    }

    .pagina-pedidos .imgcablogo {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    .pagina-pedidos .eja-ped-cab__user {
        flex: 1 1 auto;
        min-width: 0;
        justify-content: flex-start;
    }

    .pagina-pedidos .eja-ped-cab__home {
        width: 60px;
        height: 60px;
        margin-left: auto;
    }

    .pagina-pedidos .eja-ped-cab__home-icon {
        width: 60px;
        height: 60px;
    }

    .eja-ped-titulo-wrap {
        margin-top: calc(60px + 3.5rem);
        padding-top: 0.75rem;
    }

    .eja-ped-main {
        padding-top: 0;
    }

    .eja-ped-titulo-box {
        padding: 1rem 1.25rem 0.85rem;
        margin-bottom: 1.25rem;
    }

    .eja-ped-titulo {
        font-size: 1.35rem;
    }

    .eja-ped-cabecera-pedido__texto {
        font-size: 0.68rem;
    }

    .eja-ped-repetir {
        width: 100%;
        justify-content: center;
        font-size: 0.72rem;
    }

    .eja-ped-tabla {
        font-size: 0.72rem;
    }

    .eja-ped-foto {
        width: 40px;
        height: 40px;
    }

    .eja-ped-cabecera-pedido__meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .eja-ped-cab__nombre {
        font-size: 0.85rem;
    }

    .h3prod {
        font-size: 0.85rem;
        line-height: 1rem;
    }

    .eja-ped-col-prod {
        max-width: none;
    }

    .eja-ped-prod-cod {
        font-size: 0.7rem;
    }

    .eja-ped-prod-meta {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.15rem 0.5rem;
        margin-top: 0.35rem;
        padding-top: 0.3rem;
        border-top: 1px solid rgba(9, 20, 68, 0.12);
        font-size: 0.68rem;
        line-height: 1.25;
    }

    .eja-ped-prod-meta__lbl {
        font-weight: 700;
        color: #091444;
        text-transform: uppercase;
        font-size: 0.62rem;
        letter-spacing: 0.03em;
    }

    .eja-ped-prod-meta__val {
        font-weight: 600;
        color: #222;
        font-variant-numeric: tabular-nums;
    }

    .eja-ped-tabla thead .eja-ped-col-can,
    .eja-ped-tabla thead .eja-ped-col-pre,
    .eja-ped-tabla tbody .eja-ped-col-can,
    .eja-ped-tabla tbody .eja-ped-col-pre {
        display: none;
    }

    .eja-ped-col-tot {
        width: 4.5rem;
        font-size: 0.7rem;
        padding-left: 0.25rem;
        padding-right: 0.35rem;
    }

    .eja-ped-tabla thead .eja-ped-col-tot {
        font-size: 0.65rem;
    }
}
