/* ============================================================================
   FastPoultry - site.css
   Single stylesheet for the entire public site + dashboard + admin shells.
   Tokens at the top map to /data/config.json brand colors. When the brand is
   re-themed, change tokens only.
   ============================================================================ */

:root {
  --c-ink:     #0E1A0F;
  --c-paper:   #FBF8F1;
  --c-primary: #1A2E1B;
  --c-accent:  #C8A84E;
  --c-muted:   #6E7A6F;
  --c-line:    #E5DFCF;
  --c-soft:    #F2EDDF;
  --c-danger:  #A8362A;
  --c-success: #3F7A3F;
  --c-warn:    #C77A1F;

  --f-head: "Bebas Neue", "Oswald", "Impact", system-ui, sans-serif;
  --f-body: "Barlow", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --shadow-sm: 0 1px 2px rgba(14,26,15,.06);
  --shadow-md: 0 4px 14px rgba(14,26,15,.08);
  --shadow-lg: 0 10px 40px rgba(14,26,15,.12);

  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; transition: opacity .15s; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--c-accent); color: var(--c-ink); }
*:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

h1, h2, h3, h4 {
  font-family: var(--f-head);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0 0 .4em;
  color: var(--c-ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.05; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.1; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1em; }
small, .small { font-size: .85rem; color: var(--c-muted); }
hr { border: 0; border-top: 1px solid var(--c-line); margin: 2rem 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--soft { background: var(--c-soft); }
.section--ink { background: var(--c-ink); color: #FBF8F1; }
.section--ink h1, .section--ink h2, .section--ink h3 { color: #FBF8F1; }

/* ----------------------------- buttons ----------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .95rem;
  padding: 11px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .05s, box-shadow .15s, background .15s, border-color .15s;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: #213a23; }
.btn--accent  { background: var(--c-accent);  color: var(--c-ink); }
.btn--accent:hover { background: #d8b85b; }
.btn--ghost   { background: transparent; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-ink); }
.btn--danger  { background: var(--c-danger); color: #fff; }
.btn--lg { padding: 14px 28px; font-size: 1.05rem; }
.btn--sm { padding: 7px 12px; font-size: .85rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ----------------------------- chips / badges ----------------------------- */
.chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--c-soft);
  color: var(--c-ink);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .03em;
  border: 1px solid var(--c-line);
}
.chip--accent  { background: var(--c-accent); border-color: var(--c-accent); }
.chip--primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.chip--success { background: #E2EFE2; color: var(--c-success); border-color: #C7DEC7; }
.chip--warn    { background: #FBEFD9; color: var(--c-warn); border-color: #F0DEB1; }
.chip--danger  { background: #F7DDD9; color: var(--c-danger); border-color: #ECC0BA; }
.chip--featured { background: var(--c-accent); color: var(--c-ink); }
.chip--npip    { background: #DCEBE0; color: #1f4d2a; border-color: #C0D9C7; }

/* ----------------------------- forms ----------------------------- */
.field { display: block; margin-bottom: 18px; }
.field > label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.field .help { font-size: .8rem; color: var(--c-muted); margin-top: 4px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="url"], input[type="password"], input[type="date"], input[type="search"],
select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: #fff;
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--c-ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,46,27,.12);
}
textarea { min-height: 120px; resize: vertical; font-family: var(--f-body); }
.fieldset { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 18px; margin: 0 0 18px; }
.fieldset > legend { font-weight: 600; padding: 0 8px; }
.checkbox-row { display: flex; gap: 8px; align-items: flex-start; }
.checkbox-row input { margin-top: 4px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }

/* ----------------------------- header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,248,241,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}
.site-header .logo {
  font-family: var(--f-head);
  font-size: 1.6rem;
  letter-spacing: .04em;
  color: var(--c-ink);
}
.site-header .logo span { color: var(--c-accent); }
.site-header nav {
  flex: 1;
  display: flex;
  gap: 22px;
  font-weight: 500;
  font-size: .95rem;
}
.site-header nav a { color: var(--c-ink); }
.site-header nav a:hover { color: var(--c-primary); text-decoration: none; }
.site-header .header-cta { display: flex; gap: 10px; align-items: center; }
.site-header .header-search {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 2px 4px 2px 12px;
  width: 240px;
  transition: width .2s, border-color .15s, box-shadow .15s;
}
.site-header .header-search:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(26,46,27,.12);
  width: 320px;
}
.site-header .header-search input {
  border: 0;
  background: transparent;
  font-size: .9rem;
  width: 100%;
  padding: 6px 4px;
  outline: none;
}
.site-header .header-search input:focus { box-shadow: none; }
.site-header .header-search button {
  background: var(--c-primary);
  border: 0;
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hide-tablet { display: initial; }
@media (max-width: 1024px) { .hide-tablet { display: none; } }
.site-header .nav-toggle {
  display: none;
  width: 40px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 9px 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
}
.site-header .nav-toggle span {
  display: block;
  height: 2px;
  background: var(--c-ink);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.site-header .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-header .nav-toggle.open span:nth-child(2) { opacity: 0; }
.site-header .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-header .mobile-drawer {
  display: none;
  flex-direction: column;
  padding: 8px 20px 18px;
  background: var(--c-paper);
  border-top: 1px solid var(--c-line);
}
.site-header .mobile-drawer a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--c-line);
  color: var(--c-ink);
  font-weight: 500;
}
.site-header .mobile-drawer a:last-child { border-bottom: 0; }
@media (max-width: 880px) {
  .site-header nav { display: none; }
  .site-header .container { gap: 12px; }
  .site-header .nav-toggle { display: flex; }
  .site-header .mobile-drawer:not([hidden]) { display: flex; }
}

/* ----------------------------- hero ----------------------------- */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background:
    radial-gradient(ellipse 800px 500px at 110% -10%, rgba(200,168,78,.12), transparent 60%),
    radial-gradient(ellipse 600px 400px at -10% 110%, rgba(26,46,27,.08), transparent 60%),
    linear-gradient(180deg, #FBF8F1 0%, #F2EDDF 100%);
  overflow: hidden;
}
.hero h1 { max-width: 820px; letter-spacing: 0.01em; }
.hero .lede { max-width: 640px; font-size: 1.18rem; color: var(--c-muted); margin-bottom: 32px; line-height: 1.5; }
.hero .hero-search {
  display: flex;
  gap: 8px;
  max-width: 640px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s, border-color .15s;
}
.hero .hero-search:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(26,46,27,.12), var(--shadow-md); }
.hero .hero-search input {
  border: 0;
  flex: 1;
  background: transparent;
  font-size: 1rem;
  padding: 10px 0;
}
.hero .hero-search input:focus { box-shadow: none; outline: none; }
.hero .hero-search .btn { border-radius: 999px; }
.hero .trust-row { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 30px; color: var(--c-muted); font-size: .9rem; }
.hero .trust-row > div { padding-right: 24px; border-right: 1px solid var(--c-line); }
.hero .trust-row > div:last-child { border-right: 0; }
.hero .trust-row strong { color: var(--c-ink); display: block; font-family: var(--f-head); font-size: 1.8rem; line-height: 1; letter-spacing: .02em; }

/* ----------------------------- category grid ----------------------------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}
.cat-tile {
  display: block;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .2s ease, border-color .15s;
  text-decoration: none;
  color: inherit;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D5CDB7; text-decoration: none; }
.cat-tile .tile-img {
  aspect-ratio: 4 / 3;
  background: var(--c-soft) center/cover no-repeat;
  transition: transform .35s ease;
}
.cat-tile:hover .tile-img { transform: scale(1.05); }
.cat-tile .tile-body { padding: 14px 14px 16px; }
.cat-tile h3 { margin: 0 0 4px; font-size: 1.1rem; }
.cat-tile p { margin: 0; font-size: .85rem; color: var(--c-muted); }

/* ----------------------------- listing card ----------------------------- */
.list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}
.listing-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .2s ease, border-color .15s;
  position: relative;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #D5CDB7; }
.listing-card .photo {
  aspect-ratio: 4 / 3;
  background: var(--c-soft) center/cover no-repeat;
  position: relative;
  border-bottom: 1px solid var(--c-line);
}
.listing-card .photo .overlay {
  position: absolute;
  top: 10px; left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 56px);
}
.wishlist-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--c-line);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .1s, background .15s;
  box-shadow: var(--shadow-sm);
}
.wishlist-btn:hover { transform: scale(1.1); background: #fff; }
.wishlist-btn svg { display: block; }
.listing-card .body { padding: 14px 16px 16px; flex: 1; display: flex; flex-direction: column; }
.listing-card h3 { font-size: 1.1rem; margin: 0 0 4px; }
.listing-card h3 a { color: var(--c-ink); }
.listing-card .meta { font-size: .82rem; color: var(--c-muted); margin-bottom: 8px; }
.listing-card .price { font-family: var(--f-head); font-size: 1.5rem; color: var(--c-primary); margin-top: auto; }
.listing-card .price small { font-size: .7rem; color: var(--c-muted); font-family: var(--f-body); margin-left: 4px; }

/* ----------------------------- search page ----------------------------- */
.search-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  padding: 28px 0 56px;
}
@media (max-width: 880px) { .search-shell { grid-template-columns: minmax(0, 1fr); } }
.filters {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 18px;
  position: sticky;
  top: 80px;
  align-self: start;
}
.filters h4 { margin-top: 0; font-family: var(--f-body); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.filters .filter-group { padding: 12px 0; border-top: 1px solid var(--c-line); }
.filters .filter-group:first-of-type { border-top: 0; }
.filters label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .9rem; cursor: pointer; }
.search-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 30px 0 0;
}
.pagination button { background: #fff; border: 1px solid var(--c-line); padding: 8px 14px; border-radius: var(--r-md); cursor: pointer; }
.pagination button.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--c-muted); }

