@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ═══════════════════════════════════════════
   TOKENS
═══════════════════════════════════════════ */
:root {
  --soil:       #003701;
  --bark:       #000000;
  --hay:        #003701;
  --hay-light:  #ffffff;
  --field:      #034c00;
  --field-dim:  #000000;
  --sky:        #331f001d;
  --cream:      #e7e8c3;
  --white:      #ffffff;
  --ink:        #000000;
  --muted:      #527a72;
  --border:     #0b470068;
  --danger:     #012f00;
  --shadow-sm:  0 2px 8px rgba(45,30,15,.07);
  --shadow-md:  0 8px 28px rgba(45,30,15,.10);
  --shadow-lg:  0 20px 60px rgba(45,30,15,.13);
  --r-sm:  6px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 32px;
}

/* ═══════════════════════════════════════════
   RESET + BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  background-image: radial-gradient(ellipse 80% 40% at 50% -10%, rgba(58,125,68,.09) 0%, transparent 60%);
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { appearance: none; border: none; background: none; cursor: pointer; }
h1, h2, h3, h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--soil);
}

/* ═══════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════ */
.container {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}
.page-body { padding: 2.4rem 0 4rem; }

/* ═══════════════════════════════════════════
   HEADER / NAV
═══════════════════════════════════════════ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,247,240,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
  min-height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-img {
  height: 44px;
  width: auto;
  object-fit: contain;
}
.logo-leaf {
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--field) 0%, var(--hay) 100%);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  flex-shrink: 0;
}
.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}
.nav-link {
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: all .18s;
  position: relative;
}
.nav-link:hover { color: var(--field-dim); background: rgba(58,125,68,.09); }
.nav-link.active {
  color: var(--field-dim);
  font-weight: 600;
  background: transparent;
}
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 1.1rem;
  right: 1.1rem;
  bottom: -0.1rem;
  height: 2px;
  border-radius: 999px;
  background: rgba(4, 76, 0, 0.82);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-left: auto;
  flex-shrink: 0;
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}
.user-chip-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--field), var(--hay));
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  padding: 6px;
  border-radius: var(--r-sm);
  cursor: pointer;
  background: transparent;
  border: 1.5px solid var(--border);
  transition: background .15s;
  flex-shrink: 0;
}
.nav-toggle:hover { background: rgba(45,30,15,.06); }
.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--soil);
  border-radius: 99px;
  transition: all .25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-drawer {
  display: none;
  flex-direction: column;
  padding: 0.5rem 0 0.75rem;
  border-top: 1px solid var(--border);
  background: rgba(231,232,195,.97);
}
.nav-drawer.open { display: flex; }
.nav-drawer .nav-link { padding: 0.7rem 1rem; font-size: 0.95rem; border-radius: 0; }
.nav-link-danger { color: var(--danger) !important; }

/* ═══════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 2.6rem;
  padding: 0 1.2rem;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--field); color: #fff; border-color: var(--field); }
.btn-primary:hover { background: var(--field-dim); border-color: var(--field-dim); }
.btn-secondary { background: var(--soil); color: #fff; border-color: var(--soil); }
.btn-secondary:hover { background: var(--bark); border-color: var(--bark); }
.btn-gold {
  background: linear-gradient(135deg, #093a09 0%, #118611 100%);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.337);
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #297329 0%, #004f00 100%);
  border-color: rgba(255,255,255,.501);
  color: #fff;
}
.btn-outline { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-outline:hover { border-color: var(--field); color: var(--field-dim); background: rgba(255,254,254,.06); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(158,152,152,.06); color: var(--ink); }
.btn-sm { height: 2.1rem; padding: 0 0.9rem; font-size: 0.8rem; }
.btn-lg { height: 3.2rem; padding: 0 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }

.btn-hero-light {
  background: #fff;
  color: var(--soil);
  border-color: #fff;
}
.btn-hero-light:hover { background: var(--cream); color: var(--soil); }

.btn-hero-outline {
  background: transparent;
  color: rgba(255,255,255,.9);
  border: 1.5px solid rgba(255,255,255,.35);
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.55);
  color: #fff;
}

/* ═══════════════════════════════════════════
   CARDS
═══════════════════════════════════════════ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card-hover { transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: rgba(58,125,68,.2); }
.card-image { width: 100%; height: 180px; object-fit: cover; border-radius: var(--r-md); margin-bottom: 1rem; }
.card-tag {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 0.5rem;
}
.tag-green  { background: #d1fae5; color: #065f46; }
.tag-gold   { background: #fef3c7; color: #0b5e0c; }
.tag-brown  { background: #f5ebe0; color: var(--bark); }
.tag-blue   { background: #dbeafe; color: #1e40af; }
.tag-red    { background: #fee2e2; color: #991b1b; }
.card-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.4rem; }
.card-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--soil); margin-bottom: 0.5rem; }
.card-desc { font-size: 0.875rem; color: var(--muted); line-height: 1.55; }
.price { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.15rem; color: var(--field-dim); margin-top: 0.75rem; }
.card-actions { display: flex; gap: 0.6rem; margin-top: 1rem; flex-wrap: wrap; }

/* ═══════════════════════════════════════════
   SECTION
═══════════════════════════════════════════ */
.section { margin: 2.5rem 0; }
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.section-header h2 { font-size: 1.6rem; }
.section-header a { font-size: 0.85rem; color: var(--field-dim); font-weight: 600; border-bottom: 1px solid transparent; }
.section-header a:hover { border-color: var(--field-dim); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(2.25rem, 4vw, 4rem) clamp(1.1rem, 3vw, 2rem) clamp(2.5rem, 4vw, 3.5rem);
  background: linear-gradient(135deg, #0b3a04 0%, #1f6b1a 55%, #4fa54a 100%);
  border-radius: var(--r-xl);
  margin: 1.5rem 0 2.5rem;
  color: #fff;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle 500px at 80% 50%, rgba(37,28,4,.444) 0%, transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { position: relative; z-index: 1; max-width: 620px; width: 100%; padding: clamp(0.2rem,1vw,0.5rem) 0; }
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.85rem;
  background: rgba(53,39,7,.697);
  border: 1px solid rgba(255,255,255,.593);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hay-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 1.2rem;
}
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); color: #fff; margin-bottom: 0.9rem; text-shadow: 0 2px 12px rgba(43,38,11,.2); max-width: 100%; }
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.8); max-width: min(480px,100%); margin-bottom: 1rem; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ═══════════════════════════════════════════
   HERO CAROUSEL
