Commit 9afdd48a by Venkatshiva

some of the design cahnges and news contact pages are created and make design reponsive

parent ef301ef2
...@@ -206,4 +206,28 @@ class AdminMasterDataController extends Controller ...@@ -206,4 +206,28 @@ class AdminMasterDataController extends Controller
return back()->with('success', 'Record deleted successfully!'); return back()->with('success', 'Record deleted successfully!');
} }
public function updateMessageStatus(Request $request, $id)
{
$message = \App\Models\ContactMessage::findOrFail($id);
$message->update([
'status' => $request->input('status')
]);
return response()->json([
'success' => true,
'message' => 'Message status updated successfully!'
]);
}
public function deleteMessage($id)
{
$message = \App\Models\ContactMessage::findOrFail($id);
$message->delete();
return response()->json([
'success' => true,
'message' => 'Message deleted successfully!'
]);
}
} }
...@@ -19,6 +19,7 @@ use App\Models\Gallery; ...@@ -19,6 +19,7 @@ use App\Models\Gallery;
use App\Models\Pincode; use App\Models\Pincode;
use App\Models\Coupon; use App\Models\Coupon;
use App\Models\Wishlist; use App\Models\Wishlist;
use App\Models\ContactMessage;
class AdminViewController extends Controller class AdminViewController extends Controller
{ {
...@@ -112,4 +113,9 @@ class AdminViewController extends Controller ...@@ -112,4 +113,9 @@ class AdminViewController extends Controller
$wishlists = Wishlist::with('product')->get(); $wishlists = Wishlist::with('product')->get();
return view('admin.wishlist', compact('wishlists')); return view('admin.wishlist', compact('wishlists'));
} }
public function messages() {
$messages = ContactMessage::orderBy('created_at', 'desc')->get();
return view('admin.messages', compact('messages'));
}
} }
...@@ -49,6 +49,14 @@ class CatalogController extends Controller ...@@ -49,6 +49,14 @@ class CatalogController extends Controller
}); });
} }
// Price Range filter
if ($request->has('min_price')) {
$query->where('price', '>=', $request->input('min_price'));
}
if ($request->has('max_price')) {
$query->where('price', '<=', $request->input('max_price'));
}
// Sorting // Sorting
$sort = $request->input('sort', 'latest'); $sort = $request->input('sort', 'latest');
if ($sort === 'price_low') { if ($sort === 'price_low') {
......
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\ContactMessage;
use Illuminate\Support\Facades\Validator;
class ContactController extends Controller
{
public function showForm()
{
return view('contact');
}
public function submitForm(Request $request)
{
$validator = Validator::make($request->all(), [
'name' => 'required|string|max:255',
'email' => 'required|email|max:255',
'phone' => 'nullable|string|max:20',
'subject' => 'nullable|string|max:255',
'message' => 'required|string|min:5',
]);
if ($validator->fails()) {
return response()->json([
'success' => false,
'errors' => $validator->errors()->all()
], 422);
}
try {
ContactMessage::create([
'name' => $request->name,
'email' => $request->email,
'phone' => $request->phone,
'subject' => $request->subject,
'message' => $request->message,
'status' => 'Unread',
]);
return response()->json([
'success' => true,
'message' => 'Your message has been sent successfully. We will get back to you soon!'
]);
} catch (\Exception $e) {
return response()->json([
'success' => false,
'message' => 'Something went wrong. Please try again later.'
], 500);
}
}
}
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class ContactMessage extends Model
{
use HasFactory;
protected $fillable = [
'name',
'email',
'phone',
'subject',
'message',
'status',
];
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('contact_messages', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email');
$table->string('phone')->nullable();
$table->string('subject')->nullable();
$table->text('message');
$table->enum('status', ['Unread', 'Read', 'Replied'])->default('Unread');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('contact_messages');
}
};
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<!-- Google Fonts --> <!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet">
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" href="styles.css?v=99"> <link rel="stylesheet" href="styles.css?v=108">
</head> </head>
<body> <body>
......
...@@ -23,6 +23,14 @@ body { ...@@ -23,6 +23,14 @@ body {
zoom: 0.8; zoom: 0.8;
} }
@supports not (zoom: 0.8) {
body {
transform: scale(0.8);
transform-origin: top center;
width: 125%;
}
}
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
font-family: var(--font-heading); font-family: var(--font-heading);
font-weight: 700; font-weight: 700;
...@@ -100,6 +108,14 @@ h1, h2, h3, h4, h5, h6 { ...@@ -100,6 +108,14 @@ h1, h2, h3, h4, h5, h6 {
white-space: nowrap !important; white-space: nowrap !important;
} }
.header-cart-btn::after {
content: "Cart" !important;
font-family: 'Plus Jakarta Sans', sans-serif !important;
font-weight: 700 !important;
font-size: 1rem !important;
color: #305CDE !important;
}
.navbar-custom .btn-cart:hover, .navbar-custom .btn-cart:hover,
.header-cart-btn:hover { .header-cart-btn:hover {
background-color: rgba(255, 255, 255, 0.9) !important; background-color: rgba(255, 255, 255, 0.9) !important;
...@@ -567,13 +583,13 @@ h1, h2, h3, h4, h5, h6 { ...@@ -567,13 +583,13 @@ h1, h2, h3, h4, h5, h6 {
background: rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.08);
border: 1px solid rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.18);
border-radius: 16px; border-radius: 16px;
padding: 1rem 1.4rem; padding: 1rem 1.5rem;
display: flex; display: flex;
gap: 1.2rem; gap: 1.2rem;
align-items: center; align-items: center;
width: 595px; width: 476px;
max-width: 100%; max-width: 100%;
height: 161px; height: 139px;
backdrop-filter: blur(16px); backdrop-filter: blur(16px);
-webkit-backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25); box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
...@@ -588,8 +604,8 @@ h1, h2, h3, h4, h5, h6 { ...@@ -588,8 +604,8 @@ h1, h2, h3, h4, h5, h6 {
} }
.why-card-icon { .why-card-icon {
width: 70px; width: 64px;
height: 70px; height: 64px;
border-radius: 50%; border-radius: 50%;
background: rgba(255, 255, 255, 0.25); background: rgba(255, 255, 255, 0.25);
border: none; border: none;
...@@ -602,21 +618,22 @@ h1, h2, h3, h4, h5, h6 { ...@@ -602,21 +618,22 @@ h1, h2, h3, h4, h5, h6 {
} }
.why-card-content { .why-card-content {
max-width: 381px; flex-grow: 1;
} }
.why-card-content h5 { .why-card-content h5 {
font-size: 1.6rem; font-size: 1.35rem;
font-weight: 700; font-weight: 700;
margin-bottom: 6px; margin-bottom: 4px;
color: #ffffff; color: #ffffff;
font-family: 'Plus Jakarta Sans', sans-serif;
} }
.why-card-content p { .why-card-content p {
font-size: 1.18rem; font-size: 0.98rem;
margin-bottom: 0; margin-bottom: 0;
color: rgba(255, 255, 255, 0.85); color: rgba(255, 255, 255, 0.85);
line-height: 1.4; line-height: 1.35;
} }
/* Gallery Page – Edge-to-Edge Masonry Collage */ /* Gallery Page – Edge-to-Edge Masonry Collage */
...@@ -811,13 +828,13 @@ h1, h2, h3, h4, h5, h6 { ...@@ -811,13 +828,13 @@ h1, h2, h3, h4, h5, h6 {
/* Detail page tags */ /* Detail page tags */
.detail-tag { .detail-tag {
display: inline-block; display: inline-block;
padding: 0.35rem 0.9rem; padding: 0.45rem 1.1rem;
border-radius: 50px; border-radius: 50px;
font-size: 0.78rem; font-size: 0.88rem;
font-weight: 700; font-weight: 700;
margin-right: 0.5rem; margin-right: 0.5rem;
margin-bottom: 0.5rem; margin-bottom: 0.5rem;
text-transform: uppercase; text-transform: none;
letter-spacing: 0.02em; letter-spacing: 0.02em;
} }
...@@ -826,40 +843,50 @@ h1, h2, h3, h4, h5, h6 { ...@@ -826,40 +843,50 @@ h1, h2, h3, h4, h5, h6 {
.tag-polished { background-color: var(--accent-brown); color: white; } .tag-polished { background-color: var(--accent-brown); color: white; }
.btn-add-cart-detail { .btn-add-cart-detail {
background: linear-gradient(180deg, #005bff 0%, #0045a5 100%) !important; background: #FFB900 !important;
color: white !important; color: #000000 !important;
font-weight: 600 !important; font-weight: 700 !important;
border-radius: 12px !important; font-family: 'Plus Jakarta Sans', sans-serif !important;
border: 1px solid #7cb1ff !important; border-radius: 6px !important;
padding: 0.75rem 2rem !important; border: none !important;
display: flex !important; display: inline-flex !important;
align-items: center !important; align-items: center !important;
justify-content: center !important; justify-content: center !important;
gap: 0.5rem !important; gap: 0.5rem !important;
box-shadow: 0 4px 10px rgba(0, 74, 173, 0.2) !important;
transition: all 0.25s ease !important;
width: 100% !important; width: 100% !important;
max-width: 473px !important;
height: 53px !important;
transition: all 0.25s ease !important;
font-size: 1.05rem !important;
} }
.btn-add-cart-detail:hover { .btn-add-cart-detail:hover {
background: linear-gradient(180deg, #004aad 0%, #003680 100%) !important; background: #e0a100 !important;
box-shadow: 0 6px 15px rgba(0, 74, 173, 0.3) !important; color: #000000 !important;
transform: translateY(-1px); transform: translateY(-1px);
} }
.btn-buy-now-detail { .btn-buy-now-detail {
background-color: #0c3da8; background-color: #004aad !important;
color: white; color: white !important;
font-weight: 700; font-weight: 700 !important;
border: none; font-family: 'Plus Jakarta Sans', sans-serif !important;
border-radius: 6px; border: none !important;
padding: 0.75rem 2rem; border-radius: 6px !important;
transition: background-color 0.2s; display: inline-flex !important;
width: 100%; align-items: center !important;
justify-content: center !important;
width: 100% !important;
max-width: 619px !important;
height: 53px !important;
transition: all 0.2s ease !important;
font-size: 1.05rem !important;
text-transform: none !important;
} }
.btn-buy-now-detail:hover { .btn-buy-now-detail:hover {
background-color: #092e80; background-color: #003680 !important;
transform: translateY(-1px);
} }
/* Delivery checking */ /* Delivery checking */
...@@ -1432,26 +1459,24 @@ footer a:hover { ...@@ -1432,26 +1459,24 @@ footer a:hover {
-webkit-appearance: none !important; -webkit-appearance: none !important;
} }
.shop-header-options-bar .icon-toggle-grid { .shop-header-options-bar .icon-toggle-grid,
.shop-header-options-bar .icon-toggle-list {
width: 36px !important; width: 36px !important;
height: 36px !important; height: 36px !important;
border-radius: 6px !important; border-radius: 6px !important;
background-color: #cbd5e1 !important; /* selected bg */ background-color: transparent !important;
color: #1e293b !important; color: #94a3b8 !important;
display: flex !important; display: flex !important;
align-items: center !important; align-items: center !important;
justify-content: center !important; justify-content: center !important;
cursor: pointer !important; cursor: pointer !important;
transition: all 0.2s ease !important;
} }
.shop-header-options-bar .icon-toggle-list { .shop-header-options-bar .icon-toggle-grid.active,
width: 36px !important; .shop-header-options-bar .icon-toggle-list.active {
height: 36px !important; background-color: #cbd5e1 !important; /* selected bg */
color: #94a3b8 !important; color: #1e293b !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
cursor: pointer !important;
} }
/* Checkout Form styling matching mockup */ /* Checkout Form styling matching mockup */
...@@ -1527,4 +1552,45 @@ footer a:hover { ...@@ -1527,4 +1552,45 @@ footer a:hover {
box-shadow: 0 4px 12px rgba(0, 74, 173, 0.2) !important; box-shadow: 0 4px 12px rgba(0, 74, 173, 0.2) !important;
} }
/* Range slider custom styling to prevent drag-drop block cursor */
.form-range {
cursor: pointer !important;
user-select: none !important;
-webkit-user-select: none !important;
-moz-user-select: none !important;
-ms-user-select: none !important;
}
.form-range::-webkit-slider-thumb {
cursor: grab !important;
}
.form-range::-webkit-slider-thumb:active {
cursor: grabbing !important;
}
.form-range::-moz-range-thumb {
cursor: grab !important;
}
.form-range::-moz-range-thumb:active {
cursor: grabbing !important;
}
.form-range::-ms-thumb {
cursor: grab !important;
}
.form-range::-ms-thumb:active {
cursor: grabbing !important;
}
/* Footer layout padding matching fluid header/body layout alignment */
footer {
padding: 4rem 0 2rem !important;
}
footer .container {
max-width: 100% !important;
padding-left: 2rem !important;
padding-right: 2rem !important;
}
@extends('layouts.admin')
@section('breadcrumbs')
<nav aria-label="breadcrumb">
<ol class="breadcrumb mb-0">
<li class="breadcrumb-item"><a href="{{ url('/admin/dashboard') }}">Admin</a></li>
<li class="breadcrumb-item">Manage Portal</li>
<li class="breadcrumb-item active" aria-current="page">Messages</li>
</ol>
</nav>
@endsection
@section('page_title', 'Customer Inquiries')
@section('page_description', 'View and manage customer contact messages and help requests.')
@section('content')
<div class="panel-card">
<div class="table-responsive">
<table class="table mb-0 align-middle">
<thead>
<tr>
<th>Date</th>
<th>Customer Name</th>
<th>Email & Phone</th>
<th>Subject</th>
<th>Status</th>
<th>Action</th>
</tr>
</thead>
<tbody id="messages-tbody">
@foreach($messages as $msg)
<tr id="msg-row-{{ $msg->id }}" style="{{ $msg->status === 'Unread' ? 'font-weight: 600; background-color: rgba(33, 114, 226, 0.02);' : '' }}">
<td style="font-size: 0.85rem;">{{ $msg->created_at->format('d-M-Y H:i') }}</td>
<td>{{ $msg->name }}</td>
<td>
<div class="small text-dark">{{ $msg->email }}</div>
@if($msg->phone)
<div class="small text-muted" style="font-size: 0.78rem;"><i class="bi bi-telephone-fill me-1" style="font-size: 0.7rem;"></i>{{ $msg->phone }}</div>
@endif
</td>
<td>{{ $msg->subject ?? 'General Inquiry' }}</td>
<td>
@if($msg->status === 'Unread')
<span class="badge bg-danger px-2.5 py-1.5" id="msg-badge-{{ $msg->id }}" style="font-size: 0.72rem; letter-spacing: 0.2px;">Unread</span>
@else
<span class="badge bg-success px-2.5 py-1.5" id="msg-badge-{{ $msg->id }}" style="font-size: 0.72rem; letter-spacing: 0.2px;">Read</span>
@endif
</td>
<td>
<button class="btn-action text-primary me-1" onclick="viewMessageDetails({{ json_encode($msg) }})" title="View Inquiry details"><i class="fa-solid fa-eye"></i></button>
<button class="btn-action text-secondary me-1" onclick="toggleReadStatus({{ $msg->id }}, '{{ $msg->status }}')" id="status-btn-{{ $msg->id }}" title="{{ $msg->status === 'Unread' ? 'Mark as Read' : 'Mark as Unread' }}">
<i class="fa-solid {{ $msg->status === 'Unread' ? 'fa-envelope-open' : 'fa-envelope' }}"></i>
</button>
<button class="btn-action text-danger" onclick="deleteMessage({{ $msg->id }})" title="Delete Inquiry"><i class="fa-solid fa-trash"></i></button>
</td>
</tr>
@endforeach
@if(count($messages) === 0)
<tr>
<td colspan="6" class="text-center text-muted py-5">
<i class="bi bi-inbox fs-2 d-block mb-2 text-muted"></i>
No customer messages found.
</td>
</tr>
@endif
</tbody>
</table>
</div>
</div>
<!-- Message View Modal -->
<div class="modal fade" id="viewMessageModal" tabindex="-1" aria-labelledby="viewMessageModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg">
<div class="modal-content rounded-4 border-0 shadow-lg">
<div class="modal-header border-bottom-0 pb-0" style="background-color: var(--light-bg); border-top-left-radius: 16px; border-top-right-radius: 16px; padding: 1.5rem 1.5rem 0.5rem;">
<h5 class="modal-title fw-bold text-dark" id="viewMessageModalLabel" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.25rem;">
<i class="bi bi-envelope-paper me-2 text-primary"></i>Message Details
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body" style="padding: 1.5rem;">
<div class="row g-3 mb-4">
<div class="col-md-6">
<div class="small text-muted mb-0.5" style="font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;">Customer Name</div>
<div class="fw-semibold text-dark fs-6" id="modal-name"></div>
</div>
<div class="col-md-6">
<div class="small text-muted mb-0.5" style="font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;">Date & Time</div>
<div class="text-dark" id="modal-date"></div>
</div>
<div class="col-md-6 col-lg-4">
<div class="small text-muted mb-0.5" style="font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;">Email</div>
<div><a href="" id="modal-email-link" class="text-decoration-none fw-semibold"></a></div>
</div>
<div class="col-md-6 col-lg-4">
<div class="small text-muted mb-0.5" style="font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;">Phone Number</div>
<div class="text-dark" id="modal-phone"></div>
</div>
<div class="col-12">
<div class="small text-muted mb-0.5" style="font-size: 0.78rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px;">Subject</div>
<div class="fw-bold text-dark fs-6" id="modal-subject"></div>
</div>
</div>
<div class="p-3 bg-light rounded-3 border border-light-subtle" style="min-height: 120px; font-size: 0.95rem; line-height: 1.6; white-space: pre-wrap; color: #334155;" id="modal-message"></div>
</div>
<div class="modal-footer border-top-0 pt-0" style="padding: 1rem 1.5rem 1.5rem;">
<button type="button" class="btn btn-secondary rounded-pill px-4" data-bs-dismiss="modal">Close</button>
<a href="" id="modal-reply-btn" class="btn btn-custom-primary rounded-pill text-white px-4"><i class="bi bi-reply-fill me-1"></i>Reply via Email</a>
</div>
</div>
</div>
</div>
@endsection
@push('scripts')
<script>
// View details modal
function viewMessageDetails(msg) {
// Set modal content
$('#modal-name').text(msg.name);
$('#modal-date').text(new Date(msg.created_at).toLocaleString('en-IN', { dateStyle: 'medium', timeStyle: 'short' }));
$('#modal-email-link').text(msg.email).attr('href', 'mailto:' + msg.email);
$('#modal-phone').text(msg.phone || 'N/A');
$('#modal-subject').text(msg.subject || 'General Inquiry');
$('#modal-message').text(msg.message);
$('#modal-reply-btn').attr('href', 'mailto:' + msg.email + '?subject=Re: ' + encodeURIComponent(msg.subject || 'General Inquiry'));
// Show modal
const modal = new bootstrap.Modal(document.getElementById('viewMessageModal'));
modal.show();
// If Unread, mark as Read via AJAX automatically
if (msg.status === 'Unread') {
updateStatusAJAX(msg.id, 'Read', function() {
// Update local row styling
$(`#msg-row-${msg.id}`).css({'font-weight': 'normal', 'background-color': 'transparent'});
// Update badge in the list row
const badge = $(`#msg-badge-${msg.id}`);
badge.removeClass('bg-danger').addClass('bg-success').text('Read');
// Update button icon & title
const statusBtn = $(`#status-btn-${msg.id}`);
statusBtn.attr('title', 'Mark as Unread');
statusBtn.find('i').removeClass('fa-envelope-open').addClass('fa-envelope');
// Decrement dashboard/sidebar count if dynamic count functions exist
decrementUnreadBadge();
});
}
}
// Toggle Read/Unread status action button
function toggleReadStatus(id, currentStatus) {
const nextStatus = currentStatus === 'Unread' ? 'Read' : 'Unread';
updateStatusAJAX(id, nextStatus, function() {
const row = $(`#msg-row-${id}`);
const badge = $(`#msg-badge-${id}`);
const btn = $(`#status-btn-${id}`);
if (nextStatus === 'Read') {
row.css({'font-weight': 'normal', 'background-color': 'transparent'});
badge.removeClass('bg-danger').addClass('bg-success').text('Read');
btn.attr('title', 'Mark as Unread');
btn.find('i').removeClass('fa-envelope-open').addClass('fa-envelope');
decrementUnreadBadge();
} else {
row.css({'font-weight': '600', 'background-color': 'rgba(33, 114, 226, 0.02)'});
badge.removeClass('bg-success').addClass('bg-danger').text('Unread');
btn.attr('title', 'Mark as Read');
btn.find('i').removeClass('fa-envelope').addClass('fa-envelope-open');
incrementUnreadBadge();
}
// Update onclick status param dynamically
btn.attr('onclick', `toggleReadStatus(${id}, '${nextStatus}')`);
});
}
// Helper status update ajax
function updateStatusAJAX(id, status, callback) {
$.ajax({
url: `/admin/messages/${id}/status`,
method: 'PUT',
data: {
_token: '{{ csrf_token() }}',
status: status
},
dataType: 'json',
success: function(res) {
if (res.success && callback) {
callback();
}
},
error: function() {
alert('Failed to update message status.');
}
});
}
// Delete message inquiry
function deleteMessage(id) {
if (confirm('Are you sure you want to delete this message inquiry?')) {
$.ajax({
url: `/admin/messages/${id}`,
method: 'DELETE',
data: {
_token: '{{ csrf_token() }}'
},
dataType: 'json',
success: function(res) {
if (res.success) {
// Fade and remove row
$(`#msg-row-${id}`).fadeOut(300, function() {
$(this).remove();
// If table is now empty, reload to show empty state row
if ($('#messages-tbody tr').length === 0) {
location.reload();
}
});
}
},
error: function() {
alert('Failed to delete message.');
}
});
}
}
// Helpers to update sidebar/navbar dynamic counts
function decrementUnreadBadge() {
const badge = $('.unread-messages-count-badge');
if (badge.length > 0) {
let count = parseInt(badge.first().text());
if (count > 0) {
count--;
if (count === 0) {
badge.addClass('d-none');
} else {
badge.text(count);
}
}
}
}
function incrementUnreadBadge() {
const badge = $('.unread-messages-count-badge');
if (badge.length > 0) {
let count = parseInt(badge.first().text()) || 0;
count++;
badge.removeClass('d-none').text(count);
}
}
</script>
@endpush
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="description" content="Get in touch with VSI Mart. Send us a message for ocean theme decor, seashell crafts, custom orders, or product inquiries.">
<meta name="keywords" content="seashell crafts, beach decor, shell gifts, handmade jewelry, Chennai crafts, VSI Mart, contact us">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Contact Us - VSI Mart</title>
<meta name="csrf-token" content="{{ csrf_token() }}">
<!-- Google Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap" rel="stylesheet">
<!-- Bootstrap 5 CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="{{ asset('styles.css') }}?v=108">
<style>
.contact-info-card {
border: 1px solid rgba(0, 74, 173, 0.1);
background-color: #ffffff;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-info-card:hover {
transform: translateY(-3px);
box-shadow: 0 10px 25px rgba(0, 74, 173, 0.08) !important;
}
.contact-icon-wrapper {
width: 50px;
height: 50px;
background-color: rgba(0, 74, 173, 0.08);
color: #004AAD;
display: flex;
align-items: center;
justify-content: center;
border-radius: 12px;
font-size: 1.3rem;
}
.form-label-custom {
font-family: 'Plus Jakarta Sans', sans-serif;
font-size: 0.85rem;
font-weight: 700;
color: #4e5d6c;
margin-bottom: 6px;
}
.contact-form-control {
border: 1.5px solid #ebdcb9 !important;
border-radius: 8px !important;
padding: 10px 14px;
font-size: 0.9rem;
transition: all 0.2s ease;
}
.contact-form-control:focus {
border-color: #305CDE !important;
box-shadow: 0 0 0 3px rgba(48, 92, 222, 0.12) !important;
outline: none;
}
</style>
</head>
<body>
<!-- Top Pillayar Suzhi Bar -->
<div class="top-suzhi-bar text-center py-1" style="background-color: #fcfbf0; border-bottom: 1.5px solid #ebdcb9; display: flex; align-items: center; justify-content: center; height: 42px;">
<img src="{{ asset('pillayar_suzhi.png') }}" alt="Pillayar Suzhi" style="height: 30px; object-fit: contain;">
</div>
<!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="{{ asset('header_logo.png') }}" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="{{ asset('footer_logo.png') }}" alt="VSI MART" style="height: 24px; object-fit: contain;">
</a>
<!-- Header Actions -->
<div class="d-flex align-items-center gap-3 ms-auto me-2 me-lg-0 order-lg-last">
<a href="{{ url('/wishlist') }}" class="header-wishlist-btn text-white position-relative" title="Wishlist"><i class="bi bi-heart fs-5"></i></a>
<!-- Desktop Cart -->
<a href="{{ url('/cart') }}" class="header-cart-btn text-white position-relative" title="Cart">
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="vertical-align:middle;"><circle cx="9" cy="21" r="1"/><circle cx="20" cy="21" r="1"/><path d="M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"/><line x1="6" y1="10" x2="21" y2="10"/><line x1="7" y1="14" x2="20" y2="14"/></svg>
<span class="cart-count-badge badge rounded-pill bg-danger position-absolute top-0 start-100 translate-middle" style="font-size: 0.62rem; display: none;">0</span>
</a>
<!-- Desktop Sign In -->
<div class="header-auth-container d-none d-lg-inline-block">
<a href="#" class="header-signin-btn text-white text-decoration-none">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="margin-right:5px;vertical-align:middle;"><path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"/><polyline points="10 17 15 12 10 7"/><line x1="15" y1="12" x2="3" y2="12"/></svg> <span class="d-none d-md-inline">Sign In</span>
</a>
</div>
</div>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav mx-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link" href="{{ url('/') }}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('/shop') }}">SHOP</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ url('/gallery') }}">Gallery</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="{{ url('/contact') }}">Contact</a>
</li>
</ul>
</div>
</div>
</nav>
<!-- Page Header Banner -->
<header class="page-header-banner">
<div class="container">
<h1>Contact Us</h1>
</div>
</header>
<!-- Contact Main Container -->
<main class="container py-5" style="min-height: 60vh;">
<!-- Breadcrumbs -->
<nav aria-label="breadcrumb" class="mb-5">
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ url('/') }}" class="text-decoration-none">Home</a></li>
<li class="breadcrumb-item active" aria-current="page">Contact Us</li>
</ol>
</nav>
<div class="row g-5">
<!-- Left Info Cards -->
<div class="col-lg-5">
<h3 class="fw-bold mb-2" style="font-family: 'Plus Jakarta Sans', sans-serif;">Get In Touch</h3>
<p class="text-muted mb-4">Have questions about our handcrafted ocean collections, custom decorations, or bulk orders? Reach out to us, and our team will get back to you shortly.</p>
<!-- Cards list -->
<div class="d-flex flex-column gap-3">
<div class="card contact-info-card border-0 shadow-sm rounded-4 p-3">
<div class="d-flex align-items-center gap-3">
<div class="contact-icon-wrapper">
<i class="bi bi-geo-alt-fill"></i>
</div>
<div>
<h6 class="fw-bold mb-1" style="font-family: 'Plus Jakarta Sans', sans-serif;">Our Location</h6>
<p class="text-muted small mb-0">Chennai, Tamil Nadu, India</p>
</div>
</div>
</div>
<div class="card contact-info-card border-0 shadow-sm rounded-4 p-3">
<div class="d-flex align-items-center gap-3">
<div class="contact-icon-wrapper">
<i class="bi bi-telephone-fill"></i>
</div>
<div>
<h6 class="fw-bold mb-1" style="font-family: 'Plus Jakarta Sans', sans-serif;">Phone Number</h6>
<p class="text-muted small mb-0">+91 XXXXX XXXXX (Mon-Sat, 9AM-6PM)</p>
</div>
</div>
</div>
<div class="card contact-info-card border-0 shadow-sm rounded-4 p-3">
<div class="d-flex align-items-center gap-3">
<div class="contact-icon-wrapper">
<i class="bi bi-envelope-fill"></i>
</div>
<div>
<h6 class="fw-bold mb-1" style="font-family: 'Plus Jakarta Sans', sans-serif;">Email Address</h6>
<p class="text-muted small mb-0">info@vsimart.com</p>
</div>
</div>
</div>
<div class="card contact-info-card border-0 shadow-sm rounded-4 p-3">
<div class="d-flex align-items-center gap-3">
<div class="contact-icon-wrapper">
<i class="bi bi-clock-fill"></i>
</div>
<div>
<h6 class="fw-bold mb-1" style="font-family: 'Plus Jakarta Sans', sans-serif;">Store Hours</h6>
<p class="text-muted small mb-0">Online Ordering Available 24/7</p>
</div>
</div>
</div>
</div>
</div>
<!-- Right Form Card -->
<div class="col-lg-7">
<div class="card border border-light-subtle shadow-sm rounded-4 p-4 p-md-5">
<h3 class="fw-bold mb-4 text-dark" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.6rem;">Send A Message</h3>
<!-- Alert Notification Box -->
<div id="contact-alert" class="alert d-none rounded-3 mb-4" role="alert"></div>
<form id="contact-form">
@csrf
<div class="row g-3">
<div class="col-md-6">
<label for="name" class="form-label form-label-custom">Full Name <span class="text-danger">*</span></label>
<input type="text" class="form-control contact-form-control" id="name" name="name" required placeholder="Enter your full name">
</div>
<div class="col-md-6">
<label for="email" class="form-label form-label-custom">Email Address <span class="text-danger">*</span></label>
<input type="email" class="form-control contact-form-control" id="email" name="email" required placeholder="Enter your email address">
</div>
<div class="col-md-6">
<label for="phone" class="form-label form-label-custom">Phone Number</label>
<input type="tel" class="form-control contact-form-control" id="phone" name="phone" placeholder="Enter your mobile number">
</div>
<div class="col-md-6">
<label for="subject" class="form-label form-label-custom">Subject / Product Inquiry</label>
<input type="text" class="form-control contact-form-control" id="subject" name="subject" placeholder="Inquiry topic or product name">
</div>
<div class="col-12">
<label for="message" class="form-label form-label-custom">Message <span class="text-danger">*</span></label>
<textarea class="form-control contact-form-control" id="message" name="message" rows="5" required placeholder="Tell us how we can help you..."></textarea>
</div>
<div class="col-12 mt-4 text-end">
<button type="submit" id="submit-btn" class="btn btn-custom-primary rounded-pill text-white px-5 py-2 font-weight-600">
<span class="spinner-border spinner-border-sm d-none me-2" role="status" aria-hidden="true"></span>
Send Message
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer id="contact" style="background: linear-gradient(to right, #2172E2, #03489F); color: #ffffff; padding: 4rem 0 2rem; font-family: 'Inter', sans-serif;">
<div class="container">
<div class="row g-4 align-items-start">
<!-- Brand Info -->
<div class="col-lg-5 col-md-6">
<div class="mb-3">
<img src="{{ asset('footer_logo.png') }}" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;">
</div>
<p class="text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;">
Handmade seashell crafts and ocean-inspired décor, beautifully crafted by skilled artisans in Chennai. Unique gifts, souvenirs, and beach-style creations made with sustainably sourced natural shells.
</p>
</div>
<!-- Quick Links -->
<div class="col-lg-2 col-md-3">
<h5 class="text-white fw-bold mb-3" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem;">Quick Links</h5>
<ul class="list-unstyled d-flex flex-column gap-2" style="font-size: 0.9rem;">
<li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li>
<li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li>
<li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li>
<li><a href="{{ url('/contact') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li>
<li><a href="#" class="text-white text-decoration-none opacity-85 hover-opacity-100">Login</a></li>
</ul>
</div>
<!-- Contact Us -->
<div class="col-lg-3 col-md-3">
<h5 class="text-white fw-bold mb-3" style="font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.15rem;">Contact Us</h5>
<ul class="list-unstyled d-flex flex-column gap-2 text-white-50" style="font-size: 0.9rem; color: rgba(255,255,255,0.85) !important;">
<li>• Chennai, Tamil Nadu, India</li>
<li>• +91 XXXXX XXXXX</li>
<li>• info@vsimart.com</li>
</ul>
</div>
<!-- Social Media Icons -->
<div class="col-lg-2 col-md-12 d-flex justify-content-lg-end justify-content-start align-items-start">
<div class="d-flex gap-3 fs-4" style="padding-left: 1.5rem;">
<a href="#" class="text-white opacity-85 hover-opacity-100"><i class="bi bi-facebook"></i></a>
<a href="#" class="text-white opacity-85 hover-opacity-100"><i class="bi bi-instagram"></i></a>
<a href="#" class="text-white opacity-85 hover-opacity-100"><i class="bi bi-twitter-x"></i></a>
</div>
</div>
</div>
</div>
<hr class="my-4" style="background-color: rgba(255,255,255,0.35); height: 2.5px; opacity: 1; border: none; margin-left: 0; margin-right: 0; width: 100%;">
<div class="container">
<div class="text-start small text-white-50" style="color: rgba(255,255,255,0.85) !important;">
&copy; 2026 VSI Mart. All Rights Reserved.
</div>
</div>
</footer>
<!-- Bootstrap & jQuery Scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<script>
$(document).ready(function() {
// Setup CSRF header for jQuery AJAX
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
// Form Submit handler
$('#contact-form').on('submit', function(e) {
e.preventDefault();
// UI adjustments during loading
const btn = $('#submit-btn');
const spinner = btn.find('.spinner-border');
const alertBox = $('#contact-alert');
btn.prop('disabled', true);
spinner.removeClass('d-none');
alertBox.addClass('d-none').removeClass('alert-success alert-danger');
// Form Data
const formData = {
name: $('#name').val().trim(),
email: $('#email').val().trim(),
phone: $('#phone').val().trim(),
subject: $('#subject').val().trim(),
message: $('#message').val().trim()
};
// Send request
$.ajax({
url: "{{ url('/contact') }}",
method: "POST",
data: formData,
dataType: "json",
success: function(res) {
btn.prop('disabled', false);
spinner.addClass('d-none');
if (res.success) {
alertBox.removeClass('d-none')
.addClass('alert-success')
.text(res.message);
$('#contact-form')[0].reset();
} else {
alertBox.removeClass('d-none')
.addClass('alert-danger')
.text(res.message || 'An error occurred. Please try again.');
}
},
error: function(xhr) {
btn.prop('disabled', false);
spinner.addClass('d-none');
let errMsg = 'Something went wrong. Please try again.';
if (xhr.status === 422 && xhr.responseJSON && xhr.responseJSON.errors) {
errMsg = xhr.responseJSON.errors.join('\n');
} else if (xhr.responseJSON && xhr.responseJSON.message) {
errMsg = xhr.responseJSON.message;
}
alertBox.removeClass('d-none')
.addClass('alert-danger')
.html(errMsg.replace(/\n/g, '<br>'));
}
});
});
});
</script>
</body>
</html>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<!-- Google Fonts --> <!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Caveat:wght@700&family=Poppins:wght@300;400;600;700;800&display=swap" rel="stylesheet">
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" href="styles.css?v=99"> <link rel="stylesheet" href="styles.css?v=108">
</head> </head>
<body> <body>
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<a class="nav-link" href="{{ url('/gallery') }}">Gallery</a> <a class="nav-link" href="{{ url('/gallery') }}">Gallery</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#contact">Contact</a> <a class="nav-link" href="{{ url('/contact') }}">Contact</a>
</li> </li>
</ul> </ul>
<!-- Mobile Actions (Inside Hamburger Menu) --> <!-- Mobile Actions (Inside Hamburger Menu) -->
...@@ -284,14 +284,14 @@ ...@@ -284,14 +284,14 @@
<!-- Why Choose Us Section --> <!-- Why Choose Us Section -->
<section class="why-choose-us-bg"> <section class="why-choose-us-bg">
<div class="container"> <div class="container-fluid px-lg-5">
<div class="text-center mb-5"> <div class="text-center mb-5">
<h2 class="h1 fw-bold" style="font-family: 'Poppins', sans-serif;">Why Choose Us</h2> <h2 class="h1 fw-bold" style="font-family: 'Poppins', sans-serif;">Why Choose Us</h2>
<p class="text-white-50">We pour our heart into every creation, ensuring you receive only the finest handcrafted pieces</p> <p class="text-white-50">We pour our heart into every creation, ensuring you receive only the finest handcrafted pieces</p>
</div> </div>
<div class="row g-4"> <div class="row g-4">
<!-- Why 1 --> <!-- Why 1 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
</div> </div>
</div> </div>
<!-- Why 2 --> <!-- Why 2 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
</div> </div>
</div> </div>
<!-- Why 3 --> <!-- Why 3 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -336,7 +336,7 @@ ...@@ -336,7 +336,7 @@
</div> </div>
</div> </div>
<!-- Why 4 --> <!-- Why 4 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -351,7 +351,7 @@ ...@@ -351,7 +351,7 @@
</div> </div>
</div> </div>
<!-- Why 5 --> <!-- Why 5 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
</div> </div>
</div> </div>
<!-- Why 6 --> <!-- Why 6 -->
<div class="col-md-4"> <div class="col-lg-4 col-md-6">
<div class="why-card"> <div class="why-card">
<div class="why-card-icon"> <div class="why-card-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"> <svg width="28" height="28" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
...@@ -453,11 +453,8 @@ ...@@ -453,11 +453,8 @@
<div class="mb-3"> <div class="mb-3">
<img src="footer_logo.png" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;">
</div> </div>
<p class="pe-lg-5 text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;"> <p class="text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;">
Handmade seashell crafts and ocean-inspired décor,<br> Handmade seashell crafts and ocean-inspired décor, beautifully crafted by skilled artisans in Chennai. Unique gifts, souvenirs, and beach-style creations made with sustainably sourced natural shells.
beautifully crafted by skilled artisans in Chennai.<br>
Unique gifts, souvenirs, and beach-style creations<br>
made with sustainably sourced natural shells.
</p> </p>
</div> </div>
<!-- Quick Links --> <!-- Quick Links -->
...@@ -467,7 +464,7 @@ ...@@ -467,7 +464,7 @@
<li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li> <li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li>
<li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li> <li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li>
<li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li> <li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li>
<li><a href="#contact" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li> <li><a href="{{ url('/contact') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li>
<li><a href="#" class="text-white text-decoration-none opacity-85 hover-opacity-100">Login</a></li> <li><a href="#" class="text-white text-decoration-none opacity-85 hover-opacity-100">Login</a></li>
</ul> </ul>
</div> </div>
......
...@@ -639,6 +639,15 @@ ...@@ -639,6 +639,15 @@
<li class="{{ Request::is('admin/pincodes') ? 'active' : '' }}"><a href="{{ url('/admin/pincodes') }}"><i class="fa-solid fa-map-pin"></i>Pincodes</a></li> <li class="{{ Request::is('admin/pincodes') ? 'active' : '' }}"><a href="{{ url('/admin/pincodes') }}"><i class="fa-solid fa-map-pin"></i>Pincodes</a></li>
<li class="{{ Request::is('admin/coupons') ? 'active' : '' }}"><a href="{{ url('/admin/coupons') }}"><i class="fa-solid fa-percent"></i>Coupons</a></li> <li class="{{ Request::is('admin/coupons') ? 'active' : '' }}"><a href="{{ url('/admin/coupons') }}"><i class="fa-solid fa-percent"></i>Coupons</a></li>
<li class="{{ Request::is('admin/wishlist') ? 'active' : '' }}"><a href="{{ url('/admin/wishlist') }}"><i class="fa-solid fa-heart"></i>Wishlist</a></li> <li class="{{ Request::is('admin/wishlist') ? 'active' : '' }}"><a href="{{ url('/admin/wishlist') }}"><i class="fa-solid fa-heart"></i>Wishlist</a></li>
<li class="{{ Request::is('admin/messages') ? 'active' : '' }}">
<a href="{{ url('/admin/messages') }}">
<i class="fa-solid fa-envelope"></i>Messages
@php
$unreadCount = \App\Models\ContactMessage::where('status', 'Unread')->count();
@endphp
<span class="badge bg-danger ms-auto unread-messages-count-badge {{ $unreadCount === 0 ? 'd-none' : '' }}">{{ $unreadCount }}</span>
</a>
</li>
</ul> </ul>
</div> </div>
...@@ -653,10 +662,26 @@ ...@@ -653,10 +662,26 @@
<!-- Dynamic Header --> <!-- Dynamic Header -->
<div class="mb-4"> <div class="mb-4">
<div class="d-flex justify-content-between align-items-center pb-2 border-bottom mb-3">
<!-- Breadcrumbs Area --> <!-- Breadcrumbs Area -->
<div class="custom-breadcrumb"> <div class="custom-breadcrumb mb-0">
@yield('breadcrumbs') @yield('breadcrumbs')
</div> </div>
<!-- Top Right Info & Notification -->
<div class="d-flex align-items-center gap-3">
@php
$unreadCount = \App\Models\ContactMessage::where('status', 'Unread')->count();
@endphp
<a href="{{ url('/admin/messages') }}" class="position-relative text-muted hover-text-primary" style="font-size: 1.2rem; transition: color 0.2s;" title="Customer Inquiries">
<i class="fa-solid fa-bell"></i>
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger unread-messages-count-badge {{ $unreadCount === 0 ? 'd-none' : '' }}" style="font-size: 0.55rem; padding: 0.25em 0.45em;">
{{ $unreadCount }}
</span>
</a>
<span class="text-muted" style="opacity: 0.5;">|</span>
<span class="text-dark fw-semibold" style="font-size: 0.85rem;"><i class="fa-solid fa-circle-user text-primary me-1" style="font-size: 1rem; vertical-align: middle;"></i>Admin Portal</span>
</div>
</div>
<div class="d-flex justify-content-between align-items-center mt-2"> <div class="d-flex justify-content-between align-items-center mt-2">
<div> <div>
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<!-- Bootstrap Icons --> <!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" href="/styles.css"> <link rel="stylesheet" href="/styles.css?v=101">
</head> </head>
<body> <body>
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="/header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="/header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="/footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="/footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
</header> </header>
<!-- Product Detail Container --> <!-- Product Detail Container -->
<main class="container py-5"> <main class="container-fluid px-lg-5 py-5">
<!-- Breadcrumbs --> <!-- Breadcrumbs -->
<nav aria-label="breadcrumb" class="mb-4"> <nav aria-label="breadcrumb" class="mb-4">
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
@if($product->is_bestseller) @if($product->is_bestseller)
<span class="badge-bestseller">Best Seller</span> <span class="badge-bestseller">Best Seller</span>
@endif @endif
<img id="main-product-img" src="{{ $product->primaryImage ? $product->primaryImage->image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1600&auto=format&fit=crop&q=90' }}" alt="{{ $product->name }}" class="w-100 img-fluid" style="height: 630px; object-fit: cover;"> <img id="main-product-img" src="{{ $product->primaryImage ? $product->primaryImage->image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=1600&auto=format&fit=crop&q=90' }}" alt="{{ $product->name }}" class="w-100 img-fluid" style="height: 500px; object-fit: cover;">
</div> </div>
<!-- Thumbnail carousel (5 images) --> <!-- Thumbnail carousel (5 images) -->
<div class="row g-2"> <div class="row g-2">
...@@ -170,9 +170,9 @@ ...@@ -170,9 +170,9 @@
<!-- Product Tags --> <!-- Product Tags -->
<div class="mb-3"> <div class="mb-3">
<span class="detail-tag tag-handcrafted">+ Handcrafted</span> <span class="detail-tag tag-handcrafted">✦ Handcrafted</span>
<span class="detail-tag tag-natural">+ Natural Shells</span> <span class="detail-tag tag-natural">✦ Natural Shells</span>
<span class="detail-tag tag-polished">+ Polished</span> <span class="detail-tag tag-polished">✦ Polished</span>
</div> </div>
<!-- Size selector --> <!-- Size selector -->
...@@ -196,40 +196,40 @@ ...@@ -196,40 +196,40 @@
<!-- Quantity and Buttons --> <!-- Quantity and Buttons -->
<div class="mb-3"> <div class="mb-3">
<h6 class="fw-bold mb-2">Quantity</h6> <h6 class="fw-bold mb-2">Quantity</h6>
<div class="row g-3"> <div class="d-flex align-items-center gap-3">
<div class="col-md-4"> <div style="width: 130px; flex-shrink: 0;">
<div class="d-flex align-items-center border rounded-3 p-1 bg-white justify-content-between"> <div class="d-flex align-items-center border rounded-3 p-1 bg-white justify-content-between" style="height: 53px;">
<button class="btn btn-link px-2 py-1 text-dark text-decoration-none fw-bold" id="qty-minus"><i class="bi bi-dash"></i></button> <button class="btn btn-link px-2 py-1 text-dark text-decoration-none fw-bold" id="qty-minus" style="box-shadow: none;"><i class="bi bi-dash"></i></button>
<input type="number" id="detail-qty" class="form-control border-0 text-center bg-transparent p-0 fw-bold" value="1" min="1" readonly style="width: 40px;"> <input type="number" id="detail-qty" class="form-control border-0 text-center bg-transparent p-0 fw-bold" value="1" min="1" readonly style="width: 40px; box-shadow: none;">
<button class="btn btn-link px-2 py-1 text-dark text-decoration-none fw-bold" id="qty-plus"><i class="bi bi-plus"></i></button> <button class="btn btn-link px-2 py-1 text-dark text-decoration-none fw-bold" id="qty-plus" style="box-shadow: none;"><i class="bi bi-plus"></i></button>
</div> </div>
</div> </div>
<div class="col-md-8"> <div class="flex-grow-1">
<button class="btn-add-cart-detail w-100 py-2.5 btn-add-to-cart-dynamic" <button class="btn-add-cart-detail btn-add-to-cart-dynamic"
data-id="{{ $product->id }}" data-id="{{ $product->id }}"
data-name="{{ $product->name }}" data-name="{{ $product->name }}"
data-price="{{ round($price) }}" data-price="{{ round($price) }}"
data-img="{{ $product->primaryImage ? $product->primaryImage->image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80' }}" data-img="{{ $product->primaryImage ? $product->primaryImage->image_url : 'https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?w=800&auto=format&fit=crop&q=80' }}"
id="btn-add-to-cart"> id="btn-add-to-cart">
Add to cart <i class="bi bi-cart3 fs-5"></i> Add to cart
</button> </button>
</div> </div>
</div> </div>
</div> </div>
<a href="{{ url('/checkout') }}" class="btn btn-buy-now-detail w-100 py-3 text-center mb-3 d-block text-decoration-none"><i class="bi bi-lightning-charge-fill me-1"></i> Buy it now</a> <a href="{{ url('/checkout') }}" class="btn-buy-now-detail text-decoration-none mb-2"><i class="bi bi-lightning-charge-fill me-1"></i> Buy it now</a>
<!-- PIN Code Check --> <!-- PIN Code Check -->
<div class="card border border-light-subtle rounded-3 p-3 mb-3 bg-white shadow-sm"> <div class="mb-2" style="max-width: 619px;">
<h6 class="fw-bold mb-2 small text-muted"><i class="bi bi-truck me-2"></i>Check estimated delivery date</h6> <h6 class="fw-bold mb-2 text-muted" style="font-size: 0.88rem;"><i class="bi bi-truck me-2"></i>Check estimated delivery date</h6>
<div class="input-group"> <div class="d-flex">
<input type="text" class="form-control" placeholder="Enter Pin code" aria-label="Pin code"> <input type="text" class="form-control" placeholder="Enter Pin code" aria-label="Pin code" style="border: 1.5px solid #ebdcb9; border-top-left-radius: 8px; border-bottom-left-radius: 8px; border-top-right-radius: 0; border-bottom-right-radius: 0; font-size: 0.88rem; height: 42px; box-shadow: none;">
<button class="check-pincode-btn" type="button">Check</button> <button class="btn text-white px-4 fw-bold" type="button" style="background-color: #5a3825; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-top-left-radius: 0; border-bottom-left-radius: 0; height: 42px; font-size: 0.9rem; white-space: nowrap;">Check</button>
</div> </div>
</div> </div>
<!-- Refunds Alert Box --> <!-- Refunds Alert Box -->
<div class="d-flex align-items-center gap-3 p-3 rounded-3" style="background-color: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534;"> <div class="d-flex align-items-center gap-3 p-3 rounded-3 mt-1" style="background-color: #f0fdf4; border: 1.5px solid #bbf7d0; color: #166534; max-width: 619px;">
<div class="rounded-circle d-flex align-items-center justify-content-center text-white" style="width: 42px; height: 42px; min-width: 42px; background-color: #166534;"> <div class="rounded-circle d-flex align-items-center justify-content-center text-white" style="width: 42px; height: 42px; min-width: 42px; background-color: #166534;">
<i class="bi bi-arrow-counterclockwise fs-4"></i> <i class="bi bi-arrow-counterclockwise fs-4"></i>
</div> </div>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<!-- Bootstrap Icons --> <!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" href="styles.css?v=99"> <link rel="stylesheet" href="styles.css?v=105">
</head> </head>
<body> <body>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="header_logo.png" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART" style="height: 24px; object-fit: contain;">
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
<a class="nav-link" href="{{ url('/gallery') }}">Gallery</a> <a class="nav-link" href="{{ url('/gallery') }}">Gallery</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
<a class="nav-link" href="#contact">Contact</a> <a class="nav-link" href="{{ url('/contact') }}">Contact</a>
</li> </li>
</ul> </ul>
<!-- Mobile Actions (Inside Hamburger Menu) --> <!-- Mobile Actions (Inside Hamburger Menu) -->
...@@ -123,6 +123,22 @@ ...@@ -123,6 +123,22 @@
</div> </div>
</div> </div>
<!-- Price Filter Slider -->
<div class="mb-4">
<h6 class="fw-bold mb-3 small text-uppercase tracking-wider text-muted" style="font-size: 0.8rem; letter-spacing: 0.05em;">Price Filter</h6>
<div class="d-flex align-items-center justify-content-between mb-2">
<span class="text-muted small" style="font-size: 0.82rem;">Max Price:</span>
<span class="fw-bold text-primary" id="price-slider-value" style="font-size: 0.95rem; color: #305CDE !important;">₹5,000</span>
</div>
<input type="range" class="form-range" id="price-range-slider" min="0" max="5000" step="50" value="5000" style="accent-color: #305CDE;">
<div class="d-flex justify-content-between text-muted small mt-1" style="font-size: 0.75rem;">
<span>₹0</span>
<span>₹5,000</span>
</div>
</div>
<!-- Categories Area -->
<div class="mt-4 pt-4 border-top">
<!-- Categories Heading --> <!-- Categories Heading -->
<h6 class="fw-bold mb-3 small text-uppercase tracking-wider text-muted" style="font-size: 0.8rem; letter-spacing: 0.05em;">CATEGORIES</h6> <h6 class="fw-bold mb-3 small text-uppercase tracking-wider text-muted" style="font-size: 0.8rem; letter-spacing: 0.05em;">CATEGORIES</h6>
...@@ -137,6 +153,7 @@ ...@@ -137,6 +153,7 @@
<button class="filter-category-btn" data-category="Beach Souvenirs">Beach Souvenirs(4)</button> <button class="filter-category-btn" data-category="Beach Souvenirs">Beach Souvenirs(4)</button>
</div> </div>
</div> </div>
</div>
</aside> </aside>
<!-- Product Grid Area --> <!-- Product Grid Area -->
...@@ -169,10 +186,10 @@ ...@@ -169,10 +186,10 @@
<!-- Grid/List Toggle Icons --> <!-- Grid/List Toggle Icons -->
<div class="d-flex align-items-center gap-2 ms-1"> <div class="d-flex align-items-center gap-2 ms-1">
<div class="icon-toggle-grid"> <div class="icon-toggle-grid active" style="cursor: pointer;">
<i class="bi bi-grid-fill" style="font-size: 1.05rem;"></i> <i class="bi bi-grid-fill" style="font-size: 1.05rem;"></i>
</div> </div>
<div class="icon-toggle-list"> <div class="icon-toggle-list" style="cursor: pointer;">
<i class="bi bi-list" style="font-size: 1.25rem;"></i> <i class="bi bi-list" style="font-size: 1.25rem;"></i>
</div> </div>
</div> </div>
...@@ -223,11 +240,8 @@ ...@@ -223,11 +240,8 @@
<div class="mb-3"> <div class="mb-3">
<img src="footer_logo.png" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;"> <img src="footer_logo.png" alt="VSI MART Logo" style="height: 48px; max-width: 100%; object-fit: contain;">
</div> </div>
<p class="pe-lg-5 text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;"> <p class="text-white-50" style="font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85) !important;">
Handmade seashell crafts and ocean-inspired décor,<br> Handmade seashell crafts and ocean-inspired décor, beautifully crafted by skilled artisans in Chennai. Unique gifts, souvenirs, and beach-style creations made with sustainably sourced natural shells.
beautifully crafted by skilled artisans in Chennai.<br>
Unique gifts, souvenirs, and beach-style creations<br>
made with sustainably sourced natural shells.
</p> </p>
</div> </div>
<!-- Quick Links --> <!-- Quick Links -->
...@@ -237,7 +251,7 @@ ...@@ -237,7 +251,7 @@
<li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li> <li><a href="{{ url('/') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Home</a></li>
<li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li> <li><a href="{{ url('/shop') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Shop</a></li>
<li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li> <li><a href="{{ url('/gallery') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Gallery</a></li>
<li><a href="#contact" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li> <li><a href="{{ url('/contact') }}" class="text-white text-decoration-none opacity-85 hover-opacity-100">Contact</a></li>
<li><a href="#" class="text-white text-decoration-none opacity-85 hover-opacity-100">Login</a></li> <li><a href="#" class="text-white text-decoration-none opacity-85 hover-opacity-100">Login</a></li>
</ul> </ul>
</div> </div>
...@@ -272,7 +286,6 @@ ...@@ -272,7 +286,6 @@
<!-- Bootstrap & jQuery Scripts --> <!-- Bootstrap & jQuery Scripts -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
<!-- Custom JS -->
<script src="main.js"></script> <script src="main.js"></script>
<script> <script>
...@@ -283,6 +296,8 @@ ...@@ -283,6 +296,8 @@
let currentSearch = ''; let currentSearch = '';
let currentSort = 'latest'; let currentSort = 'latest';
let currentPage = 1; let currentPage = 1;
let currentView = 'grid';
let currentMaxPrice = 5000;
if (urlParams.has('category')) { if (urlParams.has('category')) {
// Scroll to the products area on page load // Scroll to the products area on page load
...@@ -291,6 +306,25 @@ ...@@ -291,6 +306,25 @@
}, 600); }, 600);
} }
// View Mode Toggles
$('.icon-toggle-grid').on('click', function() {
if (currentView !== 'grid') {
currentView = 'grid';
$('.icon-toggle-list').removeClass('active');
$(this).addClass('active');
loadProducts(currentPage);
}
});
$('.icon-toggle-list').on('click', function() {
if (currentView !== 'list') {
currentView = 'list';
$('.icon-toggle-grid').removeClass('active');
$(this).addClass('active');
loadProducts(currentPage);
}
});
// Load Categories dynamically // Load Categories dynamically
function loadCategories() { function loadCategories() {
$.ajax({ $.ajax({
...@@ -311,7 +345,7 @@ ...@@ -311,7 +345,7 @@
// Load Products dynamically // Load Products dynamically
function loadProducts(page = 1) { function loadProducts(page = 1) {
currentPage = page; currentPage = page;
const url = `{{ url('/api/products') }}?page=${page}&category=${currentCategory}&search=${encodeURIComponent(currentSearch)}&sort=${currentSort}`; const url = `{{ url('/api/products') }}?page=${page}&category=${currentCategory}&search=${encodeURIComponent(currentSearch)}&sort=${currentSort}&max_price=${currentMaxPrice}`;
$.ajax({ $.ajax({
url: url, url: url,
...@@ -353,6 +387,51 @@ ...@@ -353,6 +387,51 @@
`; `;
} }
if (currentView === 'list') {
html += `
<div class="col-12 mb-4">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm" id="prod-card-${p.id}">
<div class="row g-0 align-items-stretch">
<div class="col-md-4 position-relative" style="min-height: 220px;">
${p.is_bestseller ? '<span class="badge-bestseller">Best Seller</span>' : ''}
<button class="btn-wishlist"><i class="fa-regular fa-heart"></i></button>
<a href="/product-detail/${p.slug}" class="h-100 d-block">
<img src="${imgUrl}" class="object-fit-cover w-100 h-100" alt="${p.name}">
</a>
</div>
<div class="col-md-8">
<div class="card-body d-flex flex-column p-4 h-100 product-card-body">
<h5 class="product-title fw-bold mb-2" style="font-size: 1.15rem; color: #000000; height: auto; overflow: visible;">
<a href="/product-detail/${p.slug}" class="text-decoration-none text-dark">${p.name}</a>
</h5>
<div class="product-rating small mb-2">
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-solid fa-star text-warning"></i>
<i class="fa-regular fa-star text-warning"></i>
<span class="text-muted ms-1">(24)</span>
</div>
<div class="d-flex align-items-center mb-2">
<span class="product-price fw-bold text-dark fs-4 display-price">₹${Math.round(p.price)}</span>
${strikePart}
${saveBadge}
</div>
${discountTag}
<div class="size-select-group my-2 w-100" style="max-width: 400px;">
<span class="text-muted small w-100 mb-1">Size / Variant</span>
${sizeButtons}
</div>
<div class="mt-auto pt-2" style="max-width: 250px;">
<button class="btn btn-custom-primary w-100 rounded-pill text-white btn-add-to-cart-dynamic" data-id="${p.id}" data-name="${p.name}" data-price="${Math.round(p.price)}" data-img="${imgUrl}">Add to cart</button>
</div>
</div>
</div>
</div>
</div>
</div>
`;
} else {
html += ` html += `
<div class="col-lg-4 col-md-6 mb-4"> <div class="col-lg-4 col-md-6 mb-4">
<div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100" id="prod-card-${p.id}"> <div class="card product-card border rounded-3 overflow-hidden shadow-sm h-100" id="prod-card-${p.id}">
...@@ -390,6 +469,7 @@ ...@@ -390,6 +469,7 @@
</div> </div>
</div> </div>
`; `;
}
}); });
$('#shop-product-grid').html(html); $('#shop-product-grid').html(html);
...@@ -471,6 +551,17 @@ ...@@ -471,6 +551,17 @@
card.find('.btn-add-to-cart-dynamic').attr('data-price', newPrice); card.find('.btn-add-to-cart-dynamic').attr('data-price', newPrice);
}); });
// Price range slider change with input update and debounce
$('#price-range-slider').on('input', function() {
const val = $(this).val();
$('#price-slider-value').text('₹' + Number(val).toLocaleString('en-IN'));
currentMaxPrice = val;
});
$('#price-range-slider').on('change', function() {
loadProducts(1);
});
// Initial load // Initial load
loadCategories(); loadCategories();
loadProducts(1); loadProducts(1);
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!-- Bootstrap Icons --> <!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css">
<!-- Custom CSS --> <!-- Custom CSS -->
<link rel="stylesheet" href="{{ asset('styles.css') }}"> <link rel="stylesheet" href="{{ asset('styles.css') }}?v=101">
</head> </head>
<body> <body>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<!-- Navigation Header --> <!-- Navigation Header -->
<nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top"> <nav class="navbar navbar-expand-lg navbar-dark navbar-custom sticky-top">
<div class="container"> <div class="container-fluid px-lg-4">
<a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}"> <a class="navbar-brand text-white fw-bold d-flex align-items-center" href="{{ url('/') }}">
<img src="{{ asset('header_logo.png') }}" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;"> <img src="{{ asset('header_logo.png') }}" alt="VSI Logo" style="height: 45px; margin-right: 10px; object-fit: contain;">
<img src="{{ asset('footer_logo.png') }}" alt="VSI MART" style="height: 24px; object-fit: contain;"> <img src="{{ asset('footer_logo.png') }}" alt="VSI MART" style="height: 24px; object-fit: contain;">
......
...@@ -46,5 +46,8 @@ Route::prefix('admin')->group(function () { ...@@ -46,5 +46,8 @@ Route::prefix('admin')->group(function () {
Route::get('/pincodes', [AdminViewController::class, 'pincodes']); Route::get('/pincodes', [AdminViewController::class, 'pincodes']);
Route::get('/coupons', [AdminViewController::class, 'coupons']); Route::get('/coupons', [AdminViewController::class, 'coupons']);
Route::get('/wishlist', [AdminViewController::class, 'wishlist']); Route::get('/wishlist', [AdminViewController::class, 'wishlist']);
Route::get('/messages', [AdminViewController::class, 'messages']);
Route::put('/messages/{id}/status', [AdminMasterDataController::class, 'updateMessageStatus']);
Route::delete('/messages/{id}', [AdminMasterDataController::class, 'deleteMessage']);
}); });
}); });
...@@ -44,8 +44,10 @@ Route::get('/wishlist', function () { ...@@ -44,8 +44,10 @@ Route::get('/wishlist', function () {
return view('wishlist'); return view('wishlist');
}); });
Route::get('/dashboard', function () { use App\Http\Controllers\ContactController;
return view('dashboard');
}); Route::get('/contact', [ContactController::class, 'showForm']);
Route::post('/contact', [ContactController::class, 'submitForm']);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment