/* =========================================
   GLOWING THEME REDESIGN - HEADER
   ========================================= */

/* Global Font Override for Header */
.glowing-header,
.header-top-bar {
    font-family: 'Urbanist', sans-serif !important;
}

:root {
    --bg-krem: #fcf8f3;
    --text-kahve: #704831;
    --bg-kahve: #704831;
    --vurgu-kahve: #a67b5b;
}

/* Top Bar */
.header-top-bar {
    background-color: var(--text-kahve);
    border-bottom: 1px solid #e5e7eb;
    padding: 10px 0;
    font-size: 13px;
    color: var(--bg-krem);
    font-weight: 600;
    overflow: hidden;
}

.top-marquee {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-track {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll 30s linear infinite;
}

.marquee-track span {
    display: inline-block;
    padding: 0 40px;
    position: relative;
    color: var(--bg-krem);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Separator dot after each item */
.marquee-track span::after {
    content: "•";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vurgu-kahve);
    opacity: 0.8;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    /* Matched 1200px container */
    margin: 0 auto;
    padding: 0 20px;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* FontAwesome Fixes in Top Bar */
.top-bar-left i,
.currency-lang-selector i {
    font-size: 14px;
    color: #4b5563;
}

.top-bar-left a:hover i {
    color: #000;
}

.top-bar-center {
    font-weight: 700;
    text-transform: capitalize;
    letter-spacing: 1px;
    color: #111;
}

.currency-lang-selector a {
    margin-left: 15px;
    color: #4b5563;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Main Header Container */
.glowing-header {
    display: flex;
    flex-direction: column;
    /* Stack vertically */
    align-items: center;
    padding: 0;
    /* Remove side padding from container */
    background: #fff;
    /* Default White */
    width: 100%;
    margin: 0 auto;
    max-width: 1400px;
    /* Matched container */
    height: auto;
    min-height: 120px;
    /* Adjusted height */
    transition: all 0.3s ease;
}

.stacked-header .header-top-row {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0 0 0;
    /* Reduced top padding, removed bottom padding to close gap */
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
    /* Optional separator */
}

/* Make logo larger by default */
.stacked-header .logo-image {
    max-height: 80px !important;
    /* Increased from 50px */
    height: auto;
    transition: all 0.3s ease;
}

.stacked-header .yakut-text {
    font-size: 72px !important;
    /* Increased from 56px */
}

.stacked-header .header-bottom-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    /* Nav Left/Center, Icons Right */
    align-items: center;
    padding: 5px 40px 15px 40px;
    /* Reduced top padding to close gap */
    border-top: 1px solid transparent;
}

/* Nav is effectively centered relative to the bottom row if we want, 
   but user image showed links on left/center and icons on right. 
   Using flex-grow on nav to push icons to right could work 
   if we want nav truly centered in the remaining space.
   For now: Nav Left/Center, Icons Far Right as per standard row behavior.
*/
.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
    /* Take space */
    justify-content: center;
    /* Center nav in the bottom bar like the reference image seems to show (or left?) user said "logonun altında ise kategorilerin olduğu sayfalar" - usually centered */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 0 0 auto;
    /* Do not shrink */
}

.search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #1a1a1a;
    padding: 0;
}

/* Sticky & Scroll State */
.header.sticky-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

/* Scrolled State: Cream Background - NO POSITION CHANGE */
.header.scrolled {
    background-color: var(--bg-krem) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    /* Position stays sticky, no change to fixed */
}

.header.scrolled .glowing-header {
    background-color: transparent !important;
    /* Let parent bg show through */
    box-shadow: none;
    /* Remove shadow from inner container */
    max-width: 1400px;
    /* Maintain content width constraint */
    padding: 0;
}

.header.scrolled .header-top-row {
    padding: 5px 0 0 0;
    /* Shrink padding */
    /* Optional: We could hide this row completely if we wanted a "slim" sticky, 
       but "tamamen sticky olsun" implies full content usually. 
       We will shrink it significantly. */
}

.header.scrolled .logo-image {
    max-height: 80px !important;
    /* Maintain logo size */
}

.header.scrolled .yakut-text {
    font-size: 72px !important;
    /* Maintain text size */
}

/* Maintain bottom row gap in sticky but tighter */
.header.scrolled .header-bottom-row {
    padding: 5px 40px 10px 40px;
}

/* Styles specifically for internal logo structure */
.slide-content h2 {

    font-family: 'Urbanist', sans-serif;
    font-size: 68px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--white);
    text-transform: capitalize;
}

.slide-subtitle {
    font-family: 'Urbanist', sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
    text-transform: uppercase;
    color: var(--white);
}

.cta-button {
    display: inline-block;
    padding: 0;
    background: transparent;
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border-radius: 0;
    transition: all 0.3s;
    letter-spacing: 0.5px;
    text-transform: capitalize;
    border-bottom: 1px solid var(--white);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: none;
    background: transparent;
    color: var(--white);
    opacity: 0.8;
}

