/* Profile overview only. Existing activity tabs retain their layout. */
.fp-profile {
    --fp-accent: #b71f32;
    --fp-ink: #233142;
    --fp-muted: #697585;
    --fp-border: #e6eaee;
    padding-bottom: 48px;
    line-height: 1.9
}

.fp-profile * {
    box-sizing: border-box
}

.fp-profile a {
    color: inherit;
    text-decoration: none
}

.fp-profile a:hover {
    color: var(--fp-accent)
}

.fp-profile a:focus-visible, .fp-profile summary:focus-visible, .fp-profile button:focus-visible {
    outline: 3px solid #bb334c;
    outline-offset: 4px
}

.fp-profile h1, .fp-profile h2, .fp-profile h3, .fp-profile p {
    margin-top: 0
}

.fp-profile h1 {
    font-size: 29px;
    font-weight: 800;
    line-height: 1.65;
    margin-bottom: 6px
}

.fp-profile h2 {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.7;
    margin-bottom: 14px
}

.fp-profile h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 10px
}

.fp-profile p {
    font-size: 14px
}

.fp-hero {
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--fp-border);
    overflow: hidden;
    margin-bottom: 28px
}

.fp-cover {
    height: 210px;
    background: linear-gradient(110deg, #122b37, #344e58);
    position: relative;
    overflow: hidden
}

.fp-cover > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 48%
}

.fp-cover:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(12, 26, 36, .55), transparent 75%);
    pointer-events: none
}

.fp-cover-label {
    position: absolute;
    bottom: 20px;
    left: 26px;
    z-index: 1;
    color: #fff;
    font-size: 12px;
    letter-spacing: .1px
}

.fp-cover-label span {
    padding: 0 10px;
    opacity: .6
}

.fp-identity {
    padding: 26px 32px 24px;
    display: flex;
    align-items: center;
    gap: 24px
}

.fp-logo {
    background: #fff;
    object-fit: contain;
    padding: 9px;
    border-radius: 16px;
    border: 1px solid var(--fp-border);
    flex-shrink: 0;
    box-shadow: 0 4px 20px #24354809
}

.fp-identity-text {
    flex: 1;
    min-width: 0
}

.fp-eyebrow {
    font-size: 11px !important;
    font-weight: 600;
    color: var(--fp-muted);
    margin-bottom: 3px !important
}

.fp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    color: var(--fp-muted);
    font-size: 12px
}

.fp-meta i {
    margin-left: 5px
}

.fp-member-code {
    font-size: 11px
}

.fp-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--fp-accent);
    color: #fff !important;
    padding: 12px 19px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    min-height: 46px
}

.fp-primary-link:hover {
    background: #961a2a
}

.fp-tabs {
    display: flex;
    border-top: 1px solid var(--fp-border);
    padding: 0 28px;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: thin
}

.fp-tabs a {
    padding: 17px 5px 14px;
    white-space: nowrap;
    font-size: 13px;
    border-bottom: 3px solid transparent;
    color: #66717e
}

.fp-tabs a[aria-current] {
    border-color: var(--fp-accent);
    color: var(--fp-accent);
    font-weight: 700
}

.fp-layout {
    display: grid;
    grid-template-columns:minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start
}

.fp-main, .fp-sidebar {
    min-width: 0
}

.fp-sidebar-inner {
    position: sticky;
    top: 24px
}

.fp-sidebar {
    align-self: stretch
}

.fp-card {
    background: #fff;
    border: 1px solid var(--fp-border);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 24px;
    scroll-margin-top: 24px
}

.fp-section-heading {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 20px
}

.fp-section-heading h2 {
    margin: 0
}

.fp-section-icon {
    width: 43px;
    height: 43px;
    background: #f9eff0;
    color: var(--fp-accent);
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0
}

.fp-biography {
    white-space: pre-line;
    font-size: 14px;
    line-height: 2.2;
    color: #46525f;
    overflow-wrap: anywhere
}

.fp-facts {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 0 24px;
    margin: 24px 0 0;
    border-top: 1px solid var(--fp-border)
}