/* ----------------------------- listing detail ----------------------------- */
.detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 380px);
  gap: 36px;
  padding: 28px 0 56px;
  align-items: start;
}
@media (max-width: 880px) { .detail-shell { grid-template-columns: minmax(0, 1fr); } }
.detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.detail-gallery .hero-img {
  aspect-ratio: 4 / 3;
  max-height: 560px;
  background: var(--c-soft) center/cover no-repeat;
  border-radius: var(--r-lg);
  border: 1px solid var(--c-line);
}
.detail-gallery .thumb-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.detail-gallery .thumb-row .thumb {
  aspect-ratio: 1;
  background: var(--c-soft) center/cover no-repeat;
  border-radius: var(--r-md);
  cursor: pointer;
  opacity: .8;
  transition: opacity .15s, border-color .15s;
  border: 2px solid transparent;
}
.detail-gallery .thumb-row .thumb:hover { opacity: 1; }
.detail-gallery .thumb-row .thumb.active { border-color: var(--c-accent); opacity: 1; }
.detail-info { min-width: 0; }
.detail-info h1 { font-size: clamp(1.6rem, 3vw, 2.0rem); margin: 0 0 12px; line-height: 1.2; }
.detail-info .price { font-family: var(--f-head); font-size: 2.4rem; color: var(--c-primary); margin: 0 0 10px; line-height: 1; }
.detail-info .seller-card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 16px;
  margin: 18px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}
