/*
Theme Name: ThekedarBhai
Theme URI: https://thekedarbhai.com
Author: ThekedarBhai
Description: Standalone mobile-first theme for ThekedarBhai V2. Pair with ThekedarBhai Core plugin.
Version: 3.6.0
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: thekedarbhai
License: GPL-2.0-or-later
*/

:root {
  --tb-bg: #f3efe6;
  --tb-ink: #1c2418;
  --tb-muted: #4d5a45;
  --tb-accent: #0f6b4c;
  --tb-accent-2: #c45c26;
  --tb-amber: #e0a52c;
  --tb-orange: #c45c26;
  --tb-tint: #e7efe8;
  --tb-line: rgba(28, 36, 24, 0.12);
  --tb-font: "Tiro Devanagari Hindi", Georgia, serif;
  --tb-sans: "Figtree", "Segoe UI", sans-serif;
}

/* Let long mobile forms use the screen instead of a multi-row sticky header. */
@media (max-width: 640px) {
  .tb-site-header { position: static !important; }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.tb-theme {
  margin: 0;
  color: var(--tb-ink);
  font-family: var(--tb-sans);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(15, 107, 76, 0.12), transparent 60%),
    radial-gradient(900px 400px at 100% 0%, rgba(196, 92, 38, 0.1), transparent 55%),
    linear-gradient(180deg, #efe8da 0%, var(--tb-bg) 45%, #e7efe8 100%);
  min-height: 100vh;
}

.tb-site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(243, 239, 230, 0.92);
  border-bottom: 1px solid var(--tb-line);
}

.tb-site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tb-site-title {
  margin: 0;
  font-family: var(--tb-font);
  font-size: 1.35rem;
}

.tb-site-title a {
  color: inherit;
  text-decoration: none;
}

.tb-site-logo {
  margin: 0;
  line-height: 0;
}

.tb-site-logo a {
  display: inline-block;
  vertical-align: middle;
}

.tb-site-logo img {
  display: block;
  height: 52px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.tb-theme .custom-logo {
  height: 52px;
  width: auto;
  max-width: 280px;
}

.tb-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
}

.tb-nav a {
  color: var(--tb-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.tb-nav a.tb-is-active {
  color: var(--tb-accent);
  text-decoration: underline;
  text-underline-offset: 5px;
}

.tb-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 60;
  background: var(--tb-accent);
  color: #fff;
  padding: 0.6rem 0.9rem;
  border-radius: 0 0 10px 0;
  font-weight: 600;
}

.tb-skip-link:focus {
  left: 0;
}

.tb-langswitch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  font-size: 0.85rem;
  white-space: nowrap;
}

.tb-lang-link {
  color: var(--tb-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.3rem 0.45rem;
  border-radius: 8px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.tb-lang-link:hover {
  color: var(--tb-accent);
}

.tb-lang-link.tb-is-active {
  color: var(--tb-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tb-lang-sep {
  color: var(--tb-line);
}

.tb-site-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.5rem 0 4rem;
}

.tb-site-footer {
  border-top: 1px solid var(--tb-line);
  padding: 2rem 1rem 5rem;
  color: var(--tb-muted);
  font-size: 0.9rem;
}

.tb-footer-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 1.5rem 2rem;
}

.tb-footer-brand,
.tb-footer-col {
  min-width: 0;
}

.tb-footer-name {
  font-family: var(--tb-font);
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
  color: var(--tb-ink);
}

.tb-footer-tagline,
.tb-footer-disclaimer {
  margin: 0 0 0.5rem;
  line-height: 1.55;
}

.tb-footer-head {
  font-weight: 700;
  margin: 0 0 0.4rem;
  color: var(--tb-ink);
}

.tb-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tb-footer-col li {
  margin: 0 0 0.35rem;
}

.tb-footer-col a {
  color: var(--tb-muted);
  text-decoration: none;
}

.tb-footer-col a:hover {
  color: var(--tb-accent);
}

.tb-footer-copy {
  max-width: 900px;
  margin: 1.25rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--tb-line);
  font-size: 0.85rem;
}

.tb-plugin-missing {
  max-width: 720px;
  margin: 2rem auto;
  padding: 1.25rem;
  border: 1px solid var(--tb-line);
  border-radius: 14px;
  background: #fff;
}

.tb-plugin-missing a {
  color: var(--tb-accent);
  font-weight: 700;
}

@media (max-width: 640px) {
  .tb-site-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .tb-site-logo img,
  .tb-theme .custom-logo {
    height: 40px;
    max-width: 220px;
  }
}

/* V2 mobile optimisations ---------------------------------------------------- */

@media (max-width: 640px) {
  .tb-site-header__inner {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
    gap: 0.25rem 0;
  }
  .tb-langswitch {
    margin-left: 0;
    align-self: flex-end;
    padding-top: 0.2rem;
  }
  .tb-site-footer {
    padding-bottom: max(5rem, calc(env(safe-area-inset-bottom) + 4rem));
  }
  .tb-footer-grid {
    grid-template-columns: 1fr;
    gap: 1rem 0;
  }
}

/* Reference code box + directory listings (2.5.0) --------------------------- */

.tb-ref-box {
  margin: 0.6rem 0 1rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--tb-line);
  border-left: 4px solid var(--tb-accent);
  border-radius: 12px;
  background: #fff;
}

