feat(cms): implement complete SysSiteCMS content management system

Initial implementation of the HomeSysPanel CMS built with Laravel 13.0.
Includes complete admin panel, content management, user authentication,
modular architecture for products/services/chatbot, and marketing tools.

Key features:
- User authentication with email verification and password reset
- Role-based access control (Admin/User with granular permissions)
- Content management (pages, news, FAQ, downloads, galleries, banners)
- Contact management system with subjects and responses
- Marketing tools (email campaigns, visitor analytics, social sharing)
- Modular architecture (Products, Services, Chatbot modules)
- AI Chatbot integration with OpenRouter.ai and LlamaCpp support
- Visitor tracking with geolocation
- SEO optimization with meta tags and Open Graph
- Responsive design with Bootstrap 5
- Dark mode support
- Maintenance mode
- Feature request system
This commit is contained in:
marco
2026-09-07 19:06:53 -03:00
commit 38295e7e88
279 changed files with 33691 additions and 0 deletions
@@ -0,0 +1,102 @@
@extends('layouts.admin')
@section('title', 'Nova Categoria')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Nova Categoria</h1>
<a href="{{ route('admin.categories.index') }}" class="btn btn-sm btn-secondary shadow-sm">
<i class="bi bi-arrow-left text-white-50"></i> Voltar
</a>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Informações da Categoria</h6>
</div>
<div class="card-body">
<form action="{{ route('admin.categories.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-md-8">
<div class="form-group mb-3">
<label class="font-weight-bold">Nome da Categoria</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror" value="{{ old('name') }}" required>
@error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Slug (URL)</label>
<input type="text" name="slug" id="slug" class="form-control @error('slug') is-invalid @enderror" value="{{ old('slug') }}" required>
@error('slug') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Descrição</label>
<textarea name="description" id="editor" class="form-control @error('description') is-invalid @enderror" rows="5">{{ old('description') }}</textarea>
@error('description') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-3">
<label class="font-weight-bold">Imagem da Categoria</label>
<input type="file" name="image" class="form-control-file @error('image') is-invalid @enderror">
@error('image') <div class="invalid-feedback d-block">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Ordem</label>
<input type="number" name="order" class="form-control @error('order') is-invalid @enderror" value="{{ old('order', 0) }}" required>
@error('order') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Status</label>
<select name="active" class="form-control">
<option value="1" {{ old('active', '1') == '1' ? 'selected' : '' }}>Ativa</option>
<option value="0" {{ old('active') == '0' ? 'selected' : '' }}>Inativa</option>
</select>
</div>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-block py-3 fw-bold shadow-sm">
<i class="bi bi-floppy me-1"></i> Salvar Categoria
</button>
</form>
</div>
</div>
@endsection
@push('css')
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
@endpush
@push('js')
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
<script>
$(document).ready(function() {
$('#editor').summernote({
height: 200,
tabsize: 2,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['view', ['fullscreen', 'codeview']]
]
});
document.getElementById('name').addEventListener('keyup', function() {
let text = this.value.toLowerCase()
.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
document.getElementById('slug').value = text;
});
});
</script>
@endpush
@@ -0,0 +1,109 @@
@extends('layouts.admin')
@section('title', 'Editar Categoria')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Editar Categoria: {{ $category->name }}</h1>
<a href="{{ route('admin.categories.index') }}" class="btn btn-sm btn-secondary shadow-sm">
<i class="bi bi-arrow-left text-white-50"></i> Voltar
</a>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Informações da Categoria</h6>
</div>
<div class="card-body">
<form action="{{ route('admin.categories.update', $category) }}" method="POST" enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="row">
<div class="col-md-8">
<div class="form-group mb-3">
<label class="font-weight-bold">Nome da Categoria</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror" value="{{ old('name', $category->name) }}" required>
@error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Slug (URL)</label>
<input type="text" name="slug" id="slug" class="form-control @error('slug') is-invalid @enderror" value="{{ old('slug', $category->slug) }}" required>
@error('slug') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Descrição</label>
<textarea name="description" id="editor" class="form-control @error('description') is-invalid @enderror" rows="5">{{ old('description', $category->description) }}</textarea>
@error('description') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-3">
<label class="font-weight-bold">Imagem da Categoria</label>
@if($category->image)
<div class="mb-2">
<img src="{{ asset('storage/' . $category->image) }}" class="img-thumbnail" style="height: 100px;">
</div>
@endif
<input type="file" name="image" class="form-control-file @error('image') is-invalid @enderror">
<small class="text-muted">Deixe em branco para manter a imagem atual.</small>
@error('image') <div class="invalid-feedback d-block">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Ordem</label>
<input type="number" name="order" class="form-control @error('order') is-invalid @enderror" value="{{ old('order', $category->order) }}" required>
@error('order') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Status</label>
<select name="active" class="form-control">
<option value="1" {{ old('active', $category->active) == '1' ? 'selected' : '' }}>Ativa</option>
<option value="0" {{ old('active', $category->active) == '0' ? 'selected' : '' }}>Inativa</option>
</select>
</div>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-block py-3 fw-bold shadow-sm">
<i class="bi bi-floppy me-1"></i> Salvar Alterações
</button>
</form>
</div>
</div>
@endsection
@push('css')
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
@endpush
@push('js')
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
<script>
$(document).ready(function() {
$('#editor').summernote({
height: 200,
tabsize: 2,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['view', ['fullscreen', 'codeview']]
]
});
document.getElementById('name').addEventListener('keyup', function() {
let text = this.value.toLowerCase()
.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
document.getElementById('slug').value = text;
});
});
</script>
@endpush
@@ -0,0 +1,78 @@
@extends('layouts.admin')
@section('title', 'Categorias de Produtos')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Categorias de Produtos</h1>
<a href="{{ route('admin.categories.create') }}" class="btn btn-sm btn-primary shadow-sm">
<i class="bi bi-plus-lg text-white-50"></i> Nova Categoria
</a>
</div>
@if(session('success'))
<div class="alert alert-success border-0 shadow-sm mb-4">{{ session('success') }}</div>
@endif
@if(session('error'))
<div class="alert alert-danger border-0 shadow-sm mb-4">{{ session('error') }}</div>
@endif
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Lista de Categorias</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th width="50">Ordem</th>
<th width="100">Imagem</th>
<th>Nome</th>
<th>Slug</th>
<th>Status</th>
<th width="150">Ações</th>
</tr>
</thead>
<tbody>
@foreach($categories as $category)
<tr>
<td>{{ $category->order }}</td>
<td>
@if($category->image)
<img src="{{ asset('storage/' . $category->image) }}" class="img-thumbnail" style="height: 50px;">
@else
<span class="badge badge-light">Sem foto</span>
@endif
</td>
<td>{{ $category->name }}</td>
<td>{{ $category->slug }}</td>
<td>
<span class="badge badge-{{ $category->active ? 'success' : 'secondary' }}">
{{ $category->active ? 'Ativa' : 'Inativa' }}
</span>
</td>
<td>
<a href="{{ route('admin.categories.edit', $category) }}" class="btn btn-sm btn-primary">
<i class="bi bi-pencil"></i>
</a>
<form action="{{ route('admin.categories.destroy', $category) }}" method="POST" class="d-inline">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Excluir esta categoria? Certifique-se de que não há produtos vinculados.')">
<i class="bi bi-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-4">
{{ $categories->links() }}
</div>
</div>
</div>
@endsection
@@ -0,0 +1,116 @@
@extends('layouts.admin')
@section('title', 'Novo Produto')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Novo Produto</h1>
<a href="{{ route('admin.products.index') }}" class="btn btn-sm btn-secondary shadow-sm">
<i class="bi bi-arrow-left text-white-50"></i> Voltar
</a>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Informações do Produto</h6>
</div>
<div class="card-body">
<form action="{{ route('admin.products.store') }}" method="POST" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-md-8">
<div class="form-group mb-3">
<label class="font-weight-bold">Nome do Produto</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror" value="{{ old('name') }}" required>
@error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Slug (URL)</label>
<input type="text" name="slug" id="slug" class="form-control @error('slug') is-invalid @enderror" value="{{ old('slug') }}" required>
@error('slug') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Descrição</label>
<textarea name="description" id="editor" class="form-control @error('description') is-invalid @enderror" rows="10">{{ old('description') }}</textarea>
@error('description') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-3">
<label class="font-weight-bold">Categoria</label>
<select name="category_id" class="form-control @error('category_id') is-invalid @enderror">
<option value="">Sem Categoria</option>
@foreach($categories as $category)
<option value="{{ $category->id }}" {{ old('category_id') == $category->id ? 'selected' : '' }}>
{{ $category->name }}
</option>
@endforeach
</select>
@error('category_id') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Preço (R$)</label>
<input type="number" name="price" step="0.01" class="form-control @error('price') is-invalid @enderror" value="{{ old('price') }}">
@error('price') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Imagem do Produto</label>
<input type="file" name="image" class="form-control-file @error('image') is-invalid @enderror">
@error('image') <div class="invalid-feedback d-block">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Status</label>
<select name="active" class="form-control">
<option value="1" {{ old('active', '1') == '1' ? 'selected' : '' }}>Ativo</option>
<option value="0" {{ old('active') == '0' ? 'selected' : '' }}>Inativo</option>
</select>
</div>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-block py-3 fw-bold shadow-sm">
<i class="bi bi-floppy me-1"></i> Salvar Produto
</button>
</form>
</div>
</div>
@endsection
@push('css')
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
@endpush
@push('js')
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
<script>
$(document).ready(function() {
$('#editor').summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['view', ['fullscreen', 'codeview']]
]
});
document.getElementById('name').addEventListener('keyup', function() {
let text = this.value.toLowerCase()
.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
document.getElementById('slug').value = text;
});
});
</script>
@endpush
@@ -0,0 +1,123 @@
@extends('layouts.admin')
@section('title', 'Editar Produto')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Editar Produto: {{ $product->name }}</h1>
<a href="{{ route('admin.products.index') }}" class="btn btn-sm btn-secondary shadow-sm">
<i class="bi bi-arrow-left text-white-50"></i> Voltar
</a>
</div>
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Informações do Produto</h6>
</div>
<div class="card-body">
<form action="{{ route('admin.products.update', $product) }}" method="POST" enctype="multipart/form-data">
@csrf
@method('PUT')
<div class="row">
<div class="col-md-8">
<div class="form-group mb-3">
<label class="font-weight-bold">Nome do Produto</label>
<input type="text" name="name" id="name" class="form-control @error('name') is-invalid @enderror" value="{{ old('name', $product->name) }}" required>
@error('name') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Slug (URL)</label>
<input type="text" name="slug" id="slug" class="form-control @error('slug') is-invalid @enderror" value="{{ old('slug', $product->slug) }}" required>
@error('slug') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Descrição</label>
<textarea name="description" id="editor" class="form-control @error('description') is-invalid @enderror" rows="10">{{ old('description', $product->description) }}</textarea>
@error('description') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
</div>
<div class="col-md-4">
<div class="form-group mb-3">
<label class="font-weight-bold">Categoria</label>
<select name="category_id" class="form-control @error('category_id') is-invalid @enderror">
<option value="">Sem Categoria</option>
@foreach($categories as $category)
<option value="{{ $category->id }}" {{ old('category_id', $product->category_id) == $category->id ? 'selected' : '' }}>
{{ $category->name }}
</option>
@endforeach
</select>
@error('category_id') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Preço (R$)</label>
<input type="number" name="price" step="0.01" class="form-control @error('price') is-invalid @enderror" value="{{ old('price', $product->price) }}">
@error('price') <div class="invalid-feedback">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Imagem do Produto</label>
@if($product->image)
<div class="mb-2">
<img src="{{ asset('storage/' . $product->image) }}" class="img-thumbnail" style="height: 100px;">
</div>
@endif
<input type="file" name="image" class="form-control-file @error('image') is-invalid @enderror">
<small class="text-muted">Deixe em branco para manter a imagem atual.</small>
@error('image') <div class="invalid-feedback d-block">{{ $message }}</div> @enderror
</div>
<div class="form-group mb-3">
<label class="font-weight-bold">Status</label>
<select name="active" class="form-control">
<option value="1" {{ old('active', $product->active) == '1' ? 'selected' : '' }}>Ativo</option>
<option value="0" {{ old('active', $product->active) == '0' ? 'selected' : '' }}>Inativo</option>
</select>
</div>
</div>
</div>
<hr>
<button type="submit" class="btn btn-primary btn-block py-3 fw-bold shadow-sm">
<i class="bi bi-floppy me-1"></i> Salvar Alterações
</button>
</form>
</div>
</div>
@endsection
@push('css')
<link href="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.css" rel="stylesheet">
@endpush
@push('js')
<script src="https://cdn.jsdelivr.net/npm/summernote@0.8.18/dist/summernote-bs4.min.js"></script>
<script>
$(document).ready(function() {
$('#editor').summernote({
height: 300,
tabsize: 2,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['view', ['fullscreen', 'codeview']]
]
});
document.getElementById('name').addEventListener('keyup', function() {
let text = this.value.toLowerCase()
.normalize('NFD').replace(/[\u0300-\u036f]/g, "")
.replace(/[^\w ]+/g, '')
.replace(/ +/g, '-');
document.getElementById('slug').value = text;
});
});
</script>
@endpush
@@ -0,0 +1,80 @@
@extends('layouts.admin')
@section('title', 'Gerenciar Produtos')
@section('content')
<div class="d-sm-flex align-items-center justify-content-between mb-4">
<h1 class="h3 mb-0 text-gray-800">Gerenciamento de Produtos</h1>
<a href="{{ route('admin.products.create') }}" class="btn btn-sm btn-primary shadow-sm">
<i class="bi bi-plus-lg text-white-50"></i> Novo Produto
</a>
</div>
@if(session('success'))
<div class="alert alert-success border-0 shadow-sm mb-4">{{ session('success') }}</div>
@endif
<div class="card shadow mb-4">
<div class="card-header py-3">
<h6 class="m-0 font-weight-bold text-primary">Lista de Produtos</h6>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table table-bordered" width="100%" cellspacing="0">
<thead>
<tr>
<th width="100">Imagem</th>
<th>Nome</th>
<th>Categoria</th>
<th>Preço</th>
<th>Status</th>
<th>Ações</th>
</tr>
</thead>
<tbody>
@foreach($products as $product)
<tr>
<td>
@if($product->image)
<img src="{{ asset('storage/' . $product->image) }}" class="img-thumbnail" style="height: 50px;">
@else
<span class="badge badge-light">Sem foto</span>
@endif
</td>
<td>{{ $product->name }}</td>
<td>
@if($product->category)
<span class="badge badge-info">{{ $product->category->name }}</span>
@else
<span class="badge badge-light">Sem Categoria</span>
@endif
</td>
<td>R$ {{ number_format($product->price, 2, ',', '.') }}</td>
<td>
<span class="badge badge-{{ $product->active ? 'success' : 'secondary' }}">
{{ $product->active ? 'Ativo' : 'Inativo' }}
</span>
</td>
<td>
<a href="{{ route('admin.products.edit', $product) }}" class="btn btn-sm btn-primary">
<i class="bi bi-pencil"></i>
</a>
<form action="{{ route('admin.products.destroy', $product) }}" method="POST" class="d-inline">
@csrf
@method('DELETE')
<button type="submit" class="btn btn-sm btn-danger" onclick="return confirm('Excluir este produto?')">
<i class="bi bi-trash"></i>
</button>
</form>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-4">
{{ $products->links() }}
</div>
</div>
</div>
@endsection
+147
View File
@@ -0,0 +1,147 @@
@extends('layouts.app')
@section('title', $page->title)
@section('meta_description', $page->meta_description)
@section('meta_keywords', $page->meta_keywords)
@section('og_title', $page->og_title)
@section('og_description', $page->og_description)
@section('og_image', $page->og_image)
@section('canonical', $page->canonical_url)
@section('content')
<div class="container py-5">
<div class="text-center mb-5">
<h1 class="display-4 fw-bold text-primary">{{ $page->title }}</h1>
<div class="lead text-muted">{!! $page->content !!}</div>
</div>
<!-- Filtro de Categorias -->
@if($categories->count() > 0)
<div class="row mb-5">
<div class="col-12 text-center">
<div class="d-flex flex-wrap justify-content-center gap-2">
<a href="{{ route('produtos') }}" class="btn btn-{{ !request()->has('categoria') || request()->categoria == '' ? 'primary' : 'outline-primary' }} rounded-pill px-4">
Todos
</a>
@foreach($categories as $category)
<a href="{{ route('produtos', ['categoria' => $category->slug]) }}" class="btn btn-{{ request()->categoria == $category->slug ? 'primary' : 'outline-primary' }} rounded-pill px-4">
{{ $category->name }}
</a>
@endforeach
</div>
</div>
</div>
@endif
<!-- Detalhes da Categoria Atual -->
@if($currentCategory)
<div class="row mb-5 align-items-center">
@if($currentCategory->image)
<div class="col-md-4">
<img src="{{ asset('storage/' . $currentCategory->image) }}" class="img-fluid rounded shadow-sm" alt="{{ $currentCategory->name }}">
</div>
@endif
<div class="{{ $currentCategory->image ? 'col-md-8' : 'col-12 text-center' }}">
<h2 class="fw-bold text-dark">{{ $currentCategory->name }}</h2>
@if($currentCategory->description)
<div class="text-muted lead">{!! $currentCategory->description !!}</div>
@endif
</div>
</div>
@endif
<div class="row g-4">
@forelse($products as $product)
<div class="col-md-4 col-lg-3">
<div class="card h-100 border-0 shadow-sm overflow-hidden product-card">
<div class="position-relative">
@if($product->image)
<img src="{{ asset('storage/' . $product->image) }}" class="card-img-top" alt="{{ $product->name }}" style="height: 250px; object-fit: cover;">
@else
<div class="bg-light d-flex align-items-center justify-content-center" style="height: 250px;">
<i class="bi bi-box-seam display-1 text-muted"></i>
</div>
@endif
@if($product->price)
<div class="position-absolute bottom-0 end-0 bg-primary text-white px-3 py-2 fw-bold rounded-start-pill shadow">
R$ {{ number_format($product->price, 2, ',', '.') }}
</div>
@endif
</div>
<div class="card-body p-4">
<h5 class="card-title fw-bold text-dark mb-3">{{ $product->name }}</h5>
<div class="card-text text-muted small mb-4">
{!! Str::limit(strip_tags($product->description), 100) !!}
</div>
<div class="d-grid">
<button class="btn btn-outline-primary rounded-pill fw-bold" data-bs-toggle="modal" data-bs-target="#productModal{{ $product->id }}">
<i class="bi bi-info-circle me-1"></i> Detalhes
</button>
</div>
</div>
</div>
</div>
<!-- Modal de Detalhes do Produto -->
<div class="modal fade" id="productModal{{ $product->id }}" tabindex="-1" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered">
<div class="modal-content border-0 shadow-lg rounded-4 overflow-hidden">
<div class="modal-body p-0">
<div class="row g-0">
<div class="col-lg-6">
@if($product->image)
<img src="{{ asset('storage/' . $product->image) }}" class="img-fluid h-100" style="object-fit: cover; min-height: 400px;">
@else
<div class="bg-light d-flex align-items-center justify-content-center h-100" style="min-height: 400px;">
<i class="bi bi-box-seam display-1 text-muted"></i>
</div>
@endif
</div>
<div class="col-lg-6 p-5">
<button type="button" class="btn-close float-end" data-bs-dismiss="modal" aria-label="Close"></button>
<h2 class="fw-bold text-primary mb-3">{{ $product->name }}</h2>
@if($product->price)
<h3 class="text-dark fw-bold mb-4">R$ {{ number_format($product->price, 2, ',', '.') }}</h3>
@endif
<div class="text-muted mb-5">
{!! $product->description !!}
</div>
<div class="d-grid gap-3">
<a href="https://wa.me/{{ preg_replace('/\D/', '', $company->phone) }}?text=Olá! Gostaria de mais informações sobre o produto: {{ $product->name }}" target="_blank" class="btn btn-success btn-lg rounded-pill fw-bold">
<i class="bi bi-whatsapp me-2"></i> Tenho Interesse
</a>
<a href="{{ route('contato') }}" class="btn btn-outline-primary btn-lg rounded-pill fw-bold">
Solicitar Orçamento
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@empty
<div class="col-12 text-center py-5">
<i class="bi bi-box-seam fs-1 text-muted d-block mb-3"></i>
<p class="text-muted lead">Nenhum produto cadastrado no momento.</p>
</div>
@endforelse
</div>
</div>
@endsection
@push('css')
<style>
.product-card {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.product-card:hover {
transform: translateY(-10px);
box-shadow: 0 1rem 3rem rgba(0,0,0,.1) !important;
}
.rounded-start-pill {
border-top-left-radius: 50px;
border-bottom-left-radius: 50px;
}
</style>
@endpush