@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 обрезал бы их, поэтому вписываем
целиком на белую подложку. --}}
@else
@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())