.tb-ref-label {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tb-muted);
}

.tb-ref-code {
  margin: 0;
  font-family: "Figtree", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  letter-spacing: 0.06em;
  color: var(--tb-accent);
  word-break: break-word;
}

.tb-ref-hint {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--tb-muted);
  line-height: 1.5;
}

.tb-muted {
  color: var(--tb-muted);
}

.tb-directory-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: flex-end;
  margin: 0.9rem 0 0.4rem;
}

.tb-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 150px;
  flex: 1 1 180px;
}

.tb-field-group label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--tb-muted);
}

.tb-field-group select,
.tb-field-group input[type="search"] {
  font: inherit;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--tb-line);
  border-radius: 10px;
  background: #fff;
  color: var(--tb-ink);
}

.tb-directory-summary {
  margin: 0.5rem 0 0.9rem;
  font-size: 0.92rem;
  color: var(--tb-muted);
}

.tb-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.tb-card {
  background: #fff;
  border: 1px solid var(--tb-line);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 36, 24, 0.08);
}

.tb-card-head {
  display: flex;
  gap: 0.7rem;
  align-items: center;
}

.tb-avatar {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--tb-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.tb-card-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.tb-card-title a {
  color: var(--tb-accent);
  text-decoration: none;
}

.tb-card-trade {
  margin: 0;
  font-size: 0.85rem;
  color: var(--tb-muted);
}

.tb-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tb-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--tb-line);
  color: var(--tb-muted);
  background: #f7f3ea;
}

.tb-badge.tb-badge-listed {
  border-color: rgba(15, 107, 76, 0.35);
  color: var(--tb-accent);
  background: rgba(15, 107, 76, 0.08);
}

.tb-card .tb-btn {
  margin-top: auto;
}

.tb-directory-empty {
  text-align: center;
  padding: 2rem 1rem;
  border: 1px dashed var(--tb-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.tb-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

/* Profile view (2.5.0) */
.tb-profile-head {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.tb-profile-head .tb-avatar {
  width: 72px;
  height: 72px;
  font-size: 1.7rem;
}

.tb-profile-service {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--tb-accent);
}

.tb-breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--tb-muted);
}

.tb-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.4rem;
  opacity: 0.5;
}

.tb-breadcrumb a {
  color: var(--tb-muted);
  text-decoration: none;
}

.tb-breadcrumb a:hover {
  color: var(--tb-accent);
}

.tb-pagination-current {
  align-self: center;
  font-size: 0.88rem;
  color: var(--tb-muted);
}

.tb-profile-section {
  margin: 1.4rem 0 0.6rem;
}

.tb-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tb-chips li {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--tb-line);
  border-radius: 999px;
  font-size: 0.85rem;
  background: #fff;
}

.tb-profile-bio {
  line-height: 1.7;
}

.tb-evidence-note {
  font-size: 0.82rem;
  color: var(--tb-muted);
  margin: 0.5rem 0 0;
}

/* Personal Fit + capability meters (2.7.0) */
.tb-fit-group {
  margin: 0.9rem 0 1.1rem;
}

.tb-fit-group-head {
  font-weight: 700;
  margin: 0 0 0.6rem;
}

.tb-fit-row {
  margin: 0 0 0.9rem;
}

.tb-fit-q {
  margin: 0 0 0.2rem;
}

.tb-fit-feel {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  color: var(--tb-muted);
}

.tb-fit-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tb-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--tb-line);
  border-radius: 999px;
  font-size: 0.88rem;
  cursor: pointer;
  background: #fff;
}

.tb-opt input {
  accent-color: var(--tb-accent);
}

.tb-opt:has(input:checked),
.tb-opt:has(input:checked) {
  border-color: var(--tb-accent);
  background: var(--tb-tint);
  font-weight: 600;
}

.tb-meters {
  display: grid;
  gap: 0.45rem;
  margin: 0.6rem 0;
}

