/**
 * Dyfonus Apple-Style Navigation System
 * Version: 3.0.0 - Mobile-first responsive navigation
 * 
 * Features:
 * - Apple.com-inspired design
 * - Mobile-first approach
 * - Full-screen mobile menu with slide animation
 * - Smooth 60fps transitions
 * - Dark mode support
 * - Accessibility compliant
 */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Colors - Light Mode */
    --dyfo-bg-primary: #ffffff;
    --dyfo-bg-secondary: #f5f5f7;
    --dyfo-text-primary: #1d1d1f;
    --dyfo-text-secondary: #6e6e73;
    --dyfo-border-color: rgba(0, 0, 0, 0.1);
    --dyfo-accent: #0066cc;
    --dyfo-accent-hover: #0055b3;
    
    /* Dimensions */
    --dyfo-header-height: 48px;
    
    /* Transitions */
    --dyfo-menu-transition: 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    --dyfo-fast-transition: 0.2s ease;
    
    /* Cart glow effects */
    --cart-glow-color: rgba(239, 68, 68, 0.6);
    --cart-glow-size: 8px;
}

/* Dark Mode */
[data-theme="dark"],
.dark-mode {
    --dyfo-bg-primary: #000000;
    --dyfo-bg-secondary: #1d1d1f;
    --dyfo-text-primary: #f5f5f7;
    --dyfo-text-secondary: #a1a1a6;
    --dyfo-border-color: rgba(255, 255, 255, 0.1);
}

/* ============================================
   HIDE KADENCE NATIVE HEADERS
   ============================================ */
#mobile-header,
.site-mobile-header-wrap,
#masthead .site-header-wrap,
.site-header-row,
.site-header,
.woocommerce-page .site-header,
.woocommerce-page #masthead,
.woocommerce-page .site-header-wrap,
.woocommerce-archive .site-header,
.woocommerce-archive #masthead {
    display: none !important;
}

/* Ensure header shows on all WooCommerce pages */
.woocommerce-page .dyfo-header,
.woocommerce-archive .dyfo-header,
.single-product .dyfo-header,
.post-type-archive-product .dyfo-header,
.tax-product_cat .dyfo-header,
.tax-product_tag .dyfo-header {
    display: block !important;
    position: fixed !important;
    z-index: 99999 !important;
}

/* Ensure body has proper padding for fixed header on all pages */
body,
.woocommerce-page,
.woocommerce-archive,
.single-product,
.post-type-archive-product {
    padding-top: var(--dyfo-header-height) !important;
}

/* Hide any WooCommerce default headers */
.woocommerce-page #page-header,
.woocommerce-page .page-header,
.woocommerce-page .entry-header,
.woocommerce-archive #page-header,
.woocommerce-archive .page-header {
    display: none !important;
}

/* Hide WooCommerce breadcrumbs */
.woocommerce-page .woocommerce-breadcrumb,
.woocommerce-archive .woocommerce-breadcrumb,
.single-product .woocommerce-breadcrumb {
    display: none !important;
}

/* Hide WooCommerce result count and ordering on archive pages */
.woocommerce-page .woocommerce-result-count,
.woocommerce-page .woocommerce-ordering,
.woocommerce-archive .woocommerce-result-count,
.woocommerce-archive .woocommerce-ordering {
    display: none !important;
}

/* Hide default WooCommerce page titles */
.woocommerce-page .page-title,
.woocommerce-archive .page-title {
    display: none !important;
}

/* Ensure custom footer shows on all WooCommerce pages */
.woocommerce-page .dyfo-custom-footer,
.woocommerce-archive .dyfo-custom-footer,
.single-product .dyfo-custom-footer,
.cart .dyfo-custom-footer,
.checkout .dyfo-custom-footer,
.my-account .dyfo-custom-footer {
    display: block !important;
    position: relative;
    width: 100%;
    clear: both;
}

/* Hide any WooCommerce footers */
.woocommerce-page .site-footer,
.woocommerce-page footer,
.woocommerce-archive .site-footer,
.woocommerce-archive footer {
    display: none !important;
}

/* Ensure body padding accounts for fixed header on all WooCommerce pages */
.woocommerce-page body,
.woocommerce-archive body,
.single-product body,
.cart body,
.checkout body,
.my-account body {
    padding-top: var(--dyfo-header-height) !important;
    box-sizing: border-box;
}