.fp-facts > div {
    padding: 15px 0;
    border-bottom: 1px solid #edf0f3;
    min-width: 0
}

.fp-facts dt {
    font-size: 11px;
    font-weight: 400;
    color: var(--fp-muted);
    margin-bottom: 4px
}

.fp-facts dd {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    overflow-wrap: anywhere
}

.fp-service + .fp-service {
    border-top: 1px solid var(--fp-border);
    padding-top: 22px;
    margin-top: 22px
}

.fp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0;
    list-style: none;
    margin: 10px 0 16px
}

.fp-tags li {
    font-size: 11px;
    line-height: 1.8;
    padding: 5px 10px;
    border-radius: 6px;
    background: #f1f4f7;
    color: #475667
}

.fp-service-description {
    white-space: pre-line;
    line-height: 2.1;
    color: #576473;
    overflow-wrap: anywhere
}

.fp-details {
    border-top: 1px dashed var(--fp-border);
    padding-top: 12px
}

.fp-details summary {
    font-size: 12px;
    cursor: pointer;
    color: #6a4350;
    padding: 5px 0
}

.fp-details summary span {
    color: var(--fp-muted);
    font-size: 11px
}

.fp-attachments {
    padding-top: 15px
}

.fp-attachments img {
    max-width: 100%
}

.fp-gallery {
    display: grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap: 12px
}

.fp-gallery a {
    overflow: hidden;
    border-radius: 10px;
    background: #f2f4f6
}

.fp-gallery img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform .2s
}

.fp-gallery a:hover img {
    transform: scale(1.035)
}

.fp-contact {
    border-top: 3px solid var(--fp-accent)
}

.fp-contact h2 {
    margin-top: 5px;
    margin-bottom: 10px
}

.fp-muted {
    color: var(--fp-muted);
    font-size: 12px !important;
    line-height: 2
}

.fp-contact-actions {
    padding: 4px 0 18px
}

.fp-contact-actions > div {
    width: 100%;
    gap: 10px
}

.fp-contact-actions button {
    flex: 1;
    min-height: 43px;
    border-radius: 8px !important;
    font-size: 13px !important
}

.fp-contact-row {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 15px 0;
    border-top: 1px solid var(--fp-border);
    font-size: 12px;
    min-width: 0
}

.fp-contact-row > i {
    color: #7d8994
}

.fp-contact-row > span:nth-child(2) {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere
}

.fp-contact-row small {
    display: block;
    color: var(--fp-muted);
    font-size: 10px
}

.fp-contact-row bdi {
    font-size: 12px
}

.fp-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    border-top: 1px solid var(--fp-border);
    padding-top: 17px
}

.fp-socials a {
    font-size: 11px;
    padding: 5px 10px;
    border: 1px solid #e5e9ee;
    border-radius: 6px;
    min-height: 34px
}

.fp-socials a:hover {
    background: #faf0f2;
    border-color: #e5c7cb
}

.fp-sidebar .fp-card {
    padding: 24px;
    width: 100%;
}

.fp-address {
    font-style: normal;
    margin: 0
}

.fp-address + .fp-address {
    border-top: 1px solid var(--fp-border);
    margin-top: 18px;
    padding-top: 18px
}

.fp-address h3 {
    font-size: 13px;
    margin-bottom: 8px;
    color: #485566
}

.fp-address h3 i {
    color: var(--fp-accent);
    margin-left: 6px
}

.fp-address p {
    font-size: 12px;
    margin-bottom: 6px;
    line-height: 2
}

.fp-quicklinks {
    padding: 0 18px 20px
}

.fp-quicklinks > p {
    font-size: 11px;
    color: #7a8590
}

.fp-quicklinks a {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 8px 0
}

.fp-quicklinks a span {
    color: #abb2b9
}

.fp-list-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 4px
}

.fp-list-heading h2 {
    margin: 0
}

.fp-list-heading > a {
    color: var(--fp-accent);
    font-size: 11px;
    white-space: nowrap
}

.fp-list-item {
    padding: 18px 0;
    border-bottom: 1px solid var(--fp-border)
}

