/* ============================================================
   ATG Haat — artisan directory (haat.html)
   Builds on the Gulabi tokens and components in styles.css.
   ============================================================ */

[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.haat-hero { padding-bottom: 36px; }
.haat-hero .hand { margin-top: 14px; color: var(--rose-deep); }
.haat-main { padding-top: 10px; }

.haat-sample {
  font-size: 0.95rem;
  color: var(--ink-soft);
  background: linear-gradient(135deg, rgba(231, 188, 174, 0.18), rgba(216, 196, 158, 0.2));
  border: 1.5px dashed var(--gold-soft);
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  margin-bottom: 26px;
}

/* ---------- search, city, category chips ---------- */

.haat-controls { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }

.haat-search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1.5px solid rgba(194, 161, 94, 0.6);
  border-radius: 100px;
  padding: 0 22px;
  box-shadow: var(--shadow-soft);
  color: var(--ink-muted);
  font-size: 1.2rem;
  transition: border-color 0.25s;
}
.haat-search:focus-within { border-color: var(--rani); }
.haat-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 14px 0;
  outline: none;
}
.haat-search input::placeholder { color: var(--ink-muted); }

.haat-city select {
  appearance: none;
  -webkit-appearance: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface) url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23B96A83' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 20px center;
  border: 1.5px solid rgba(194, 161, 94, 0.6);
  border-radius: 100px;
  padding: 14px 46px 14px 22px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  height: 100%;
}

.haat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.haat-chips button {
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid rgba(185, 106, 131, 0.4);
  background: rgba(231, 188, 174, 0.18);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}
.haat-chips button:hover { background: rgba(231, 188, 174, 0.45); }
.haat-chips button[aria-pressed="true"] { background: var(--rani); border-color: var(--rani); color: #FFF8F0; }
.haat-chips .n { margin-left: 6px; opacity: 0.7; font-weight: 500; }

.haat-status { font-family: var(--font-hand); font-size: 1.3rem; color: var(--ink-muted); margin-bottom: 24px; }

/* ---------- maker list: 3 columns, category icon as bullet ---------- */

.haat-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 28px;
  row-gap: 4px;
  background: var(--surface);
  border: 1.5px solid rgba(194, 161, 94, 0.5);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.haat-list::after {
  content: '';
  position: absolute; top: 7px; left: 7px; right: 7px; bottom: 7px;
  border: 1px dotted rgba(185, 143, 83, 0.6);
  border-radius: calc(var(--radius) - 7px);
  pointer-events: none;
}
.haat-list:empty { display: none; }
.haat-list li { animation: haat-in 0.5s var(--ease) both; }
@keyframes haat-in { from { opacity: 0; transform: translateY(10px); } }

.haat-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 12px;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  position: relative;
  z-index: 1;
  transition: background 0.25s;
}
.haat-item:hover, .haat-item:focus-visible { background: rgba(231, 188, 174, 0.22); outline: none; }
.haat-bullet {
  flex: 0 0 36px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(231, 188, 174, 0.2);
  border: 1px solid rgba(194, 161, 94, 0.55);
  display: grid;
  place-items: center;
}
.haat-bullet .haat-ico { width: 22px; height: 22px; }
.haat-item-text { min-width: 0; }
.haat-item strong {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  line-height: 1.25;
  color: var(--ink);
}
.haat-item .about {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-top: 3px;
}
.haat-item .where, .haat-where {
  display: block;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage-deep);
}
.haat-item .where { margin-top: 6px; }
.haat-where { margin-bottom: 8px; }

/* icons inside filter buttons and category chips */
.haat-chips .haat-ico, .chip .haat-ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

@media (max-width: 900px) { .haat-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .haat-list { grid-template-columns: 1fr; padding: 14px 12px; } }

/* ---------- detail view ---------- */

body.haat-open { overflow: hidden; }

.haat-dialog {
  width: min(760px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 1.5px solid var(--gold);
  border-radius: 28px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(74, 50, 44, 0.35);
  overflow: hidden;
}
.haat-dialog[open] { display: flex; flex-direction: column; animation: haat-fade 0.3s ease; }
@keyframes haat-fade { from { opacity: 0; } }
.haat-dialog::backdrop { background: rgba(74, 50, 44, 0.45); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }

.haat-dialog-body { overflow-y: auto; padding: 22px 34px 34px; }

.haat-close {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: rgba(255, 253, 246, 0.94);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 50, 44, 0.15);
}

.haat-gallery {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -34px 22px;
  padding: 0 34px;
  scrollbar-width: thin;
}
.haat-gallery img {
  flex: 0 0 auto;
  height: 300px;
  max-width: 88%;
  object-fit: cover;
  border-radius: 16px;
  border: 1.5px solid rgba(194, 161, 94, 0.55);
  background: var(--lavender);
  scroll-snap-align: start;
}
.haat-gallery > :first-child { border-radius: 150px 150px 16px 16px; }

.haat-detail h2 { font-size: clamp(1.7rem, 4vw, 2.3rem); line-height: 1.15; margin: 2px 0 8px; }
.haat-detail .about { color: var(--ink-soft); }

.haat-block { margin-top: 22px; padding-top: 18px; border-top: 1px dashed rgba(194, 161, 94, 0.6); }
.haat-block h4 {
  font-family: var(--font-head);
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sage-deep);
  margin-bottom: 6px;
}
.haat-block p { color: var(--ink-soft); white-space: pre-line; }
.haat-block .hand { color: var(--rose-deep); font-size: 1.45rem; }

.haat-vcard { display: inline-block; }
.haat-vcard img {
  max-width: 260px;
  border-radius: 12px;
  border: 1.5px solid rgba(194, 161, 94, 0.55);
  box-shadow: var(--shadow-soft);
  transform: rotate(-1.5deg);
}

.haat-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.haat-actions .btn { padding: 12px 24px; font-size: 0.92rem; }
.haat-find { font-family: var(--font-hand); font-size: 1.3rem; color: var(--ink-soft); }

.haat-foot {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.haat-share {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--rose-deep);
  cursor: pointer;
}

.haat-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--ink);
  color: #FFF8F0;
  font-family: var(--font-head);
  font-size: 0.9rem;
  padding: 10px 20px;
  border-radius: 100px;
  box-shadow: 0 10px 26px rgba(74, 50, 44, 0.3);
  max-width: calc(100% - 40px);
}

@media (max-width: 720px) {
  .haat-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -28px 20px; padding: 2px 28px; scrollbar-width: none; }
  .haat-chips::-webkit-scrollbar { display: none; }
  .haat-chips button { flex: 0 0 auto; }
  .haat-city { flex: 1 1 100%; }
  .haat-city select { width: 100%; }

  /* detail opens as a bottom sheet on phones */
  .haat-dialog {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
    border-bottom: 0;
  }
  .haat-dialog-body { padding: 18px 22px 30px; }
  .haat-gallery { margin: 0 -22px 18px; padding: 0 22px; }
  .haat-gallery img { height: 240px; }
}
