/* =====================================================
EL PAJAR · OFERTAS · V1
Archivo /ofertas/ + detalle del CPT oferta.
===================================================== */

body.elpajar-page-ofertas #primary,
body.elpajar-single-oferta #primary {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.eo-offers, .eo-offers *, .eo-offers *::before, .eo-offers *::after,
.eo-single, .eo-single *, .eo-single *::before, .eo-single *::after {
    box-sizing: border-box;
}

.eo-offers, .eo-single {
    --eo-ink:#3b271d;
    --eo-paper:#fbf8f3;
    --eo-line:#e3d8c7;
    --eo-olive:#515139;
    --eo-gold:#f3d28f;
    width:100%;
    color:#2f2925;
    background:#fffdf9;
    font:1rem/1.65 Arial,Helvetica,sans-serif;
    overflow-wrap:anywhere;
}

.eo-container, .eo-offer-container {
    width:min(calc(100% - 48px),var(--pajar-container,1280px));
    max-width:100%;
    margin:0 auto;
}
.eo-offer-container { width:min(calc(100% - 48px),940px); }

.eo-offers h1, .eo-offers h2, .eo-single h1, .eo-single h2 {
    margin:0;
    color:var(--eo-ink);
    font-family:Georgia,"Times New Roman",serif;
    font-weight:400;
    letter-spacing:-.025em;
}
.eo-offers h1, .eo-single h1 {
    font-size:clamp(2rem,3.3vw,2.875rem);
    line-height:1.1;
}
.eo-offers h2, .eo-single h2 {
    font-size:clamp(1.65rem,2.5vw,2.25rem);
    line-height:1.16;
}

.eo-eyebrow {
    margin:0 0 10px;
    color:#755037;
    font-size:.6875rem;
    font-weight:700;
    line-height:1.5;
    letter-spacing:.2em;
    text-transform:uppercase;
}

