/* ==========================================================================
   BYTE ROBOTIK — ACETERNITY CAPSULE NAVBAR & GOOEY SEARCH
   - Full-width edge-to-edge at top with icon + label
   - Smoothly shrinks into a floating #1a1a1a capsule dock on scroll
   - Smart Autohide on continuous scroll down, reveals on scroll up
   - Aceternity UI Gooey liquid SVG filter search bar with crystal clear "Ara" input
   - Integrated Cart badge and User Profile Avatar (PP) with themed dropdown
   ========================================================================== */

/* Hidden SVG Gooey Filter Container */
.br-gooey-svg-filter {
    position: absolute;
    width: 0;
    height: 0;
    pointer-events: none;
    opacity: 0;
    overflow: hidden;
}

/* ==========================================================================
   MAIN CAPSULE NAVBAR WRAPPER
   Always centered via left: 50%; transform: translate(-50%, 0); for ultra smooth morphing
   ========================================================================== */
.br-capsule-navbar {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translate(-50%, 0);
    width: 100vw;
    max-width: 100vw;
    z-index: 1050;
    background-color: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 0.65rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
    transition: 
        transform 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        top 0.42s cubic-bezier(0.16, 1, 0.3, 1),
        width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        max-width 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        border-radius 0.45s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: width, max-width, transform, top, border-radius;
}

/* --------------------------------------------------------------------------
   CONDENSED / SCROLLED STATE (FLOATING CAPSULE DOCK)
   -------------------------------------------------------------------------- */
.br-capsule-navbar.is-scrolled {
    top: 14px;
    width: fit-content;
    max-width: min(1200px, 95vw);
    border-radius: 12px;
    background-color: rgba(26, 26, 26, 0.95);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 6px 12px;
    box-shadow: 
        0 16px 40px -8px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

/* --------------------------------------------------------------------------
   SMART AUTOHIDE STATE
   Smoothly slides up out of the viewport on scroll down, reveals on scroll up
   -------------------------------------------------------------------------- */
.br-capsule-navbar.is-hidden {
    transform: translate(-50%, -130%) !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

/* Inner Container */
.br-capsule-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    gap: 0.75rem;
    transition: gap 0.35s ease;
}

.br-capsule-navbar.is-scrolled .br-capsule-inner {
    width: auto;
    gap: 0.5rem;
}

/* ==========================================================================
   LEFT: BYTE ROBOTIK OFFICIAL LOGO + TEXT
   ========================================================================== */
.br-capsule-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none !important;
    color: #ffffff !important;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.br-capsule-brand:hover {
    transform: scale(1.04);
    color: #ffffff !important;
}

