:root{
  --red:#440a0a;
  --red2:#2b0505;
  --red3:#2b0505;
  --red4:#280303;

  --text:#fff;
  --muted:rgba(255,255,255,.72);
}

.site-header{
  direction: rtl;
  background: linear-gradient(180deg, var(--red), var(--red2));
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.header-bar{
  min-height: 64px;
  padding: 10px 0;

  display: grid;
  grid-template-columns: 190px 1fr 190px;
  align-items: center;
  gap: 14px;
}

.header-logo img{
  height: 42px;
  width: auto;
  display: block;
}

.header-search{ width: 100%; }

.search-form{
  width: 100%;
  height: 44px;
  border-radius: 14px;

  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.10);

  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;

  transition: border-color .2s ease, background .2s ease;
}

.search-form:focus-within{
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
}

.search-btn{
  border: 0;
  background: transparent;
  color: rgba(255,255,255,.85);
  padding: 0 6px;
  line-height: 0;
}

.search-input{
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--text);
  font-size: 14px;
}

.search-input::placeholder{ color: rgba(255,255,255,.65); }

.header-actions{
  display: flex;
  justify-content: flex-start; /* چون RTL هستیم، سمت چپ */
}

.account-btn{
  height: 44px;
  border-radius: 14px;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 0 14px;

  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.10);
  color: #fff;

  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}

.account-btn:hover{
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.07));
  border-color: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

.account-btn i{
  font-size: 18px;
  color: rgba(255,255,255,.9);
}

.account-text{
  font-weight: 700;
  font-size: 13px;
}

/* ===== موبایل ===== */
@media (max-width: 768px){
  .header-bar{
    /* حالا فقط دو ستون داریم: search و actions */
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "search actions";
    gap: 10px;
    padding: 10px 0 12px;
  }

  /* لوگو در موبایل مخفی میشه */
  .header-logo { display: block; }

  .header-actions{ grid-area: actions; }
  .header-search{ display: none; }

  /* متن حساب کاربری روی موبایل مخفی بشه فقط آیکن */
  .account-text{ display:none; }

  .account-btn{
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .search-form{ height: 44px; border-radius: 14px; }
}

.HeaderText-Container{
  display: none;
}

@media (max-width: 768px){

  .HeaderText-Container{
    display: flex;
    flex-direction: column;
    justify-content: center;

    margin-right: 10px;

    /* اینا کلیدی هستن */
    align-items: flex-start;
    gap: 6px;
  }

  .HeaderText-Container h2{
    font-size: 17px;
    font-weight: 800;
    color: #fff;

    margin: 0;
    padding: 0;

    line-height: 1;
    display: block;
  }

  .HeaderText-Container p{
    font-size: 11px;
    color: rgba(255,255,255,.7);

    margin: 0;
    padding: 0;

    line-height: 1;
    display: block;
  }
}
@media (max-width: 768px){
  .header-bar{
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo text actions";
    align-items: center;
  }

  .header-logo{
    grid-area: logo;
  }

  .HeaderText-Container{
    grid-area: text;
  }

  .header-actions{
    grid-area: actions;
  }
}