/* Fix for cart and checkout pages - ensure no duplicate headers */
.woocommerce-cart .dyfo-header,
.woocommerce-checkout .dyfo-header,
.woocommerce-account .dyfo-header {
    display: block !important;
}

/* Ensure main content area has proper spacing */
.woocommerce-page .site-main,
.woocommerce-archive .site-main,
.single-product .site-main {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ============================================
   MAIN HEADER
   ============================================ */
.dyfo-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--dyfo-border-color);
    height: var(--dyfo-header-height);
    transition: background-color var(--dyfo-fast-transition);
}

[data-theme="dark"] .dyfo-header,
.dark-mode .dyfo-header {
    background: rgba(29, 29, 31, 0.8);
}

/* WordPress Admin Bar adjustment */
body.admin-bar .dyfo-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .dyfo-header {
        top: 46px;
    }
}

.dyfo-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
    height: 100%;
}

/* Page content offset */
body {
    padding-top: var(--dyfo-header-height) !important;
}

body.admin-bar {
    padding-top: calc(var(--dyfo-header-height) + 32px) !important;
}

@media (max-width: 782px) {
    body.admin-bar {
        padding-top: calc(var(--dyfo-header-height) + 46px) !important;
    }
}

/* ============================================
   LOGO
   ============================================ */
.dyfo-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dyfo-text-primary);
    font-weight: 600;
    font-size: 18px;
    gap: 8px;
    flex-shrink: 0;
}

.dyfo-logo-img {
    height: 28px;
    width: auto;
    object-fit: contain;
}

.dyfo-logo-text {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* ============================================
   DESKTOP NAVIGATION
   ============================================ */
.dyfo-nav-desktop {
    display: none;
}

.dyfo-nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.dyfo-nav-item {
    position: relative;
}

.dyfo-nav-btn {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--dyfo-text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--dyfo-fast-transition) cubic-bezier(0.32, 0.72, 0, 1);
    opacity: 0.8;
    font-family: inherit;
    border-radius: 6px;
}

.dyfo-nav-btn:hover,
.dyfo-nav-btn:focus {
    opacity: 1;
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.dyfo-nav-btn:active {
    transform: translateY(0);
}

.dyfo-nav-btn.active {
    opacity: 1;
    background: rgba(99, 102, 241, 0.12);
    color: var(--dyfo-accent);
}

/* WIP Badge */
.dyfo-wip-badge {
    display: inline-block;
    padding: 2px 6px;
    margin-left: 6px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-radius: 4px;
    vertical-align: middle;
}

.dyfo-wip-badge-small {
    padding: 1px 4px;
    margin-left: 4px;
    font-size: 7px;
}

[data-theme="dark"] .dyfo-wip-badge,
.dark-mode .dyfo-wip-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #1f2937;
}

/* Navigation link style (for direct links like Shop) */
.dyfo-nav-link {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    color: var(--dyfo-text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color var(--dyfo-fast-transition), opacity var(--dyfo-fast-transition);
    opacity: 0.8;
    font-family: inherit;
}

.dyfo-nav-link:hover,
.dyfo-nav-link:focus {
    opacity: 1;
    color: var(--dyfo-text-primary);
}

/* ============================================
   HEADER ACTIONS (Right side)
   ============================================ */
.dyfo-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dyfo-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--dyfo-text-primary);
    opacity: 0.8;
    transition: all var(--dyfo-fast-transition) cubic-bezier(0.32, 0.72, 0, 1);
    border-radius: 50%;
    text-decoration: none;
    position: relative;
}

.dyfo-action-btn:hover,
.dyfo-action-btn:focus {
    opacity: 1;
    transform: scale(1.08);
    background: rgba(99, 102, 241, 0.08);
}

.dyfo-action-btn:active {
    transform: scale(0.95);
}

.dyfo-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Theme toggle icons */
.dyfo-theme-btn .dyfo-moon-icon {
    display: none;
}

[data-theme="dark"] .dyfo-theme-btn .dyfo-sun-icon,
.dark-mode .dyfo-theme-btn .dyfo-sun-icon {
    display: none;
}

[data-theme="dark"] .dyfo-theme-btn .dyfo-moon-icon,
.dark-mode .dyfo-theme-btn .dyfo-moon-icon {
    display: block;
}

