/* HOTELLIER — Telegram Mini App (TMA) Mobile-First Stylesheet */

:root {
  --tma-bg: var(--tg-theme-bg-color, #ffffff);
  --tma-text: var(--tg-theme-text-color, #111827);
  --tma-hint: var(--tg-theme-hint-color, #6b7280);
  --tma-link: var(--tg-theme-link-color, #0a3622);
  --tma-btn: var(--tg-theme-button-color, #0a3622);
  --tma-btn-text: var(--tg-theme-button-text-color, #ffffff);
  --tma-sec-bg: var(--tg-theme-secondary-bg-color, #f3f4f6);

  --htl-emerald: #0a3622;
  --htl-gold: #c59b27;
  --htl-border: #e5e7eb;
  --safe-bottom: env(safe-area-inset-bottom, 16px);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Plus Jakarta Sans', Roboto, sans-serif;
  background-color: var(--tma-bg);
  color: var(--tma-text);
  line-height: 1.4;
  padding-bottom: calc(65px + var(--safe-bottom));
  user-select: none;
  -webkit-user-select: none;
}

/* ── TMA HEADER ── */
.tma-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--tma-bg);
  border-bottom: 1px solid var(--htl-border);
  padding: 10px 14px;
}

.tma-header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.tma-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tma-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--htl-gold);
}

.tma-brand-title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.05em;
  color: var(--htl-emerald);
}

.tma-lang-toggle {
  display: flex;
  gap: 4px;
  background: var(--tma-sec-bg);
  padding: 3px;
  border-radius: 20px;
}

.tma-lang-btn {
  border: none;
  background: none;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  color: var(--tma-hint);
  cursor: pointer;
}

.tma-lang-btn.active {
  background: #ffffff;
  color: var(--htl-emerald);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* TMA Search */
.tma-search-wrap {
  position: relative;
  width: 100%;
}

.tma-search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border-radius: 10px;
  border: 1px solid var(--htl-border);
  background: var(--tma-sec-bg);
  color: var(--tma-text);
  font-size: 13.5px;
  outline: none;
}

.tma-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tma-hint);
  pointer-events: none;
}

/* ── TMA HERO BANNER ── */
.tma-hero {
  margin: 12px 14px;
  padding: 16px;
  background: linear-gradient(135deg, #0a3622 0%, #062315 100%);
  color: #ffffff;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(10, 54, 34, 0.2);
}

.tma-hero-badge {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #f3df95;
  margin-bottom: 6px;
  display: block;
}

.tma-hero-title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 6px;
}

.tma-hero-desc {
  font-size: 12px;
  color: #cbd5e1;
  margin-bottom: 12px;
  line-height: 1.4;
}

.tma-hero-btn {
  display: inline-block;
  background: var(--htl-gold);
  color: #062315;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* ── HORIZONTAL CATEGORY CHIPS ── */
.tma-cat-scroll {
  display: flex;
  gap: 8px;
  padding: 4px 14px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tma-cat-scroll::-webkit-scrollbar { display: none; }

.tma-chip {
  padding: 7px 14px;
  border-radius: 20px;
  background: var(--tma-sec-bg);
  border: 1px solid var(--htl-border);
  color: var(--tma-text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.tma-chip.active {
  background: var(--htl-emerald);
  color: #ffffff;
  border-color: var(--htl-emerald);
}

/* ── COMPACT PRODUCT GRID ── */
.tma-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 14px 20px;
}

.tma-card {
  background: var(--tma-bg);
  border: 1px solid var(--htl-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tma-card-img {
  position: relative;
  width: 100%;
  height: 135px;
  background: var(--tma-sec-bg);
}

.tma-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tma-card-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--htl-emerald);
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 10px;
}

.tma-card-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tma-card-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--tma-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tma-card-moq {
  font-size: 11px;
  color: var(--tma-hint);
  margin-top: auto;
  margin-bottom: 8px;
}

.tma-card-btn {
  width: 100%;
  padding: 7px;
  background: var(--htl-emerald);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

/* ── BOTTOM SHEET MODAL ── */
.tma-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tma-sheet-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.tma-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88vh;
  background: var(--tma-bg);
  border-radius: 20px 20px 0 0;
  z-index: 1001;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-bottom);
}

.tma-sheet-backdrop.open .tma-sheet {
  transform: translateY(0);
}

.tma-sheet-drag {
  width: 36px;
  height: 4px;
  background: var(--htl-border);
  border-radius: 2px;
  margin: 10px auto 4px;
}

.tma-sheet-content {
  padding: 14px 16px 24px;
  overflow-y: auto;
}

/* ── BOTTOM NAVIGATION (Fixed) ── */
.tma-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--tma-bg);
  border-top: 1px solid var(--htl-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 999;
}

.tma-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--tma-hint);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  position: relative;
  width: 25%;
}

.tma-nav-item.active {
  color: var(--htl-emerald);
}

.tma-badge {
  position: absolute;
  top: -3px;
  right: 22px;
  background: var(--htl-gold);
  color: #062315;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 10px;
}