.detail-info .seller-card .avatar {
  width: 52px; height: 52px;
  background: var(--c-soft) center/cover no-repeat;
  border-radius: 50%;
}
.detail-info .seller-card .info { flex: 1; }
.detail-info .seller-card .name { font-weight: 600; }
.attr-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
  margin: 14px 0;
  table-layout: fixed;
}
.attr-table td {
  padding: 8px 0;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
.attr-table td:first-child { color: var(--c-muted); width: 42%; font-weight: 500; }
.attr-table td:last-child { word-wrap: break-word; overflow-wrap: anywhere; }
.attr-table tr:last-child td { border-bottom: 0; }

/* ----------------------------- live arrival guarantee summary ----------------------------- */
.lag-summary {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, #FBF8F1 0%, #fff 100%);
  margin: 16px 0;
  overflow: hidden;
}
.lag-summary summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  font-size: .9rem;
  transition: background .15s;
}
.lag-summary summary::-webkit-details-marker { display: none; }
.lag-summary summary:hover { background: rgba(200,168,78,.08); }
.lag-summary .lag-icon { color: var(--c-primary); display: flex; flex-shrink: 0; }
.lag-summary .lag-text { flex: 1; line-height: 1.4; }
.lag-summary .lag-chevron { color: var(--c-muted); transition: transform .2s; }
.lag-summary[open] .lag-chevron { transform: rotate(180deg); }
.lag-body { padding: 0 14px 14px; border-top: 1px solid var(--c-line); }
.lag-tiers { margin: 12px 0; }
.lag-tiers label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .12s;
  flex-wrap: wrap;
}
.lag-tiers label:hover { background: rgba(200,168,78,.06); }
.lag-tiers label > strong { font-size: .92rem; }
.lag-tiers input[type=radio] { margin-top: 4px; flex-shrink: 0; }
.lag-tiers label .muted { flex-basis: 100%; padding-left: 22px; }