/* Animated Yakut Logo - Premium Ruby Design (Global) */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&display=swap');

.yakut-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    line-height: 1;
    position: relative;
    padding: 10px;
}

.yakut-text {
    font-family: 'Cinzel', serif !important;
    font-size: 48px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    background: linear-gradient(to bottom, #e01e37, #640d14);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0px 2px 0px #4a0404);
}

.yakut-text::after {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent 20%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 215, 0, 0.4) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            transparent 80%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: nobleShine 8s linear infinite;
}

.kozmetik-text {
    font-family: 'Cinzel', serif !important;
    font-size: 13px;
    color: #000;
    letter-spacing: 10px;
    font-weight: 400;
    margin-top: 5px;
    text-transform: uppercase;
    margin-left: 8px;
    opacity: 0.8;
}

@keyframes nobleShine {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* Menus */
.main-nav.left-nav,
.main-nav.right-nav {
    display: flex;
    gap: 15px;
    /* Reduced from 30px */
}

.nav-item {
    color: var(--bg-kahve);
    font-weight: 700;
    font-size: 14px;
    /* Reduced from 14px */
    /* Slightly larger for emphasis */
    text-transform: capitalize;
    letter-spacing: 0px;
    /* Reduced from 0.5px */
    text-decoration: none;
    position: relative;
    white-space: nowrap;
}

.nav-item:after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-kahve);
    transition: width 0.3s;
}

.nav-item:hover {
    color: var(--bg-kahve);
}

.nav-item:hover:after {
    width: 100%;
}

/* Dropdown Navigation */
.nav-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-item.has-dropdown {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.nav-dropdown-wrapper:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 10px 0;
    /* Use display: block with opacity/visibility for smooth transitions */
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown-wrapper:hover .dropdown-menu {
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-item:hover {
    background: var(--bg-krem, #fcf8f3);
    color: var(--vurgu-kahve, #a67b5b);
    padding-left: 25px;
}

/* Right Actions & Badge */
.action-btn {
    position: relative;
    /* Essential for badge positioning */
    background: transparent;
    border: none;
    padding: 0;
    color: #1a1a1a;
    transition: transform 0.2s;
    cursor: pointer;
    display: inline-flex;
    /* Helps with relative positioning bounds */
}

.action-btn:hover {
    color: #d62828;
    transform: translateY(-2px);
}

.action-btn svg {
    width: 24px;
    height: 24px;
    stroke-width: 1.5;
}

.count-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: var(--bg-kahve);
    color: var(--bg-krem);
    font-size: 10px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: normal;
    pointer-events: none;
    /* Prevent interference */
}

/* Mobile */
/* =========================================
   NEW HEADER STRUCTURE STYLES
   ========================================= */

/* Desktop Wrapper - Hide on Mobile */
.desktop-header-wrapper {
    display: block;
}

/* Mobile Wrapper - Hide on Desktop */
.mobile-header-wrapper {
    display: none;
}

@media (max-width: 991px) {
    .desktop-header-wrapper {
        display: none !important;
    }

    .mobile-header-wrapper {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 70px;
        /* Fixed Height */
        background: var(--bg-krem);
        z-index: 9999;
        border-bottom: 1px solid var(--bg-kahve);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    }

    .mobile-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 100%;
        padding: 0 15px;
        position: relative;
        border-bottom: 1px solid var(--bg-kahve);
    }

    /* 1. Menu Toggle */
    .mobile-header-wrapper .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 0;
        width: 30px;
    }

    .mobile-header-wrapper .menu-toggle span {
        width: 100%;
        height: 2px;
        background: #1a1a1a;
        transition: all 0.3s;
    }

    /* 2. Logo (Absolute Center) */
    .mobile-header-wrapper .mobile-logo {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-header-wrapper .mobile-logo img {
        height: 100%;
        width: auto;
        max-height: 40px;
        object-fit: contain;
        display: block;
    }

    .yakut-text-mobile {
        font-family: 'Cinzel', serif;
        font-size: 24px;
        font-weight: 700;
        color: #e01e37;
    }

    /* 3. Icons (Right) */
    .mobile-header-wrapper .mobile-icons {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .mobile-header-wrapper .action-btn {
        position: relative;
        color: #1a1a1a;
        display: flex;
        align-items: center;
    }

    .mobile-header-wrapper .count-badge {
        position: absolute;
        top: -5px;
        right: -8px;
        background: var(--bg-kahve);
        color: var(--bg-krem);
        font-size: 10px;
        width: 16px;
        height: 16px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Body Compensation */
    body {
        padding-top: 70px;
        /* Push content down */
    }
}

@media (max-width: 991px) {
    .header-top-bar {
        display: none;
    }

    .glowing-header {
        padding: 10px 15px !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
        margin-bottom: 0 !important;
        position: fixed;
        /* Fix header to top */
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        justify-content: space-between;
        /* position: relative; */
        background: #fff !important;
        /* Ensure white background */
    }

    /* Fixed Content Overlap on Homepage - Add padding to push content down */
    .anasayfa-page .bubs-homepage-wrapper {
        padding-top: 90px !important;
        /* Increased to match taller header */
        margin-top: 0 !important;
    }

    /* Force header to not push content down too much if relative */
    .header.sticky-bar {
        margin-bottom: 0 !important;
    }

    /* Ensure slider starts after header */
    .shofy-hero-slider {
        margin-top: 0 !important;
    }

    .header-left-section,
    .header-right-section {
        flex: initial;
        width: auto;
        padding: 0;
        justify-content: flex-start;
    }

    /* Absolute Center Logo on Mobile */
    .header-center-section {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        width: auto;
        padding: 0;
    }

    /* Scale down logo text */
    .yakut-text {
        font-size: 28px !important;
        letter-spacing: 1px !important;
    }

    .kozmetik-text {
        font-size: 10px !important;
        letter-spacing: 4px !important;
        margin-left: 2px !important;
    }

    /* Adjust Icons */
    .header-actions {
        gap: 12px;
    }

    .action-btn svg {
        width: 20px;
        height: 20px;
    }

    .header-left-section .main-nav,
    .header-right-section .main-nav,
    .search-text {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        padding: 0;
        margin-right: 15px;
        /* Space from search icon if visible */
    }

    .menu-toggle span {
        width: 22px;
        height: 2px;
        background: #000;
    }

    /* FORCE UNIFICATION: Ensure Homepage Header Matches Category Header Exactly */
    body.anasayfa-page header.header,
    body.anasayfa-page .glowing-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        background: #fff !important;
        background-color: #ffffff !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 9999 !important;
        border-bottom: 1px solid #e5e5e5 !important;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03) !important;
        margin-bottom: 0 !important;
        height: auto !important;
        padding: 20px 15px !important;
        /* Increased padding */
    }

    body.anasayfa-page .yakut-text {
        font-family: 'Cinzel', serif !important;
        font-size: 28px !important;
        letter-spacing: 1px !important;
        /* Fallback to solid color if gradient fails or is invisible */
        color: var(--bg-kahve) !important;
        background: none !important;
        -webkit-text-fill-color: var(--bg-kahve) !important;
    }

    body.anasayfa-page .kozmetik-text {
        color: var(--bg-kahve) !important;
        font-size: 10px !important;
        letter-spacing: 4px !important;
    }

    /* Ensure Icons are consistent */
    body.anasayfa-page .action-btn,
    body.anasayfa-page .action-btn i,
    body.anasayfa-page .action-btn svg {
        color: var(--bg-kahve) !important;
        fill: none !important;
        stroke: var(--bg-kahve) !important;
    }

    /* FORCE LOGO IMAGE VISIBILITY & SIZING */
    body.anasayfa-page .logo-image,
    body.anasayfa-page .header-center-section img {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        max-height: 40px !important;
        min-height: 20px !important;
        /* Ensure min height */
        width: auto !important;
        z-index: 10000 !important;
        /* Add shadow in case it is a white logo on white bg */
        filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));
    }

    /* Ensure styles apply to the link container too */
    body.anasayfa-page .header-center-section a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        height: 100% !important;
    }
}

