:root {
  --ah-cream: #F6F1EB;
  --ah-cream-soft: #ECE2D4;
  --ah-primary: #2C4F6C;
  --ah-primary-dark: #1E3A52;
  --ah-accent: #D17B4D;
  --ah-accent-dark: #B3653A;
  --ah-gold: #E8B468;
  --ah-brick: #8C3A35;
  --ah-taupe: #7A6A63;
  --ah-charcoal: #3A322D;
  --ah-charcoal-soft: #7A6A63;
  --ah-white: #FFFFFF;

  --ah-font-display: "Noto Sans Thai", sans-serif;
  --ah-font-body: "Noto Sans Thai", sans-serif;

  --ah-radius: .75rem;
  --ah-shadow: 0 6px 18px rgba(42, 42, 40, 0.07);
}

body {
  font-family: var(--ah-font-body);
  color: var(--ah-charcoal);
  background-color: var(--ah-white);
}

h1, h2, h3, .ah-brand {
  font-family: var(--ah-font-display);
}

a {
  text-decoration: none;
}

/* Header */
.ah-navbar {
  background-color: rgba(246, 241, 235, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(42, 42, 40, 0.08);
  z-index: 1030;
}

.ah-brand {
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ah-primary);
  flex-shrink: 0;
}

.ah-header-search input {
  border-radius: 999px;
  border: 1px solid rgba(42, 42, 40, 0.15);
  padding: .5rem 1rem;
}

.ah-header-link {
  color: var(--ah-charcoal);
  font-weight: 500;
  font-size: .95rem;
}

.ah-header-link:hover {
  color: var(--ah-primary);
}

.ah-lang-toggle {
  background: transparent;
  border: 1px solid rgba(42, 42, 40, 0.15);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ah-charcoal);
  padding: .35rem .8rem;
  flex-shrink: 0;
}

.ah-lang-toggle:hover {
  border-color: var(--ah-primary);
  color: var(--ah-primary);
}

/* Buttons */
.ah-btn-primary {
  background-color: var(--ah-primary);
  border: 1px solid var(--ah-primary);
  color: var(--ah-white);
  border-radius: 999px;
  font-weight: 700;
  padding: .55rem 1.4rem;
  box-shadow: 0 6px 16px rgba(44, 79, 108, 0.25);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
  white-space: nowrap;
}

.ah-btn-primary:hover {
  background-color: var(--ah-primary-dark);
  border-color: var(--ah-primary-dark);
  color: var(--ah-white);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(44, 79, 108, 0.32);
}

.ah-btn-outline {
  background-color: var(--ah-white);
  border: 1px solid rgba(42, 42, 40, 0.15);
  color: var(--ah-charcoal);
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem 1.2rem;
}

.ah-btn-outline:hover {
  border-color: var(--ah-primary);
  color: var(--ah-primary);
}

/* Hero */
.ah-hero {
  padding: 3.5rem 0 3rem;
  background-color: var(--ah-cream);
}

.ah-eyebrow {
  color: var(--ah-accent);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .85rem;
  margin-bottom: .5rem;
}

.ah-h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ah-primary-dark);
  margin-bottom: 1.5rem;
}

.ah-h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--ah-primary-dark);
}

.ah-h3-banner {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ah-primary-dark);
}

.ah-search-wrap {
  max-width: 38rem;
  display: flex;
  gap: .5rem;
  background-color: var(--ah-white);
  border-radius: 999px;
  padding: .4rem .4rem .4rem 1.25rem;
  box-shadow: var(--ah-shadow);
}

.ah-search-input {
  border: none;
  flex: 1;
  font-size: 1rem;
}

.ah-search-input:focus {
  box-shadow: none;
  outline: none;
}

.ah-search-btn {
  flex-shrink: 0;
}

.ah-search-hint {
  color: var(--ah-charcoal-soft);
  font-size: .85rem;
  margin-top: .75rem;
}

/* Sections */
.ah-section {
  padding: 3.5rem 0;
}

.ah-alt-bg {
  background-color: var(--ah-cream-soft);
}

.ah-link-more {
  color: var(--ah-accent-dark);
  font-weight: 600;
  font-size: .9rem;
}

.ah-link-more:hover {
  color: var(--ah-brick);
}