═══════════════════════════════════════════ */
.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  margin: 1.5rem 0 2.5rem;
  color: #fff;
  background: var(--soil);
}
.hero-carousel--compact {
  margin: 0 0 2rem;
}
.hero-carousel--compact .carousel-slide {
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1.25rem, 3vw, 2.5rem) 4rem;
}
.hero-carousel--compact .carousel-slide-content h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
.hero-carousel--compact .carousel-slide-visual {
  width: 180px;
  height: 180px;
}
.hero-carousel--compact .carousel-photo {
  width: 170px;
  height: 170px;
}

.carousel-viewport {
  overflow: hidden;
  position: relative;
}
.carousel-track {
  display: flex;
  transition: transform .55s cubic-bezier(.4, 0, .2, 1);
}
.carousel-slide {
  position: relative;
  flex: 0 0 100%;
  min-width: 100%;
  padding: clamp(2.5rem, 4vw, 4.5rem) clamp(1.25rem, 3vw, 3rem) 5rem;
  overflow: hidden;
}
.carousel-slide-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(105deg, rgba(0,55,1,.92) 0%, rgba(3,76,0,.78) 45%, rgba(3,76,0,.45) 100%),
    var(--slide-bg, none);
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.carousel-slide-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 100%;
}
.carousel-slide-content {
  flex: 1;
  max-width: 580px;
}
.carousel-slide-content .hero-label { margin-bottom: 1.2rem; }
.carousel-slide-content h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  color: #fff;
  margin-bottom: 0.9rem;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.carousel-slide-content p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.82);
  max-width: 480px;
  margin-bottom: 1.5rem;
  line-height: 1.65;
}
.carousel-slide-visual {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 240px;
  height: 240px;
}
.carousel-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.3));
  animation: carousel-logo-float 4s ease-in-out infinite;
}
.carousel-photo {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--r-lg);
  border: 3px solid rgba(255,255,255,.25);
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}
@keyframes carousel-logo-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 1.5px solid rgba(255,255,255,.25);
  color: #fff;
  display: grid;
  place-items: center;
  transition: background .2s, border-color .2s;
  cursor: pointer;
}
.carousel-btn:hover {
  background: rgba(255,255,255,.28);
  border-color: rgba(255,255,255,.45);
}
.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 0.5rem;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.carousel-dot.is-active {
  background: #fff;
  transform: scale(1.25);
}
.carousel-dot:hover:not(.is-active) {
  background: rgba(255,255,255,.6);
}

