/* תיקון בעיות ההדר אחרי המעבר ל-Tailwind */

/* תיקון ההדר לדסקטופ */
.desktop-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: white !important;
    border-bottom: 1px solid #eee !important;
    width: 100% !important;
}

.desktop-header .middle-bar {
    padding: 15px 0 !important;
    border-bottom: 1px solid #eee !important;
}

.desktop-header .container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

.desktop-header .row {
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

.desktop-header .col-2,
.desktop-header .col-8 {
    padding: 0 15px !important;
}

/* תיקון מיקום הלוגו במרכז */
.desktop-header .col-8.text-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.desktop-header .store-brand {
    display: inline-block !important;
}

.desktop-header .store-brand img {
    max-width: var(--logo-destop-width, 180px) !important;
    height: auto !important;
    display: block !important;
}

/* תיקון מיקום אייקון החיפוש */
.desktop-header .col-2.text-start {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center !important;
}

.desktop-header .search-trigger {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* תיקון מיקום האייקונים בצד ימין */
.desktop-header .col-2.text-end {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
}

.desktop-header .d-flex.justify-content-end {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
}

.desktop-header .cart-trigger,
.desktop-header .user-account-link {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

/* תיקון ההדר המובייל */
.mobile-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 15px !important;
    background-color: white !important;
    border-bottom: 1px solid #eee !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    width: 100% !important;
}

.mobile-header-right {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

.mobile-header-center {
    flex-grow: 1 !important;
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.mobile-header-left {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
}

.mobile-logo {
    display: inline-block !important;
}

.mobile-logo img {
    max-width: var(--logo-mobile-width, 100px) !important;
    height: auto !important;
    display: block !important;
}

/* תיקון כללי לכפתורים ואייקונים */
.search-trigger,
.menu-trigger,
.cart-trigger {
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* תיקון עבור דפי user area שמשתמשים ב-Tailwind */
.user-page .desktop-header,
.user-page .mobile-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05) !important;
}

/* וידוא שהאייקונים נראים */
.search-icon,
.cart-icon,
.wishlist-icon,
.user-account-icon,
.hamburger-icon {
    width: 26px !important;
    height: 26px !important;
    display: block !important;
}

/* תיקון למכולה */
.container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 15px !important;
}

/* תיקון למקרה של התנגשות עם Tailwind reset */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* הסתרת scrollbar אופקי אם נוצר */
body {
    overflow-x: hidden;
}

/* תיקון נוסף למניעת השפעת Tailwind reset */
.desktop-header .container,
.mobile-header .container {
    box-sizing: border-box !important;
}

/* תיקון מיוחד לעמוד החשבון */
.user-page .desktop-header .store-brand img,
.user-page .mobile-header .mobile-logo img {
    vertical-align: middle !important;
}

/* תיקון למניעת התנגשות עם Tailwind preflight */
.desktop-header *,
.mobile-header * {
    box-sizing: border-box !important;
}

/* תיקון לוודא שהאייקונים לא נעלמים */
.desktop-header img,
.mobile-header img {
    opacity: 1 !important;
    visibility: visible !important;
}

/* תיקון למניעת גלישה */
.desktop-header,
.mobile-header {
    overflow: visible !important;
    max-width: 100% !important;
}

/* תיקון אוטומטי לגובה */
.desktop-header .middle-bar,
.mobile-header {
    min-height: 70px !important;
    height: auto !important;
}

/* תיקון ליישור אנכי */
.desktop-header .row,
.mobile-header {
    align-items: center !important;
    justify-content: space-between !important;
}

/* וידוא שכל האלמנטים נמתחים לגובה מלא */
.desktop-header .col-2,
.desktop-header .col-8,
.mobile-header > div {
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
}

/* תיקון ספציפי לטלפונים קטנים */
@media (max-width: 576px) {
    .mobile-header {
        padding: 8px 10px !important;
    }
    
    .mobile-header-right,
    .mobile-header-left {
        gap: 0px !important;
    }
    
    .mobile-logo img {
        max-width: 80px !important;
    }
}

/* תיקון מיצוב מדויק לפי הצורך */
.desktop-header .store-brand a,
.mobile-header .mobile-logo a {
    display: inline-block !important;
    line-height: 1 !important;
}

/* וידוא מרכוז מושלם */
.desktop-header .col-8.text-center .store-brand {
    margin: 0 auto !important;
}

.mobile-header-center .mobile-logo {
    margin: 0 auto !important;
}

/* תיקון למניעת קפיצות באנימציות */
.desktop-header *,
.mobile-header * {
    backface-visibility: hidden !important;
    -webkit-font-smoothing: antialiased !important;
}

/* תיקון למקרה של overflow */
.desktop-header .container,
.mobile-header {
    position: relative !important;
    width: 100% !important;
}

/* תיקון לוודא שהאלמנטים לא יוצאים מהמסגרת */
.desktop-header .col-2,
.desktop-header .col-8 {
    overflow: visible !important;
    white-space: nowrap !important;
}

/* תיקון פונט לכל האיזור האישי */
body:has([class*="max-w-7xl"]),
body:has([class*="bg-slate-50"]),
body[data-store-slug] {
    font-family: 'Noto Sans Hebrew', sans-serif !important;
}

/* וידוא שכל הטקסט באיזור האישי ישתמש בפונט הנכון */
.max-w-7xl,
.max-w-7xl * {
    font-family: 'Noto Sans Hebrew', sans-serif !important;
}

.user-page .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.user-page .container-fluid {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* תיקון padding/margin של Bootstrap שמפריע ל-Tailwind */
.user-page * {
    box-sizing: border-box !important;
}

.user-page .row {
    margin: 0 !important;
}

.user-page .col-* {
    padding: 0 !important;
}

/* תיקון התנגשויות בין Bootstrap ו-Tailwind */
.user-page .d-flex,
.user-page .d-block,
.user-page .d-none {
    display: initial !important;
}

.user-page .justify-content-center,
.user-page .justify-content-end,
.user-page .align-items-center {
    justify-content: initial !important;
    align-items: initial !important;
}

/* איפוס Bootstrap classes שמפריעים ל-Tailwind */
.user-page .text-center,
.user-page .text-end,
.user-page .text-start {
    text-align: initial !important;
}

.user-page .mb-*,
.user-page .mt-*,
.user-page .mx-*,
.user-page .my-*,
.user-page .p-*,
.user-page .m-* {
    margin: initial !important;
    padding: initial !important;
}

/* וידוא שה-Tailwind spacing עובד */
.user-page .p-4 {
    padding: 1rem !important;
}

.user-page .p-6 {
    padding: 1.5rem !important;
}

.user-page .p-8 {
    padding: 2rem !important;
}

.user-page .py-12 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

.user-page .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.user-page .mb-2 {
    margin-bottom: 0.5rem !important;
}

.user-page .mb-4 {
    margin-bottom: 1rem !important;
}

.user-page .mb-6 {
    margin-bottom: 1.5rem !important;
}

.user-page .mb-8 {
    margin-bottom: 2rem !important;
}

.user-page .space-y-6 > * + * {
    margin-top: 1.5rem !important;
}

.user-page .gap-6 {
    gap: 1.5rem !important;
}

/* תיקון ספציפי לטיילוויד במקומות שבהם יש ניגוד עם בוטסטרפ */
[class*="bg-slate-"],
[class*="text-slate-"],
[class*="border-slate-"],
[class*="shadow-"],
[class*="rounded-"],
[class*="hover:"],
[class*="transition-"],
[class*="duration-"],
[class*="ease-"] {
    font-family: 'Noto Sans Hebrew', sans-serif !important;
}

/* תיקון למניעת התנגשות עם בוטסטרפ grid */
[class*="bg-slate-"] .container,
[class*="bg-slate-"] .container-fluid {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* תיקון responsive של Tailwind */
[class*="sm:px-6"],
[class*="lg:px-8"] {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 640px) {
    [class*="sm:px-6"] {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    [class*="lg:px-8"] {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    [class*="lg:w-80"] {
        width: 20rem !important;
    }
    
    [class*="lg:mb-0"] {
        margin-bottom: 0 !important;
    }
}

/* תיקון חשוב לspacing של Tailwind */
.min-h-screen {
    min-height: 100vh !important;
}

.bg-slate-50 {
    background-color: #f8fafc !important;
}

.bg-white {
    background-color: #ffffff !important;
}

.rounded-2xl {
    border-radius: 1rem !important;
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
}

.max-w-md {
    max-width: 28rem !important;
}

.max-w-7xl {
    max-width: 80rem !important;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.text-center {
    text-align: center !important;
}

.text-3xl {
    font-size: 1.875rem !important;
    line-height: 2.25rem !important;
}

.text-xl {
    font-size: 1.25rem !important;
    line-height: 1.75rem !important;
}

.text-lg {
    font-size: 1.125rem !important;
    line-height: 1.75rem !important;
}

.text-sm {
    font-size: 0.875rem !important;
    line-height: 1.25rem !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-medium {
    font-weight: 500 !important;
}

.text-slate-800 {
    color: #1e293b !important;
}

.text-slate-700 {
    color: #334155 !important;
}

.text-slate-600 {
    color: #475569 !important;
}

.text-blue-600 {
    color: #2563eb !important;
}

.grid {
    display: grid !important;
}

.flex {
    display: flex !important;
}

.items-center {
    align-items: center !important;
}

.justify-center {
    justify-content: center !important;
}

.w-full {
    width: 100% !important;
}

/* איפוס Bootstrap רק לדפי User Area */
body:has([class*="max-w-7xl"]),
body:has([class*="bg-slate-50"]) {
    margin: 0 !important;
    padding: 0 !important;
}

/* איפוס container רק כשיש Tailwind classes */
body:has([class*="max-w-7xl"]) .container,
body:has([class*="max-w-7xl"]) .container-fluid {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* איפוס Bootstrap grid רק כשיש Tailwind */
body:has([class*="max-w-7xl"]) .row {
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    margin: 0 !important;
}

body:has([class*="max-w-7xl"]) [class*="col-"] {
    padding: 0 !important;
}

/* וידוא Tailwind spacing עובד במקום Bootstrap */
.max-w-7xl {
    max-width: 80rem !important;
}

.py-8 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.sm\:px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.lg\:px-8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.p-6 {
    padding: 1.5rem !important;
}

.p-8 {
    padding: 2rem !important;
}

.space-y-8 > * + * {
    margin-top: 2rem !important;
}

.lg\:space-x-8 > * + * {
    margin-right: 2rem !important;
    margin-left: 0 !important;
}

.lg\:space-y-0 > * + * {
    margin-top: 0 !important;
}

.flex-1 {
    flex: 1 1 0% !important;
}

.flex-shrink-0 {
    flex-shrink: 0 !important;
}

.w-80 {
    width: 20rem !important;
}

.min-w-0 {
    min-width: 0px !important;
}

/* תיקון responsive */
@media (min-width: 640px) {
    .sm\:px-6 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (min-width: 1024px) {
    .lg\:px-8 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    .lg\:flex-row {
        flex-direction: row !important;
    }
    
    .lg\:space-x-8 > * + * {
        margin-right: 2rem !important;
        margin-left: 0 !important;
        margin-top: 0 !important;
    }
    
    .lg\:space-y-0 > * + * {
        margin-top: 0 !important;
    }
    
    .lg\:w-80 {
        width: 20rem !important;
    }
}

/* תיקון עבור responsive breakpoints */
@media (max-width: 991.98px) {
    .desktop-header {
        display: none !important;
    }
    
    .mobile-header {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .mobile-header {
        display: none !important;
    }
    
    .desktop-header {
        display: block !important;
    }
    
    .lg\:w-80 {
        width: 20rem !important;
    }
}

/* תיקון אייקוני Font Awesome */
.fas, .far, .fab, .fa, 
i.fas, i.far, i.fab, i.fa,
[class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands", FontAwesome !important;
    font-weight: 900 !important;
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-weight: 400 !important;
    font-family: "Font Awesome 6 Brands" !important;
}

/* וידוא שאייקונים נטענים נכון */
i.fas, i.far, i.fab {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* תיקון אייקונים ב-Tailwind */
.user-page .fas,
.user-page .far,
.user-page .fab,
body * .fas,
body * .far, 
body * .fab,
* .fas, * .far, * .fab {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.user-page .far,
body * .far,
* .far {
    font-weight: 400 !important;
}

/* וידוא שאף אלמנט לא דורס את Font Awesome */
* {
    --fa-font-family: "Font Awesome 6 Free" !important;
}

/* תיקון ספציפי לכל אלמנט עם קלאס של Font Awesome */
[class^="fa-"], 
[class*=" fa-"] {
    font-family: "Font Awesome 6 Free" !important;
} 