/* Quick Action Grid */
.ah-quick-actions {
  padding-top: 2.5rem;
  padding-bottom: 1rem;
}

.ah-quick-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  background-color: var(--ah-white);
  border: 1px solid rgba(42, 42, 40, 0.08);
  border-radius: var(--ah-radius);
  padding: 1.25rem .5rem;
  text-align: center;
  color: var(--ah-charcoal);
  font-weight: 600;
  font-size: .85rem;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.ah-quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--ah-shadow);
  border-color: var(--ah-primary);
  color: var(--ah-primary);
}

.ah-quick-icon {
  font-size: 1.75rem;
}

/* Filter bar (Lost & Found) */
.ah-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  align-items: center;
}

.ah-filter-select {
  width: auto;
  border-radius: 999px;
  border: 1px solid rgba(42, 42, 40, 0.15);
  font-size: .85rem;
  padding: .4rem 1rem;
}

.ah-filter-pills {
  display: flex;
  gap: .4rem;
}

.ah-pill {
  border: 1px solid rgba(42, 42, 40, 0.15);
  background-color: var(--ah-white);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  color: var(--ah-charcoal-soft);
}

.ah-pill.is-active {
  background-color: var(--ah-primary);
  border-color: var(--ah-primary);
  color: var(--ah-white);
}

/* Lost & Found cards */
.ah-lf-card {
  display: block;
  color: inherit;
  text-decoration: none;
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  overflow: hidden;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease;
}

.ah-lf-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(42, 42, 40, 0.12);
}

.ah-lf-photo {
  height: 9rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.ah-lf-badge {
  position: absolute;
  top: .6rem;
  left: .6rem;
  background-color: var(--ah-brick);
  color: var(--ah-white);
  font-size: .7rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
}

.ah-lf-body {
  padding: .85rem 1rem;
}

.ah-lf-name {
  font-weight: 700;
  color: var(--ah-primary-dark);
  margin-bottom: .15rem;
}

.ah-lf-meta {
  font-size: .8rem;
  color: var(--ah-charcoal-soft);
  margin-bottom: .15rem;
}

.ah-lf-reward {
  font-size: .8rem;
  font-weight: 700;
  color: var(--ah-accent-dark);
}

/* Clinic cards */
.ah-clinic-card {
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 1.1rem;
  height: 100%;
}

.ah-clinic-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .5rem;
}

.ah-clinic-name {
  font-weight: 700;
  color: var(--ah-primary-dark);
}

.ah-clinic-emergency {
  background-color: var(--ah-brick);
  color: var(--ah-white);
  font-size: .65rem;
  font-weight: 700;
  padding: .2rem .5rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.ah-clinic-meta {
  font-size: .85rem;
  color: var(--ah-charcoal-soft);
  margin: .4rem 0 .8rem;
}

.ah-clinic-open {
  color: var(--ah-primary);
  font-weight: 600;
}

.ah-clinic-actions {
  display: flex;
  gap: .5rem;
}

.ah-clinic-actions .ah-btn-outline {
  flex: 1;
  text-align: center;
}

/* Marketplace mini cards */
.ah-mini-card {
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 1.25rem .5rem;
  text-align: center;
  font-weight: 600;
  font-size: .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}

.ah-mini-icon {
  font-size: 1.75rem;
}

/* Marketplace product cards (backend-driven) */
.ah-product-card {
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ah-product-photo {
  height: 7rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.ah-product-icon-badge {
  position: absolute;
  bottom: .5rem;
  left: .5rem;
  background-color: var(--ah-white);
  font-size: 1rem;
  line-height: 1;
  padding: .3rem .45rem;
  border-radius: 999px;
  box-shadow: var(--ah-shadow);
}

.ah-product-icon {
  font-size: 1.75rem;
  margin-top: 1.25rem;
}

.ah-product-body {
  padding: .75rem .75rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}

.ah-product-name {
  font-weight: 600;
  font-size: .9rem;
}

.ah-product-price {
  color: var(--ah-accent-dark);
  font-weight: 700;
  font-size: .9rem;
}

.ah-product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(42, 42, 40, 0.12);
}

.ah-product-detail-photo {
  width: 100%;
  max-height: 16rem;
  object-fit: cover;
  border-radius: var(--ah-radius);
}

/* Pagination (Marketplace) */
.ah-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}

.ah-pagination-btn {
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 .6rem;
  border-radius: var(--ah-radius);
  border: 1px solid var(--ah-cream-soft);
  background-color: var(--ah-white);
  color: var(--ah-charcoal-soft);
  font-weight: 600;
  font-size: .85rem;
}

.ah-pagination-btn.is-active {
  background-color: var(--ah-primary);
  border-color: var(--ah-primary);
  color: var(--ah-white);
}

.ah-pagination-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* List cards (Knowledge / Community / Activity) */
.ah-list-card {
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  overflow: hidden;
}

.ah-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid rgba(42, 42, 40, 0.06);
  color: inherit;
  transition: background-color .15s ease;
}

