/* Cabecera pública del vendedor, con las superficies y controles actuales. */
.seller-profile-header {
    padding-top: 1.5rem;
}

.seller-profile-cover {
    height: 16.25rem;
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--fn-secondary-bg);
}

.seller-profile-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-profile-card {
    position: relative;
    margin: -3rem 1.5rem 0;
    padding: 2rem;
    border-radius: 1.5rem;
    background: var(--fn-tertiary-bg);
}

.seller-profile-avatar {
    position: absolute;
    top: -2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 7rem;
    height: 7rem;
    overflow: hidden;
    border: 6px solid var(--fn-body-bg);
    border-radius: 50%;
    background: var(--fn-secondary-bg);
    color: var(--fn-heading-color);
    font-size: 2rem;
    font-weight: 600;
}

.seller-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.seller-profile-top {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.seller-profile-identity {
    flex: 1;
    min-width: 0;
    padding-left: 8.25rem;
}

.seller-profile-name-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.seller-profile-name-row h1 {
    min-width: 0;
    margin: 0;
    font-size: 2rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.seller-profile-identity-label {
    padding: .25rem .5rem;
    border-radius: .5rem;
    background: var(--fn-primary-bg-subtle);
    color: var(--fn-primary-text-emphasis);
    font-size: .75rem;
}

.seller-profile-location {
    margin: .375rem 0 0;
    color: var(--fn-secondary-color);
    font-size: .875rem;
    overflow-wrap: anywhere;
}

.seller-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    max-width: 24rem;
}

.seller-profile-social {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: .5rem;
}

.seller-profile-contact + .seller-profile-social {
    margin-top: .75rem;
}

.seller-profile-social-links {
    display: contents;
}

.seller-profile-social > .btn,
.seller-profile-social-links > .btn,
.seller-profile-social .dropdown > .btn {
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    border: 0;
}

.seller-profile-social .dropdown-menu {
    min-width: 9.5rem;
}

.seller-profile-contact {
    display: flex;
    flex-shrink: 0;
    gap: .75rem;
    max-width: 100%;
}

.seller-profile-contact .btn {
    min-height: 2.75rem;
    padding-inline: 1.25rem;
}

.seller-profile-about {
    margin-top: 1.5rem;
    color: var(--fn-secondary-color);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.seller-profile-about h2 {
    margin-bottom: .5rem;
    color: var(--fn-heading-color);
    font-size: 1rem;
}

.seller-profile-about p:last-child {
    margin-bottom: 0;
}

.seller-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin: 1.5rem 0 0;
}

.seller-profile-stats > div {
    display: grid;
    gap: .375rem;
    padding: 1.25rem .75rem;
    border-radius: 1rem;
    background: var(--fn-body-bg);
    text-align: center;
}

.seller-profile-stats dt {
    grid-row: 2;
    color: var(--fn-secondary-color);
    font-size: .875rem;
    font-weight: 400;
}

.seller-profile-stats dd {
    grid-row: 1;
    margin: 0;
    color: var(--fn-heading-color);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.seller-profile-listings {
    margin-top: 3rem;
}

.seller-profile-listings .form-label {
    margin-bottom: .5rem;
    color: var(--fn-secondary-color);
    font-size: .875rem;
}

.seller-profile-listings .form-control,
.seller-profile-listings .choices .form-select {
    min-height: 3rem;
    border: 0;
    border-radius: 1rem;
    background-color: var(--fn-secondary-bg);
    color: var(--fn-body-color);
}

.seller-profile-listings .choices .form-select {
    padding: .75rem 1rem;
}

.seller-profile-filter-row {
    position: relative;
    z-index: 10;
}

.seller-profile-listings .choices.is-open {
    z-index: 20;
}

.seller-profile-listings .choices__list--dropdown {
    border-color: var(--fn-border-color);
    border-radius: 1rem;
    background: var(--fn-secondary-bg);
    color: var(--fn-body-color);
}

.seller-profile-page :is(a, button, input):focus-visible {
    outline: 2px solid var(--fn-link-color);
    outline-offset: 3px;
}

@media (min-width: 992px) {
    .seller-profile-header {
        padding-top: 2.5rem;
    }
}

@media (max-width: 991.98px) {
    .seller-profile-top {
        flex-direction: column;
        align-items: stretch;
    }

    .seller-profile-actions {
        max-width: 100%;
    }
}

/* Igualar las fotos de servicios y vehículos dentro del perfil del vendedor. */
.seller-profile-page .pv-service-media .service-directory-card__media {
    --fn-aspect-ratio: 75%;
}

/* Reutiliza las pestañas de Cuenta con semántica de botones de filtro. */
.seller-post-type-tabs {
    overflow-x: auto;
}

.seller-post-type-tabs .publication-tab {
    margin-bottom: 0;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
}

.seller-post-type-count {
    font-variant-numeric: tabular-nums;
}

.seller-post-type-tabs .publication-tab[aria-pressed="true"] {
    border-bottom-color: var(--fn-primary);
    color: var(--fn-emphasis-color);
}

.seller-post-type-tabs .publication-tab:focus-visible {
    outline-offset: -3px;
}

@media (max-width: 575.98px) {
    .seller-profile-cover {
        height: 10rem;
    }

    .seller-profile-card {
        margin: -2rem .75rem 0;
        padding: 1rem;
    }

    .seller-profile-avatar {
        left: 1rem;
        width: 5rem;
        height: 5rem;
        font-size: 1.5rem;
    }

    .seller-profile-top {
        flex-direction: row;
        flex-wrap: wrap;
        column-gap: .25rem;
    }

    /* Reserva el espacio del avatar; los accesos bajan como una sola unidad. */
    .seller-profile-top::before {
        content: "";
        order: -2;
        flex: 0 0 5rem;
        height: 2rem;
    }

    .seller-profile-actions {
        display: contents;
    }

    .seller-profile-actions .seller-profile-social {
        order: -1;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        width: max-content;
        max-width: 100%;
        min-width: 0;
        margin-top: 0;
        margin-left: auto;
    }

    /* Las redes numerosas se desplazan sin recortar el menú de compartir. */
    .seller-profile-social-links {
        display: flex;
        gap: inherit;
        min-width: 0;
        overflow-x: auto;
    }

    .seller-profile-social-links > .btn:focus-visible {
        outline-offset: -3px;
    }

    .seller-profile-social > .btn,
    .seller-profile-social-links > .btn {
        flex-shrink: 0;
    }

    .seller-profile-identity {
        flex-basis: 100%;
        padding: 0;
    }

    .seller-profile-name-row h1 {
        font-size: 1.5rem;
    }

    .seller-profile-contact {
        order: 1;
        flex-basis: 100%;
        width: 100%;
    }

    .seller-profile-contact .btn {
        flex: 1;
        min-width: 0;
        padding-inline: .75rem;
    }

    .seller-profile-stats {
        grid-template-columns: minmax(0, 1fr);
        gap: .5rem;
    }

    .seller-profile-stats > div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: .75rem;
        text-align: left;
    }

    .seller-profile-stats dd {
        font-size: 1.25rem;
    }

    .seller-profile-listings {
        margin-top: 2rem;
    }

    .seller-post-type-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .seller-post-type-tabs .publication-tab {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        column-gap: .25rem;
        row-gap: .125rem;
        justify-items: center;
        padding: .5rem .25rem;
        text-align: center;
        font-size: .875rem;
    }

    .seller-post-type-tabs .publication-tab i {
        font-size: 1rem;
    }

    .seller-post-type-count {
        grid-column: 1 / -1;
        font-size: .75rem;
        line-height: 1.25;
        text-align: center;
    }
}