/* Cart count badge */
.dyfo-cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 var(--cart-glow-size) var(--cart-glow-color);
    animation: dyfo-cart-pulse 2s ease-in-out infinite;
    z-index: 10;
}

@keyframes dyfo-cart-pulse {
    0%, 100% {
        box-shadow: 0 0 calc(var(--cart-glow-size) * 0.8) var(--cart-glow-color);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 calc(var(--cart-glow-size) * 1.5) var(--cart-glow-color);
        transform: scale(1.05);
    }
}

/* ============================================
   HAMBURGER BUTTON
   ============================================ */
.dyfo-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 4px;
    padding: 10px;
}

.dyfo-hamburger-line {
    display: block;
    width: 17px;
    height: 1px;
    background: var(--dyfo-text-primary);
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

/* Hamburger to X animation */
.dyfo-hamburger.active .dyfo-hamburger-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

.dyfo-hamburger.active .dyfo-hamburger-line:nth-child(2) {
    opacity: 0;
}

.dyfo-hamburger.active .dyfo-hamburger-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU OVERLAY
   ============================================ */
.dyfo-mobile-menu {
    position: fixed;
    top: var(--dyfo-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9998;
    background: var(--dyfo-bg-primary);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dyfo-menu-transition), 
                opacity 0.3s ease, 
                visibility 0s 0.4s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dyfo-mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--dyfo-menu-transition), 
                opacity 0.3s ease, 
                visibility 0s 0s;
}

body.admin-bar .dyfo-mobile-menu {
    top: calc(var(--dyfo-header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .dyfo-mobile-menu {
        top: calc(var(--dyfo-header-height) + 46px);
    }
}

.dyfo-mobile-menu-inner {
    padding: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Mobile Navigation List */
.dyfo-mobile-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--dyfo-border-color);
}

.dyfo-mobile-nav-item {
    border-top: 1px solid var(--dyfo-border-color);
}

.dyfo-mobile-nav-item:first-child {
    border-top: none;
}

.dyfo-mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 50px;
    height: 56px;
    font-size: 17px;
    font-weight: 600;
    color: var(--dyfo-text-primary);
    text-decoration: none;
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: background var(--dyfo-fast-transition);
    font-family: inherit;
}

.dyfo-mobile-nav-link:hover,
.dyfo-mobile-nav-link:focus {
    background: var(--dyfo-bg-secondary);
}

.dyfo-mobile-nav-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.3;
    flex-shrink: 0;
}

/* Mobile Menu Footer */
.dyfo-mobile-menu-footer {
    padding: 20px 50px;
    margin-top: auto;
}

.dyfo-mobile-menu-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--dyfo-bg-secondary);
    border-radius: 10px;
    margin-bottom: 20px;
}

.dyfo-mobile-menu-search svg {
    width: 18px;
    height: 18px;
    opacity: 0.5;
    flex-shrink: 0;
}

.dyfo-mobile-menu-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 17px;
    color: var(--dyfo-text-primary);
    outline: none;
    font-family: inherit;
    min-width: 0;
}

.dyfo-mobile-menu-search input::placeholder {
    color: var(--dyfo-text-secondary);
}

.dyfo-mobile-menu-account {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 17px;
    color: var(--dyfo-text-primary);
    text-decoration: none;
}

.dyfo-mobile-menu-account svg {
    width: 18px;
    height: 18px;
}

.dyfo-mobile-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Mobile Theme Switch */
.dyfo-mobile-theme-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
}

.dyfo-theme-switch-track {
    width: 51px;
    height: 31px;
    background: #e9e9eb;
    border-radius: 31px;
    position: relative;
    transition: background 0.3s;
    flex-shrink: 0;
}

[data-theme="dark"] .dyfo-theme-switch-track,
.dark-mode .dyfo-theme-switch-track {
    background: #34c759;
}

.dyfo-theme-switch-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

[data-theme="dark"] .dyfo-theme-switch-knob,
.dark-mode .dyfo-theme-switch-knob {
    transform: translateX(20px);
}

.dyfo-mobile-theme-switch span {
    font-size: 17px;
    color: var(--dyfo-text-primary);
}

/* ============================================
   SUB-MENUS (Mobile - Slide from right)
   ============================================ */
