/* ═══════════════════════════════════════════════════════════════════════
   CHEVRON NAVIGATION — UNIFIED COMPONENT
   ───────────────────────────────────────────────────────────────────────
   One source of truth for every chevron-style nav button across the app:
   • Carousel & gallery overlays   (.carousel-btn, .gallery-nav)
   • Section sliders               (.top-items-nav, .themed-section-nav,
                                    .nl-nav-btn, .nav-circle, .ml-nav-circle)
   • Sidebar collapse & nav arrow  (.collapse-btn, .cat-arrow)
   • Pagination                    (.pagination-btn)
   • Breadcrumbs                   (.breadcrumb-chevron)
   ─────────────────────────────────────────────────────────────────────── */

:root {
    --chevron-size-sm: 32px;
    --chevron-size-md: 40px;
    --chevron-size-lg: 48px;
    --chevron-radius:  50%;
    --chevron-shadow:  0 2px 8px rgba(15, 23, 42, 0.08);
    --chevron-shadow-hover: 0 6px 18px rgba(15, 23, 42, 0.15);
    --chevron-transition: transform .2s ease, background-color .2s ease,
                          color .2s ease, box-shadow .2s ease;
}

/* ── Base component ─────────────────────────────────────────────── */
.top-items-nav button,
.themed-section-nav button,
.nl-nav-btn,
.nav-circle,
.ml-nav-circle,
.carousel-btn,
.gallery-nav {
    width: var(--chevron-size-md);
    height: var(--chevron-size-md);
    min-width: var(--chevron-size-md);   /* prevent flex shrinkage */
    border-radius: var(--chevron-radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: var(--chevron-transition);
    line-height: 1;
    padding: 0;
    font-size: 14px;
}

.top-items-nav button:focus-visible,
.themed-section-nav button:focus-visible,
.nl-nav-btn:focus-visible,
.nav-circle:focus-visible,
.ml-nav-circle:focus-visible,
.carousel-btn:focus-visible,
.gallery-nav:focus-visible {
    outline: 2px solid var(--primary-color, #7c3aed);
    outline-offset: 3px;
}

.top-items-nav button i,
.themed-section-nav button i,
.nl-nav-btn i,
.nav-circle i,
.ml-nav-circle i,
.carousel-btn i,
.gallery-nav i {
    pointer-events: none;     /* clicks land on the button, not the icon */
    line-height: 1;
}

/* ── Hover/active states ────────────────────────────────────────── */
.top-items-nav button:hover,
.themed-section-nav button:hover,
.nl-nav-btn:hover,
.nav-circle:hover,
.ml-nav-circle:hover {
    transform: translateY(-1px);
    box-shadow: var(--chevron-shadow-hover);
    background-color: var(--primary-color, #7c3aed);
    color: #fff;
    border-color: var(--primary-color, #7c3aed);
}

.top-items-nav button:active,
.themed-section-nav button:active,
.nl-nav-btn:active,
.nav-circle:active,
.ml-nav-circle:active {
    transform: translateY(0);
    box-shadow: var(--chevron-shadow);
}

/* Disabled state — for sliders at boundaries */
.top-items-nav button:disabled,
.themed-section-nav button:disabled,
.nl-nav-btn:disabled,
.nav-circle:disabled,
.ml-nav-circle:disabled,
.carousel-btn:disabled,
.gallery-nav:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ── Overlay variant (sit on top of images/slides) ──────────────── */
.carousel-btn,
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--chevron-size-lg);
    height: var(--chevron-size-lg);
    min-width: var(--chevron-size-lg);
    box-shadow: var(--chevron-shadow);
    z-index: 10;
}

.carousel-btn:hover,
.gallery-nav:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: var(--chevron-shadow-hover);
}

.carousel-btn:active,
.gallery-nav:active {
    transform: translateY(-50%) scale(0.96);
}

.carousel-btn--prev,
.gallery-nav--prev { left: 16px;  right: auto; }
.carousel-btn--next,
.gallery-nav--next { right: 16px; left: auto; }

/* ── Sidebar collapse (admin) ───────────────────────────────────── */
.admin-logo .collapse-btn {
    width: var(--chevron-size-sm);
    height: var(--chevron-size-sm);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: var(--chevron-transition);
    padding: 0;
}

.admin-logo .collapse-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ── Breadcrumb chevron utility ─────────────────────────────────── */
.breadcrumb-chevron {
    font-size: 10px !important;
    color: var(--text-muted, #94a3b8);
    margin: 0 2px;
    flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --chevron-size-sm: 30px;
        --chevron-size-md: 36px;
        --chevron-size-lg: 40px;
    }

    .carousel-btn--prev,
    .gallery-nav--prev { left: 8px; }
    .carousel-btn--next,
    .gallery-nav--next { right: 8px; }

    .top-items-nav,
    .themed-section-nav {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    :root {
        --chevron-size-md: 34px;
        --chevron-size-lg: 36px;
    }

    .breadcrumb-chevron {
        font-size: 9px !important;
    }
}

/* ── Touch target accessibility (always ≥ 36×36 on touch) ───────── */
@media (hover: none) and (pointer: coarse) {
    .top-items-nav button,
    .themed-section-nav button,
    .nl-nav-btn,
    .nav-circle,
    .ml-nav-circle {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    /* Always show gallery nav on touch devices (no hover to trigger it) */
    .gallery-main .gallery-nav { opacity: 1; }
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .top-items-nav button,
    .themed-section-nav button,
    .nl-nav-btn,
    .nav-circle,
    .ml-nav-circle,
    .carousel-btn,
    .gallery-nav,
    .admin-logo .collapse-btn {
        transition: none;
    }
}