.fp-list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0
}

.fp-list-item h3 {
    font-size: 14px;
    margin-bottom: 6px
}

.fp-list-item p {
    font-size: 12px;
    color: var(--fp-muted);
    margin-bottom: 0
}

.fp-list-item-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px
}

.fp-list-item time {
    font-size: 10px;
    color: #7c8792;
    white-space: nowrap
}

@media (min-width: 1450px) {
    .fp-cover {
        height: 240px
    }
}

@media (max-width: 991px) {
    .fp-layout {
        grid-template-columns:minmax(0, 1fr) 280px;
        gap: 18px
    }

    .fp-card {
        padding: 22px
    }

    .fp-identity {
        padding: 22px;
        gap: 17px
    }

    .fp-profile h1 {
        font-size: 24px
    }

    .fp-primary-link {
        font-size: 12px;
        padding: 11px
    }

    .fp-logo {
        width: 90px;
        height: 90px
    }

    .fp-sidebar .fp-card {
        padding: 19px
    }
}

@media (max-width: 767px) {
    body[id="profile.show-page"] #main-content > .container-fluid, body[id="profile.show-page"] nav[aria-label="مسیر صفحه"] {
        padding: 0 14px
    }

    .fp-layout {
        display: flex;
        flex-direction: column;
        gap: 0
    }

    .fp-main, .fp-sidebar {
        width: 100%
    }

    .fp-sidebar {
        order: -1
    }

    .fp-sidebar-inner {
        position: static;
        display: contents
    }

    .fp-quicklinks {
        display: none
    }

    .fp-cover {
        height: 145px
    }

    .fp-cover-label {
        font-size: 10px;
        bottom: 14px;
        left: 16px
    }

    .fp-identity {
        flex-wrap: wrap;
        padding: 20px 18px;
        gap: 14px
    }

    .fp-logo {
        width: 76px;
        height: 76px;
        padding: 5px
    }

    .fp-identity-text {
        flex-basis: calc(100% - 95px)
    }

    .fp-profile h1 {
        font-size: 21px
    }

    .fp-meta {
        font-size: 10px;
        gap: 4px 10px
    }

    .fp-primary-link {
        width: 100%;
        font-size: 13px
    }

    .fp-tabs {
        gap: 20px;
        padding: 0 18px
    }

    .fp-tabs a {
        font-size: 11px;
        padding: 14px 0 12px
    }

    .fp-hero {
        margin-bottom: 18px;
        border-radius: 12px
    }

    .fp-card {
        padding: 21px 18px;
        margin-bottom: 18px;
        border-radius: 12px
    }

    .fp-profile h2 {
        font-size: 17px
    }

    .fp-biography {
        font-size: 13px
    }

    .fp-facts {
        gap: 0 14px
    }

    .fp-facts dd {
        font-size: 12px
    }

    .fp-gallery {
        grid-template-columns:repeat(2, minmax(0, 1fr))
    }

    .fp-gallery img {
        height: 130px
    }

    .fp-list-item-top {
        display: block
    }

    .fp-socials a {
        min-height: 40px;
        display: flex;
        align-items: center
    }

    .fp-address {
        font-size: 12px
    }

    .fp-contact-row {
        min-height: 56px
    }

    .fp-profile {
        padding-bottom: 65px
    }
}

@media (prefers-reduced-motion: reduce) {
    .fp-profile * {
        transition: none !important;
        scroll-behavior: auto !important
    }
}

@media (max-width: 767px) {
    .fp-main, .fp-sidebar, .fp-sidebar-inner {
        display: contents
    }

    .fp-layout > .fp-main > .fp-card {
        order: 3;
        width: 100%
    }

    .fp-layout > .fp-main > #profile-about {
        order: 0
    }

    .fp-sidebar .fp-contact {
        order: 1;
        width: 100%
    }

    .fp-sidebar #profile-addresses {
        order: 4;
        width: 100%
    }

    .fp-details summary {
        min-height: 44px;
        display: list-item;
        padding: 9px 0
    }
}

