@extends('layouts.mobile')
@section('meta_title', ($currentCategory?->name ?? 'Browse Categories') . ' - Online Shopping | Gletra')
@section('meta_description', $currentCategory
? 'Shop all products in ' . $currentCategory->name . ' on Gletra Mobile.'
: 'Discover a wide range of categories including Fashion, Electronics, Home Decor and more on Gletra Mobile.')
@section('content')
@php
$isCategoryProductsPage = request()->routeIs('mobile.category') && isset($products) && $currentCategory;
$showingProducts = isset($products) && ! $isCategoryProductsPage;
$isCategoryBrowsePage = ! $showingProducts && ! $isCategoryProductsPage;
$activeParentId = null;
if ($currentCategory && $isCategoryBrowsePage) {
$activeParentId = $currentCategory->parent_id ?? $currentCategory->id;
}
@endphp
@if($isCategoryProductsPage)