@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    background-color: #F5F3EF;
        color-scheme: light only;

}

* {
    color-scheme: light only;
}

html {
    color-scheme: light only;
}

/* إزالة اللون الأزرق من جميع العناصر */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

button,
a,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
    outline: none;
    -webkit-focus-ring-color: transparent;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.header {
    background-color: #d7cfc4;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 100%;
    margin: 0 auto 64px auto;
    border-radius: 2px;
    transition:
        transform 0.6s ease,
        max-width 0.7s ease,
        border-radius 0.7s ease,
        background-color 0.4s ease,
        backdrop-filter 0.4s ease;
}

.logo {
    width: 100px;
}

.nav-center {
    flex: 1;
    display: flex;
    justify-content: center;
}


.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-list li a {
    position: relative;
    text-decoration: none;
    color: #000;
    font-weight: bold;
    padding: 5px 4px;
    transition: color 0.3s ease;
    font-size: 18px;
}

/* ====== Search Design ====== */

/* Search icon container */
.search-icon-container {
    width: auto;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-right: 0;
    margin-right: 10px;
}

/* Search button */
.search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: scale(1.1);
}

.search-btn:active {
    transform: scale(0.95);
}

.search-btn svg {
    display: block;
}

/* Search popup overlay */
.search-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 15vh;
    z-index: 2000;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.search-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.search-popup.visible {
    opacity: 1;
    visibility: visible;
}

/* Popup content */
.search-popup-content {
    background-color: rgb(215, 207, 196);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.search-popup.visible .search-popup-content {
    transform: scale(1);
}

/* Close button */
.close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #000;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg);
}

/* Search form */
#search-form {
    display: flex;
    gap: 12px;
    margin-top: 0;
}

#search-popup-field {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    outline: none;
}

#search-popup-field:focus {
    border-color: #6b4f2e;
    background-color: rgba(255, 255, 255, 0.8);
}

#search-popup-field::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Submit button */
.search-submit-btn {
    padding: 14px 32px;
    background-color: #6b4f2e;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: bold;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background-color: #5a3f24;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 79, 46, 0.3);
}

.search-submit-btn:active {
    transform: translateY(0);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #000;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(.68, -0.55, .27, 1.55);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 90px;
    left: 5%;
    right: 5%;
    background-color: rgba(215, 207, 196, 0.95);
    backdrop-filter: blur(10px);
    padding: 25px 15px;
    text-align: center;
    z-index: 999;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.mobile-menu.show {
    display: block;
    transform: scale(1);
    opacity: 1;
}

.mobile-menu.hide {
    transform: scale(0.9);
    opacity: 0;
    pointer-events: none;
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu li {
    opacity: 0;
    transform: translateY(15px);
    animation: fadeInItem 0.6s forwards;
}

.mobile-menu.show li:nth-child(1) {
    animation-delay: 0.1s;
}

.mobile-menu.show li:nth-child(2) {
    animation-delay: 0.25s;
}

.mobile-menu.show li:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes fadeInItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-menu a {
    color: #000;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

a {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

a[href^="mailto"],
a[href^="tel"],
a[href*="wa.me"],
a[href*="api.whatsapp.com"] {
    -webkit-user-select: text;
    user-select: text;
}

.mobile-menu a:hover {
    color: #6b4f2e;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-center {
        display: none;
    }

    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .hamburger {
        right: 20px;
        left: auto;
    }
    
    .search-icon-container {
        position: absolute;
        left: 20px;
        width: auto;
    }
    
    .search-popup-content {
        padding: 50px 25px 30px 25px;
        width: 88%;
        max-width: 400px;
    }
    
    .close-btn {
        top: 15px;
        left: 15px;
        font-size: 22px;
        width: 32px;
        height: 32px;
    }
    
    #search-form {
        flex-direction: column;
        gap: 12px;
    }
    
    #search-popup-field {
        padding: 13px 18px;
        font-size: 15px;
    }
    
    .search-submit-btn {
        width: 100%;
        padding: 13px 20px;
    }
    
    .search-popup {
        padding-top: 25vh;
    }
}





/* أيقونة المفضلة */
.wishlist-icon-container {
    position: relative;
    margin-left: 5px;
}

.wishlist-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.wishlist-link:hover {
    background: rgba(0, 0, 0, 0.05);
}

.wishlist-link svg {
    color: #000;
}

.wishlist-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wishlist-count.show {
    opacity: 0;
}





/* أضف هذا في نهاية ملف header.css */

@media (max-width: 768px) {
    .header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 12px 15px;
        gap: 10px;
    }

    /* الهمبرغر على اليمين */
    .hamburger {
        display: block;
        order: 1;
        grid-column: 1;
        justify-self: start;
    }

    /* اللوغو في المنتصف */
    .logo {
        order: 2;
        grid-column: 2;
        justify-self: center;
        position: static;
        transform: none;
    }

    /* السيرش والقلب على اليسار */
    .search-icon-container,
    .wishlist-icon-container {
        display: flex;
        order: 3;
        grid-column: 3;
    }

    /* مجموعة الأيقونات على اليسار */
    .header::after {
        content: '';
        display: none;
    }

    /* ترتيب الأيقونات */
    .wishlist-icon-container {
        margin-left: 0;
        margin-right: 10px;
    }

    .search-icon-container {
        margin-left: 40px;
    }

    /* إخفاء الـ nav */
    .nav-center {
        display: none;
    }

    .spacer {
        display: none;
    }
}
