/**
 * nav-v20.css — NavigationMenuV20 styles
 * Mirrors NavigationMenuV20Component.php renderStyles() exactly.
 */

:root {
    --nav-v20-font-sans: 'Inter', sans-serif;
    --nav-v20-font-display: 'Oswald', sans-serif;
    --nav-v20-font-serif: 'Playfair Display', serif;
}

/* ============================================
   BASE NAV
   ============================================ */
.nav-v20 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
    z-index: 9999;
}

.nav-v20-sticky {
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.nav-v20-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    height: 56px;
}

/* ============================================
   BRAND
   ============================================ */
.nav-v20-brand {
    display: flex;
    align-items: center;
    align-self: center;
    text-decoration: none;
    gap: 0.6rem;
    flex-shrink: 0;
}

.nav-v20-logo {
    height: 36px;
    width: auto;
    border-radius: 4px;
}

.nav-v20-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nav-v20-brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.02em;
}

.nav-v20-brand-tagline {
    font-size: 0.55rem;
    color: #6b7280;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   MOBILE TOGGLE
   ============================================ */
.nav-v20-toggle {
    display: none;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.nav-v20-toggle-icon,
.nav-v20-toggle-icon::before,
.nav-v20-toggle-icon::after {
    display: block;
    width: 20px;
    height: 2px;
    background: #374151;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.nav-v20-toggle-icon {
    top: 50%;
    transform: translate(-50%, -50%);
}

.nav-v20-toggle-icon::before {
    content: '';
    top: -6px;
}

.nav-v20-toggle-icon::after {
    content: '';
    top: 6px;
}

/* ============================================
   MAIN MENU
   ============================================ */
.nav-v20-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-v20-items {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.nav-v20-item {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-v20-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-v20-link:hover,
.nav-v20-link:focus {
    color: #111827;
    background: #f3f4f6;
}

.nav-v20-link.active {
    color: #111827;
    background: #f3f4f6;
    font-weight: 600;
}

.nav-v20-link i:first-child {
    font-size: 0.75rem;
    opacity: 0.7;
}

.nav-v20-arrow {
    font-size: 0.5rem;
    margin-left: 0.2rem;
    transition: transform 0.2s ease;
}

.nav-v20-has-mega:hover .nav-v20-arrow,
.nav-v20-has-mega.nav-v20-open .nav-v20-arrow {
    transform: rotate(180deg);
}

/* Badge */
.nav-v20-badge {
    font-size: 0.55rem;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: 2px;
}

.badge-danger {
    background: #ef4444;
    color: white;
}

.badge-success {
    background: #22c55e;
    color: white;
}

.badge-warning {
    background: #f59e0b;
    color: white;
}

.badge-info {
    background: #3b82f6;
    color: white;
}

/* ============================================
   MEGA DROPDOWN
   ============================================ */
.nav-v20-mega {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    width: max-content;
    min-width: 320px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    scrollbar-width: thin;
    z-index: 1001;
    padding: 4px;
}

/* Bridge gap to prevent closing on hover */
.nav-v20-mega::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

.nav-v20-mega::-webkit-scrollbar {
    width: 6px;
}

.nav-v20-mega::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.nav-v20-mega::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.nav-v20-mega::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Open state — triggered by JS class OR hover */
.nav-v20-mega.nav-v20-mega-open,
.nav-v20-has-mega:hover>.nav-v20-mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

/* Small mega (profile dropdown) */
.nav-v20-mega-sm {
    min-width: 160px;
    left: auto;
    right: 0;
    transform: translateY(10px);
}

.nav-v20-mega-sm.nav-v20-mega-open,
.nav-v20-has-mega:hover>.nav-v20-mega-sm {
    transform: translateY(0);
}

.nav-v20-mega-inner {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.5rem;
}

/* Rows wrapper */
.nav-v20-mega-rows-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

/* Row layouts */
.nav-v20-mega-row {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    width: 100%;
}

.nav-v20-layout-grid_2_equal {
    grid-template-columns: 1fr 1fr;
}

.nav-v20-layout-hero_full {
    grid-template-columns: 1fr;
}

.nav-v20-layout-grid_3_mixed {
    grid-template-columns: repeat(3, 1fr);
}

.nav-v20-layout-grid_4 {
    grid-template-columns: repeat(4, 1fr);
}

.nav-v20-layout-grid_4_equal {
    grid-template-columns: repeat(4, 1fr);
}

.nav-v20-layout-grid_masonry {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
}

/* Column card */
.nav-v20-mega-col {
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    padding: 1.5rem;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    isolation: isolate;
}

.nav-v20-col-span-2 {
    grid-column: span 2;
}

.nav-v20-col-span-3 {
    grid-column: span 3;
}

.nav-v20-col-span-4 {
    grid-column: span 4;
}

.nav-v20-mega-col img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: grayscale(30%);
    opacity: 0.85;
    z-index: 0;
}

.nav-v20-mega-col:hover img {
    transform: scale(1.06);
    filter: grayscale(0%);
    opacity: 1;
}

.nav-v20-col-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.nav-v20-col-image img {
    position: static;
    width: 100%;
    height: 100%;
}

.nav-v20-col-header {
    position: relative;
    z-index: 2;
    margin-bottom: 0.5rem;
}

.nav-v20-col-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: block;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.nav-v20-col-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    display: block;
    margin-top: 2px;
}

.nav-v20-col-items {
    position: relative;
    z-index: 2;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.nav-v20-col-link {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
}

.nav-v20-col-link:hover {
    color: #ffffff;
}

/* Dropdown links (profile menu) */
.nav-v20-dropdown-link {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease;
}

.nav-v20-dropdown-link:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Footer bar */
.nav-v20-mega-footer {
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1.5rem;
    text-align: center;
}

.nav-v20-mega-footer-btn {
    font-size: 0.8rem;
    font-weight: 600;
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.nav-v20-mega-footer-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

/* ============================================
   RIGHT ACTIONS
   ============================================ */
.nav-v20-actions {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nav-v20-action-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.nav-v20-action-btn:hover {
    color: #111827;
    background: #f3f4f6;
}

.nav-v20-action-text {
    font-size: 0.85rem;
}

.nav-v20-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-v20-cart-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.nav-v20-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
.nav-v20-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 991px) {
    .nav-v20-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-v20-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: 5rem 1rem 2rem;
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 9999;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .nav-v20-menu.nav-v20-open {
        left: 0;
    }

    .nav-v20-items {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .nav-v20-item {
        width: 100%;
    }

    .nav-v20-link {
        width: 100%;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        font-size: 1rem;
    }

    .nav-v20-mega {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background: #f9fafb;
        max-height: none;
        overflow: visible;
        width: 100%;
        padding: 0;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .nav-v20-mega.nav-v20-mega-open {
        display: block;
        transform: none;
    }

    .nav-v20-mega-inner {
        padding: 0.5rem 0 0.5rem 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-v20-mega-rows-wrapper {
        gap: 0.5rem;
    }

    .nav-v20-mega-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem;
    }

    .nav-v20-mega-col {
        min-height: 60px;
        padding: 0.75rem;
        background: transparent;
        border-radius: 6px;
    }

    .nav-v20-mega-col img {
        display: none;
    }

    .nav-v20-col-title {
        color: #374151;
        font-size: 0.9rem;
        text-shadow: none;
    }

    .nav-v20-col-link {
        color: #6b7280;
    }

    .nav-v20-actions {
        margin-top: auto;
        width: 100%;
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
    }

    .nav-v20-brand-text {
        display: none;
    }
}

/* ============================================
   MEGA MENU COLUMN BASE (Card Container)
   ============================================ */
.nav-v20-mega-column {
    position: relative;
    background: #1f2937;
    border-radius: 12px;
    overflow: hidden;
    padding: 1.5rem;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    isolation: isolate;
    border: none;
}

.nav-v20-mega-column:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* ============================================
   CATEGORY CARD (CategoryCardRenderer)
   ============================================ */
.nav-v20-category-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    position: relative;
}

.nav-v20-category-card:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
    border-color: #d1d5db;
    z-index: 5;
}

.nav-v20-cat-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.nav-v20-cat-title a {
    color: inherit;
    text-decoration: none;
}

.nav-v20-cat-title a:hover {
    color: #4f46e5;
}

.nav-v20-cat-body {
    display: flex;
    gap: 1.25rem;
    flex: 1;
}

.nav-v20-cat-thumb {
    width: 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #f3f4f6;
    background: #f9fafb;
}

.nav-v20-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s;
}

.nav-v20-category-card:hover .nav-v20-cat-thumb img {
    transform: scale(1.05);
}

.nav-v20-list-wrap {
    flex: 1;
}

.nav-v20-cat-subtitle {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 0.5rem;
    font-family: var(--nav-v20-font-serif);
}

.nav-v20-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-v20-cat-list li {
    margin-bottom: 0.35rem;
}

.nav-v20-cat-list a {
    color: #4b5563;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.1s;
}

.nav-v20-cat-list a:hover {
    color: #111827;
    text-decoration: underline;
}

.nav-v20-cat-list a.nav-v20-highlight {
    color: #dc2626;
    font-weight: 600;
}

/* Whimsical font override */
.nav-v20-font-whimsical,
.nav-v20-font-whimsical .nav-v20-cat-title,
.nav-v20-font-whimsical a {
    font-family: 'Pacifico', cursive !important;
    letter-spacing: 0.05em;
    font-weight: 400;
}

.nav-v20-category-card.nav-v20-font-whimsical .nav-v20-cat-title {
    color: #b45309;
    font-size: 1.4rem;
    text-transform: none;
    letter-spacing: 0;
}

/* ============================================
   PROMO / FEATURED CARD (FeaturedCardRenderer)
   ============================================ */
.nav-v20-promo-card {
    position: relative;
    overflow: hidden;
    padding: 0 !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    background: #f3f4f6;
}

.nav-v20-promo-bg-wrap {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.nav-v20-promo-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.5s ease;
}

.nav-v20-promo-card:hover .nav-v20-promo-bg {
    transform: scale(1.05);
    filter: grayscale(0%);
    opacity: 1;
}

.nav-v20-promo-content {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 1rem 1.5rem;
    text-align: center;
    max-width: 90%;
    transform: translateY(0);
    transition: transform 0.3s ease;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.nav-v20-promo-card:hover .nav-v20-promo-content {
    transform: translateY(-2px);
}

.nav-v20-promo-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0.2rem 0 0.5rem 0;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

.nav-v20-promo-badge {
    font-size: 0.6rem;
    background: #ffffff;
    color: #111827;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 6px;
}

.nav-v20-promo-btn {
    font-size: 0.75rem;
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
    padding-bottom: 2px;
    transition: all 0.2s;
}

.nav-v20-promo-btn:hover {
    border-bottom-color: #ffffff;
}

/* ============================================
   HERO ROW (Full-Width CTA Banner)
   ============================================ */
.nav-v20-hero-row {
    grid-column: 1 / -1;
    width: 100%;
    position: relative;
    min-height: 220px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    margin-top: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.nav-v20-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.nav-v20-hero-row:hover .nav-v20-hero-bg {
    transform: scale(1.05);
}

.nav-v20-hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
    background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
    padding: 2rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(1px);
}

.nav-v20-hero-title {
    font-family: var(--nav-v20-font-display);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

.nav-v20-hero-sub {
    font-family: var(--nav-v20-font-serif);
    font-style: italic;
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.9;
}

/* ============================================
   HTML BLOCK
   ============================================ */
.nav-v20-html-item {
    width: 100%;
}

/* ============================================
   MEGA MENU ROW LAYOUTS (V2+)
   ============================================ */
.nav-v20-mega-rows-wrapper {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.nav-v20-mega-row {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    width: 100%;
}

.nav-v20-mega-row:last-child {
    margin-bottom: 0;
}

/* Mega Footer */
.nav-v20-mega-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.5rem;
    text-align: center;
}

.nav-v20-mega-footer-btn {
    font-size: 0.85rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.nav-v20-mega-footer-btn:hover {
    text-decoration: underline;
}