/* =========================================
   MOBILE MENU STYLES
   ========================================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-krem);
    z-index: 10001;
    transition: left 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: hidden;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
    /* Prevent header from shrinking */
}

.mobile-menu-title {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mobile-menu-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-krem);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--bg-kahve);
}

.mobile-menu-close:hover {
    background: var(--bg-kahve);
    color: #fff;
}

.mobile-nav {
    padding: 20px 20px 80px 20px;
    /* Extra bottom padding */
    width: 100%;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    overscroll-behavior: contain;
}

.mobile-nav-item {
    display: block;
    padding: 20px 0;
    color: var(--bg-kahve);
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    transition: color 0.3s;
}

.mobile-nav-item:hover {
    background: var(--bg-krem);
    color: var(--vurgu-kahve);
    padding-left: 25px;
}

/* Mobile Accordion */
.mobile-nav-accordion {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-parent .mobile-nav-item {
    flex: 1;
    border-bottom: none;
}

.mobile-accordion-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.mobile-accordion-toggle svg {
    transition: transform 0.3s ease;
}

.mobile-nav-accordion.open .mobile-accordion-toggle svg {
    transform: rotate(180deg);
}

.mobile-nav-children {
    max-height: 0;
    overflow: hidden;
    background: var(--bg-krem);
    transition: max-height 0.3s ease;
}

.mobile-nav-accordion.open .mobile-nav-children {
    max-height: 1000px;
}

.mobile-nav-child {
    display: block;
    padding: 12px 20px 12px 35px;
    color: var(--bg-kahve);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(112, 72, 49, 0.1);
    transition: all 0.2s ease;
}

.mobile-nav-child:last-child {
    border-bottom: none;
}

.mobile-nav-child:hover {
    background: rgba(166, 123, 91, 0.15);
    color: var(--vurgu-kahve);
    padding-left: 40px;
}