.eo-breadcrumbs { margin:0 0 22px; font-size:.8125rem; }
.eo-breadcrumbs ol {
    display:flex; flex-wrap:wrap; align-items:center; gap:8px 10px;
    margin:0; padding:0; list-style:none;
}
.eo-breadcrumbs li { margin:0; padding:0; list-style:none; }
.eo-breadcrumbs li + li::before { content:"/"; margin-right:10px; color:#756959; }
.eo-breadcrumbs li:last-child {
    min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.eo-offers a, .eo-single a { color:#59432e; text-underline-offset:4px; }
.eo-offers a:focus-visible, .eo-single a:focus-visible {
    outline:3px solid #745020; outline-offset:4px;
}

.eo-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px 22px; }

.eo-button {
    display:inline-flex; align-items:center; justify-content:center; gap:12px;
    min-height:46px; max-width:100%; padding:12px 20px;
    border:1px solid transparent; border-radius:4px;
    color:#2b1b14 !important; background:var(--eo-gold);
    font:600 .9375rem/1.35 Arial,Helvetica,sans-serif;
    text-align:center; text-decoration:none !important;
}
.eo-button:hover { background:#efc86f; }

.eo-text-link {
    display:inline-flex; align-items:center; gap:10px;
    min-height:44px; max-width:100%; padding:8px 0;
    color:#59432e; font-size:.875rem; font-weight:600; line-height:1.5;
    text-decoration:underline; text-decoration-thickness:1px;
}
.eo-text-link:hover { color:#2b1b14; text-decoration-thickness:2px; }
.eo-text-link--light { color:#fff !important; }

/* INTRO */
.eo-intro { padding:22px 0 36px; background:var(--eo-paper); }
.eo-intro__grid {
    display:grid;
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
    align-items:center;
    gap:clamp(30px,4vw,62px);
}
.eo-intro__grid > * { min-width:0; }
.eo-lead { max-width:43rem; margin:16px 0 24px; color:#625448; }
.eo-intro__photo {
    width:100%; max-width:450px; margin:0; justify-self:end;
}
.eo-intro__photo img {
    display:block; width:100%; height:auto; border-radius:4px;
}

/* LISTADO */
.eo-listing { padding:clamp(36px,4vw,60px) 0; }
.eo-section-heading { margin-bottom:28px; }

.eo-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:24px;
}
.eo-card {
    display:flex; flex-direction:column; min-width:0;
    border:1px solid var(--eo-line); border-radius:4px;
    background:#fff; overflow:hidden;
}
.eo-card__media {
    display:block; position:relative; aspect-ratio:3/2;
    overflow:hidden; background:#eee7dc;
}
.eo-card__image {
    display:block; width:100%; height:100%; object-fit:cover;
}
.eo-card__body {
    display:flex; flex:1; flex-direction:column; padding:24px;
}
.eo-card__kicker {
    margin:0 0 8px; color:#84683d;
    font-size:.6875rem; font-weight:700;
    letter-spacing:.13em; text-transform:uppercase;
}
.eo-card__title {
    margin:0 0 16px !important;
    font-size:clamp(1.45rem,1.9vw,1.75rem) !important;
}
.eo-card__title a { color:var(--eo-ink); text-decoration:none; }
.eo-card__title a:hover { text-decoration:underline; }

.eo-card__facts {
    display:flex; flex-wrap:wrap; gap:12px 26px;
    margin:0 0 18px; padding:14px 0;
    border-block:1px solid var(--eo-line);
}
.eo-card__fact-value {
    display:block; color:var(--eo-ink);
    font:400 1.65rem/1.15 Georgia,"Times New Roman",serif;
}
.eo-card__fact-label {
    display:block; margin-top:2px; color:#736353;
    font-size:.75rem; line-height:1.45;
}
.eo-card__excerpt {
    margin:0 0 14px; color:#5c5044; font-size:.9375rem;
}
.eo-card__validity {
    margin:0 0 10px; color:#745a34; font-size:.8125rem; font-weight:600;
}
.eo-card__more { margin-top:auto; align-self:flex-start; }

.eo-pagination {
    margin-top:34px; padding-top:24px; border-top:1px solid var(--eo-line);
}
.eo-pagination ul {
    display:flex; flex-wrap:wrap; gap:8px; margin:0; padding:0; list-style:none;
}
.eo-pagination li { list-style:none; }
.eo-pagination a, .eo-pagination span {
    display:inline-flex; align-items:center; justify-content:center;
    min-width:42px; min-height:42px; padding:8px 12px;
    border:1px solid #d6c9b6; border-radius:4px; text-decoration:none;
}
.eo-pagination .current {
    color:#fff; background:var(--eo-olive); border-color:var(--eo-olive);
}

.eo-empty {
    padding:30px; border:1px solid var(--eo-line);
    border-radius:4px; background:var(--eo-paper);
}
.eo-empty h2 { margin-bottom:12px; }
.eo-empty > p:not(.eo-eyebrow) { margin:0 0 20px; color:#625448; }

/* CIERRE */
.eo-closing { padding:0 0 clamp(36px,4vw,60px); }

.eo-closing__box, .eo-offer__next {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center; gap:28px;
    padding:30px 36px; border-radius:4px;
    color:#fff; background:var(--eo-olive);
}
.eo-closing__box .eo-eyebrow, .eo-offer__next .eo-eyebrow { color:var(--eo-gold); }
.eo-closing__box h2, .eo-offer__next h2 { color:#fff; margin-bottom:10px; }
.eo-closing__box p:not(.eo-eyebrow), .eo-offer__next p:not(.eo-eyebrow) {
    margin:0; max-width:46rem; color:#fff; font-size:.9375rem;
}
.eo-actions--closing {
    flex-direction:column; align-items:flex-start; gap:4px;
}

/* DETALLE */
.eo-offer__header { padding:22px 0 30px; background:var(--eo-paper); }
.eo-offer__header h1 { max-width:52rem; }

.eo-offer__facts {
    display:flex; flex-wrap:wrap; gap:18px 34px; margin-top:22px;
}
.eo-offer__facts > div { min-width:120px; }
.eo-offer__fact-value {
    display:block; color:var(--eo-ink);
    font:400 clamp(2rem,4vw,2.75rem)/1.05 Georgia,"Times New Roman",serif;
}
.eo-offer__fact-label {
    display:block; margin-top:4px; color:#736353; font-size:.8125rem;
}

.eo-offer__hero {
    margin:36px 0 0; overflow:hidden; border-radius:4px; background:#eee7dc;
}
.eo-offer__hero .eo-card__image {
    width:100%; height:auto; max-height:620px; object-fit:cover;
}

.eo-offer__validity, .eo-offer__expired {
    margin:24px 0 0; padding:14px 18px;
    border-left:3px solid #9c793e; border-radius:0 4px 4px 0;
    color:#574633; background:#f5eedf; font-size:.875rem;
}
.eo-offer__expired {
    border-left-color:#8f5d4e; background:#f6eae4;
}

.eo-offer__content {
    padding:32px 0 42px; color:#3d352e; font-size:1rem; line-height:1.75;
}
.eo-offer__content > *:first-child { margin-top:0; }
.eo-offer__content h2, .eo-offer__content h3 {
    margin:1.6em 0 .65em; color:var(--eo-ink);
    font-family:Georgia,"Times New Roman",serif; font-weight:400;
}
.eo-offer__content p, .eo-offer__content ul, .eo-offer__content ol {
    margin:0 0 1.2em;
}
.eo-offer__content img {
    display:block; max-width:100%; height:auto; border-radius:4px;
}

/* Limpieza de bloques vacíos heredados */
.eo-offer__content p:empty,
.eo-offer__content div:empty,
.eo-offer__content figure:empty {
    display:none !important;
    margin:0 !important;
    padding:0 !important;
}

.eo-offer__next { margin-bottom:22px; }
.eo-offer__back { margin:0 0 48px; }

/* RESPONSIVE */
@media (max-width:980px) {
    .eo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .eo-closing__box, .eo-offer__next {
        grid-template-columns:minmax(0,1fr); gap:22px;
    }
}
@media (max-width:760px) {
    .eo-intro__grid { grid-template-columns:minmax(0,1fr); gap:24px; }
    .eo-intro__photo { max-width:480px; justify-self:start; }
}
@media (max-width:680px) {
    body.elpajar-page-ofertas .elpajar-header__inner,
    body.elpajar-single-oferta .elpajar-header__inner {
        height:88px; min-height:88px;
        grid-template-columns:minmax(0,1fr) auto; column-gap:14px;
    }
    body.elpajar-page-ofertas .elpajar-logo,
    body.elpajar-single-oferta .elpajar-logo {
        width:max-content; max-width:100%; height:88px; margin:0;
    }
    body.elpajar-page-ofertas .elpajar-logo img,
    body.elpajar-single-oferta .elpajar-logo img {
        display:block; height:112px; width:auto; max-width:100%;
        object-fit:contain; transform:none;
    }
    body.elpajar-page-ofertas .elpajar-topbar,
    body.elpajar-single-oferta .elpajar-topbar { font-size:13px; }
    body.elpajar-page-ofertas .elpajar-topbar__inner,
    body.elpajar-single-oferta .elpajar-topbar__inner { min-height:36px; }
    body.elpajar-page-ofertas .elpajar-topbar__contact,
    body.elpajar-single-oferta .elpajar-topbar__contact {
        justify-content:center; gap:18px; flex-wrap:wrap; padding-block:5px;
    }
    .eo-container, .eo-offer-container { width:calc(100% - 40px); }
    .eo-intro, .eo-offer__header { padding-top:18px; }
    .eo-offers h1, .eo-single h1 {
        font-size:clamp(1.875rem,7.5vw,2.375rem);
    }
    .eo-lead { font-size:.9375rem; }
    .eo-listing { padding-block:32px; }
    .eo-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
    .eo-card__body { padding:22px; }
    .eo-closing__box, .eo-offer__next { padding:26px 24px; }
    .eo-offer__hero { margin-top:26px; }
    .eo-offer__content { padding:28px 0 34px; }
}
@media (max-width:374px) {
    .eo-container, .eo-offer-container { width:calc(100% - 32px); }
    .eo-closing__box, .eo-offer__next { padding:24px 20px; }
    .eo-eyebrow { letter-spacing:.15em; }
}