.dyfo-submenu {
    position: fixed;
    top: var(--dyfo-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: var(--dyfo-bg-primary);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--dyfo-menu-transition), 
                opacity 0.3s ease, 
                visibility 0s 0.4s;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dyfo-submenu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    transition: transform var(--dyfo-menu-transition), 
                opacity 0.3s ease, 
                visibility 0s 0s;
}

body.admin-bar .dyfo-submenu {
    top: calc(var(--dyfo-header-height) + 32px);
}

@media (max-width: 782px) {
    body.admin-bar .dyfo-submenu {
        top: calc(var(--dyfo-header-height) + 46px);
    }
}

.dyfo-submenu-header {
    display: flex;
    align-items: center;
    padding: 0 50px;
    height: 56px;
    border-bottom: 1px solid var(--dyfo-border-color);
}

.dyfo-submenu-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    font-size: 17px;
    font-weight: 600;
    color: var(--dyfo-text-secondary);
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.dyfo-submenu-back svg {
    width: 14px;
    height: 14px;
}

.dyfo-submenu-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dyfo-submenu-item a {
    display: block;
    padding: 16px 50px;
    font-size: 17px;
    color: var(--dyfo-text-primary);
    text-decoration: none;
    transition: background var(--dyfo-fast-transition);
}

.dyfo-submenu-item a:hover,
.dyfo-submenu-item a:focus {
    background: var(--dyfo-bg-secondary);
}

.dyfo-submenu-view-all {
    display: block;
    padding: 20px 50px;
    font-size: 17px;
    color: var(--dyfo-accent);
    text-decoration: none;
    border-top: 1px solid var(--dyfo-border-color);
    margin-top: 20px;
}

.dyfo-submenu-view-all:hover {
    text-decoration: underline;
}

/* ============================================
   DESKTOP DROPDOWN
   ============================================ */
.dyfo-desktop-dropdown {
    position: fixed;
    top: var(--dyfo-header-height);
    left: 0;
    right: 0;
    z-index: 9997;
    background: var(--dyfo-bg-primary);
    border-bottom: 1px solid var(--dyfo-border-color);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.3s ease,
                visibility 0s 0.3s;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.dyfo-desktop-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
                opacity 0.3s ease,
                visibility 0s 0s;
}

body.admin-bar .dyfo-desktop-dropdown {
    top: calc(var(--dyfo-header-height) + 32px);
}

.dyfo-dropdown-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 32px 22px;
}

.dyfo-dropdown-section {
    display: none;
}

.dyfo-dropdown-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dyfo-dropdown-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    justify-content: center;
}

.dyfo-dropdown-list li a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--dyfo-text-secondary);
    text-decoration: none;
    transition: all var(--dyfo-fast-transition) cubic-bezier(0.32, 0.72, 0, 1);
    position: relative;
    border-radius: 6px;
    border: 1px solid transparent;
}

.dyfo-dropdown-list li a:hover,
.dyfo-dropdown-list li a:focus {
    color: var(--dyfo-accent);
    transform: translateX(4px);
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid var(--dyfo-accent);
    border-radius: 0 6px 6px 0;
}

.dyfo-dropdown-list li a::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--dyfo-accent);
    transition: width var(--dyfo-fast-transition);
}

.dyfo-dropdown-list li a:hover::after,
.dyfo-dropdown-list li a:focus::after {
    width: 0; /* Hide underline when using border-left accent */
}

/* Dark mode specific hover for dropdown items */
[data-theme="dark"] .dyfo-dropdown-list li a:hover,
.dark-mode .dyfo-dropdown-list li a:hover {
    background: rgba(99, 102, 241, 0.12);
    border-left-color: #818cf8;
}

.dyfo-dropdown-view-all {
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dyfo-accent);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.1);
    transition: all var(--dyfo-fast-transition);
}

