/* =========================================================
   SUPERAMEDIAS
   Diseño general
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7f9;
    color: #17202a;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
select {
    font-family: inherit;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    width: 100%;
    background: #ffffff;
    border-bottom: 1px solid #e8ecef;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-inner {
    max-width: 1500px;
    margin: 0 auto;
    min-height: 68px;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.brand-mark {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: linear-gradient(135deg, #FF6B35, #E63946);
    color: #ffffff;

    border-radius: 11px;

    font-size: 19px;
    font-weight: 800;
}

.current-location {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #65717d;
    font-size: 14px;
}

.location-dot {
    width: 9px;
    height: 9px;
    background: #19a974;
    border-radius: 50%;
}


/* =========================================================
   ACCIONES DE LA TOPBAR (sustituyen al menú inferior)
   ========================================================= */

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-icon-link {
    width: 40px;
    height: 40px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f4f0ee;

    font-size: 18px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.topbar-icon-link:hover {
    background: #ffe0cc;
    transform: translateY(-1px);
}

.topbar-badge {
    position: absolute;

    top: -2px;
    right: -2px;

    min-width: 16px;
    height: 16px;

    padding: 0 3px;

    display: none;
    align-items: center;
    justify-content: center;

    background: #E63946;
    color: #ffffff;

    border-radius: 50%;
    border: 2px solid #ffffff;

    font-size: 10px;
    font-weight: 800;
    line-height: 1;
}

.topbar-badge.show {
    display: flex;
}

.topbar-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 10px 16px;

    border-radius: 30px;

    background: linear-gradient(120deg, #FF6B35, #E63946);
    color: #ffffff;

    font-size: 13px;
    font-weight: 800;

    white-space: nowrap;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.topbar-cta:hover {
    transform: translateY(-1px);

    box-shadow:
        0 8px 18px rgba(230, 57, 70, 0.30);
}

.account-link {
    font-size: 14px;
    font-weight: 700;
    color: #17202a;
}

.topbar-greeting {
    font-size: 14px;
    font-weight: 700;
    color: #46525c;
    white-space: nowrap;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    overflow: hidden;

    background: linear-gradient(135deg, #2a1410, #1a0e0c);
    color: #ffffff;

    min-height: 390px;

    display: flex;
    align-items: center;
}

.hero-glow {
    position: absolute;

    width: 500px;
    height: 500px;

    right: -180px;
    top: -220px;

    background: rgba(255, 107, 53, 0.22);

    border-radius: 50%;

    filter: blur(10px);
}

.hero-content {
    position: relative;
    z-index: 2;

    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding: 70px 28px;

    font-family: 'Plus Jakarta Sans', Arial, Helvetica, sans-serif;
}

.hero-badge {
    display: inline-block;

    padding: 8px 13px;

    border-radius: 30px;

    background: rgba(255, 255, 255, 0.10);

    font-size: 25px;
    font-weight: 800;

    letter-spacing: 1.2px;
}

.hero h1 {
    margin: 22px 0 16px;

    font-size: clamp(42px, 5vw, 72px);

    line-height: 1.02;

    letter-spacing: -3px;
}

.hero h1 span {
    color: #FF8A50;
}

.hero-text {
    max-width: 650px;

    margin: 0 0 14px;

    color: #e2cfc8;

    font-size: 15px;
    line-height: 1.6;
}

.hero-text-strong {
    display: inline-block;

    margin-left: 6px;

    color: #ffffff;
    font-weight: 800;
    font-size: 18px;
}

.resumen-oferta {
    margin-top: 8px;

    padding: 18px;

    border-radius: 16px;

    background: #f7f8fa;

    border: 1px solid #eceff2;
}

.resumen-oferta-fila {
    display: flex;

    flex-direction: column;

    gap: 3px;

    padding: 10px 0;

    font-size: 14px;
}

.resumen-oferta-fila + .resumen-oferta-fila {
    border-top: 1px solid #e8ecef;
}

.resumen-oferta-fila span {
    color: #6b7785;
}

.resumen-oferta-fila strong {
    font-size: 15px;

    line-height: 1.35;
}

.resumen-oferta-fila-destacada strong {
    font-size: 17px;

    color: #E63946;
}

.resumen-oferta-ahorro strong {
    color: #168456;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    padding: 18px 30px;

    background: linear-gradient(120deg, #FF6B35, #E63946);
    color: #ffffff;

    border-radius: 14px;

    font-size: 17px;
    font-weight: 800;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.primary-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(230, 57, 70, 0.35);
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;

    margin-bottom: 22px;
}


/* =========================================================
   NOMBRE DE MARCA A DOS COLORES (dentro del texto del hero)
   ========================================================= */

.brand-word {
    font-weight: 800;
}

.brand-word-super {
    color: #FF8A50;
}

.brand-word-amedias {
    color: #ffffff;
}


/* =========================================================
   PASOS DENTRO DEL HERO (compacto)
   ========================================================= */

.hero-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;

    margin: 22px 0 26px;
}

.hero-step {
    flex: 1;
    min-width: 220px;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    padding: 12px 14px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-step-icon {
    font-size: 18px;
    line-height: 1.4;
}

.hero-step-text {
    color: #e2cfc8;
    font-size: 15px;
    line-height: 1.5;
}

.hero-step-text strong {
    color: #ffffff;
    font-weight: 800;
}


/* =========================================================
   BUSCADOR (integrado en el hero, mismo estilo oscuro)
   ========================================================= */

.hero-search {
    max-width: 560px;
}

.search-toggle-button {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 14px 18px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.08);

    font-family: inherit;
    font-size: 15px;
    font-weight: 800;

    color: #ffffff;

    cursor: pointer;

    transition: background 0.2s ease;
}

.search-toggle-button:hover {
    background: rgba(255, 255, 255, 0.14);
}

.search-toggle-icon {
    font-size: 18px;
}

.search-toggle-arrow {
    margin-left: auto;

    font-size: 13px;

    color: #e2cfc8;

    transition: transform 0.2s ease;
}

.search-toggle-arrow.open {
    transform: rotate(180deg);
}

.search-panel {
    margin-top: 10px;

    padding: 16px;

    border-radius: 14px;

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.search-panel .field label {
    color: #e2cfc8;
}

.search-panel .field select {
    background: rgba(255, 255, 255, 0.92);
}

.eyebrow {
    display: block;

    color: #8b949e;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.offers-header h2 {
    margin: 7px 0 7px;

    font-size: 28px;

    letter-spacing: -0.8px;
}

.offers-header p {
    margin: 0;

    color: #74808b;

    font-size: 15px;
}

.filters {
    margin-top: 25px;

    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.field label {
    display: block;

    margin-bottom: 8px;

    font-size: 15px;
    font-weight: 800;

    color: #17202a;
}

.field select {
    width: 100%;

    min-height: 48px;

    padding: 0 14px;

    border: 1px solid #dfe4e8;

    border-radius: 11px;

    background: #ffffff;

    color: #17202a;

    font-size: 16px;
    font-weight: 600;

    outline: none;

    cursor: pointer;
}

.field select:focus {
    border-color: #FF6B35;

    box-shadow:
        0 0 0 3px rgba(255, 107, 53, 0.18);
}

.field select:disabled {
    background: #f4f6f8;

    color: #9aa3ab;

    cursor: not-allowed;
}

/* =========================================================
   INPUTS DEL FORMULARIO
   ========================================================= */

.field input {
    width: 100%;

    min-height: 48px;

    padding: 0 14px;

    border: 1px solid #dfe4e8;

    border-radius: 11px;

    background: #ffffff;

    color: #17202a;

    font-size: 16px;
    font-weight: 600;

    outline: none;
}

.field input:focus {
    border-color: #FF6B35;

    box-shadow:
        0 0 0 3px rgba(255, 107, 53, 0.18);
}

.field input[readonly] {
    background: #f4f6f8;

    color: #17202a;

    cursor: default;
}

/* =========================================================
   SECCIÓN OFERTAS
   ========================================================= */

.offers-section {
    max-width: 1500px;

    margin: 55px auto 0;

    padding: 0 28px;
}

.offers-header {
    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}

.offer-count {
    padding: 8px 13px;

    background: #ffffff;

    border: 1px solid #e2e7eb;

    border-radius: 20px;

    color: #66727d;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;
}


/* =========================================================
   GRID DE CARDS
   ========================================================= */

.offers-container {
    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 20px;

    align-items: stretch;
}


/* =========================================================
   CARD DE OFERTA
   ========================================================= */

.offer-card {
    background: #ffffff;

    border: 2px solid #16a34a;

    border-radius: 18px;

    padding: 21px;

    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.offer-image {
    position: relative;

    margin: -21px -21px 16px -21px;

    height: 160px;

    overflow: hidden;

    background: #f4f6f8;
}

.offer-image img {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    display: block;
}

.offer-image-logo img {
    object-fit: contain;

    padding: 24px;

    box-sizing: border-box;
}

.offer-card:hover {
    transform: translateY(-4px);

    border-color: #d6dce1;

    box-shadow:
        0 14px 32px rgba(15, 23, 42, 0.10);
}

.offer-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 8px;

    margin-bottom: 15px;
}

.offer-supermarket {
    font-size: 14px;
    font-weight: 800;

    color: #17202a;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}

.offer-status {
    flex-shrink: 0;

    padding: 5px 8px;

    border-radius: 20px;

    background: #e9f8f0;

    color: #168456;

    font-size: 10px;
    font-weight: 800;

    text-transform: uppercase;
}

.offer-status-acuerdo {
    background: #fdecec;

    color: #c0392b;
}

.offer-acuerdo {
    opacity: 0.75;

    border-color: #E63946 !important;
}

.join-offer-button.cerrada {
    background: #eceff2 !important;

    color: #8792a0 !important;

    cursor: default;
}

.join-offer-button.acuerdo-cerrado {
    background: linear-gradient(120deg, #E63946, #C1272D) !important;

    color: #ffffff !important;
}

.offer-card h3 {
    margin: 0 0 10px;

    font-size: 21px;
    font-weight: 800;

    line-height: 1.25;

    letter-spacing: -0.4px;

    text-transform: uppercase;
}

.offer-promotion {
    display: inline-block;

    align-self: flex-start;

    margin: 0 0 15px;

    padding: 6px 9px;

    background: #ffe0cc;

    color: #c1440e;

    border-radius: 7px;

    font-size: 13px;
    font-weight: 800;
}

.offer-location {
    margin-bottom: 8px;

    color: #46525c;

    font-size: 14px;
    font-weight: 600;

    line-height: 1.4;
}

.offer-date {
    margin-bottom: 20px;

    color: #7a858f;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.4;
}

.offer-prices {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

    margin-top: auto;

    padding-top: 15px;

    border-top: 1px solid #edf0f2;
}

.offer-prices > div {
    min-width: 0;
}

.offer-prices span {
    display: block;

    margin-bottom: 5px;

    color: #5b6670;

    font-size: 13px;
    font-weight: 700;
}

.offer-prices strong {
    display: block;

    font-size: 20px;
    font-weight: 800;

    color: #17202a;
}

.offer-prices > div:last-child strong {
    color: #168456;
}

.offer-saving {
    margin-top: 12px;

    color: #168456;

    font-size: 12px;
    font-weight: 700;

    line-height: 1.4;
}


/* =========================================================
   PARTICIPANTES
   ========================================================= */

.offer-participants {
    margin-top: 17px;

    padding: 10px 11px;

    background: #f5f7f9;

    border-radius: 9px;

    color: #66727d;

    font-size: 12px;

    text-align: center;
}

.offer-participants strong {
    color: #17202a;
}

.join-offer-button {
    width: 100%;

    margin-top: 10px;

    min-height: 46px;

    border: 0;

    border-radius: 10px;

    background: linear-gradient(120deg, #22c55e, #16a34a);

    color: #ffffff;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.join-offer-button:hover {
    background: linear-gradient(120deg, #16a34a, #15803d);

    transform: translateY(-1px);
}

.offer-full {
    margin-top: 17px;

    padding: 11px;

    background: #e9f8f0;

    color: #168456;

    border-radius: 10px;

    text-align: center;

    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   SIN OFERTAS
   ========================================================= */

.empty-offers {
    grid-column: 1 / -1;

    background: #ffffff;

    border: 1px solid #e4e9ed;

    border-radius: 18px;

    padding: 55px 25px;

    text-align: center;
}

.empty-icon {
    width: 60px;
    height: 60px;

    margin: 0 auto 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f4f6f8;

    border-radius: 18px;

    font-size: 27px;
}

.empty-offers h3 {
    margin: 0 0 8px;

    font-size: 20px;
}

.empty-offers p {
    max-width: 450px;

    margin: 0 auto 20px;

    color: #7b8791;

    font-size: 14px;

    line-height: 1.5;
}

.secondary-button {
    display: inline-flex;

    padding: 12px 16px;

    border: 1px solid #dfe4e8;

    border-radius: 10px;

    background: #ffffff;

    font-size: 14px;
    font-weight: 700;
}

.secondary-button:hover {
    background: #f6f7f8;
}


/* =========================================================
   ORDENADOR NORMAL
   4 CARDS
   ========================================================= */

@media (max-width: 1250px) {

    .offers-container {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


/* =========================================================
   TABLET
   2 CARDS
   ========================================================= */

@media (max-width: 900px) {

    .hero {
        min-height: 350px;
    }

    .hero-content {
        padding: 60px 22px;
    }

    .offers-section {
        padding-left: 22px;
        padding-right: 22px;
    }

    .offers-container {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 18px;
    }


    .offer-card {
        border: 2px solid #16a34a;

        box-shadow:
            0 4px 14px rgba(15, 23, 42, 0.10);
    }


    /* =========================================================
       LEGIBILIDAD (pantallas medianas/tablets también)
       ========================================================= */

    .search-panel {
        padding: 18px;
    }

    .field label {
        font-size: 16px;
        font-weight: 800;
    }

    .field select,
    .field input {
        font-size: 17px;
        font-weight: 700;
    }

    .offer-promotion {
        font-size: 15px;
    }

    .offer-card h3 {
        font-size: 22px;
        font-weight: 800;
    }

    .offer-supermarket {
        font-size: 15px;
        font-weight: 800;
    }

    .offer-location {
        font-size: 15px;
        font-weight: 700;
    }

    .offer-date {
        font-size: 13px;
        font-weight: 700;
    }

    .offer-prices span {
        font-size: 14px;
        font-weight: 700;
    }

    .offer-prices strong {
        font-size: 21px;
        font-weight: 800;
    }

    .join-offer-button {
        font-size: 15px;

        min-height: 50px;
    }

    .offers-header p {
        font-size: 15px;
        font-weight: 600;
    }

}


/* =========================================================
   MÓVIL
   ========================================================= */

@media (max-width: 600px) {

    body {
        padding-bottom: 82px;
    }


    .topbar-inner {
        min-height: 60px;

        padding: 0 20px;
    }


    .brand {
        font-size: 19px;
    }


    .brand-mark {
        width: 34px;
        height: 34px;

        border-radius: 9px;
    }


    .current-location {
        font-size: 12px;
    }


    .hero {
        min-height: 360px;
    }


    .hero-content {
        padding: 55px 22px;
    }


    .hero h1 {
        font-size: 44px;

        letter-spacing: -1.5px;
    }


    .hero-text {
        font-size: 16px;
    }


    .hero-steps {
        flex-direction: column;
    }


    .filters {
        grid-template-columns: 1fr;

        gap: 14px;
    }


    .offers-section {
        margin-top: 38px;

        padding: 0 18px;
    }


    .offers-header {
        align-items: flex-start;

        flex-direction: column;

        gap: 10px;
    }


    .offers-header h2 {
        font-size: 27px;
    }


    .offers-container {
        grid-template-columns: 1fr;

        gap: 18px;
    }


    .offer-card {
        padding: 20px;

        border: 2px solid #16a34a;

        box-shadow:
            0 4px 14px rgba(15, 23, 42, 0.10);
    }


    .topbar-actions {
        gap: 6px;
    }


    .topbar-greeting {
        display: none;
    }


    .topbar-cta span.topbar-cta-text {
        display: none;
    }


    /* =========================================================
       LETRA MÁS GRANDE EN MÓVIL
       ========================================================= */

    .field label {
        font-size: 16px;
        font-weight: 800;
    }

    .field select,
    .field input {
        font-size: 17px;
        font-weight: 700;
    }

    .offer-promotion {
        font-size: 15px;
    }

    .offer-card h3 {
        font-size: 22px;
        font-weight: 800;
    }

    .offer-supermarket {
        font-size: 15px;
        font-weight: 800;
    }

    .offer-location {
        font-size: 15px;
        font-weight: 700;
    }

    .offer-date {
        font-size: 13px;
        font-weight: 700;
    }

    .offer-prices span {
        font-size: 14px;
        font-weight: 700;
    }

    .offer-prices strong {
        font-size: 21px;
        font-weight: 800;
    }

    .join-offer-button {
        font-size: 15px;

        min-height: 50px;
    }

    .eyebrow {
        font-size: 12px;
    }

    .offers-header p {
        font-size: 15px;
        font-weight: 600;
    }

    .empty-offers p {
        font-size: 16px;
    }

    .hero-step-text {
        font-size: 16px;
    }

}

/* =========================================================
   PIE DE PÁGINA (enlaces legales)
   ========================================================= */

.site-footer {
    text-align: center;
    padding: 24px 16px;
    color: #9aa3ab;
    font-size: 12px;
}

.site-footer a {
    color: #6b7785;
    margin: 0 8px;
    text-decoration: none;
}

.site-footer a:hover {
    color: #E63946;
    text-decoration: underline;
}