/* --- additions for profile.product / profile.inventory / profile.rfq pages --- */
.fp-page-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0 0 20px
}

.fp-empty {
    text-align: center;
    padding: 60px 20px
}

.fp-empty h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--fp-ink);
    margin-bottom: 10px
}

.fp-empty p {
    font-size: 13px;
    line-height: 2;
    color: var(--fp-muted);
    max-width: 480px;
    margin: 0 auto 22px
}

.fp-empty .fp-primary-link {
    display: inline-flex
}

.fp-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center
}

.fp-pagination nav > * {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0
}

.fp-pagination .page-link {
    border-radius: 8px !important;
    border: 1px solid var(--fp-border) !important;
    color: var(--fp-ink) !important;
    font-size: 12px
}

.fp-pagination .page-item.active .page-link {
    background: var(--fp-accent) !important;
    border-color: var(--fp-accent) !important;
    color: #fff !important
}

@media (max-width: 767px) {
    .fp-page-title {
        font-size: 17px
    }
}

/* --- page-chrome scoping: driven by presence of .fp-profile, not by a body id
   (the body id attribute is not guaranteed to be set/consistent across
   profile.show / profile.product / profile.inventory / profile.rfq) --- */
body:has(.fp-profile) {
    background: #f4f6f8;
    color: #202d3b
}

body:has(.fp-profile) #main-content > .container-fluid {
    max-width: 1220px;
    padding: 0 24px
}

body:has(.fp-profile) nav[aria-label="مسیر صفحه"] {
    max-width: 1220px;
    margin: auto;
    padding: 0 24px
}

body:has(.fp-profile) .breadcrumb {
    background: transparent;
    padding: 20px 0;
    font-size: 12px;
    margin: 0;
    color: #697684
}

@media (max-width: 767px) {
    body:has(.fp-profile) #main-content > .container-fluid, body:has(.fp-profile) nav[aria-label="مسیر صفحه"] {
        padding: 0 14px
    }
}

/* --- price.blade.php inside an fp-list-item --- */
.fp-list-item .purchase-info {
    font-size: 13px;
    color: #46525f
}

.fp-list-item .purchase-info strong {
    font-size: 16px;
    color: var(--fp-ink)
}

.fp-list-item .purchase-info small {
    color: var(--fp-muted);
    font-size: 11px
}

.fp-list-item .purchase-info time {
    color: #7c8792;
    font-size: 11px
}

/* --- rfq-card.blade.php restyled as fp-list-item --- */
.fp-rfq-item .fp-list-item-top time {
    white-space: nowrap
}

.fp-rfq-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--fp-border);
    flex-wrap: wrap
}

.fp-rfq-item-link {
    color: var(--fp-accent);
    font-size: 12px;
    font-weight: 700
}

.fp-rfq-item-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

/* --- fp-location: decorative "map" card in the sidebar (placeholder until real
   lat/lng-backed map is wired up) --- */
.fp-map {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin: 0;
    border: 1px solid var(--fp-border);
    background: #eef1f4
}

.fp-map-illustration {
    display: block;
    width: 100%;
    height: 150px
}

.fp-map-pulse {
    transform-origin: 160px 85px;
    animation: fp-map-pulse 2.4s ease-out infinite
}

.fp-map-pulse--delay {
    animation-delay: .9s
}

@keyframes fp-map-pulse {
    0% {
        transform: scale(.6);
        opacity: .55
    }
    100% {
        transform: scale(1.7);
        opacity: 0
    }
}

.fp-map-open {
    position: absolute;
    bottom: 10px;
    inset-inline-start: 10px;
    background: #fff;
    color: var(--fp-ink) !important;
    font-size: 11px;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(24, 35, 50, .15);
    display: inline-flex;
    align-items: center;
    gap: 6px
}

.fp-map-open:hover {
    color: var(--fp-accent) !important
}

.fp-map-address {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--fp-ink);
    margin: 0
}

.fp-map-address i {
    color: var(--fp-accent)
}

@media (prefers-reduced-motion: reduce) {
    .fp-map-pulse, .fp-map-pulse--delay {
        animation: none !important
    }
}