/* ==========================================================================
   Pizzas Watson — Selector de sedes
   ========================================================================== */

.pw-branches {
    padding: 90px 0 120px;
    background: var(--pw-white);
}

/* ==========================================================================
   Encabezado
   ========================================================================== */

.pw-branches__heading {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.pw-branches__heading h2 {
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.pw-branches__heading h2 strong,
.pw-branches__heading h2 span {
    display: block;
}

.pw-branches__heading h2 strong {
    color: #d32268;
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 800;
}

.pw-branches__heading h2 span {
    margin-top: 3px;
    color: #e52a75;
    font-size: clamp(1.85rem, 2.7vw, 2.4rem);
    font-weight: 500;
}

.pw-branches__heading p {
    max-width: 650px;
    margin: 22px auto 0;
    color: #e52a75;
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-weight: 500;
    line-height: 1.25;
    text-wrap: balance;
}

/* ==========================================================================
   Cuadrícula
   ========================================================================== */

.pw-branches__grid {
    max-width: 1050px;
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 68px auto 0;
}

/* ==========================================================================
   Tarjeta
   ========================================================================== */

.pw-branch-card {
    position: relative;
    min-height: 280px;
    display: grid;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    border-radius: 17px;
    background:
        linear-gradient(
            135deg,
            #c81755,
            #a70047
        );
}

.pw-branch-card__image {
    position: absolute;
    inset: 0;
    z-index: -3;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition:
        transform 0.55s
        cubic-bezier(0.22, 1, 0.36, 1);
}

.pw-branch-card__overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(
            135deg,
            rgba(204, 23, 87, 0.76),
            rgba(168, 0, 70, 0.68)
        );
    transition:
        background 0.3s ease;
}

.pw-branch-card::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 2px solid transparent;
    border-radius: inherit;
    content: "";
    pointer-events: none;
    transition:
        border-color 0.25s ease;
}

.pw-branch-card:hover
.pw-branch-card__image {
    transform: scale(1.06);
}

.pw-branch-card:hover
.pw-branch-card__overlay {
    background:
        linear-gradient(
            135deg,
            rgba(204, 23, 87, 0.68),
            rgba(168, 0, 70, 0.58)
        );
}

.pw-branch-card.is-selected::after {
    border-color: #fff7c9;
}

/* ==========================================================================
   Contenido
   ========================================================================== */

.pw-branch-card__content {
    width: min(100% - 36px, 430px);
    display: grid;
    justify-items: center;
    gap: 30px;
    text-align: center;
}

.pw-branch-card__content h3 {
    max-width: 420px;
    margin: 0;
    color: #fff8c8;
    font-size: clamp(1.65rem, 2.7vw, 2.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-shadow:
        0 3px 14px
        rgba(75, 0, 29, 0.25);
}

/* ==========================================================================
   Botón
   ========================================================================== */

.pw-branch-card__button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 18px;
    border: 2px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;
    color: var(--pw-white);
    background: rgba(159, 0, 65, 0.2);
    font-family: var(--pw-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition:
        color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.pw-branch-card__button img {
    width: 25px;
    height: 25px;
    display: block;
    object-fit: contain;
    transition:
        filter 0.2s ease,
        transform 0.2s ease;
}

/*
 * Convierte el PNG blanco a magenta
 * cuando el botón tiene fondo claro.
 */
.pw-branch-card.is-selected
.pw-branch-card__button img,
.pw-branch-card__button:hover img {
    filter:
        brightness(0)
        saturate(100%)
        invert(16%)
        sepia(94%)
        saturate(4512%)
        hue-rotate(326deg)
        brightness(80%)
        contrast(108%);
}

.pw-branch-card__button:hover {
    color: #b6004c;
    background: var(--pw-white);
    transform: translateY(-2px);
}

.pw-branch-card.is-selected
.pw-branch-card__button {
    color: #b6004c;
    background: #fff8c8;
    border-color: #fff8c8;
}

/* ==========================================================================
   Estado vacío
   ========================================================================== */

.pw-branches__empty {
    max-width: 720px;
    margin: 50px auto 0;
    padding: 24px;
    border: 1px dashed rgba(211, 34, 104, 0.38);
    border-radius: 16px;
    color: #d32268;
    text-align: center;
    font-weight: 700;
}

/* ==========================================================================
   Tabletas
   ========================================================================== */

@media (max-width: 900px) {
    .pw-branches {
        padding: 76px 0 92px;
    }

    .pw-branches__grid {
        gap: 14px;
        margin-top: 54px;
    }

    .pw-branch-card {
        min-height: 250px;
    }

    .pw-branch-card__content {
        gap: 24px;
    }
}

/* ==========================================================================
   Móviles
   ========================================================================== */

@media (max-width: 680px) {
    .pw-branches {
        padding: 62px 0 72px;
    }

    .pw-branches__heading {
        padding-inline: 8px;
    }

    .pw-branches__heading h2 strong {
        font-size: 1.75rem;
    }

    .pw-branches__heading h2 span {
        font-size: 1.55rem;
    }

    .pw-branches__heading p {
        margin-top: 18px;
        font-size: 1rem;
        line-height: 1.4;
    }

    .pw-branches__grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 42px;
    }

    .pw-branch-card {
        min-height: 230px;
        border-radius: 15px;
    }

    .pw-branch-card__content {
        gap: 24px;
    }

    .pw-branch-card__content h3 {
        font-size: 1.6rem;
    }

    .pw-branch-card__button {
        min-height: 46px;
        font-size: 1.05rem;
    }
}