.tb-meter {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.tb-meter-name {
  color: var(--tb-accent);
  font-weight: 700;
}

.tb-meter-bar {
  display: inline-flex;
  gap: 3px;
}

.tb-meter-bar i {
  width: 100%;
  height: 8px;
  border-radius: 2px;
  background: var(--tb-line);
}

.tb-meter-l1 .tb-meter-bar i:nth-child(1) { background: var(--tb-amber); }
.tb-meter-l2 .tb-meter-bar i:nth-child(-n+2) { background: var(--tb-orange); }
.tb-meter-l3 .tb-meter-bar i { background: var(--tb-accent); }
.tb-meter-x .tb-meter-bar i { background: var(--tb-line); }

.tb-meter-val {
  color: var(--tb-muted);
}

.tb-chips .tb-chip {
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--tb-line);
  border-radius: 999px;
  font-size: 0.8rem;
  background: #fff;
}

.tb-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.tb-btn-outline {
  border: 1px solid var(--tb-accent);
  color: var(--tb-accent);
  background: transparent;
}

.tb-btn-outline:hover {
  background: var(--tb-tint);
}

/* Compare tray (2.7.0) */
.tb-compare-tray[hidden] {
  display: none;
}

.tb-compare-tray {
  position: sticky;
  bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  margin-top: 1rem;
  background: #0f6b4c;
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 107, 76, 0.28);
  z-index: 30;
}

.tb-compare-tray-title {
  font-weight: 700;
}

.tb-compare-tray-count {
  font-size: 0.85rem;
  opacity: 0.9;
}

.tb-compare-tray-remove {
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #fff !important;
  font-size: 0.82rem;
}

@media (max-width: 560px) {
  .tb-compare-tray {
    left: 0;
    right: 0;
    border-radius: 0;
  }
}

/* Compare table (2.7.0) */
.tb-cmp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
}

.tb-cmp-table th,
.tb-cmp-table td {
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--tb-line);
  vertical-align: top;
  font-size: 0.88rem;
}

.tb-cmp-table thead th {
  background: var(--tb-tint);
  text-align: left;
}

.tb-cmp-table thead a {
  color: inherit;
  font-weight: 700;
}

.tb-cmp-table thead small {
  display: block;
  font-weight: 400;
  color: var(--tb-muted);
}

.tb-cmp-table thead th > strong {
  display: block;
}

.tb-cmp-ev,
.tb-muted {
  color: var(--tb-muted);
  font-size: 0.82rem;
}

.tb-fit-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tb-fit-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--tb-line);
}

.tb-fit-item dt {
  font-weight: 700;
}

.tb-fit-item dd {
  margin: 0.2rem 0 0;
}

.tb-fit-item .tb-fit-meaning {
  display: block;
  font-size: 0.8rem;
  color: var(--tb-muted);
  margin-top: 0.15rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* Print: avoid cutting reader content on predictable paper. */
@media print {
  .tb-site-header,
  .tb-site-footer {
    display: none;
  }
  body.tb-theme {
    background: #fff;
    color: #000;
  }
}

/* 3.4 directory journeys */
.tb-journey-grid,.tb-product-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(1rem,3vw,1.5rem);margin-block:1.5rem}
.tb-journey-card{background:var(--tb-surface,#fff);border:1px solid var(--tb-border,#d9d1c7);border-radius:1.25rem;padding:clamp(1.1rem,3vw,1.75rem);box-shadow:0 10px 30px rgba(27,54,93,.08)}
.tb-journey-icon{display:grid;place-items:center;width:3.25rem;height:3.25rem;border-radius:1rem;background:var(--tb-bg,#f4f2ee);font-size:1.65rem}.tb-journey-card h2{margin:.85rem 0 .35rem}
.tb-material-filters{display:grid;grid-template-columns:repeat(5,minmax(8rem,1fr)) auto;align-items:end;gap:.75rem;background:var(--tb-surface,#fff);border:1px solid var(--tb-border,#d9d1c7);border-radius:1.15rem;padding:1rem;margin-block:1.25rem}
.tb-material-filters label{display:grid;gap:.35rem;font-weight:700;font-size:.9rem}.tb-material-filters select{width:100%;min-height:2.8rem}
.tb-supplier-facts{display:grid;gap:.65rem;margin:1rem 0}.tb-supplier-facts div{display:grid;grid-template-columns:minmax(7rem,40%) 1fr;gap:.75rem;border-top:1px solid var(--tb-border,#e5ded5);padding-top:.6rem}.tb-supplier-facts dt{font-size:.82rem;color:var(--tb-muted,#5f635f)}.tb-supplier-facts dd{margin:0;font-weight:650}.tb-supplier-facts small{display:block;font-weight:400;color:var(--tb-muted,#5f635f)}
@media(max-width:880px){.tb-material-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.tb-material-filters .tb-btn{grid-column:1/-1}}
@media(max-width:620px){.tb-journey-grid,.tb-product-grid,.tb-material-filters{grid-template-columns:1fr}.tb-journey-card{padding:1rem}.tb-material-filters{padding:.85rem}.tb-supplier-facts div{grid-template-columns:1fr;gap:.2rem}.tb-supplier-card .tb-btn{width:100%}}

