/* Navigation UI Redesign */
.nav-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-logo img {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.nav-menu-wrapper {
    margin-left: 20px;
}

.menu-toggle-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1.5px;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #FFD700;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 20px;
}

.hamburger-icon span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle-btn:hover .hamburger-icon span {
    background: #FFD700;
}

/* ================================
   NAV BAR — Transparent Category Bar (overlays hero)
   ================================ */

.navbar {
    width: 100%;
    z-index: 100;
    padding: 5px 0;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

/* Home page override: transparent navbar over hero */
.home-page .site-header {
    position: absolute;
    background: transparent;
    box-shadow: none;
}

.home-page .site-header.scrolled {
    position: sticky;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.home-page .navbar {
    background: transparent;
    border-bottom: none;
}

.home-page .site-header.scrolled .navbar {
    background: #fff;
}

.navbar.scrolled .nav-logo img {
    height: 32px;
}

.navbar.scrolled .menu-toggle-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}

.navbar.scrolled .hamburger-icon span {
    background: #1a1a1a;
}

.navbar.scrolled .nav-cat-link {
    color: #1a1a1a;
}

.navbar.scrolled .nav-icon-btn-v2 {
    color: #1a1a1a;
}

.navbar.scrolled .categories-btn-v2 {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar.scrolled .nav-cat-link {
    color: #636366;
}

.navbar.scrolled .nav-cat-link:hover {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.04);
}

.navbar.scrolled .nav-cat-link::after {
    background: var(--accent-primary, #B8860B);
}

.navbar.scrolled .nav-icon-btn-v2 {
    color: #1C1C1E;
}

.navbar.scrolled .mobile-hamburger {
    color: #1C1C1E;
}

/* Solid navbar for non-hero pages (catalog, product details, etc.) */
.navbar.navbar-solid {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.navbar-solid .categories-btn-v2 {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    text-shadow: none;
}

.navbar-solid .categories-btn-v2:hover,
.navbar-solid .categories-btn-v2.active {
    background: rgba(0, 0, 0, 0.1);
    color: #1C1C1E;
}

.navbar-solid .nav-cat-link {
    color: #636366;
    text-shadow: none;
}

.navbar-solid .nav-cat-link:hover {
    color: #1C1C1E;
    background: rgba(0, 0, 0, 0.04);
}

.navbar-solid .nav-cat-link::after {
    background: var(--accent-primary, #B8860B);
}

.navbar-solid .nav-icon-btn-v2 {
    color: #1C1C1E;
    text-shadow: none;
}

.navbar-solid .mobile-hamburger {
    color: #1C1C1E;
    text-shadow: none;
}

.nav-content-v2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    height: 48px;
}

/* Branding — hidden, logo in top bar */
.logo {
    display: none;
}

/* Category Button */
.categories-btn-v2 {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 10px 20px;
    border-radius: 0;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 48px;
    letter-spacing: 1px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.categories-btn-v2:hover,
.categories-btn-v2.active {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.categories-btn-v2::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 60px;
    background: transparent;
    z-index: 10000;
}

/* ---- Inline Category Links (JamesEdition style) ---- */
.nav-cat-links {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 48px;
}

.nav-cat-link {
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.3px;
    text-decoration: none;
    padding: 0 14px;
    height: 48px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-cat-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-cat-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s ease;
}

.nav-cat-link:hover::after {
    width: 60%;
}

/* ---- Nav Links V2 (Mobile slide-out) ---- */
.nav-links-v2 {
    display: none;
}

.nav-link-v2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    padding: 12px 0;
    text-decoration: none;
    display: block;
}

.nav-link-v2:hover {
    color: var(--accent-primary);
}

/* Mobile Contact Info (Inside Menu) */
.mobile-contact-info {
    display: none;
    margin-top: var(--space-6, 48px);
    padding-top: var(--space-6, 48px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    flex-direction: column;
    gap: var(--space-3, 24px);
}

/* Actions */
.nav-actions-v2 {
    display: flex;
    align-items: center;
    gap: 0;
    height: 48px;
}

/* ---- Nav Search V2 ---- */
.nav-search-v2 {
    flex: 0 0 320px;
    margin: 0 20px;
    position: relative;
    z-index: 10;
}

.search-form-v2 {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 30px;
    padding: 4px 6px 4px 18px;
    transition: all 0.3s ease;
}

.navbar.scrolled .search-form-v2,
.navbar.navbar-solid .search-form-v2 {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
}

.search-form-v2:focus-within {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(184, 134, 11, 0.15);
}

.navbar.scrolled .search-form-v2:focus-within,
.navbar.navbar-solid .search-form-v2:focus-within {
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.search-input-v2 {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 0;
    outline: none;
    width: 100%;
}

.navbar.scrolled .search-input-v2,
.navbar.navbar-solid .search-input-v2 {
    color: #1c1c1e;
}

.search-input-v2::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar.scrolled .search-input-v2::placeholder,
.navbar.navbar-solid .search-input-v2::placeholder {
    color: #8e8e93;
}

.search-submit-v2 {
    background: var(--accent-primary);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-submit-v2:hover {
    transform: scale(1.1);
    background: var(--accent-secondary);
}

@media (max-width: 1200px) {
    .nav-search-v2 {
        flex: 0 0 240px;
    }
}

@media (max-width: 992px) {
    .nav-search-v2 {
        display: none;
        /* Hide in mobile navbar, will be in mobile menu if needed */
    }
}

.nav-icon-btn-v2 {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.nav-icon-btn-v2:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.theme-toggle-wrapper {
    display: none;
}

.cart-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #d32f2f;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-hamburger {
    display: none;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 16px;
    height: 48px;
    align-items: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* ================================
   RESPONSIVE
   ================================ */

@media (max-width: 992px) {
    .navbar {
        padding: 10px 0;
    }

    .nav-content-v2 {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .nav-logo {
        display: block;
        flex: 0 0 auto;
    }

    .nav-logo img {
        height: 28px;
    }

    /* Hide cart on mobile header as it's in the bottom nav */
    .nav-actions-v2 {
        display: none !important;
    }

    /* Move menu toggle to far right */
    .nav-menu-wrapper {
        margin-left: auto;
    }

    .menu-toggle-btn {
        padding: 8px;
        background: transparent;
        border: none;
        gap: 0;
        display: flex;
        align-items: center;
    }

    .menu-toggle-btn .btn-text {
        display: none;
    }

    .hamburger-icon {
        width: 24px;
        height: 18px;
        margin: 0;
    }

    .hamburger-icon span {
        height: 2px;
        background: #111;
    }

    .site-header.scrolled .hamburger-icon span {
        background: #111;
    }
}

.header-top-bar {
    height: 64px;
    overflow: hidden;
    /* Prevent wide banner from pushing width */
    width: 100%;
    max-width: 100vw;
}

.header-banner-col {
    overflow: hidden;
    max-width: 100%;
}

.header-logo-col {
    flex: 0 0 110px;
    padding: 4px 8px;
}

.header-logo-col img {
    height: 56px;
}

.banner-part-name {
    font-size: 1.3rem;
}

.banner-prefix {
    font-size: 0.8rem;
}

.banner-specials-tag {
    display: none;
}

#bannerPartImg {
    height: 56px;
    max-width: 120px;
    /* Reset complex transforms for mobile stability */
    transform: none !important;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

#headerBannerInner {
    padding: 0 16px;
}

.header-contacts-col,
.header-actions-col {
    flex: 0 0 auto;
    padding: 0 8px;
    gap: 6px;
}

.header-actions-col {
    border-left: none;
}

.hdr-contact-btn,
.hdr-action-btn {
    width: 30px;
    height: 30px;
    font-size: 0.8rem;
}

.mobile-hamburger {
    display: flex;
    padding: 0;
    height: 30px;
    width: 30px;
    justify-content: center;
}

.nav-links-v2 {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    height: 100vh;
    background: #FFFFFF;
    flex-direction: column;
    padding: 80px 24px;
    transform: translateX(100%);
    visibility: hidden;
    /* Prevent horizontal overflow trigger */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
    z-index: 2000;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
}

.nav-links-v2.active {
    transform: translateX(0);
    visibility: visible;
}


@media (max-width: 992px) {

    /* ── Hide contact column only — keep actions visible (cart, hamburger, filter) ── */
    .header-contacts-col {
        display: none !important;
    }

    /* ── Hide nav category links bar on mobile ── */
    .nav-cat-links {
        display: none !important;
    }

    /* ── Let banner fill the remaining header width ── */
    .header-banner-col {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .banner-specials-tag {
        display: none;
    }
}

/* ── Mobile Bottom Navigation ──────────────────── */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 65px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 9000;
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8e8e93;
    background: none;
    border: none;
    gap: 4px;
    padding: 8px 0;
    flex: 1;
    transition: all 0.2s ease;
    cursor: pointer;
}

.bottom-nav-item i {
    font-size: 1.2rem;
}

.bottom-nav-item span {
    font-size: 0.7rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.bottom-nav-item.active {
    color: var(--accent-primary, #B8860B);
}

.bottom-cart-icon {
    position: relative;
}

.bottom-cart-icon .cart-badge {
    top: -8px;
    right: -10px;
}

@media (max-width: 992px) {
    .mobile-bottom-nav {
        display: flex;
    }

    /* Offset footer padding so it doesn't get covered */
    body {
        padding-bottom: 70px;
    }

    /* Reposition FAB WhatsApp if it conflicts */
    .fab-whatsapp {
        bottom: 85px;
    }
}

/* Fix for Catalog Page Mobile Cart Visibility */
@media (max-width: 992px) {
    .header-actions-col {
        position: relative;
        right: 0;
        top: 0;
    }

    .catalog-sidebar {
        z-index: 9500;
    }
}

/* ── Floating WhatsApp Button ──────────────────── */
.fab-whatsapp {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8000;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.25s ease;
    animation: fab-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 1s both;
}

.fab-whatsapp:hover {
    transform: scale(1.12) translateY(-3px);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55);
}

/* Pulse ring */
.fab-whatsapp::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: fab-pulse 2.5s ease infinite;
}

@keyframes fab-pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }

    60% {
        transform: scale(1.3);
        opacity: 0;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

@media (max-width: 992px) {
    .fab-whatsapp {
        display: none !important;
    }
}

@keyframes fab-pop {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Show on all screens — hide on desktop if preferred */
@media (min-width: 993px) {
    .fab-whatsapp {
        /* Still visible on desktop but subtler */
        width: 52px;
        height: 52px;
        font-size: 1.4rem;
        bottom: 32px;
        right: 32px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}