.br-capsule-navbar.is-scrolled .br-capsule-brand {
    height: 36px;
    padding: 0 4px 0 2px;
    margin-right: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Official Logo Badge Container (Circular background removed) */
.br-capsule-brand__badge {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent !important;
    border: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    padding: 0;
}

.br-capsule-brand:hover .br-capsule-brand__badge {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.br-capsule-navbar.is-scrolled .br-capsule-brand__badge {
    width: auto;
    height: auto;
}

.br-capsule-brand__logo {
    width: 26px;
    height: 26px;
    display: block;
    transition: transform 0.25s ease;
}

.br-capsule-brand:hover .br-capsule-brand__logo {
    transform: scale(1.08);
}

/* Brand Text: collapses smoothly in scrolled state */
.br-capsule-brand__text {
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: #ffffff;
    white-space: nowrap;
    max-width: 160px;
    opacity: 1;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                margin 0.35s ease;
}

.br-capsule-navbar.is-scrolled .br-capsule-brand__text {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    margin-right: 0;
    pointer-events: none;
}

/* ==========================================================================
   CENTER: NAVIGATION LINKS (ICON + TEXT -> ICONS ONLY)
   ========================================================================== */
.br-capsule-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.25rem;
    transition: gap 0.35s ease;
}

.br-capsule-navbar.is-scrolled .br-capsule-nav {
    gap: 0.15rem;
}

.br-capsule-item {
    position: relative;
}

/* Link Styles — strict color rule to prevent blue links (e.g. visited /blog) */
.br-capsule-link,
.br-capsule-link:visited,
.br-capsule-link:link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-weight: 500;
    font-size: 0.88rem;
    position: relative;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.br-capsule-link .br-capsule-link__icon,
.br-capsule-link .br-capsule-link__label {
    color: inherit !important;
}

.br-capsule-navbar.is-scrolled .br-capsule-link {
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    width: 36px;
    height: 36px;
}

.br-capsule-link:hover,
.br-capsule-link:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.br-capsule-link.active,
.br-capsule-link.active:visited {
    background-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* Link Icon */
.br-capsule-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.br-capsule-link__icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 2.2;
    stroke: currentColor;
}

/* Link Label: Smoothly expands at top, smoothly collapses to 0 width when scrolled */
.br-capsule-link__label {
    display: inline-block;
    max-width: 130px;
    opacity: 1;
    margin-left: 0.45rem;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.25s ease,
                margin-left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.br-capsule-navbar.is-scrolled .br-capsule-link__label {
    max-width: 0;
    opacity: 0;
    margin-left: 0;
    pointer-events: none;
}

/* Micro Tooltips when in Scrolled / Compact mode */
.br-capsule-navbar.is-scrolled .br-capsule-link::after {
    content: attr(data-label);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #111111;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1060;
}

.br-capsule-navbar.is-scrolled .br-capsule-link:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RIGHT ACTION GROUP: GOOEY SEARCH, CART, ACCOUNT AVATAR (PP)
   ========================================================================== */
.br-capsule-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   ACETERNITY UI GOOEY INPUT COMPONENT
   Direct implementation from https://ui.aceternity.com/registry/gooey-input-demo.json
   -------------------------------------------------------------------------- */
.br-gooey-input-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.br-gooey-filter-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    filter: url(#br-gooey-filter);
    -webkit-filter: url(#br-gooey-filter);
}

.br-store-gooey-search .br-gooey-filter-wrap,
#store-gooey-search .br-gooey-filter-wrap {
    filter: none !important;
    -webkit-filter: none !important;
}

.br-capsule-navbar.is-scrolled .br-gooey-filter-wrap {
    height: 36px;
}

/* Button Row (Aceternity: width 115px -> 200px, margin-left 0 -> 50px) */
.br-gooey-button-row {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    width: 115px;
    margin-left: 0;
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                margin-left 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.br-capsule-navbar.is-scrolled .br-gooey-button-row {
    height: 36px;
    width: 105px;
}

.br-gooey-input-container.is-expanded .br-gooey-button-row {
    width: 210px;
    margin-left: 48px;
}

@media (max-width: 768px) {
    .br-gooey-input-container.is-expanded .br-gooey-button-row {
        width: 175px;
        margin-left: 44px;
    }
}

/* Trigger Pill Surface (Aceternity surfaceClass: bg-foreground text-background) */
#br-capsule-navbar .br-gooey-trigger,
.br-gooey-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    height: 38px;
    border-radius: 9999px;
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    padding: 0 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    box-sizing: border-box;
    outline: none;
    user-select: none;
}

.br-capsule-navbar.is-scrolled .br-gooey-trigger {
    height: 36px;
    padding: 0 12px;
}

/* Trigger Search Icon */
.br-gooey-trigger-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #1a1a1a;
    transition: opacity 0.2s ease, width 0.3s ease, margin 0.3s ease;
}

.br-gooey-input-container.is-expanded .br-gooey-trigger-icon {
    opacity: 0;
    width: 0;
    margin: 0;
    pointer-events: none;
}

/* Search Input — 100% transparent background so the white capsule shows through completely */
#br-capsule-navbar .br-gooey-input-container input[type="search"],
#br-capsule-navbar .br-gooey-input-container input[type="search"].br-gooey-input,
#br-capsule-navbar input.br-gooey-input,
.br-gooey-input-container input[type="search"].br-gooey-input,
.br-gooey-input {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: #1a1a1a !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0;
    cursor: text;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
}

#br-capsule-navbar .br-gooey-input-container input[type="search"]:focus,
#br-capsule-navbar .br-gooey-input-container input[type="search"].br-gooey-input:focus,
#br-capsule-navbar input.br-gooey-input:focus,
.br-gooey-input-container input[type="search"].br-gooey-input:focus,
.br-gooey-input:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: #1a1a1a !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.br-gooey-input::-webkit-search-decoration,
.br-gooey-input::-webkit-search-cancel-button,
.br-gooey-input::-webkit-search-results-button,
.br-gooey-input::-webkit-search-results-decoration {
    display: none;
}

#br-capsule-navbar input.br-gooey-input::placeholder,
.br-gooey-input-container input.br-gooey-input::placeholder,
.br-gooey-input::placeholder {
    color: rgba(26, 26, 26, 0.7) !important;
    font-weight: 500 !important;
    opacity: 1 !important;
}

/* Detached Bubble (Aceternity: size-10, scale 0 -> 1, spring bounce: 0.25) */
.br-gooey-bubble {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%) scale(0);
    opacity: 0;
    pointer-events: none;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: transform 0.4s cubic-bezier(0.34, 1.35, 0.64, 1),
                opacity 0.25s ease;
    z-index: 2;
}

