<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?= esc($title ?? 'APA Sales | Luxury Sterling Silver Jewelry') ?></title>

    <!-- Bootstrap 5.3.3 -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
    <!-- 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=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap" rel="stylesheet">
    <!-- AOS -->
    <link href="https://unpkg.com/aos@2.3.4/dist/aos.css" rel="stylesheet">

    <style>
        :root {
            --gold: #b4975a;
            --gold-light: #d4bd83;
            --gold-hover: #967c42;
            --black: #181818;
            --black-soft: #242424;
            --text: #333333;
            --muted: #777777;
            --border: #e7e3db;
            --light: #f8f7f4;
        }

        /* Top Announcement Bar */
        .site-topbar {
            background-color: var(--black);
            color: #d4bd83;
            font-size: 11px;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            padding: 8px 0;
            text-align: center;
            font-weight: 500;
            font-family: "Inter", sans-serif;
        }

        /* Main Luxury Navbar */
        .site-navbar {
            background: #ffffff;
            border-bottom: 1px solid var(--border);
            padding: 14px 0;
            position: sticky;
            top: 0;
            z-index: 1050;
            box-shadow: 0 4px 20px rgba(0,0,0,0.03);
            transition: all 0.3s ease;
        }

        .site-brand {
            font-family: "Cormorant Garamond", serif;
            font-size: 28px;
            font-weight: 700;
            letter-spacing: 3px;
            color: var(--black);
            text-decoration: none;
            display: flex;
            flex-direction: column;
            line-height: 1.1;
        }

        .site-brand span {
            font-size: 9px;
            letter-spacing: 4px;
            text-transform: uppercase;
            color: var(--gold);
            font-family: "Inter", sans-serif;
            font-weight: 600;
        }

        .site-nav-links .nav-link {
            font-family: "Inter", sans-serif;
            font-size: 13px;
            font-weight: 500;
            letter-spacing: 1.5px;
            text-transform: uppercase;
            color: var(--black);
            padding: 8px 16px !important;
            transition: color 0.25s ease;
            position: relative;
        }

        .site-nav-links .nav-link:hover,
        .site-nav-links .nav-link.active {
            color: var(--gold) !important;
        }

        .site-nav-links .nav-link::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 16px;
            right: 16px;
            height: 2px;
            background-color: var(--gold);
            transform: scaleX(0);
            transition: transform 0.25s ease;
        }

        .site-nav-links .nav-link:hover::after,
        .site-nav-links .nav-link.active::after {
            transform: scaleX(1);
        }

        .site-nav-icons {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .site-icon-btn {
            color: var(--black);
            font-size: 18px;
            position: relative;
            text-decoration: none;
            transition: color 0.2s ease;
            background: none;
            border: none;
            padding: 4px;
        }

        .site-icon-btn:hover {
            color: var(--gold);
        }

        .site-icon-badge {
            position: absolute;
            top: -4px;
            right: -6px;
            background: var(--gold);
            color: #ffffff;
            font-size: 9px;
            font-weight: 600;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* Mobile Menu */
        .navbar-toggler {
            border: 1px solid var(--border);
            padding: 6px 10px;
        }
        .navbar-toggler:focus {
            box-shadow: none;
        }
    </style>
</head>
<body>

    <!-- TOP ANNOUNCEMENT BAR -->
    <div class="site-topbar">
        <div class="container d-flex justify-content-between align-items-center">
            <span class="d-none d-md-inline"><i class="bi bi-shield-check me-1"></i> 100% Certified 925 Sterling Silver</span>
            <span class="mx-auto mx-md-0"><i class="bi bi-truck me-1"></i> Complimentary Insured Shipping On All Orders</span>
            <span class="d-none d-md-inline"><i class="bi bi-award me-1"></i> Italian Craftsmanship</span>
        </div>
    </div>

    <!-- MAIN NAVIGATION BAR -->
    <nav class="navbar navbar-expand-lg site-navbar">
        <div class="container">
            <!-- Brand Logo -->
            <a class="navbar-brand site-brand" href="<?= base_url('product') ?>">
                APA SALES
                <span>Sterling Silver</span>
            </a>

            <!-- Mobile Toggle Button -->
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
                <i class="bi bi-list fs-4"></i>
            </button>

            <!-- Navigation Links -->
            <div class="collapse navbar-collapse" id="navbarContent">
                <?php $current_uri = uri_string(); ?>
                <ul class="navbar-nav mx-auto site-nav-links">
                    <li class="nav-item">
                        <a class="nav-link <?= ($current_uri == '' || $current_uri == 'product' || $current_uri == 'products') ? 'active' : '' ?>" href="<?= base_url('product') ?>">Products</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?= ($current_uri == 'chain' || $current_uri == 'chain-styles') ? 'active' : '' ?>" href="<?= base_url('chain') ?>">Chain Styles</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?= ($current_uri == 'detail' || $current_uri == 'product-detail' || $current_uri == 'product/detail') ? 'active' : '' ?>" href="<?= base_url('detail') ?>">Product Detail</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?= ($current_uri == 'about' || $current_uri == 'about' || $current_uri == 'about') ? 'active' : '' ?>" href="<?= base_url('about') ?>">About</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link <?= ($current_uri == 'contact' || $current_uri == 'contact' || $current_uri == 'contact') ? 'active' : '' ?>" href="<?= base_url('contact') ?>">Contact</a>
                    </li>
                    <!--<li class="nav-item">-->
                    <!--    <a class="nav-link <?= ($current_uri == 'forgot' || $current_uri == 'forgot' || $current_uri == 'forgot') ? 'active' : '' ?>" href="<?= base_url('forgot') ?>">Product Detail</a>-->
                    <!--</li>-->
                </ul>

                <!-- Action Icons -->
                <div class="site-nav-icons mt-3 mt-lg-0">
                    <a href="javascript:void(0);" class="site-icon-btn" title="Search"><i class="bi bi-search"></i></a>
                    <a href="javascript:void(0);" class="site-icon-btn" title="Wishlist">
                        <i class="bi bi-heart"></i>
                        <span class="site-icon-badge">0</span>
                    </a>
                    <a href="javascript:void(0);" class="site-icon-btn" title="Shopping Cart">
                        <i class="bi bi-bag"></i>
                        <span class="site-icon-badge">0</span>
                    </a>
                </div>
            </div>
        </div>
    </nav>
