/* ===============================
   MOBILE HEADER CSS - COMPLETELY FIXED
   Issue: body.mobile-sticky-enabled #site-header.is-sticky ~ * was breaking layout
================================ */

/* ===============================
   MOBILE TOPBAR - IMPROVED WITH ARROWS
================================ */

.perfecto-mobile-topbar {
    display: none;
    width: 100%;
    background: var(--mobile-topbar-bg, #111827);
    color: var(--mobile-topbar-text, #ffffff);
    font-size: var(--mobile-topbar-font-size, 13px);
    height: var(--mobile-topbar-height, 40px);
    overflow: hidden;
    position: relative;
}

@media (max-width: 900px) {
    .perfecto-mobile-topbar {
        display: block;
    }
    
    .desktop-topbar {
        display: none !important;
    }
}

/* ===============================
   TEXT SLIDER WITH ARROWS
================================ */

.pf-mobile-slider {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 8px;
}

/* ARROW BUTTONS */
.pf-slider-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.pf-slider-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pf-slider-arrow:active {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0.95);
}

.pf-slider-arrow svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* SLIDER CONTAINER */
.pf-slider-container {
    flex: 1;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.pf-slider-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SLIDE ITEMS */
.pf-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    transform: translateX(100%);
}

.pf-slide-item.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

.pf-slide-item.prev {
    transform: translateX(-100%);
}

.pf-slide-item a,
.pf-slide-item span {
    color: inherit;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.pf-slide-item a:hover {
    text-decoration: underline;
}

/* FADE ANIMATION */
.pf-mobile-slider[data-animation="fade"] .pf-slide-item {
    transform: translateX(0);
}

.pf-mobile-slider[data-animation="fade"] .pf-slide-item.active {
    opacity: 1;
}

.pf-mobile-slider[data-animation="fade"] .pf-slide-item:not(.active) {
    opacity: 0;
}



/* ===============================
   STATIC TEXT
================================ */

.pf-mobile-static {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
    text-align: center;
}

.pf-mobile-static a,
.pf-mobile-static span {
    color: inherit;
    text-decoration: none;
}

.pf-mobile-static a:hover {
    text-decoration: underline;
}

/* ===============================
   BANNER
================================ */

.pf-mobile-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 20px;
}

.pf-mobile-banner a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.pf-mobile-banner svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.pf-mobile-banner a:active svg {
    transform: translateX(4px);
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
================================ */

@media (max-width: 480px) {
    .pf-slider-arrow {
        width: 24px;
        height: 24px;
    }
    
    .pf-slider-arrow svg {
        width: 12px;
        height: 12px;
    }
    
    .pf-slide-item {
        padding: 0 10px;
        font-size: 12px;
    }
    
  
}

/* ===============================
   ANIMATION PERFORMANCE
================================ */

.pf-slider-track,
.pf-slide-item {
    will-change: transform, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* ===============================
   ACCESSIBILITY
================================ */

.pf-slider-arrow:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}



/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .pf-slide-item,
    .pf-slider-arrow {
        transition: none;
    }
}

/* ===============================
   MOBILE HEADER
================================ */

.mobile-header-wrapper {
    display: none;
}

@media (max-width: 900px) {
    .mobile-header-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        position: relative;
    }
    
    /* Hide desktop header elements */
    .desktop-header-section {
        display: none !important;
    }
}

.mobile-header-left,
.mobile-header-center,
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-header-left {
    flex: 1;
    justify-content: flex-start;
}

.mobile-header-center {
    flex: 0 0 auto;
    justify-content: center;
}

.mobile-header-right {
    flex: 1;
    justify-content: flex-end;
}

/* HAMBURGER BUTTON */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--mobile-hamburger-color, #111827);
    transition: background 0.2s ease;
}

.mobile-menu-toggle:active {
    background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* MOBILE ICONS */
.mobile-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: var(--mobile-icon-color, #111827);
    transition: background 0.2s ease, color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-icon:active {
    background: rgba(0, 0, 0, 0.05);
    color: var(--mobile-icon-hover, #2563eb);
}

.mobile-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.2;
}

/* Mobile Icon Counter */
.mobile-icon-count {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--header-counter-bg, #ef4444);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ===============================
   RESPONSIVE ADJUSTMENTS
================================ */

@media (max-width: 480px) {
    .mobile-header-icons {
        gap: 4px;
    }
    
    .mobile-icon {
        width: 40px;
        height: 40px;
    }
    
    .mobile-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* ===============================
   MOBILE HEADER HEIGHT
================================ */

@media (max-width: 900px) {
    #site-header {
        min-height: var(--mobile-header-height, 60px);
    }
    
    #site-header .header-inner {
        min-height: var(--mobile-header-height, 60px);
    }
}

/* ===============================
   MOBILE STICKY HEADER - COMPLETELY REMOVED
   The problematic code has been deleted
================================ */

/* REMOVED - THIS WAS THE PROBLEM:
@media (max-width: 900px) {
    body.mobile-sticky-enabled #site-header.is-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
    }
    
    body.mobile-sticky-enabled #site-header.is-sticky ~ * {
        padding-top: var(--mobile-header-height, 60px);  <-- THIS WAS BREAKING EVERYTHING
    }
}
*/

/* If you want sticky mobile header, use this instead: */
/*
@media (max-width: 900px) {
    body.mobile-sticky-enabled #site-header.is-sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
    }
}
*/