.dyfo-dropdown-view-all:hover {
    background: rgba(99, 102, 241, 0.2);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Dark mode enhancements for dropdown */
[data-theme="dark"] .dyfo-desktop-dropdown,
.dark-mode .dyfo-desktop-dropdown {
    background: rgba(29, 29, 31, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .dyfo-dropdown-view-all,
.dark-mode .dyfo-dropdown-view-all {
    background: rgba(99, 102, 241, 0.2);
}

[data-theme="dark"] .dyfo-dropdown-view-all:hover,
.dark-mode .dyfo-dropdown-view-all:hover {
    background: rgba(99, 102, 241, 0.3);
}

/* Shop dropdown horizontal product carousel */
.dyfo-shop-dropdown-products {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 8px 4px;
    scrollbar-width: thin;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    /* Hide scrollbar for Chrome, Safari and Opera */
    scrollbar-width: none;
    margin-bottom: 12px;
}
.dyfo-shop-dropdown-products::-webkit-scrollbar {
    display: none;
}
.dyfo-shop-product-item {
    flex: 0 0 auto;
    width: 140px;
    background: var(--dyfo-bg-secondary);
    border-radius: 8px;
    padding: 8px;
    transition: transform var(--dyfo-fast-transition), box-shadow var(--dyfo-fast-transition);
    border: 1px solid var(--dyfo-border-color);
    display: flex;
    flex-direction: column;
}
.dyfo-shop-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--dyfo-accent);
}
.dyfo-shop-product-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 1;
}
.dyfo-shop-product-item .woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.dyfo-shop-product-img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 6px;
    background: var(--dyfo-bg-primary);
}
.dyfo-shop-product-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--dyfo-text-primary);
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dyfo-shop-product-price {
    font-size: 12px;
    color: var(--dyfo-accent);
    font-weight: 600;
    margin-top: auto;
}
.dyfo-shop-product-item .price {
    display: block;
    margin-top: auto;
}
.dyfo-shop-view-all {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dyfo-accent);
    text-decoration: none;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    transition: all var(--dyfo-fast-transition);
    margin-top: 4px;
}
.dyfo-shop-view-all:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-1px);
}

/* WIP message for sections still under construction */
.dyfo-dropdown-wip-message {
    padding: 20px;
    text-align: center;
    color: var(--dyfo-text-secondary);
    font-size: 14px;
    background: var(--dyfo-bg-secondary);
    border-radius: 8px;
    margin: 8px 0;
}
[data-theme="dark"] .dyfo-dropdown-wip-message,
.dark-mode .dyfo-dropdown-wip-message {
    background: rgba(255, 255, 255, 0.05);
    color: var(--dyfo-text-secondary);
}

/* Dark mode for product cards */
[data-theme="dark"] .dyfo-shop-product-item,
.dark-mode .dyfo-shop-product-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}
[data-theme="dark"] .dyfo-shop-product-item:hover,
.dark-mode .dyfo-shop-product-item:hover {
    border-color: var(--dyfo-accent);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .dyfo-shop-product-img,
.dark-mode .dyfo-shop-product-img {
    background: rgba(255, 255, 255, 0.08);
}

/* Dropdown backdrop */
.dyfo-dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9996;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s 0.25s;
}

.dyfo-dropdown-backdrop.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s 0s;
}

/* ============================================
   SEARCH POPUP (Desktop/Both)
   ============================================ */
.dyfo-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s 0.3s;
}

.dyfo-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s 0s;
}

.dyfo-popup-content {
    background: var(--dyfo-bg-primary);
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dyfo-popup-overlay.active .dyfo-popup-content {
    transform: translateY(0);
}

.dyfo-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--dyfo-bg-secondary);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--dyfo-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dyfo-fast-transition);
}

.dyfo-popup-close:hover {
    background: var(--dyfo-border-color);
}

.dyfo-popup-content {
    position: relative;
}

.dyfo-popup-content h3 {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--dyfo-text-primary);
}

.dyfo-search-wrapper {
    width: 100%;
}

.dyfo-search-wrapper input {
    width: 100%;
    padding: 12px 16px;
    font-size: 17px;
    border: 1px solid var(--dyfo-border-color);
    border-radius: 10px;
    background: var(--dyfo-bg-secondary);
    color: var(--dyfo-text-primary);
    outline: none;
    font-family: inherit;
}

.dyfo-search-wrapper input:focus {
    border-color: var(--dyfo-accent);
}

.dyfo-search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.dyfo-search-bubble {
    padding: 8px 16px;
    background: var(--dyfo-bg-secondary);
    border-radius: 20px;
    font-size: 14px;
    color: var(--dyfo-text-secondary);
    cursor: pointer;
    transition: background var(--dyfo-fast-transition), color var(--dyfo-fast-transition);
}

.dyfo-search-bubble:hover {
    background: var(--dyfo-accent);
    color: white;
}

.dyfo-search-results {
    margin-top: 16px;
}

/* ============================================
   RESPONSIVE - TABLET & ABOVE (≥1024px)
   ============================================ */
