@extends('layouts.app') @php // Breadcrumbs shared 1:1 by the visible nav and the BreadcrumbList JSON-LD. $sellerCrumbs = [ ['name' => 'Главная', 'url' => route('home')], ['name' => $seller->public_name, 'url' => route('seller.card', $seller)], ]; if ($currentCategory) { $sellerCrumbs[] = ['name' => $currentCategory->name, 'url' => route('seller.card.category', [$seller, $currentCategory->slug])]; } // Non-empty, unique description reused across meta, OG and JSON-LD. $sellerSeoDescription = $seller->seoDescription($products->total()); @endphp @section('title', ($currentCategory ? $currentCategory->name.' — ' : '').$seller->public_name.' — teeu') @section('meta_description', $sellerSeoDescription) @section('seo') @include('partials.seo.meta', [ 'canonical' => $currentCategory ? route('seller.card.category', [$seller, $currentCategory->slug]) : route('seller.card', $seller), 'ogType' => 'profile', 'ogTitle' => ($currentCategory ? $currentCategory->name.' — ' : '').$seller->public_name, 'ogDescription' => $sellerSeoDescription, 'ogImage' => \App\Support\OgImage::from($seller->logoUrl()), ]) @include('partials.seo.json-ld', ['data' => \App\Support\Seo::storeJsonLd($seller, $products->total())]) @include('partials.seo.json-ld', ['data' => \App\Support\Seo::breadcrumbJsonLd($sellerCrumbs)]) @endsection @section('content') {{-- Витрина продавца по макету редизайна («Страница продавца»): шапка-панель с контактами пилюлями и «Написать продавцу» справа, «О продавце», товары с колонкой категорий магазина слева, отзывы. --}}
{{-- Breadcrumbs (ТЗ §19.1) — mirror of the BreadcrumbList JSON-LD above. --}} {{-- Шапка магазина. На телефоне логотип и название стоят в ряд, контакты и «Написать продавцу» уходят строками ниже; на широком экране кнопка чата — справа. --}} @php($hasContacts = $seller->website || $seller->vk || $seller->telegram || $seller->contact_public_phone)
@if ($seller->logoUrl()) {{-- object-contain + поля: логотипы у продавцов разной формы (квадрат, широкий прямоугольник) — object-cover обрезал бы их, поэтому вписываем целиком на белую подложку. --}} {{ $seller->public_name }} @else
{{ mb_strtoupper(mb_substr($seller->public_name, 0, 1)) }}
@endif

{{ $seller->public_name }}

@if ($seller->reviews_count > 0) ★ {{ number_format($seller->rating_avg, 1) }} · {{ $seller->reviews_count }} {{ \App\Support\Ru::plural($seller->reviews_count, ['отзыв', 'отзыва', 'отзывов']) }} @else Отзывов пока нет @endif @if ($seller->created_at) · на teeu с {{ $seller->created_at->year }} @endif @if ($minimumOrder = $seller->minimumOrderAmount()) · Заказ от {{ \App\Services\Commerce\MinimumOrderService::money($minimumOrder) }} ₽ @endif
@if ($hasContacts) {{-- Structured contacts as pill links (ТЗ §7.2) --}} @php($cbtn = 'inline-flex items-center gap-1.5 rounded-[20px] border border-[var(--color-line)] bg-white px-[13px] py-1.5 text-[12.5px] font-semibold text-[var(--color-slate)] transition hover:border-[var(--color-primary)] hover:text-[var(--color-primary)]') {{-- track(type) fires a fire-and-forget beacon for lead stats; the link still opens. --}}
@if ($seller->website) Сайт @endif @if ($seller->vk) ВКонтакте @endif @if ($seller->telegram) Telegram @endif @if ($seller->contact_public_phone) {{-- Reveal-on-click: shows the number and records the click for lead stats. --}}
@endif
@endif
{{-- Approved description (ТЗ §7.1). Shown only on the main storefront page — not on category subsections or paginated pages. Collapsed to ~a paragraph with a toggle. --}} @if ($seller->description && ! $currentCategory && $products->onFirstPage())

О продавце

{!! nl2br(e($seller->description)) !!}

@endif {{-- Storefront (#13): products + browse by the seller's categories. Категории — в левой колонке, как в каталоге площадки; товары справа. --}} @php($hasCatNav = $categories->isNotEmpty())

{{ $currentCategory ? $currentCategory->name : 'Товары магазина' }} {{ number_format($products->total(), 0, '.', ' ') }}

@if ($hasCatNav) @endif
@if ($products->isEmpty())
В этом разделе пока нет товаров.
@else
@foreach ($products as $product) @endforeach
{{ $products->links() }}
@endif
{{-- Reviews — only approved ones are shown (ТЗ §40.3) --}}

Отзывы @if ($seller->reviews_count){{ $seller->reviews_count }}@endif

@forelse ($reviews as $review)
{{ $review->user?->displayName() ?? 'Покупатель' }} {{ str_repeat('★', $review->rating) }}{{ str_repeat('★', 5 - $review->rating) }}
{{ $review->published_at?->format('d.m.Y') }}
@if ($review->text)

{{ $review->text }}

@endif @if ($review->seller_reply)
Ответ магазина

{{ $review->seller_reply }}

@endif
@empty
У продавца пока нет отзывов
@endforelse
@endsection