.merchant-profile-modern {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 1rem;
}
.merchant-profile-modern.has-store-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.92);
    border-radius: 16px;
    z-index: 0;
}
.merchant-profile-modern > * { position: relative; z-index: 1; }
.sf-seller-bg {
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background-size: cover;
    background-position: center;
    filter: blur(0.5px);
    z-index: 0;
}
.sf-seller-banner img {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.store-identity-modern {
    margin-top: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid #e2e8f0;
}
.identity-header { display: flex; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.identity-avatar-container {
    width: 120px; height: 120px; border-radius: 12px; overflow: hidden;
    border: 3px solid #fff; box-shadow: 0 10px 20px rgba(0,0,0,.1); position: relative;
}
.identity-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.sf-seller-avatar-fallback {
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700; background: #e2e8f0; color: #334155;
}
.avatar-badge {
    position: absolute; bottom: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
    background: #22c55e; color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: .75rem; border: 2px solid #fff;
}
.identity-content { flex: 1; min-width: 260px; }
.identity-store-name { margin: 0 0 .45rem; font-size: 1.6rem; font-weight: 800; }
.identity-tagline {
    margin: 0; display: inline-block; background: #eff6ff; border: 1px solid #dbeafe;
    border-radius: 999px; padding: .35rem .8rem; font-size: .9rem; color: #334155;
}
.identity-meta-grid {
    margin-top: .8rem; display: grid; gap: .6rem;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.identity-meta-item {
    display: flex; gap: .55rem; align-items: center; background: #fff; border: 1px solid #e2e8f0;
    border-radius: 12px; padding: .7rem .8rem;
}
.meta-label { font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .45px; }
.meta-value { font-size: 1rem; font-weight: 700; color: #0f172a; }
.identity-level-badge {
    margin-top: .8rem; display: inline-flex; align-items: center; gap: .45rem;
    border-radius: 999px; padding: .45rem .95rem; color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.identity-fx-level-badge {
    max-width: 100%;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.28);
}
.identity-fx-level-badge .level-text {
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.25;
    white-space: nowrap;
}
.store-page-tabs {
    border-bottom: 1px solid #e2e8f0;
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    padding: 0;
}
.store-page-tabs .nav-item {
    list-style: none;
    margin: 0;
}
.store-page-tabs .nav-link {
    cursor: pointer;
    border: 1px solid #dbe3ef;
    color: #334155;
    border-radius: 10px;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .8rem;
    text-decoration: none;
}
.store-page-tabs .nav-link.active {
    color: #1d4ed8;
    font-weight: 700;
    border-color: #bfdbfe;
    background: #eff6ff;
}
.store-tab-pane { display: none; margin-top: 1rem; }
.store-tab-pane.active { display: block; }
.store-tab-pane-info {
    display: grid;
    gap: .95rem;
}
.store-contact-modern,
.store-social-modern,
.store-policies-modern {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: .85rem;
}
.section-header { display: flex; gap: .5rem; align-items: center; margin-bottom: .85rem; }
.section-title { margin: 0; font-size: 1rem; font-weight: 700; color: #334155; }
.section-line { flex: 1; height: 1px; background: linear-gradient(90deg, #cbd5e1, transparent); }
.contact-grid { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.contact-card { display: flex; gap: .65rem; align-items: center; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .75rem .85rem; }
.contact-details {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    min-width: 0;
}
.contact-label { font-size: .7rem; text-transform: uppercase; color: #64748b; }
.contact-value { font-size: .9rem; color: #0f172a; text-decoration: none; }
.social-grid { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .65rem .8rem; text-decoration: none; color: inherit; display: inline-flex; flex-direction: column; }
.social-card--static { cursor: default; }
.social-value { font-size: .78rem; color: #475569; word-break: break-word; }
.social-follow { font-size: .72rem; color: #64748b; }
.store-policies-content { display: grid; gap: .6rem; }
.policy-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: .7rem .85rem; }
.policy-heading { margin: 0 0 .35rem; font-size: .85rem; font-weight: 700; color: #334155; }
.policy-text { font-size: .9rem; color: #334155; line-height: 1.5; }
.quick-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .65rem; margin-bottom: .9rem; }
.stat-item { border: 1px solid #e2e8f0; border-radius: 12px; padding: .65rem .75rem; background: #fff; }
.stat-item.highlight { background: #eff6ff; border-color: #bfdbfe; }
.stat-value { font-size: 1.2rem; font-weight: 800; color: #0f172a; line-height: 1.1; }
.stat-label { font-size: .75rem; color: #64748b; text-transform: uppercase; letter-spacing: .4px; margin-top: .15rem; }
.stats-grid-modern { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat-card { border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; padding: .75rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.card-title { margin: 0; font-size: .95rem; font-weight: 700; color: #334155; }
.main-stat .stat-number { font-size: 1.7rem; font-weight: 800; color: #0f172a; }
.main-stat .stat-description { font-size: .8rem; color: #64748b; }
.secondary-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; margin-top: .6rem; }
.secondary-stat { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: .45rem .5rem; }
.secondary-stat .value { font-weight: 700; color: #0f172a; }
.secondary-stat .label { font-size: .72rem; color: #64748b; }
.performance-metrics { display: grid; gap: .55rem; }
.metric-value { font-size: 1.05rem; font-weight: 700; color: #0f172a; }
.metric-label { font-size: .75rem; color: #64748b; }
.metric-progress { height: 7px; background: #e2e8f0; border-radius: 999px; margin-top: .25rem; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg,#3b82f6,#10b981); border-radius: 999px; }
.rating-overview { display: flex; align-items: baseline; gap: .45rem; }
.score { font-size: 1.45rem; font-weight: 800; color: #0f172a; }
.out-of { font-size: .85rem; color: #64748b; }
.rating-breakdown { display: grid; gap: .45rem; margin-top: .6rem; }
.breakdown-item { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: .4rem; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: .35rem .5rem; }
.breakdown-item .percentage { font-weight: 700; color: #0f172a; }
.breakdown-item .label, .breakdown-item .count { font-size: .75rem; color: #64748b; }
.products-filters-bar { border: 1px solid #e2e8f0; border-radius: 14px; padding: .75rem; background: #fff; margin-bottom: .9rem; }
.filter-toggle-button {
    border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 8px; padding: .4rem .7rem; display: inline-flex; gap: .45rem; align-items: center; cursor: pointer;
}
.seller-filters-grid { margin-top: .8rem; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.filter-group .filter-label { font-size: .75rem; color: #64748b; margin-bottom: .2rem; text-transform: none; }
.filter-search-input, .price-input, .sort-select {
    width: 100%; border: 1px solid #d4d4d8; border-radius: 8px; padding: .45rem .6rem; background: #fff;
}
.filter-input-wrapper { display: flex; align-items: center; gap: .4rem; }
.filter-input-wrapper .filter-search-input { flex: 1; }
.clear-search-btn { border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; padding: .35rem .45rem; cursor: pointer; }
.filter-actions-row { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; }

.merchant-profile-modern.sf-seller-shell {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 700px) {
    .store-page-tabs .nav-link {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 992px) {
    .identity-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .identity-content {
        width: 100%;
        min-width: 0;
    }
    .identity-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .seller-filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .stats-grid-modern {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .merchant-profile-modern {
        padding: .7rem;
        border-radius: 12px;
    }
    .store-identity-modern {
        padding: .8rem;
        border-radius: 14px;
    }
    .identity-avatar-container {
        width: 92px;
        height: 92px;
    }
    .identity-store-name {
        font-size: 1.25rem;
        line-height: 1.25;
    }
    .identity-tagline {
        font-size: .82rem;
        padding: .28rem .65rem;
    }
    .identity-meta-grid {
        grid-template-columns: 1fr;
        gap: .5rem;
    }
    .identity-meta-item {
        padding: .6rem .7rem;
    }
    .store-page-tabs {
        gap: .4rem;
    }
    .store-page-tabs .nav-link {
        font-size: .9rem;
        padding: .42rem .65rem;
        border-radius: 9px;
    }
    .store-tab-icon {
        font-size: .95rem;
    }
    .store-contact-modern,
    .store-social-modern,
    .store-policies-modern {
        padding: .7rem;
        border-radius: 12px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .contact-card {
        align-items: flex-start;
    }
    .contact-label {
        display: block;
        line-height: 1.2;
        letter-spacing: .3px;
    }
    .contact-value {
        display: block;
        line-height: 1.25;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .social-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .social-card {
        width: 100%;
        min-height: 62px;
        justify-content: center;
        align-items: center;
        text-align: center;
    }
    .quick-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .products-filters-bar {
        padding: .6rem;
        border-radius: 12px;
    }
    .seller-filters-grid {
        grid-template-columns: 1fr;
        gap: .55rem;
    }
    .filter-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-actions-row .btn {
        width: 100%;
        text-align: center;
    }
    .store-policies-content,
    .policy-block {
        min-width: 0;
    }
    .policy-text {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

@media (max-width: 420px) {
    .merchant-profile-modern {
        padding: .55rem;
    }
    .store-tab-pane {
        margin-top: .7rem;
    }
    .social-grid {
        grid-template-columns: 1fr;
    }
    .quick-stats {
        grid-template-columns: 1fr;
    }
    .store-page-tabs .nav-link {
        font-size: .86rem;
        padding: .38rem .55rem;
    }
}

/* Seller products cards */
.sf-seller-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
    margin-top: 0.75rem;
}

.sf-seller-product-card {
    display: grid;
    gap: 0.42rem;
    align-content: start;
    background: #fff;
    border: none;
    border-radius: 10px;
    padding: 0.65rem;
    box-shadow: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sf-seller-product-card:hover {
    box-shadow: 0 30px 48px rgba(15, 23, 42, 0.26);
    transform: translateY(8px);
}

.sf-seller-product-card:focus-within {
    outline: 2px solid var(--accent, #0d6efd);
    outline-offset: 2px;
}

.sf-seller-product-card__img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 8px;
    background: #f1f5f9;
    display: block;
}

.sf-seller-product-card__title {
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.3;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.3em * 2);
    word-break: break-word;
}

.sf-seller-product-card__body {
    display: grid;
    gap: 0.2rem;
}

.sf-seller-product-card__meta {
    display: inline-flex;
    align-items: baseline;
    gap: 0.28rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.74rem;
    margin-top: 0;
}

.sf-seller-product-card__price-row {
    display: inline-flex;
    align-items: baseline;
    gap: 0.22rem;
    flex-wrap: nowrap;
}

.sf-seller-product-card__price-value {
    font-weight: 600;
    color: inherit;
}

.sf-seller-product-card__price-code {
    opacity: 0.75;
    font-size: 0.7rem;
}

.sf-seller-product-card__type {
    text-transform: capitalize;
}

.sf-seller-product-card__actions {
    margin-top: 0.4rem;
    line-height: 1;
}

.sf-seller-product-card__view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 32px;
    padding: 0.34rem 0.58rem;
    font-size: 0.72rem;
    line-height: 1;
}

@media (max-width: 359px) {
    .sf-seller-products-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .sf-seller-product-card {
        padding: 0.58rem;
    }

    .sf-seller-product-card__title {
        font-size: 0.84rem;
        line-height: 1.28;
    }

    .sf-seller-product-card__meta {
        font-size: 0.72rem;
    }

    .sf-seller-product-card__view-btn {
        min-height: 31px;
        font-size: 0.7rem;
        padding: 0.32rem 0.54rem;
    }
}

@media (min-width: 360px) and (max-width: 639px) {
    .sf-seller-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .sf-seller-product-card {
        padding: 0.6rem;
    }

    .sf-seller-product-card__title {
        font-size: 0.8rem;
        line-height: 1.26;
    }

    .sf-seller-product-card__meta {
        font-size: 0.7rem;
    }

    .sf-seller-product-card__view-btn {
        min-height: 32px;
        font-size: 0.68rem;
        padding: 0.34rem 0.5rem;
    }
}
