/* ============================================
   Yale Navigation Styles
   File: yale-navigation.css
   Location: wp-content/themes/betheme-child/css/
   ============================================ */

/* Header Container */
.yale-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(13, 13, 13, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(46, 46, 46, 0.5);
}

.yale-header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Left Side: Back Button + Logo */
.yale-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.yale-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.yale-back-btn:hover {
    color: #f2f2f2;
    background: rgba(46, 46, 46, 0.5);
}

.yale-logo-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.yale-logo-link:hover {
    transform: scale(1.05);
}

.yale-logo {
    height: 48px;
    transition: filter 0.3s ease;
}

.yale-logo-link:hover .yale-logo {
    filter: brightness(1.1);
}

.yale-external-icon {
    color: #9ca3af;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yale-logo-link:hover .yale-external-icon {
    opacity: 1;
}

/* Desktop Navigation */
.yale-nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .yale-nav-desktop {
        display: flex;
    }
}

/* Home Button (Gold) */
.yale-nav-home {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    background: hsl(45, 100%, 51%);
    color: #0d0d0d;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.yale-nav-home:hover {
    background: hsl(45, 100%, 61%);
    box-shadow: 0 0 20px hsla(45, 100%, 51%, 0.4);
    transform: translateY(-1px);
}

/* Navigation Links */
.yale-nav-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.875rem;
}

.yale-nav-link:hover {
    color: #f2f2f2;
}

/* Products Dropdown */
.yale-dropdown {
    position: relative;
}

.yale-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.yale-dropdown-trigger:hover {
    color: #f2f2f2;
}

.yale-dropdown-content {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    width: 288px;
    background: rgb(13, 13, 13);
    border: 1px solid rgb(46, 46, 46);
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.yale-dropdown:hover .yale-dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.yale-dropdown-section {
    padding: 0.5rem;
}

.yale-dropdown-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    color: #f2f2f2;
    font-size: 0.875rem;
    font-weight: 600;
}

.yale-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.yale-dropdown-item:hover {
    background: rgb(46, 46, 46);
}

.yale-product-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid rgb(46, 46, 46);
    transition: all 0.3s ease;
}

.yale-dropdown-item:hover .yale-product-img {
    transform: scale(1.1);
    border-color: hsl(45, 100%, 51%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.yale-product-info {
    display: flex;
    flex-direction: column;
}

.yale-product-name {
    color: #f2f2f2;
    font-size: 0.875rem;
    font-weight: 500;
}

.yale-product-desc {
    color: #9ca3af;
    font-size: 0.75rem;
}

.yale-dropdown-divider {
    height: 1px;
    background: rgb(46, 46, 46);
    margin: 0.5rem 0;
}

/* Mobile Menu Toggle */
.yale-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

@media (min-width: 768px) {
    .yale-mobile-toggle {
        display: none;
    }
}

.yale-hamburger {
    position: relative;
    width: 24px;
    height: 2px;
    background: #9ca3af;
    transition: all 0.3s ease;
}

.yale-hamburger::before,
.yale-hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: #9ca3af;
    transition: all 0.3s ease;
}

.yale-hamburger::before {
    top: -8px;
}

.yale-hamburger::after {
    bottom: -8px;
}

.yale-mobile-toggle.active .yale-hamburger {
    background: transparent;
}

.yale-mobile-toggle.active .yale-hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.yale-mobile-toggle.active .yale-hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Mobile Navigation */
.yale-nav-mobile {
    display: none;
    flex-direction: column;
    background: rgb(13, 13, 13);
    border-top: 1px solid rgb(46, 46, 46);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

@media (max-width: 767px) {
    .yale-nav-mobile {
        display: flex;
    }
}

.yale-nav-mobile.active {
    max-height: 800px;
    padding: 0.5rem 0 0.75rem;
}

.yale-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.yale-mobile-link:hover {
    color: #f2f2f2;
    background: rgb(46, 46, 46);
}

/* Mobile Products Section */
.yale-mobile-products {
    border-top: 1px solid rgb(46, 46, 46);
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.yale-mobile-products-header {
    padding: 0.5rem 1.5rem;
    color: #f2f2f2;
    font-size: 0.875rem;
    font-weight: 600;
}

.yale-mobile-category {
    margin-top: 0.5rem;
}

.yale-mobile-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    color: #d1d5db;
    font-size: 0.875rem;
}

.yale-mobile-product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 3rem;
    text-decoration: none;
    transition: background 0.3s ease;
}

.yale-mobile-product-item:hover {
    background: rgb(46, 46, 46);
}

.yale-mobile-product-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid rgb(46, 46, 46);
}

.yale-mobile-product-item > div {
    display: flex;
    flex-direction: column;
}

.yale-mobile-product-name {
    color: #f2f2f2;
    font-size: 0.875rem;
}

.yale-mobile-product-desc {
    color: #9ca3af;
    font-size: 0.75rem;
}

/* Add spacing to body content to account for fixed header */
body {
    padding-top: 80px;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Accessibility improvements */
.yale-back-btn:focus,
.yale-mobile-toggle:focus,
.yale-dropdown-trigger:focus {
    outline: 2px solid hsl(45, 100%, 51%);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .yale-header {
        position: static;
        background: white;
        border-bottom: 1px solid #ddd;
    }
    
    .yale-nav-mobile,
    .yale-mobile-toggle {
        display: none !important;
    }
}