.br-gooey-input-container.is-expanded .br-gooey-bubble {
    transform: translateY(-50%) scale(1);
    opacity: 1;
    pointer-events: auto;
}

.br-gooey-bubble-surface {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}

.br-capsule-navbar.is-scrolled .br-gooey-bubble-surface {
    width: 36px;
    height: 36px;
}

.br-gooey-bubble:hover .br-gooey-bubble-surface {
    transform: scale(1.08);
}

.br-gooey-bubble-icon {
    width: 16px;
    height: 16px;
    color: #1a1a1a;
}

/* --------------------------------------------------------------------------
   SEPET SİMGESİ (SHOPPING CART BUTTON)
   -------------------------------------------------------------------------- */
.br-capsule-cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    text-decoration: none !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: background-color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0;
}

.br-capsule-navbar.is-scrolled .br-capsule-cart-btn {
    width: 36px;
    height: 36px;
}

.br-capsule-cart-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff !important;
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.25);
}

.br-capsule-cart-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.2;
}

/* Dynamic Cart Badge */
.br-capsule-cart-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
    border: 2px solid #1a1a1a;
    animation: brBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes brBadgePop {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --------------------------------------------------------------------------
   HESAP PROFİLİ (PP) / AVATAR & DROPDOWN (THEMED TO #1a1a1a)
   -------------------------------------------------------------------------- */
.br-capsule-user-dropdown {
    position: relative;
    display: inline-flex;
}

.br-capsule-avatar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0071E3, #FF5E36) !important;
    color: #ffffff !important;
    border: none;
    outline: none;
    cursor: pointer;
    font-weight: 800;
    font-size: 0.92rem;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0, 113, 227, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}

.br-capsule-avatar-btn::after,
.br-capsule-avatar-btn.dropdown-toggle::after {
    display: none !important;
    content: none !important;
    border: none !important;
}

.br-capsule-navbar.is-scrolled .br-capsule-avatar-btn {
    width: 36px;
    height: 36px;
}

.br-capsule-avatar-btn:hover {
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(255, 94, 54, 0.45);
    color: #ffffff !important;
}

.br-capsule-avatar-icon {
    width: 19px;
    height: 19px;
    stroke-width: 2.2;
    stroke: #ffffff;
    color: #ffffff;
}

/* User Profile Dropdown Menu: Strict #1a1a1a Theme */
.dropdown-menu.br-capsule-menu {
    background-color: #1a1a1a !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 16px !important;
    padding: 0.65rem !important;
    min-width: 230px !important;
    margin-top: 10px !important;
    box-shadow: 0 20px 48px -8px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
}

.br-capsule-menu-header {
    padding: 0.5rem 0.85rem !important;
    background: transparent !important;
}

.br-capsule-menu-email {
    display: block !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: rgba(255, 255, 255, 0.55) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.br-capsule-menu hr.dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08) !important;
    margin: 0.45rem 0.5rem !important;
    opacity: 1 !important;
}

.br-capsule-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.55rem 0.85rem !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 0.86rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease !important;
}

.br-capsule-menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    transform: translateX(2px) !important;
}

.br-capsule-menu-item--danger {
    color: #f87171 !important;
}

.br-capsule-menu-item--danger:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
}

.br-capsule-menu-item svg {
    flex-shrink: 0;
    opacity: 0.85;
    stroke: currentColor;
}

/* ==========================================================================
   MOBILE RESPONSIVENESS
   ========================================================================== */
.br-capsule-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    margin-left: 0.25rem;
}

.br-capsule-navbar.is-scrolled .br-capsule-mobile-toggle {
    width: 36px;
    height: 36px;
}

@media (max-width: 991px) {
    .br-capsule-nav {
        display: none;
    }
    
    .br-capsule-mobile-toggle {
        display: inline-flex;
    }

    .br-capsule-navbar {
        padding: 0.5rem 1rem;
    }

    .br-capsule-navbar.is-scrolled {
        width: 95%;
        max-width: 480px;
        padding: 5px 8px;
    }
}