/* ═══════════════════════════════════════════
   FORMS
═══════════════════════════════════════════ */
.form-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 2rem; box-shadow: var(--shadow-sm); }
.form-grid { display: flex; flex-direction: column; gap: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label, .form-field > span { font-size: 0.82rem; font-weight: 600; color: var(--bark); text-transform: uppercase; letter-spacing: .04em; }
.form-field input, .form-field select, .form-field textarea {
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--cream);
  color: var(--ink);
  font-size: 0.93rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--field); background: #fff;
  box-shadow: 0 0 0 3px rgba(32,152,50,.1);
}
.form-field input[type="file"] { padding: 0.5rem 0.75rem; font-size: 0.85rem; cursor: pointer; }
.form-footer-link { text-align: center; font-size: 0.88rem; color: var(--muted); margin-top: 1.25rem; }
.form-footer-link a { color: var(--field-dim); font-weight: 600; border-bottom: 1px solid transparent; }
.form-footer-link a:hover { border-color: var(--field-dim); }

/* ═══════════════════════════════════════════
   AUTH PAGE
═══════════════════════════════════════════ */
.auth-wrap { min-height: calc(100vh - 120px); display: grid; place-items: center; padding: 2.5rem 1rem 3rem; }
.auth-wrap-register { padding-top: 3rem; }
.auth-box { width: min(480px,100%); background: var(--white); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 2.25rem 2rem 1.75rem; box-shadow: var(--shadow-lg); margin: 0 auto; }
.auth-box-register { width: min(520px,100%); }
.auth-box .form-grid { gap: 0.9rem; }
.auth-box .form-field { gap: 0.38rem; }
.auth-title { font-size: clamp(1.72rem, 5vw, 2rem); }
.auth-sub { font-size: 0.94rem; }
.auth-logo-badge { width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(135deg, var(--field), var(--hay)); display: grid; place-items: center; margin: 0 auto 1.5rem; font-family: 'Playfair Display', serif; font-weight: 800; font-size: 1.4rem; color: #fff; }
.auth-title { text-align: center; font-size: 1.75rem; margin-bottom: 0.4rem; }
.auth-sub { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 1.75rem; }

/* ═══════════════════════════════════════════
   FLASH MESSAGES
═══════════════════════════════════════════ */
.flashes { display: flex; flex-direction: column; gap: 0.5rem; margin: 1rem 0; }
.flash { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.1rem; border-radius: var(--r-md); font-size: 0.88rem; font-weight: 500; border: 1px solid; }
.flash-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.flash-error   { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash-info    { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.flash-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

/* ═══════════════════════════════════════════
   BADGES
═══════════════════════════════════════════ */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-gold   { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-notify { background: var(--danger); color: #fff; min-width: 1.4rem; text-align: center; }

/* ═══════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════ */
.avatar { border-radius: 50%; object-fit: cover; }
.avatar-xl { width: 88px; height: 88px; }
.avatar-lg { width: 60px; height: 60px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-sm { width: 32px; height: 32px; }
.avatar-placeholder { border-radius: 50%; background: linear-gradient(135deg, var(--field) 0%, var(--hay) 100%); color: #fff; font-family: 'Playfair Display', serif; font-weight: 700; display: grid; place-items: center; }

/* ═══════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem 1.25rem; text-align: center; }
.stat-number { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 800; color: var(--soil); line-height: 1; margin-bottom: 0.35rem; }
.stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

/* ═══════════════════════════════════════════
   TABLES
═══════════════════════════════════════════ */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th { padding: 0.75rem 1rem; background: var(--cream); text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); color: var(--ink); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(58,125,68,.03); }

/* ═══════════════════════════════════════════
   DIVIDER
═══════════════════════════════════════════ */
.divider { height: 1px; background: var(--border); margin: 1.5rem 0; }

/* ═══════════════════════════════════════════
   PROFILE CARD
═══════════════════════════════════════════ */
.profile-hero { position: relative; background: linear-gradient(135deg, var(--soil) 0%, var(--bark) 100%); border-radius: var(--r-xl); padding: 2.5rem; color: #fff; overflow: hidden; margin-bottom: 2rem; }
.profile-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 80% at 100% 50%, rgba(201,168,76,.15) 0%, transparent 70%); }
.profile-hero-inner { position: relative; z-index: 1; display: flex; gap: 1.75rem; align-items: center; flex-wrap: wrap; }
.profile-hero-info h1 { color: #fff; font-size: 1.8rem; margin-bottom: 0.35rem; }
.profile-hero-info p { color: rgba(255,255,255,.75); font-size: 0.9rem; }

/* ═══════════════════════════════════════════
   EMPTY STATE
═══════════════════════════════════════════ */
.empty { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 3rem 1.5rem; text-align: center; color: var(--muted); border: 2px dashed var(--border); border-radius: var(--r-lg); grid-column: 1 / -1; }
.empty svg { opacity: .4; }
.empty p { font-size: 0.9rem; }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.footer { background: var(--soil); color: rgba(255,255,255,.65); padding: 3rem 0 1.5rem; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.footer-brand h3 { font-family: 'Playfair Display', serif; color: #fff; font-size: 1.25rem; margin-bottom: 0.6rem; }
.footer-brand p  { font-size: 0.85rem; line-height: 1.6; }
.footer-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.footer-col h4 { color: var(--hay-light); font-family: 'DM Sans', sans-serif; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 0.85rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.45rem; }
.footer-col li a { font-size: 0.85rem; transition: color .15s; }
.footer-col li a:hover { color: var(--hay-light); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; text-align: center; font-size: 0.8rem; }

/* ═══════════════════════════════════════════
   HOME LAYOUT
═══════════════════════════════════════════ */
.home-cols { display: grid; grid-template-columns: 280px 1fr 260px; gap: 1.75rem; align-items: start; }

/* ═══════════════════════════════════════════
   DASHBOARD
═══════════════════════════════════════════ */
.dash-grid { display: grid; grid-template-columns: 300px 1fr; gap: 1.75rem; align-items: start; }

/* ═══════════════════════════════════════════
   MESSAGE LIST ITEM
═══════════════════════════════════════════ */
.msg-item { display: flex; gap: 1rem; padding: 1rem; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--white); transition: background .15s; align-items: flex-start; }
.msg-item:hover { background: var(--cream); }
.msg-item-body { flex: 1; min-width: 0; }
.msg-item-name { font-weight: 600; font-size: 0.88rem; margin-bottom: 0.2rem; color: var(--ink); }
.msg-item-preview { font-size: 0.83rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item-time { font-size: 0.75rem; color: var(--muted); white-space: nowrap; }

/* ═══════════════════════════════════════════
   VET CARD
═══════════════════════════════════════════ */
.vet-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.vet-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.vet-card-header { background: linear-gradient(135deg, var(--soil), var(--bark)); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; }
.vet-card-header h3 { color: #fff; font-size: 1rem; margin-bottom: 0.2rem; }
.vet-card-header p { color: rgba(255,255,255,.7); font-size: 0.8rem; }
.vet-card-body { padding: 1.25rem; }

/* ═══════════════════════════════════════════
   ADMIN PAGE
═══════════════════════════════════════════ */
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; margin-bottom: 2rem; }
.admin-stat { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.5rem; display: flex; align-items: center; gap: 1rem; }
a.admin-stat:hover { border-color: var(--field); }
.admin-stat-icon { width: 48px; height: 48px; border-radius: var(--r-md); display: grid; place-items: center; flex-shrink: 0; }
.admin-stat-icon.green { background: #d1fae5; color: var(--field-dim); }
.admin-stat-icon.gold  { background: #fef3c7; color: #004806; }
.admin-stat-icon.brown { background: #f5ebe0; color: var(--bark); }
.admin-stat-icon.red   { background: #fee2e2; color: #991b1b; }
.admin-stat-num { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 800; color: var(--soil); line-height: 1; }
.admin-stat-lbl { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

/* ═══════════════════════════════════════════
   PAGE HEADER STRIP
═══════════════════════════════════════════ */
.page-header { padding: 2rem 0 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2rem; }
.page-header h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.page-header p { color: var(--muted); margin-top: 0.4rem; font-size: 0.95rem; }

/* ═══════════════════════════════════════════
   AJUDA ANIMAL — RELATO CARD
═══════════════════════════════════════════ */
.relato-card { display: grid; grid-template-columns: 220px 1fr; border-radius: var(--r-lg); overflow: hidden; }
.relato-img { position: relative; overflow: hidden; min-height: 180px; }
.relato-img img { width: 100%; height: 100%; object-fit: cover; }
.relato-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.6rem; }

/* ═══════════════════════════════════════════
   MARKET GRID — produtos / servicos
═══════════════════════════════════════════ */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.25rem;
}

/* ─── Página do mercado ─── */
.market-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.75rem;
}
.market-page-header h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.25rem;
}
.market-page-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.market-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.market-city-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.market-city-chips-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 0.25rem;
}
.city-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .15s;
}
.city-chip:hover {
  border-color: var(--field);
  color: var(--field-dim);
}
.city-chip.is-active {
  background: var(--field);
  border-color: var(--field);
  color: #fff;
  font-weight: 600;
}

.market-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.85rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.market-count {
  font-size: 0.88rem;
  color: var(--muted);
}
.market-count strong {
  color: var(--soil);
  font-weight: 700;
}
.market-sort {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.market-sort label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.market-sort-select {
  padding: 0.45rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--cream);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  min-width: 160px;
}
.market-sort-select:focus {
  outline: none;
  border-color: var(--field);
}

/* ─── Grid de produtos ─── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.35rem;
}
.product-grid--home {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.market-empty {
  grid-column: 1 / -1;
  padding: 4rem 2rem;
}

/* ─── Card de produto ─── */
.product-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(3,76,0,.2);
}
.product-card.is-hidden {
  display: none !important;
}
.product-card.is-row-hidden {
  display: none !important;
}

.product-card-img-link {
  display: block;
  flex-shrink: 0;
}
.product-card-img {
  position: relative;
  width: 100%;
  height: 190px;
  overflow: hidden;
  background: var(--cream);
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-card-img img {
  transform: scale(1.06);
}
.product-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(135deg, #f0fdf4, #e7e8c3);
}
.product-card-location {
  position: absolute;
  bottom: 0.65rem;
  left: 0.65rem;
  padding: 0.22rem 0.65rem;
  background: rgba(0,55,1,.82);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.product-card-body {
  padding: 1rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}
.product-card-tag {
  margin-bottom: 0 !important;
  align-self: flex-start;
}
.product-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--soil);
  line-height: 1.3;
  margin: 0;
}
.product-card-title a {
  color: inherit;
  transition: color .15s;
}
.product-card-title a:hover {
  color: var(--field);
}

.product-card-producer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.product-card-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--field), var(--soil));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.product-card-producer {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.product-card-desc {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
  margin: 0;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.product-card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--field-dim);
  line-height: 1;
}
.product-card-price--na {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
}
.product-card-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}

/* ─── Cards legado (serviços) ─── */
.market-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  display: flex;
  flex-direction: column;
}
.market-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(3,76,0,.18);
}
.market-card-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--cream);
  flex-shrink: 0;
}
.market-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.market-card:hover .market-card-img img { transform: scale(1.05); }
.market-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(135deg, #f0fdf4, #e7e8c3);
}
.market-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.market-card-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: 0.15rem;
  line-height: 1.3;
}
.market-card-producer {
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  font-weight: 500;
}
.market-card-desc {
  font-size: 0.81rem;
  color: var(--muted);
  line-height: 1.55;
  flex: 1;
}
.market-card-price {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--field-dim);
  margin-top: 0.6rem;
}
.market-card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════
   VET ROW — lista de veterinarios