.ah-list-item:last-child {
  border-bottom: none;
}

/* Community items are links (open a detail page) — Knowledge/Activity stay plain divs */
a.ah-list-item:hover {
  background-color: var(--ah-cream-soft);
}

.ah-list-item-title {
  font-weight: 600;
  color: var(--ah-charcoal);
  font-size: .92rem;
}

.ah-list-item-meta {
  font-size: .78rem;
  color: var(--ah-charcoal-soft);
}

.ah-list-item-tag {
  flex-shrink: 0;
  font-size: .7rem;
  font-weight: 700;
  color: var(--ah-primary);
  background-color: rgba(44, 79, 108, 0.1);
  padding: .25rem .55rem;
  border-radius: 999px;
}

/* AI banner */
.ah-ai-banner {
  background-color: var(--ah-primary-dark);
  color: var(--ah-white);
  padding: 3rem 0;
}

.ah-ai-banner .ah-h3-banner {
  color: var(--ah-white);
}

.ah-ai-banner-text {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0;
}

.ah-chip {
  background-color: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--ah-white);
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 600;
  padding: .4rem .9rem;
}

.ah-chip:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.ah-ai-input-wrap {
  display: flex;
  gap: .5rem;
  background-color: var(--ah-white);
  border-radius: 999px;
  padding: .35rem .35rem .35rem 1.1rem;
}

.ah-ai-input-wrap input {
  border: none;
  flex: 1;
  font-size: .9rem;
}

.ah-ai-input-wrap input:focus {
  box-shadow: none;
  outline: none;
}

/* Dashboard */
.ah-pet-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--ah-white);
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: 1.1rem;
}

.ah-pet-icon {
  font-size: 2.25rem;
}

.ah-pet-name {
  font-weight: 700;
  color: var(--ah-primary-dark);
}

.ah-pet-status {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .55rem;
  border-radius: 999px;
  margin: .2rem 0;
}

.ah-pet-status-ok {
  background-color: rgba(44, 79, 108, 0.1);
  color: var(--ah-primary);
}

.ah-pet-due {
  font-size: .8rem;
  color: var(--ah-accent-dark);
  font-weight: 600;
}

/* Footer */
.ah-footer {
  background-color: var(--ah-charcoal);
  color: rgba(255, 255, 255, 0.75);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}

.ah-footer-brand {
  color: var(--ah-white);
  margin-bottom: .75rem;
}

.ah-footer-text {
  color: rgba(255, 255, 255, 0.65);
  max-width: 22rem;
}

.ah-footer-heading {
  color: var(--ah-white);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.ah-footer-links li {
  margin-bottom: .6rem;
}

.ah-footer-links a {
  color: rgba(255, 255, 255, 0.75);
}

.ah-footer-links a:hover {
  color: var(--ah-white);
}

.ah-footer-divider {
  border-color: rgba(255, 255, 255, 0.15);
  margin: 2rem 0 1.5rem;
}

.ah-footer-copyright {
  color: rgba(255, 255, 255, 0.5);
  font-size: .85rem;
  margin: 0;
}

/* Scroll reveal */
.ah-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.ah-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 767px) {
  .ah-hero {
    padding: 2.5rem 0 2rem;
  }
}

/* Auth modal */
.ah-auth-modal-content {
  border: none;
  border-radius: var(--ah-radius);
  box-shadow: var(--ah-shadow);
  padding: .5rem;
}
