/* =========================================
   Kitchen2MyTable Mobile Header v2.2
   Samsung Fold optimized two-row layout
   Image path used by header.php: /images/logosmall.png
========================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

.k2t-header {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  padding: 8px 10px 10px;
  background: #fff;
  border-bottom: 1px solid #eee;
  font-family: 'Poppins', sans-serif;
  gap: 8px;
  overflow-x: hidden;
}

.k2t-header-row {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Row 1: logo + login/register + status dot */
.k2t-header-row-top {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) auto minmax(24px, 1fr);
  column-gap: 10px;
  align-items: center;
}

.k2t-logo {
  justify-self: start;
  display: flex;
  align-items: center;
  min-width: 0;
}

.k2t-logo a,
.k2t-logo picture,
.k2t-logo img {
  display: block;
}

.k2t-logo img {
  width: auto;
  height: 42px;
  max-width: 90px;
  object-fit: contain;
}

.custom-login-btn,
.k2t-login-btn {
  justify-self: center;
  background-color: #80336b;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  min-width: 116px;
  max-width: 150px;
  text-align: center;
  margin: 0 !important;
  white-space: normal;
}

.k2t-login-light {
  justify-self: end;
  flex: 0 0 12px;
  width: 12px !important;
  height: 12px !important;
  min-width: 12px;
  margin: 0 2px 0 0 !important;
  border-radius: 50%;
}

/* Row 2: search + microphone + search button + hamburger */
.k2t-header-row-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 56px 34px;
  column-gap: 8px;
  align-items: center;
}

.k2t-search-form {
  display: contents !important;
  margin: 0 !important;
  max-width: none !important;
}

.k2t-search-form input {
  grid-column: 1;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 44px;
  padding: 8px 10px !important;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px !important;
  line-height: 1.2;
}

.k2t-voice-btn,
#voiceSearchBtn {
  grid-column: 2;
  width: 34px !important;
  min-width: 34px !important;
  height: 44px;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.k2t-voice-btn img,
#voiceSearchBtn img {
  display: block !important;
  width: 23px !important;
  height: 23px !important;
  object-fit: contain;
}

.k2t-search-submit-btn,
.k2t-search-form button[type="submit"] {
  grid-column: 3;
  width: 56px !important;
  min-width: 56px !important;
  height: 44px;
  padding: 0 !important;
  margin: 0 !important;
  background-color: #80336b !important;
  border: none !important;
  border-radius: 7px !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: hidden;
}

.k2t-search-submit-btn img,
.k2t-search-form button[type="submit"] img {
  display: block !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px;
  object-fit: contain;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.k2t-nav-container {
  grid-column: 4;
  width: 34px;
  min-width: 34px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  position: relative;
}

#k2t-nav-toggle {
  display: none;
}

.k2t-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  min-width: 34px;
  height: 44px;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  color: #80336b;
  margin: 0 !important;
  padding: 0 !important;
}

/* Sliding drawer */
.k2t-nav-links {
  position: fixed;
  top: 0;
  right: 0;
  width: min(280px, 86vw);
  height: 100%;
  background: #fff;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 3000;
  padding: 22px 20px;
  box-shadow: -5px 0 20px rgba(0,0,0,0.15);
  overflow-y: auto;
  box-sizing: border-box;
}

#k2t-nav-toggle:checked ~ .k2t-nav-links {
  transform: translateX(0);
}

.k2t-nav-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.k2t-nav-links li {
  margin-bottom: 12px;
}

.k2t-nav-links a,
.k2t-panel-btn {
  display: block;
  width: 100%;
  text-decoration: none;
  color: #80336b;
  font-weight: 600;
  font-size: 18px;
  padding: 8px 0;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  text-align: left;
  cursor: pointer;
}

.k2t-nav-links a:hover,
.k2t-panel-btn:hover {
  color: #f7b948;
}

.k2t-menu-panel {
  display: none;
}

.k2t-menu-panel.active {
  display: block;
}

.k2t-panel-back {
  font-size: 16px;
  margin-bottom: 10px;
  background: none;
  border: none;
  color: #80336b;
  cursor: pointer;
}

.k2t-menu-panel h3 {
  color: #80336b;
  margin: 10px 0 15px;
}

@media (min-width: 600px) and (max-width: 992px) {
  .k2t-header {
    padding-left: 16px;
    padding-right: 16px;
  }

  .k2t-header-row-bottom {
    grid-template-columns: minmax(260px, 1fr) 40px 80px 40px;
    column-gap: 10px;
  }

  .k2t-search-submit-btn,
  .k2t-search-form button[type="submit"] {
    width: 80px !important;
    min-width: 80px !important;
  }

  .k2t-nav-container,
  .k2t-menu-icon {
    width: 40px;
    min-width: 40px;
  }
}

@media (max-width: 380px) {
  .k2t-header {
    padding-left: 8px;
    padding-right: 8px;
    gap: 7px;
  }

  .k2t-header-row-top {
    grid-template-columns: minmax(64px, 1fr) auto minmax(18px, 1fr);
    column-gap: 8px;
  }

  .k2t-logo img {
    height: 38px;
    max-width: 78px;
  }

  .custom-login-btn,
  .k2t-login-btn {
    min-width: 108px;
    min-height: 46px;
    padding: 7px 14px;
    font-size: 15px;
  }

  .k2t-header-row-bottom {
    grid-template-columns: minmax(0, 1fr) 30px 50px 32px;
    column-gap: 6px;
  }

  .k2t-voice-btn,
  #voiceSearchBtn {
    width: 30px !important;
    min-width: 30px !important;
  }

  .k2t-search-submit-btn,
  .k2t-search-form button[type="submit"] {
    width: 50px !important;
    min-width: 50px !important;
  }

  .k2t-nav-container,
  .k2t-menu-icon {
    width: 32px;
    min-width: 32px;
  }

  .k2t-menu-icon {
    font-size: 32px;
  }
}

.k2t-search-pill { grid-column:1 / 4; justify-self:end; min-height:44px; padding:0 19px; border:0; border-radius:999px; background:#80336b; color:#fff; display:inline-flex; align-items:center; justify-content:center; gap:9px; font:700 14px/1 'Poppins',sans-serif; cursor:pointer; }
.k2t-search-pill svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