═══════════════════════════════════════════ */
.vets-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.vet-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.5rem;
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 1.25rem;
  align-items: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, border-color .2s;
}
.vet-item:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(3,76,0,.2);
}
.vet-item-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--field), var(--soil));
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.vet-item-name {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--soil);
  margin-bottom: 0.1rem;
}
.vet-item-city { font-size: 0.8rem; color: var(--muted); margin-top: 0.1rem; }
.vet-item-crmv { font-size: 0.76rem; color: var(--muted); margin-top: 0.05rem; }
.vet-item-bio  { font-size: 0.81rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.5; }
.vet-item-action { display: flex; flex-direction: column; gap: 0.45rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   FILTER BAR
═══════════════════════════════════════════ */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.filter-bar form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 1024px
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .home-cols { grid-template-columns: 240px 1fr; }
  .home-cols .home-right { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 768px
═══════════════════════════════════════════ */
@media (max-width: 768px) {
  .container { width: calc(100% - 1rem); }

  .header-inner { gap: 0.6rem; padding: 0.7rem 0; flex-wrap: wrap; }
  .page-body { padding-top: 1.75rem; }
  .header-right { width: 100%; justify-content: flex-end; }
  .nav { display: none; }
  .nav-toggle { display: flex; }
  .nav-link.active::after { left: 0.9rem; right: 0.9rem; height: 2px; }
  .user-chip { display: none; }
  .logo-img { height: 38px; }
  .btn { min-width: 0; }
  .table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .home-cols, .dash-grid, .profile-layout { grid-template-columns: 1fr; }
  .dash-grid aside { position: static !important; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .hero { border-radius: var(--r-lg); margin: 0.75rem 0 1.75rem; }
  .hero-inner { max-width: 100%; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }

  .hero-carousel { margin: 0.35rem 0 1.1rem; border-radius: var(--r-md); }
  .hero-carousel--compact { margin: 0 0 1.1rem; }
  .carousel-slide { padding: 1.25rem 0.85rem 3rem; }
  .hero-carousel--compact .carousel-slide { padding: 1rem 0.85rem 2.75rem; }
  .carousel-slide-inner { flex-direction: column; text-align: center; }
  .carousel-slide-content { max-width: 100%; }
  .carousel-slide-content .hero-label { margin-bottom: 0.6rem; font-size: 0.66rem; padding: 0.2rem 0.55rem; }
  .carousel-slide-content h1 { font-size: clamp(1.25rem, 5vw, 1.75rem); margin-bottom: 0.4rem; }
  .hero-carousel--compact .carousel-slide-content h1 { font-size: clamp(1.18rem, 4.8vw, 1.55rem); }
  .carousel-slide-content p { max-width: 100%; margin-left: auto; margin-right: auto; font-size: 0.78rem; line-height: 1.45; margin-bottom: 0.75rem; }
  .carousel-slide-visual { display: none; }
  .hero-btns { flex-direction: row; gap: 0.5rem; justify-content: center; }
  .hero-btns .btn { flex: 1; min-width: 0; font-size: 0.76rem; height: 2.15rem; padding: 0 0.55rem; }
  .carousel-btn { width: 28px; height: 28px; }
  .carousel-prev { left: 0.35rem; }
  .carousel-next { right: 0.35rem; }
  .carousel-dots { bottom: 0.85rem; }

  .auth-box { padding: 2rem 1.25rem; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .profile-hero { padding: 1.75rem 1.25rem; }
  .profile-hero-inner { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .profile-hero-actions { width: 100%; }
  .profile-hero-actions .btn { flex: 1 1 160px; }
  .profile-sidebar, .profile-content { width: 100%; }
  .dashboard-profile-card { padding: 1.4rem 1rem !important; }
  .dashboard-actions { width: 100%; }
  .dashboard-info-list { gap: 0.7rem; }
  .relato-card { grid-template-columns: 1fr; }
  .relato-img { min-height: 200px; }
  .sidebar-sticky { position: static !important; }

  [style*="grid-template-columns:1fr 280px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns:1fr 260px"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:220px 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:220px 1fr"] > div:first-child { min-height: 180px; }

  .page-header { padding: 1rem 0 0.85rem; }
  .footer { margin-top: 3rem; }
  .cmsg { max-width: 90% !important; }

  .vet-item { grid-template-columns: 40px 1fr; gap: 0.75rem; padding: 0.9rem 1rem; }
  .vet-item-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .vet-item-action { grid-column: 1 / -1; flex-direction: row; }
  .filter-bar { padding: 0.85rem 1rem; }
  .filter-bar form { grid-template-columns: 1fr; }
  #filter-form { grid-template-columns: 1fr !important; }
  .market-toolbar { flex-direction: column; align-items: stretch; gap: 0.6rem; padding: 0.75rem; }
  .market-sort { justify-content: space-between; }
  .market-sort-select { min-width: unset; flex: 1; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .product-grid--home { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .product-card-footer { flex-direction: column; align-items: stretch; }
  .product-card-actions { margin-left: 0; justify-content: stretch; }
  .product-card-actions .btn { flex: 1; }

  /* dashboard mobile fixes */
  .dash-grid { gap: 1rem; }
  .dash-grid > aside,
  .dash-grid > div { min-width: 0; }
  .dash-grid aside .card { padding: 1.25rem 1rem; }
  .dash-grid aside .card h2 { font-size: 1rem; }
  .msg-item { padding: 0.75rem; gap: 0.65rem; align-items: center; }
  .msg-item-preview { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .msg-item-time { display: none; }
  .market-page-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .market-page-header .btn { width: 100%; justify-content: center; }
  .market-city-chips { gap: 0.4rem; }
  .city-chip { font-size: 0.74rem; padding: 0.28rem 0.65rem; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 640px
═══════════════════════════════════════════ */
@media (max-width: 640px) {
  .hero { padding: 2rem 1rem 2.25rem; }
  .hero-inner { max-width: 100%; }
  .hero h1 { margin-bottom: 0.8rem; }
  .hero p { margin-bottom: 0.9rem; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE — 480px
═══════════════════════════════════════════ */
@media (max-width: 480px) {
  body { font-size: 15px; }
  .container { width: calc(100% - 0.75rem); }
  .page-body { padding-top: 1rem; }
  .header-inner { min-height: 62px; }
  .auth-wrap { padding: 1.4rem 0.75rem 2rem; }
  .auth-wrap-register { padding-top: 1.8rem; }
  .auth-box { width: 100%; max-width: 100%; padding: 1.2rem 0.9rem 1rem; }
  .auth-box-register { padding: 1.2rem 0.9rem 1rem; }
  .auth-title { font-size: 1.55rem; }
  .auth-sub { font-size: 0.88rem; }
  .auth-box .form-grid { gap: 0.75rem; }
  .form-field input, .form-field select, .form-field textarea { padding: 0.62rem 0.78rem; }
  .admin-stats { grid-template-columns: 1fr; }
  .dashboard-actions { gap: 0.5rem !important; }
  .dashboard-actions .btn,
  .profile-hero-actions .btn { width: 100%; }
  .profile-hero-actions { flex-direction: column; }
  .profile-hero-actions .btn { min-width: 0; }
  .card-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .auth-box { padding: 1.5rem 1rem; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-number { font-size: 1.6rem; }
  .stat-card { padding: 1rem 0.75rem; }
  .btn-lg { height: 2.6rem; font-size: 0.9rem; }
  .table { font-size: 0.75rem; }
  .table th, .table td { padding: 0.5rem 0.6rem; }
  .market-grid { grid-template-columns: 1fr; gap: 0.75rem; }
  .market-card-img { height: 120px; }
  .market-card-body { padding: 0.75rem; }
  .market-card-title { font-size: 0.88rem; }
  .product-grid { grid-template-columns: 1fr; gap: 0.65rem; }
  .product-grid--home { grid-template-columns: 1fr; }
  .product-card-img { height: 120px; }
  .product-card-body { padding: 0.7rem 0.75rem 0.75rem; gap: 0.3rem; }
  .product-card-title { font-size: 0.88rem; }
  .product-card-desc { font-size: 0.75rem; }
  .product-card-tag { font-size: 0.65rem; }
  .product-card-price { font-size: 1rem; }
  .product-card-actions .btn { font-size: 0.72rem; height: 1.8rem; padding: 0 0.6rem; }
  .carousel-dots { bottom: 0.6rem; }
}

@media (max-width: 360px) {
  .market-grid { grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-card-img { height: 100px; }
}

/* ═══════════════════════════════════════════
   PRODUCT CATEGORY ROWS (marketplace carousel)
═══════════════════════════════════════════ */
.product-section {
  margin: 2rem 0;
  padding: 1.2rem 0 0.7rem;
}
.product-section--source {
  display: none !important;
}
.product-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0;
  border-bottom: none;
}
.product-section-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
}
.product-section-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  background: linear-gradient(135deg, var(--field), var(--soil));
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 0.75rem;
}
.product-section-count {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--cream);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-family: 'DM Sans', sans-serif;
}
.product-section-see-all {
  font-size: 0.85rem;
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.product-section-see-all:hover { color: var(--field); border-color: var(--field); }

/* Scroll rail */
.product-row-wrap {
  position: relative;
}
.product-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0.15rem 0 0.55rem;
  scrollbar-width: none;
}
.product-row::-webkit-scrollbar { display: none; }

.product-row .product-card {
  position: relative;
  flex: 0 0 206px;
  min-width: 206px;
  min-height: 375px;
  scroll-snap-align: start;
  border: none;
  border-radius: var(--r-md);
  box-shadow: none;
  background: #fff;
}
.product-row .product-card::before {
  content: 'Oferta';
  position: absolute;
  top: 1.25rem;
  left: 1rem;
  z-index: 2;
  padding: 0.12rem 0.48rem;
  border-radius: 4px;
  background: #49aa3f;
  color: #fff;
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.3;
}
.product-row .product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.07);
  border-color: transparent;
}
.product-row .product-card-img-link {
  pointer-events: none;
}
.product-row .product-card-img {
  height: 190px;
  padding: 2.2rem 1rem 0.75rem;
  background: #fff;
}
.product-row .product-card-img img {
  object-fit: contain;
  transform: none !important;
}
.product-row .product-card-img-placeholder {
  background: #f7f8f6;
  border-radius: var(--r-md);
}
.product-row .product-card-location,
.product-row .product-card-tag,
.product-row .product-card-producer-row,
.product-row .product-card-desc {
  display: none;
}
.product-row .product-card-body {
  padding: 0.55rem 1rem 1rem;
  gap: 0.35rem;
}
.product-row .product-card-title {
  order: 3;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.22;
  margin-top: 0.2rem;
}
.product-row .product-card-footer {
  display: flex;
  order: 1;
  align-items: flex-start;
  gap: 0;
  padding-top: 0;
  border-top: 0;
  margin-top: 0;
}
.product-row .product-card-price-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}
.product-row .product-card-price {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  color: #000;
  font-weight: 900;
}
.product-row .product-card-price::before {
  content: 'Oferta especial';
  display: block;
  width: max-content;
  max-width: 100%;
  margin-bottom: 0.2rem;
  color: #4b9f3f;
  font-size: 0.72rem;
  font-weight: 800;
}
.product-row .product-card-price--na::before {
  content: '';
  display: none;
}
.product-row .product-card-actions {
  display: block;
  position: absolute;
  top: 150px;
  right: 1.05rem;
  z-index: 3;
  margin-left: 0;
}
.product-row .product-card-actions .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  background: #4caf42;
  border-color: #4caf42;
  color: #fff;
  font-size: 0;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.product-row .product-card-actions .btn::before {
  content: '+';
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
}
.product-row .product-card-actions .btn + .btn {
  display: none;
}

/* Scroll arrows for product rows */
.product-row-prev,
.product-row-next {
  position: absolute;
  top: -2.7rem;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #b8b8b8;
  color: #111;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background .15s, box-shadow .15s;
}
.product-row-prev:hover,
.product-row-next:hover {
  background: var(--cream);
  box-shadow: var(--shadow-md);
}
.product-row-prev { left: auto; right: 3rem; }
.product-row-next { right: 0; }
.product-row-prev.hidden,
.product-row-next.hidden { display: none; }

@media (max-width: 768px) {
  .product-row-prev,
  .product-row-next { display: none; }
  .product-row .product-card {
    flex: 0 0 170px;
    min-width: 170px;
    min-height: 315px;
  }
  .product-section { margin: 1.25rem 0; }
  .product-section-title { font-size: 1.1rem; }
  .product-section-see-all { font-size: 0.78rem; }
  .product-row { gap: 0.6rem; }
  .product-row .product-card-img { height: 155px; padding-top: 2rem; }
  .product-row .product-card-actions { top: 118px; right: 0.75rem; display: block; }
  .product-row .product-card-actions .btn { width: 36px; height: 36px; }
  .product-row .product-card-title { font-size: 0.82rem; }
  .product-row .product-card-price { font-size: 0.98rem; }
}

@media (max-width: 480px) {
  .product-row .product-card {
    flex: 0 0 155px;
    min-width: 155px;
    min-height: 300px;
  }
  .product-row .product-card-img { height: 145px; }
  .product-row .product-card-body { padding: 0.65rem 0.7rem 0.7rem; }
  .product-row .product-card-title { font-size: 0.78rem; }
  .product-row .product-card-desc { display: none; }
  .product-row .product-card-tag { font-size: 0.62rem; }
  .product-row .product-card-price { font-size: 0.92rem; }
  .product-row .product-card-footer { padding-top: 0.5rem; }
  .product-row .product-card-actions { top: 110px; display: block; }
}

/* Category filter tabs */
.category-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
  margin-bottom: 1.25rem;
}
.category-tabs::-webkit-scrollbar { display: none; }
.category-tab {
  flex-shrink: 0;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--white);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.category-tab:hover { border-color: var(--field); color: var(--field-dim); }
.category-tab.is-active {
  background: var(--field);
  border-color: var(--field);
  color: #fff;
  font-weight: 600;
}

/* ═══════════════════════════════════════════
   UTILITIES
═══════════════════════════════════════════ */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-muted { color: var(--muted); font-size: 0.88rem; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ═══════════════════════════════════════════
   MODAL DE DENÚNCIA
═══════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  width: min(440px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;
}
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 0.35rem; }
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 1.15rem; color: var(--soil); }
.modal-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  cursor: pointer;
}
.modal-close:hover { background: rgba(45,30,15,.06); color: var(--ink); }
.modal-target { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.25rem; }
.modal-target strong { color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.4rem; }

.stock-controls { margin-top: 1rem; }
.stock-controls > label { display: block; font-size: .78rem; font-weight: 700; margin-bottom: .35rem; color: var(--muted); }
.stock-controls-row { display: flex; align-items: center; gap: .45rem; }
.stock-controls-row input { width: 4.5rem; min-width: 0; padding: .45rem; text-align: center; }
.made-to-order-option { display: flex; align-items: center; gap: .45rem; margin-top: .55rem; font-size: .82rem; text-transform: none; cursor: pointer; }
.made-to-order-option input { width: auto; }
.product-stock-label { display: inline-block; margin-left: .4rem; color: var(--field-dim); font-size: .78rem; font-weight: 700; }
.badge-brown { background: #f5ebe0; color: var(--bark); }

@media (max-width: 480px) {
  .modal { padding: 1.35rem; }
}
