/* ========================================== */
/* تنسيقات التوب بار */
/* ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: #f5f5f5;
}

.top-bar {
    background-color: #e9e1dd;
    padding: 15px 0;
    width: 100%;
    direction: rtl;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.top-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* اللوجو */
.logo {
    font-size: 38px;
    font-weight: 900;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: transparent;
    -webkit-text-stroke: 1.5px #000;
    font-family: 'Arial Black', sans-serif;
}

/* شريط البحث (ديسكتوب) */
.search-wrapper {
    flex: 1;
    position: relative;
    max-width: 900px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 8px;
    padding: 5px 10px;
}

.search-select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #f9f9f9;
    font-size: 13px;
    color: #333;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    min-width: 140px;
}

.search-select:focus {
    border-color: #000;
}

.search-input {
    flex: 1;
    padding: 10px 40px 10px 15px;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    outline: none;
}

.search-btn {
    position: absolute;
    left: 15px;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

/* الحساب */
.account-section {
    display: flex;
    align-items: center;
}

.account-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    gap: 4px;
}

.account-item span {
    font-size: 13px;
    font-weight: 500;
}

/* إخفاء عناصر الموبايل */
.mobile-only {
    display: none;
}

/* ========================================== */
/* Modal الدول للموبايل */
/* ========================================== */

.countries-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
}

.countries-modal.active {
    display: block;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 70vh;
    background: #fff;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.close-modal {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.close-modal svg {
    stroke: #666;
}

.modal-body {
    padding: 15px;
    max-height: calc(70vh - 70px);
    overflow-y: auto;
}

.modal-body .country-search {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.modal-body .country-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    text-align: right;
}

.modal-body .country-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.modal-body .country-list li {
    padding: 0;
}

.modal-body .country-list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s;
}

.modal-body .country-list a:hover {
    background: #f9f9f9;
}

.modal-body .country-list img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #eee;
}

/* ========================================== */
/* Modal البحث للموبايل والآيباد */
/* ========================================== */

.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
}

.search-modal.active {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.search-modal-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: #fff;
    animation: modalSlideDown 0.3s ease;
    max-height: 80vh;
    overflow-y: auto;
}

@keyframes modalSlideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.search-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.close-search-modal {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.close-search-modal svg {
    stroke: #666;
}

.search-modal-body {
    padding: 20px;
}

.search-wrapper-modal {
    position: relative;
    width: 100%;
    margin-bottom: 25px;
}

.search-input-modal {
    width: 100%;
    padding: 14px 50px 14px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background-color: #f9f9f9;
    font-size: 16px;
    color: #333;
    outline: none;
    transition: all 0.3s;
    direction: rtl;
}

.search-input-modal:focus {
    border-color: #000;
    background-color: #fff;
}

.search-btn-modal {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.search-btn-modal:hover {
    background: #333;
}

.search-suggestions {
    margin-top: 20px;
}

.suggestions-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.suggestions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.suggestions-list li {
    margin-bottom: 8px;
}

.suggestions-list a {
    display: block;
    padding: 10px 15px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background 0.2s;
}

.suggestions-list a:hover {
    background: #eee;
}

/* ========================================== */
/* تجاوب الشاشات */
/* ========================================== */

@media (max-width: 992px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .top-bar-container {
        padding: 0 20px;
    }

    .icon-btn {
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
        color: #000;
        display: flex;
        align-items: center;
    }

    .logo {
        font-size: 28px;
    }
}
