/* =========================
   ÖĞRETMEN MARKET - HEADER
   (tek satır / responsive)
   ========================= */

:root{
  --tmh-bg:#fff;
  --tmh-text:#111;
  --tmh-border:rgba(0,0,0,.10);
  --tmh-muted:rgba(0,0,0,.55);
  --tmh-radius:12px;
}

/* Header bar */
.tmh-header{
  position:sticky;
  top:0;
  z-index:999;
  background:var(--tmh-bg);
  border-bottom:1px solid var(--tmh-border);
}

/* Container */
.tmh-container{
  max-width:1200px;
  margin:0 auto;
  padding:10px 16px;
}

/* Tek satır */
.tmh-row{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:nowrap;
}

/* -------------------------
   Logo
-------------------------- */
.tmh-brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--tmh-text);
  flex:0 0 auto;
  white-space:nowrap;
  min-width:0;
}

.tmh-logo{
  height:42px !important;
  max-height:42px !important;
  width:auto !important;
  display:block;
  flex-shrink:0;
  object-fit:contain;
}

.tmh-brandtext{
  font-weight:900;
  font-size:16px;
  line-height:1;
  color:var(--tmh-text);
}

/* -------------------------
   Search (Woo product search)
-------------------------- */
.tmh-search{
  flex:1 1 auto;
  min-width:220px;
}

.tmh-search form{
  display:flex;
  width:100%;
  align-items:stretch;
}

.tmh-search input[type="search"],
.tmh-search input[type="text"]{
  flex:1;
  min-width:0;
  padding:10px 14px;
  border:1px solid var(--tmh-border);
  border-right:0;
  border-radius:var(--tmh-radius) 0 0 var(--tmh-radius);
  outline:none;
  background:#fff;
  color:var(--tmh-text);
}

.tmh-search input[type="search"]::placeholder,
.tmh-search input[type="text"]::placeholder{
  color:var(--tmh-muted);
}

/* Temanın bazen "Ara" metni basması için metni kapatıp ikon göstereceğiz */
.tmh-search button,
.tmh-search input[type="submit"]{
  width:44px;
  min-width:44px;
  border:1px solid var(--tmh-border);
  border-radius:0 var(--tmh-radius) var(--tmh-radius) 0;
  background:#111;
  color:#fff;
  cursor:pointer;
  font-size:0;   /* metni gizle */
  line-height:0;
  position:relative;
}

/* Büyüteç ikonu (CSS mask) */
.tmh-search button::before,
.tmh-search input[type="submit"]::before{
  content:"";
  width:18px;
  height:18px;
  display:block;
  background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 18a8 8 0 1 1 5.293-14.293A8 8 0 0 1 10 18Zm11 3-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
          mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M10 18a8 8 0 1 1 5.293-14.293A8 8 0 0 1 10 18Zm11 3-6-6'/%3E%3C/svg%3E") center/contain no-repeat;
  margin:auto;
}

/* -------------------------
   Actions (Mağaza / Hesap / Sepet)
-------------------------- */
.tmh-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.tmh-btn{
  position:relative;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:var(--tmh-radius);
  border:1px solid var(--tmh-border);
  background:#fff;
  text-decoration:none;
  color:var(--tmh-text);
  font-weight:800;
  font-size:14px;
  line-height:1;
  white-space:nowrap;
}

.tmh-btn:hover{ background:rgba(0,0,0,.04); }

/* SVG icon */
.tmh-ico{
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.tm-svg{
  width:18px;
  height:18px;
  display:block;
  stroke:#111 !important; /* currentColor çakışmasın */
}

/* Badge */
.tmh-badge{
  position:absolute;
  top:-6px;
  right:-6px;
  min-width:18px;
  height:18px;
  padding:0 5px;
  border-radius:999px;
  background:#111;
  color:#fff;
  font-size:10px;
  font-weight:900;
  display:flex;
  align-items:center;
  justify-content:center;
  border:2px solid #fff;
}

/* =========================
   RESPONSIVE
   Desktop: tek satır
   Mobil: üstte logo+ikon, altta arama
   ========================= */

/* MOBİL (<=820px): 2 satır */
@media (max-width: 820px){

  /* 2 satıra izin ver */
  .tmh-row{
    flex-wrap: wrap !important;
    align-items: center;
    gap: 10px !important;
  }

  /* Logo (sol) */
  .tmh-brand{
    order: 1;
    flex: 0 0 auto;
  }

  .tmh-logo{
    height: 34px !important;
    max-height: 34px !important;
    width: auto !important;
  }

  /* Logo yazısını kapat */
  .tmh-brandtext{
    display: none !important;
  }

  /* Butonlar (sağ) */
  .tmh-actions{
    order: 2;
    margin-left: auto;    /* sağa yasla */
    flex: 0 0 auto;
    gap: 8px;
  }

  /* Mobilde sadece ikon */
  .tmh-label{
    display: none !important;
  }

  .tmh-btn{
    padding: 10px;
    border-radius: 12px;
  }

  /* ARAMA (2. satır, tam genişlik) */
  .tmh-search{
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    min-width: 0 !important;
    display: block !important;  /* önemli: daha önce gizlendiyse geri aç */
  }

  .tmh-search form{
    width: 100%;
  }

  .tmh-search input[type="search"],
  .tmh-search input[type="text"]{
    padding: 10px 12px;
    font-size: 14px;
  }

  .tmh-search button,
  .tmh-search input[type="submit"]{
    width: 44px;
    min-width: 44px;
  }
}

/* ÇOK KÜÇÜK (<=420px): daha sıkı */
@media (max-width: 420px){
  .tmh-container{
    padding: 10px 12px;
  }

  .tmh-logo{
    height: 30px !important;
    max-height: 30px !important;
  }

  .tmh-actions{
    gap: 6px;
  }

  .tmh-btn{
    padding: 9px;
  }
}