@media (min-width: 1024px) {
    /* Show desktop nav, hide hamburger */
    .dyfo-nav-desktop {
        display: block;
    }

    .dyfo-hamburger {
        display: none;
    }

    /* Hide mobile menu on desktop */
    .dyfo-mobile-menu,
    .dyfo-submenu {
        display: none !important;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (<1024px)
   ============================================ */
@media (max-width: 1023px) {
    /* Hide desktop dropdown on mobile */
    .dyfo-desktop-dropdown,
    .dyfo-dropdown-backdrop {
        display: none !important;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (<768px)
   ============================================ */
@media (max-width: 767px) {
    .dyfo-mobile-nav-link {
        padding: 0 30px;
        font-size: 28px;
        height: 54px;
    }

    .dyfo-submenu-header {
        padding: 0 30px;
    }

    .dyfo-submenu-back {
        font-size: 15px;
    }

    .dyfo-submenu-item a {
        padding: 14px 30px;
        font-size: 15px;
    }

    .dyfo-submenu-view-all {
        padding: 16px 30px;
        font-size: 15px;
    }

    .dyfo-mobile-menu-footer {
        padding: 20px 30px;
    }
}

/* ============================================
   RESPONSIVE - VERY SMALL MOBILE (<480px)
   ============================================ */
@media (max-width: 480px) {
    .dyfo-header-inner {
        padding: 0 12px;
    }

    .dyfo-header-actions {
        gap: 4px;
    }

    .dyfo-action-btn {
        width: 32px;
        height: 32px;
    }

    .dyfo-action-btn svg {
        width: 16px;
        height: 16px;
    }

    .dyfo-logo-img {
        height: 24px;
    }

    .dyfo-logo-text {
        display: none;
    }

    .dyfo-hamburger {
        width: 32px;
        height: 32px;
    }

    .dyfo-cart-count {
        min-width: 14px;
        height: 14px;
        font-size: 9px;
        top: 0;
        right: 0;
    }
}

/* ============================================
   BODY SCROLL LOCK
   ============================================ */
body.dyfo-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ============================================
   ACCESSIBILITY - Focus States
   ============================================ */
.dyfo-nav-btn:focus-visible,
.dyfo-action-btn:focus-visible,
.dyfo-hamburger:focus-visible,
.dyfo-mobile-nav-link:focus-visible,
.dyfo-submenu-back:focus-visible {
    outline: 2px solid var(--dyfo-accent);
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   LEGACY SUPPORT - Old classes
   ============================================ */
/* Hide old secondary nav elements */
.dyfo-secondary-nav-wrapper,
.dyfo-secondary-nav,
#dyfo-secondary-nav {
    display: none !important;
}

/* ============================================
   GLOBAL DARK MODE - Full Page Coverage
   ============================================ */

/* Base dark mode for body and content */
[data-theme="dark"] body,
.dark-mode body {
    background-color: #000000;
    color: #f5f5f7;
}

/* Main content area dark mode */
[data-theme="dark"] .site-content,
[data-theme="dark"] #content,
[data-theme="dark"] .content-area,
[data-theme="dark"] .site-main,
[data-theme="dark"] #primary,
[data-theme="dark"] .entry-content,
[data-theme="dark"] .entry,
[data-theme="dark"] .wp-site-blocks,
[data-theme="dark"] #wrapper,
.dark-mode .site-content,
.dark-mode #content,
.dark-mode .content-area,
.dark-mode .site-main,
.dark-mode #primary,
.dark-mode .entry-content,
.dark-mode .entry,
.dark-mode .wp-site-blocks,
.dark-mode #wrapper {
    background-color: #000000;
    color: #f5f5f7;
}

/* Dark mode for page containers */
[data-theme="dark"] .page,
[data-theme="dark"] .post,
[data-theme="dark"] article,
.dark-mode .page,
.dark-mode .post,
.dark-mode article {
    background-color: #000000;
    color: #f5f5f7;
}

/* Dark mode for headings and text */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] a,
.dark-mode h1,
.dark-mode h2,
.dark-mode h3,
.dark-mode h4,
.dark-mode h5,
.dark-mode h6,
.dark-mode p,
.dark-mode span,
.dark-mode a {
    color: inherit;
}

/* Dark mode for links */
[data-theme="dark"] a:not(.dyfo-nav-btn):not(.dyfo-action-btn):not(.button):not(.btn),
.dark-mode a:not(.dyfo-nav-btn):not(.dyfo-action-btn):not(.button):not(.btn) {
    color: #6366f1;
}

[data-theme="dark"] a:not(.dyfo-nav-btn):not(.dyfo-action-btn):not(.button):not(.btn):hover,
.dark-mode a:not(.dyfo-nav-btn):not(.dyfo-action-btn):not(.button):not(.btn):hover {
    color: #818cf8;
}

/* ============================================
   WOOCOMMERCE DARK MODE
   ============================================ */

/* WooCommerce general dark mode */
[data-theme="dark"] .woocommerce,
[data-theme="dark"] .woocommerce-page,
[data-theme="dark"] .woocommerce ul.products,
[data-theme="dark"] .woocommerce-page ul.products,
.dark-mode .woocommerce,
.dark-mode .woocommerce-page,
.dark-mode .woocommerce ul.products,
.dark-mode .woocommerce-page ul.products {
    background-color: #000000;
    color: #f5f5f7;
}

/* WooCommerce product cards */
[data-theme="dark"] .woocommerce ul.products li.product,
[data-theme="dark"] .woocommerce-page ul.products li.product,
.dark-mode .woocommerce ul.products li.product,
.dark-mode .woocommerce-page ul.products li.product {
    background-color: #111827;
    color: #f5f5f7;
}

[data-theme="dark"] .woocommerce ul.products li.product .price,
[data-theme="dark"] .woocommerce-page ul.products li.product .price,
.dark-mode .woocommerce ul.products li.product .price,
.dark-mode .woocommerce-page ul.products li.product .price {
    color: #9ca3af;
}

[data-theme="dark"] .woocommerce ul.products li.product a,
[data-theme="dark"] .woocommerce-page ul.products li.product a,
.dark-mode .woocommerce ul.products li.product a,
.dark-mode .woocommerce-page ul.products li.product a {
    color: #f5f5f7;
}

/* WooCommerce buttons */
[data-theme="dark"] .woocommerce a.button,
[data-theme="dark"] .woocommerce button.button,
[data-theme="dark"] .woocommerce input.button,
[data-theme="dark"] .woocommerce #respond input#submit,
[data-theme="dark"] .woocommerce a.button.alt,
[data-theme="dark"] .woocommerce button.button.alt,
[data-theme="dark"] .woocommerce input.button.alt,
.dark-mode .woocommerce a.button,
.dark-mode .woocommerce button.button,
.dark-mode .woocommerce input.button,
.dark-mode .woocommerce #respond input#submit,
.dark-mode .woocommerce a.button.alt,
.dark-mode .woocommerce button.button.alt,
.dark-mode .woocommerce input.button.alt {
    background-color: #6366f1;
    color: #ffffff;
    border-color: #6366f1;
}

[data-theme="dark"] .woocommerce a.button:hover,
[data-theme="dark"] .woocommerce button.button:hover,
[data-theme="dark"] .woocommerce input.button:hover,
[data-theme="dark"] .woocommerce #respond input#submit:hover,
[data-theme="dark"] .woocommerce a.button.alt:hover,
[data-theme="dark"] .woocommerce button.button.alt:hover,
[data-theme="dark"] .woocommerce input.button.alt:hover,
.dark-mode .woocommerce a.button:hover,
.dark-mode .woocommerce button.button:hover,
.dark-mode .woocommerce input.button:hover,
.dark-mode .woocommerce #respond input#submit:hover,
.dark-mode .woocommerce a.button.alt:hover,
.dark-mode .woocommerce button.button.alt:hover,
.dark-mode .woocommerce input.button.alt:hover {
    background-color: #4f46e5;
    border-color: #4f46e5;
}

/* WooCommerce notices */
[data-theme="dark"] .woocommerce-message,
[data-theme="dark"] .woocommerce-info,
[data-theme="dark"] .woocommerce-error,
[data-theme="dark"] .woocommerce-warning,
.dark-mode .woocommerce-message,
.dark-mode .woocommerce-info,
.dark-mode .woocommerce-error,
.dark-mode .woocommerce-warning {
    background-color: #111827;
    color: #f5f5f7;
    border-color: #374151;
}

/* WooCommerce forms */
[data-theme="dark"] .woocommerce form .form-row input.input-text,
[data-theme="dark"] .woocommerce form .form-row textarea,
[data-theme="dark"] .woocommerce form .form-row select,
.dark-mode .woocommerce form .form-row input.input-text,
.dark-mode .woocommerce form .form-row textarea,
.dark-mode .woocommerce form .form-row select {
    background-color: #111827;
    color: #f5f5f7;
    border-color: #374151;
}

/* WooCommerce tables */
[data-theme="dark"] .woocommerce table.shop_table,
[data-theme="dark"] .woocommerce-page table.shop_table,
.dark-mode .woocommerce table.shop_table,
.dark-mode .woocommerce-page table.shop_table {
    background-color: #111827;
    color: #f5f5f7;
    border-color: #374151;
}

[data-theme="dark"] .woocommerce table.shop_table th,
[data-theme="dark"] .woocommerce table.shop_table td,
[data-theme="dark"] .woocommerce-page table.shop_table th,
[data-theme="dark"] .woocommerce-page table.shop_table td,
.dark-mode .woocommerce table.shop_table th,
.dark-mode .woocommerce table.shop_table td,
.dark-mode .woocommerce-page table.shop_table th,
.dark-mode .woocommerce-page table.shop_table td {
    color: #f5f5f7;
    border-color: #374151;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
#dyfo-custom-footer {
    background: var(--dyfo-bg-secondary);
    border-top: 1px solid var(--dyfo-border-color);
    padding: 40px 20px;
    margin-top: 60px;
}

.dyfo-footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    text-align: center;
    color: var(--dyfo-text-secondary);
    font-size: 12px;
}

.dyfo-footer-inner p {
    margin: 0 0 8px 0;
}

.dyfo-footer-links {
    margin: 16px 0;
}

.dyfo-footer-links a {
    color: var(--dyfo-text-secondary);
    text-decoration: none;
    transition: color var(--dyfo-fast-transition);
}

.dyfo-footer-links a:hover {
    color: var(--dyfo-accent);
}

.dyfo-footer-vat-info {
    font-size: 11px;
    opacity: 0.7;
}

.dyfo-footer-kvk {
    margin-top: 16px;
    opacity: 0.5;
}

/* ============================================
   CUSTOM FOOTER
   ============================================ */
.dyfo-custom-footer {
    background: var(--dyfo-bg-secondary, #f5f5f7);
    border-top: 1px solid var(--dyfo-border-color, rgba(0, 0, 0, 0.1));
    padding: 48px 0 24px;
    margin-top: 80px;
    font-size: 14px;
}

[data-theme="dark"] .dyfo-custom-footer {
    background: #0a0a0a;
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dyfo-footer-inner {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 22px;
}

.dyfo-footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 48px;
    margin-bottom: 40px;
}

.dyfo-footer-brand {
    max-width: 280px;
}

.dyfo-footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dyfo-text-primary, #1d1d1f);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
}

.dyfo-footer-logo svg {
    flex-shrink: 0;
}

.dyfo-footer-tagline {
    color: var(--dyfo-text-secondary, #6e6e73);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

.dyfo-footer-links-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.dyfo-footer-column h4 {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--dyfo-text-primary, #1d1d1f);
    margin: 0 0 16px 0;
}

.dyfo-footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dyfo-footer-column li {
    margin-bottom: 10px;
}

.dyfo-footer-column a {
    color: var(--dyfo-text-secondary, #6e6e73);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.dyfo-footer-column a:hover {
    color: var(--dyfo-accent, #0066cc);
}

[data-theme="dark"] .dyfo-footer-column a:hover {
    color: #4f9eff;
}

.dyfo-footer-column li:not(:has(a)) {
    color: var(--dyfo-text-secondary, #6e6e73);
    font-size: 14px;
}

.dyfo-footer-bottom {
    padding-top: 24px;
    border-top: 1px solid var(--dyfo-border-color, rgba(0, 0, 0, 0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="dark"] .dyfo-footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dyfo-footer-bottom p {
    margin: 0;
    color: var(--dyfo-text-secondary, #6e6e73);
    font-size: 13px;
}

.dyfo-footer-credit {
    font-size: 12px !important;
    opacity: 0.7;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .dyfo-footer-main {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .dyfo-footer-links-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dyfo-footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dyfo-footer-links-group {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .dyfo-footer-column {
        text-align: center;
    }
}