/* ----------------------------- footer ----------------------------- */
.site-footer {
  background: var(--c-ink);
  color: #C9D1CA;
  padding: 50px 0 30px;
  margin-top: 60px;
}
.site-footer a { color: #fff; opacity: .8; }
.site-footer a:hover { opacity: 1; text-decoration: none; }
.newsletter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 20px 24px;
  border: 1px solid #2A3A2C;
  border-radius: 12px;
  background: rgba(255,255,255,.02);
  margin-bottom: 30px;
}
@media (max-width: 760px) { .newsletter { grid-template-columns: 1fr; } }
.newsletter-form {
  display: flex;
  gap: 8px;
  background: #fff;
  border-radius: 8px;
  padding: 4px;
}
.newsletter-form input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  font-size: .95rem;
  outline: none;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-grid h4 { color: #fff; font-family: var(--f-body); font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin-bottom: 8px; font-size: .92rem; }
.foot-bar {
  border-top: 1px solid #2A3A2C;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .85rem;
  color: #8A958C;
}

/* ----------------------------- dashboard / admin ----------------------------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
@media (max-width: 880px) { .app-shell { grid-template-columns: 1fr; } }
.app-side {
  background: var(--c-ink);
  color: #C9D1CA;
  padding: 22px 0;
}
.app-side .brand {
  font-family: var(--f-head);
  font-size: 1.3rem;
  color: #fff;
  padding: 0 22px 18px;
  border-bottom: 1px solid #2A3A2C;
}
.app-side nav { display: flex; flex-direction: column; padding: 14px 0; }
.app-side nav a {
  color: #C9D1CA;
  padding: 10px 22px;
  font-size: .94rem;
}
.app-side nav a:hover { background: #213a23; color: #fff; text-decoration: none; }
.app-side nav a.active { background: #213a23; color: var(--c-accent); border-left: 3px solid var(--c-accent); padding-left: 19px; }
.app-main { padding: 28px 32px 60px; max-width: 1100px; }
.app-main h1 { font-size: 1.8rem; margin-bottom: 18px; }
.app-card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 22px; margin-bottom: 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 24px; }
.kpi { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 16px; }
.kpi .num { font-family: var(--f-head); font-size: 2rem; color: var(--c-primary); line-height: 1; }
.kpi .lbl { font-size: .8rem; color: var(--c-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 6px; }

.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--c-line); font-size: .92rem; }
.table th { background: var(--c-soft); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table .row-actions { display: flex; gap: 6px; }

/* ----------------------------- toasts / alerts ----------------------------- */
.alert { padding: 12px 16px; border-radius: var(--r-md); border: 1px solid; margin: 10px 0; font-size: .92rem; }
.alert--info    { background: #EAF1F7; border-color: #C5D7E6; color: #244C70; }
.alert--success { background: #E2EFE2; border-color: #C7DEC7; color: #1f4d2a; }
.alert--warn    { background: #FBEFD9; border-color: #F0DEB1; color: #7a4d10; }
.alert--danger  { background: #F7DDD9; border-color: #ECC0BA; color: #6d231a; }

.toast-host { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: var(--c-ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: tin .25s ease; }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ----------------------------- utility ----------------------------- */
.row     { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.stack   { display: flex; flex-direction: column; gap: 14px; }
.center  { text-align: center; }
.muted   { color: var(--c-muted); }
.hide-mobile { display: initial; }
@media (max-width: 640px) { .hide-mobile { display: none; } }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.skeleton { background: linear-gradient(90deg, #efeae0 25%, #f7f3e7 50%, #efeae0 75%); background-size: 200% 100%; animation: sk 1.4s linear infinite; border-radius: var(--r-md); }

/* ----------------------------- photo uploader ----------------------------- */
.photo-uploader { width: 100%; }
.photo-dropzone {
  border: 2px dashed var(--c-line);
  border-radius: var(--r-md);
  padding: 28px 20px;
  text-align: center;
  background: var(--c-soft);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.photo-dropzone.dragging { border-color: var(--c-primary); background: #FBF8F1; }
.photo-dropzone p { margin: 0 0 8px; }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.photo-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--c-line);
}
.photo-thumb-img {
  width: 100%; height: 100%;
  background: var(--c-soft) center/cover no-repeat;
}
.photo-thumb-rm {
  position: absolute;
  top: 4px; right: 4px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  line-height: 22px;
  font-size: 16px;
  padding: 0;
}
.photo-thumb-pct {
  position: absolute;
  bottom: 4px; left: 4px;
  background: rgba(0,0,0,.7);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: .7rem;
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================================
   MOBILE RESPONSIVENESS PASS
   Hits 375px (iPhone SE), 414px (iPhone Pro), 768px (iPad)
   ============================================================================ */

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .hero { padding: 48px 0 56px; }
  .hero h1 { font-size: 2rem; line-height: 1.1; }
  .hero .lede { font-size: 1.02rem; margin-bottom: 22px; }
  .hero .hero-search { padding: 5px 5px 5px 14px; }
  .hero .hero-search input { font-size: .95rem; padding: 8px 0; }
  .hero .trust-row { gap: 14px; margin-top: 22px; }
  .hero .trust-row > div { padding-right: 14px; }
  .hero .trust-row strong { font-size: 1.4rem; }

  /* Cards & grids tighten up */
  .list-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .listing-card .body { padding: 12px; }
  .listing-card h3 { font-size: 1rem; }
  .listing-card .price { font-size: 1.3rem; }
  .listing-card .meta { font-size: .78rem; }

  /* Listing detail collapses to single column at 880, this is just spacing */
  .detail-gallery .hero-img { max-height: 360px; }
  .detail-gallery .thumb-row { grid-template-columns: repeat(4, 1fr); }

  /* Tools / calculators */
  .grid-form { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 12px; }
  .kpi .num { font-size: 1.6rem; }

  /* Forms */
  input[type=text], input[type=email], input[type=tel], input[type=number],
  input[type=url], input[type=password], input[type=date], input[type=search],
  select, textarea {
    font-size: 16px;             /* prevents iOS zoom on focus */
    padding: 12px;
  }

  /* Buttons */
  .btn { padding: 10px 16px; font-size: .92rem; }
  .btn--lg { padding: 12px 22px; font-size: 1rem; }

  /* Tables: compact on mobile */
  .attr-table { font-size: .85rem; }
  .attr-table td { padding: 6px 0; }
  .attr-table td:first-child { width: 45%; }

  /* Dashboard / admin shells */
  .app-shell { display: block; }
  .app-side {
    padding: 8px 0;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 0;
  }
  .app-side .brand { display: none; }
  .app-side nav { flex-direction: row; padding: 0; }
  .app-side nav a {
    padding: 8px 14px;
    border-left: 0;
    border-bottom: 3px solid transparent;
  }
  .app-side nav a.active {
    border-left: 0;
    border-bottom-color: var(--c-accent);
    padding-left: 14px;
  }
  .app-main { padding: 20px 16px 40px; }

  /* Footer condense */
  .foot-grid { gap: 24px; }

  /* Header simplifications */
  .site-header .header-search { display: none; }
  .site-header .header-cta { gap: 6px; }
  .site-header .container { padding: 0 16px; }
  .site-header .logo { font-size: 1.3rem; }

  /* LAG box on mobile */
  .lag-tiers label { padding: 8px 6px; }

  /* Photo uploader more compact */
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }

  /* Live arrival page tiers stack */
  .row { gap: 12px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 1.7rem; }
  .hero .hero-search { flex-direction: column; padding: 8px; border-radius: 12px; }
  .hero .hero-search .btn { width: 100%; border-radius: 8px; }
  .list-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .listing-card .photo { aspect-ratio: 5 / 3; }
}
