[hidden] { display: none !important; }
:root{
  --brand: #7B1E3B;      /* malbec */
  --brand2:#A22C55;
  --cream:#FFF4E6;
  --bg:   #F4EFEA;
  --text: #1F1B1C;
  --muted:#6B6366;
  --card: #FFFFFF;
  --line: #E6DCDC;
  --ok:   #1F7A4A;

  --shadow: 0 10px 30px rgba(25,10,15,.08);
  --shadow2:0 2px 10px rgba(25,10,15,.08);
  --r: 18px;
  --r2: 14px;

  /* Safe-area (notch / barras) */
  --safe-top: env(safe-area-inset-top);
  --safe-right: env(safe-area-inset-right);
  --safe-bottom: env(safe-area-inset-bottom);
  --safe-left: env(safe-area-inset-left);

}

*{box-sizing:border-box}
body{
  margin:0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 500px at 50% -10%, var(--cream), var(--bg));
  color:var(--text);
}

.wrap{
  max-width: 980px;
  margin:0 auto;
  padding: 14px;
}

/* Safe-area padding (mobile cutouts) */
.wrap{
  padding-left: calc(14px + var(--safe-left));
  padding-right: calc(14px + var(--safe-right));
  padding-bottom: calc(14px + var(--safe-bottom));
}

/* HEADER */
.header{
  position: sticky;
  top:0;
  z-index: 10;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  padding-top: calc(10px + var(--safe-top));
  padding-left: calc(12px + var(--safe-left));
  padding-right: calc(12px + var(--safe-right));
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color:#fff;
  box-shadow: var(--shadow2);
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 1;
  min-width: 0;
}
.brandMark{
  width: 70px;
  height: 70px;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  overflow: hidden;
}

.brandLogo{
  width: 92%;
  height: 92%;
  object-fit: contain;
  display: block;
}

.brandLetter{

  font-weight: 900;
  font-size: 20px;
}
.brandText{min-width:0}
.brandName{
  font-weight: 900;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brandTag{
  font-size: 12px;
  opacity: .9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iconBtn{
  border:none;
  background: rgba(255,255,255,.14);
  color:#fff;
  border-radius: 14px;
  width: 44px;
  height: 44px;
  display:grid;
  place-items:center;
  cursor:pointer;
  border: 1px solid rgba(255,255,255,.18);
}
.icon{width:22px;height:22px}
.subtle{opacity:.7}

/* BUTTONS */
/* Touch: evita delays y mejora 'modo dedo' */
button, a, .btn, .iconBtn, input, select, textarea{
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn{
  height: 44px;
  border-radius: 14px;
  padding: 0 14px;
  border: 1px solid transparent;
  cursor:pointer;
  font-weight: 800;
}
a.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.btnPrimary{
  background: #fff;
  color: var(--brand);
}
.btnGhost{
  background: rgba(255,255,255,.12);
  color:#fff;
  border-color: rgba(255,255,255,.22);
}

/* SEARCH CARD */
.searchCard{
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px;
}
.searchForm{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items:center;
}
.searchField{
  flex: 1;
  min-width: 210px;
  display:flex;
  gap:10px;
  align-items:center;
  background: #FBF7F5;
  border: 1px solid var(--line);
  padding: 0 12px;
  border-radius: 14px;
  height: 44px;
}
.searchInput{
  border:none;
  outline:none;
  flex:1;
  background: transparent;
  font-size: 14px;
}
.searchForm .btnPrimary{
  border: 1px solid var(--brand);
  background: var(--brand);
  color:#fff;
}
.searchForm .btnGhost{
  border: 1px solid var(--line);
  background: #FBF7F5;
  color: var(--text);
}

.quickRow{
  margin-top: 10px;
  display:flex;
  gap:8px;
  flex-wrap: wrap;
}
.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #FBF7F5;
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
}

/* SECTIONS */
.section{
  margin-top: 16px;
}
.sectionHead{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.sectionHead h2{
  margin:0;
  font-size: 18px;
  letter-spacing: .1px;
}
.link{
  text-decoration:none;
  font-weight: 800;
  color: var(--brand);
}

/* CATEGORY CHIPS */
.chips{
  margin-top: 10px;
  display:flex;
  gap:10px;
  overflow:auto;
  padding-bottom: 6px;
}
.chips::-webkit-scrollbar{height:10px}
.chips::-webkit-scrollbar-thumb{background:#dbcfd2;border-radius:999px}
.chip{
  flex: 0 0 auto;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  font-weight: 900;
  cursor:pointer;
}
.chip span{opacity:.9}

/* GRID CARDS (Nuevos) */
.grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card{
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  box-shadow: var(--shadow2);
}
/* Hover: levantar publicación (solo en dispositivos con hover) */
.card, .mini{
  will-change: transform;
  transition: transform .14s ease, box-shadow .14s ease;
}
@media (hover:hover){
  .card:hover, .mini:hover{
    transform: translateY(-4px);
    box-shadow: var(--shadow);
  }
}
.cardMedia{
  position:relative;
  height: 150px;
  background: #F6F1F0;
}
.cardMedia img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.badgePrice{
  position:absolute;
  right: 10px;
  top: 10px;
  background: rgba(255,255,255,.92);
  color: var(--ok);
  border: 1px solid rgba(0,0,0,.06);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1000;
  backdrop-filter: blur(6px);
}
.badgeTag{
  position:absolute;
  left: 10px;
  bottom: 10px;
  top: auto;
  right: auto;
  background: rgba(123,30,59,.92);
  color:#fff;
  border: 1px solid rgba(255,255,255,.16);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  max-width: calc(100% - 120px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

.cardBody{
  padding: 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.jobMiniTag{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #FBF7F5;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}
.cardTitle{
  font-weight: 950;
  line-height: 1.15;
}

mark.hl{
  background: rgba(255, 204, 0, 0.35);
  color: inherit;
  border-radius: 6px;
  padding: 0 2px;
}
.cardMeta{
  display:flex;
  justify-content:space-between;
  align-items:center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}


/* Mis publicaciones: contador de clics */
.myClicks{
  margin-top: 6px;
  display: flex;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.favBtn{
  border: 1px solid var(--line);
  background: #FBF7F5;
  border-radius: 12px;
  padding: 6px 10px;
  cursor:pointer;
  font-weight: 900;
}

/* AD BLOCK */
.adBlock{
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(123,30,59,.08), rgba(162,44,85,.06));
  border: 1px dashed rgba(123,30,59,.25);
  border-radius: var(--r);
  padding: 12px;
}
.adTop{
  display:flex;
  justify-content:space-between;
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}
.adBody{
  margin-top: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r2);
  padding: 12px;
}
.adMock{
  height: 100px;
  border-radius: 14px;
  background: linear-gradient(135deg, #F5EFEF, #EFE7E7);
  display:grid;
  place-items:center;
  color:#7a6f72;
  font-weight: 900;
}

/* RAIL (Recomendados) */
.rail{
  margin-top: 10px;
  display:flex;
  gap: 12px;
  overflow:auto;
  padding-bottom: 6px;
}
.rail::-webkit-scrollbar{height:10px}
.rail::-webkit-scrollbar-thumb{background:#dbcfd2;border-radius:999px}

.mini{
  flex: 0 0 240px;
  background:#fff;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow:hidden;
  box-shadow: var(--shadow2);
}
.miniMedia{height: 110px; background:#F6F1F0;}
.miniMedia img{width:100%;height:100%;object-fit:cover;display:block;}
.miniBody{padding: 10px; display:flex; flex-direction:column; gap:6px;}
.miniTitle{font-weight: 950; line-height: 1.15;}
.miniRow{display:flex; justify-content:space-between; align-items:center; color:var(--muted); font-size: 12px; font-weight: 900;}
.miniPrice{color: var(--ok); font-weight: 1000;}

/* CALLOUT */
.callout{
  margin-top: 18px;
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding: 12px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow2);
}
.calloutIcon{font-size: 20px}
.calloutText{color: var(--text); font-weight: 700}
.calloutText strong{color: var(--brand)}

/* FOOTER */
.footer{
  margin: 18px 0 40px;
  text-align:center;
  color: var(--muted);
}
.footerLinks{
  display:flex;
  flex-wrap:wrap;
  gap: 10px 14px;
  justify-content:center;
}
.footerLinks a{
  color: var(--muted);
  text-decoration:none;
  font-weight: 900;
}
.footerCopy{
  margin-top: 10px;
  font-size: 12px;
}

/* BOTTOM SHEET MENU */
.sheetBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  z-index: 50;
}
.sheet{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  transform: translateY(110%);
  will-change: transform;
  background:#fff;
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--line);
  box-shadow: 0 -20px 50px rgba(0,0,0,.18);
  z-index: 60;
  padding: 10px 14px 16px;
  transition: transform .22s ease;
}
.sheet.open{ transform: translateY(0); }
.sheetHandle{
  width: 44px;
  height: 5px;
  border-radius: 999px;
  background:#e5dadd;
  margin: 8px auto 12px;
}
.sheetHead{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.sheetTitle{ font-weight: 1000; font-size: 16px; }
.sheetSub{ color: var(--muted); font-size: 12px; font-weight: 800; }
.sheetNav{
  margin-top: 12px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.sheetItem{
  text-decoration:none;
  color: var(--text);
  font-weight: 950;
  background: #FBF7F5;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 16px;
}

.sheetItemFlex{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.notifBadge{min-width:22px;height:22px;padding:0 7px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:1000;background:rgba(239,68,68,.95);color:#fff;}
.notifItem.unread{border-color:rgba(239,68,68,.22);background:rgba(239,68,68,.04);}
.notifItem .notifTitle{font-weight:950;}
.notifItem .notifMeta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:13px;margin-top:6px;}
.notifItem .notifActions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}

/* MODAL */
.modalBackdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  z-index: 70;
}
.modal{
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 28px));
  background: #fff;
  border-radius: var(--r);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  z-index: 80;
}
.modalHead{
  padding: 12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom: 1px solid var(--line);
}
.modalBody{ padding: 14px; display:flex; flex-direction:column; gap:12px; }
.field{ display:flex; flex-direction:column; gap:6px; font-weight: 900; color: var(--muted); }
.field input, .field select{
  height: 44px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBF7F5;
  padding: 0 12px;
  outline:none;
}
.modalActions{ display:flex; gap:10px; justify-content:flex-end; }
.modalActions .btnGhost{
  background: #FBF7F5;
  border: 1px solid var(--line);
  color: var(--text);
}
.modalActions .btnPrimary{
  background: var(--brand);
  border: 1px solid var(--brand);
  color:#fff;
}

/* RESPONSIVE */
@media (min-width: 640px){
  .grid{ grid-template-columns: repeat(2, 1fr); }
  .cardMedia{ height: 170px; }
}
@media (min-width: 980px){
  .grid{ grid-template-columns: repeat(3, 1fr); }
}

/* SEARCH: category select */
.searchSelect{
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-weight: 950;
  font-size: 13px;
  max-width: 150px;
  cursor: pointer;
  padding-right: 10px;
}
.searchDivider{
  width: 1px;
  height: 22px;
  background: var(--line);
  opacity: .9;
}

/* Section right helpers */
.sectionRight{
  display:flex;
  align-items:center;
  gap:12px;
}
.resultCount{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

/* VIEWS (router) */
.view{ display: none; }
.view.active{ display: block; }

.viewHead{
  margin-top: 12px;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}
.backLink{ font-weight: 950; }

/* Forms */
.formCard{
  margin-top: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px;
}
.formGrid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 640px){
  .formGrid{ grid-template-columns: 1fr 1fr; }
}
.field textarea{
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #FBF7F5;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
}
.field.inline{
  flex-direction: row;
  align-items:center;
  gap:10px;
  color: var(--text);
}

/* Messages / empty states */
.msg{
  margin-top: 10px;
  font-weight: 900;
  color: var(--ok);
}
.msg.error{ color: #B00020; }
.emptyState{
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r);
  border: 1px dashed var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
}

/* Lists */
.list{
  margin: 0;
  padding-left: 18px;
  display:flex;
  flex-direction:column;
  gap:10px;
  color: var(--text);
  font-weight: 800;
}

/* Ad as link */
.adLink{
  display:block;
  text-decoration:none;
  color: inherit;
}
.adImg{
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 14px;
  display:block;
}

/* Active state for category chips/pills */
.pill.active, .chip.active{
  background: rgba(123,30,59,.92);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

/* Favorite button active */
.favBtn.active{
  border-color: rgba(123,30,59,.35);
  background: rgba(123,30,59,.10);
  color: var(--brand);
}

/* Small actions on cards (delete, etc.) */
.cardActions{
  margin-top: 8px;
  display:flex;
  justify-content:flex-end;
}
.dangerBtn{
  border: 1px solid rgba(176,0,32,.25);
  background: rgba(176,0,32,.06);
  color: #B00020;
  border-radius: 12px;
  padding: 6px 10px;
  cursor:pointer;
  font-weight: 950;
}
.modalClose{
  color: var(--text) !important;
  border:none !important;
  background: transparent !important;
}


/* ===== Detalle de publicación (modal grande) ===== */
.detailModal{
  width: min(860px, calc(100% - 28px));
  max-height: 90vh;
  overflow: auto;
  position: fixed;
}

.detailClose{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(0,0,0,.18);
  color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-size: 20px;
  font-weight: 1100;
}

.detailHero{
  height: 320px;
  background: #ececec;
  overflow: hidden;
  border-radius: 16px;
  position: relative;
}

.detailHero img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detailZoomBtn{
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,0,0,.18);
  color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-size: 18px;
  font-weight: 1100;
}

.detailThumbs{
  display: flex;
  gap: 8px;
  padding: 10px 14px 0;
  overflow: auto;
}

.detailThumb{
  flex: 0 0 auto;
  width: 86px;
  height: 62px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  cursor: pointer;
}

.detailThumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detailThumb.active{
  border-color: rgba(123,30,59,.55);
  box-shadow: var(--shadow2);
}

.detailSpecGrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 2px;
}

.detailSpec{
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detailSpec .specK{
  font-size: 12px;
  font-weight: 1000;
  color: var(--muted);
}

.detailSpec .specV{
  font-size: 14px;
  font-weight: 1000;
  color: var(--text);
}

@media (max-width: 520px){
  .detailSpecGrid{ grid-template-columns: 1fr; }
  .detailThumb{ width: 76px; height: 56px; }
}

/* ===== Mobile polish (evitar distorsión en pantallas chicas) ===== */
html, body{ overflow-x: hidden; }

/* Evitar desbordes por URLs / palabras largas */
.cardTitle, .miniTitle, .detailTitle, .detailDesc, .calloutText, .field, .specV{
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 420px){
  .wrap{ padding: 10px; padding-left: calc(10px + var(--safe-left)); padding-right: calc(10px + var(--safe-right)); padding-bottom: calc(10px + var(--safe-bottom)); }

  /* Header más compacto */
  .header{ padding: 8px 10px; padding-top: calc(8px + var(--safe-top)); padding-left: calc(10px + var(--safe-left)); padding-right: calc(10px + var(--safe-right)); gap: 8px; }
  .brandMark{ width: 54px; height: 54px; border-radius: 12px; }
  .brandName{ font-size: 14px; }
  .brandTag{ display: none; }

  /* Botones del header */
  #publishBtn.btn{ height: 44px; padding: 0 10px; border-radius: 12px; font-size: 13px; }
  .iconBtn{ width: 44px; height: 44px; border-radius: 12px; }
  .icon{ width: 20px; height: 20px; }

  /* Detalle de publicación: hero más bajo en móviles */
  .detailHero{ height: 220px; }

  /* Modales: acciones en columna para que no se "aplasten" */
  .modalActions{ flex-direction: column; align-items: stretch; }
  .modalActions .btn{ width: 100%; }
}

@media (max-width: 360px){
  /* En pantallas MUY chicas: achicar aún más para que no se rompa */
  .brandMark{ width: 48px; height: 48px; }
  #publishBtn.btn{ padding: 0 8px; }
  #publishBtn.btn{ font-size: 12px; }
  .searchSelect{ max-width: 120px; }
}

/* Viewer imagen grande */
.imgViewerBackdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.62);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.imgViewer{
  width: min(980px, 100%);
  max-height: 92vh;
  position: relative;
}

.imgViewer img{
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 18px;
  background: #111;
  display: block;
}

.imgViewerClose{
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(0,0,0,.18);
  color: var(--text) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  font-size: 20px;
  font-weight: 1100;
}

/* Autocomplete */
.suggestBox{
  position: fixed;
  background: #fff;
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(0,0,0,.16);
  overflow: hidden;
  z-index: 9999;
}

.suggestItem{
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
}

.suggestItem:hover{
  background: rgba(123,30,59,.06);
}

.suggestMain{
  font-weight: 1000;
  color: var(--text);
}

.suggestMeta{
  font-weight: 950;
  color: var(--muted);
  font-size: 12px;
}

.detailBody{
  padding: 16px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detailTop{
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.detailCategory{
  background: rgba(123,30,59,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.14);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 12px;
  max-width: 100%;
  white-space: normal;
}

.detailTime{
  color: var(--muted);
  font-weight: 900;
  font-size: 12px;
}

.detailTitle{
  margin: 0;
  font-weight: 1000;
  font-size: 22px;
  line-height: 1.15;
}

.detailPrice{
  font-weight: 1100;
  color: var(--ok);
}

.detailDesc{
  background: #FBF7F5;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  font-weight: 850;
  line-height: 1.45;
}

.detailActions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.detailActions .btnGhost{
  background: #FBF7F5;
  border: 1px solid var(--line);
  color: var(--text);
}

.detailOwnerTools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding-top: 10px;
  margin-top: 2px;
  border-top: 1px solid var(--line);
}
.detailOwnerTools .btnGhost{
  background: #FBF7F5;
  border: 1px solid var(--line);
  color: var(--text);
}



/* === Estados + ubicación (publicaciones) === */
.badgeStatus{
  position:absolute;
  right: 10px;
  bottom: 10px;
  top: auto;
  left: auto;
  /* Mantener ubicación, mejorar estética (mismo look que las pills del sitio) */
  background: rgba(255,255,255,.92);
  color: var(--text);
  border: 1px solid rgba(0,0,0,.08);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1000;
  font-size: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,.12), 0 3px 10px rgba(0,0,0,.08);
  backdrop-filter: blur(6px);
  max-width: calc(100% - 120px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}
.badgeStatus--reserved{
  background: rgba(255, 242, 224, .92);
  border-color: rgba(245, 158, 11, .30);
  color: #9A4E00;
}
.badgeStatus--sold{
  background: rgba(255, 232, 238, .92);
  border-color: rgba(176, 0, 32, .22);
  color: #B00020;
}
.badgeStatus--paused{
  background: rgba(246, 241, 240, .92);
  border-color: rgba(0,0,0,.10);
  color: var(--muted);
}

.detailMetaRow{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
}
.detailStatusPill{
  background: rgba(0,0,0,.06);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1100;
}
.detailStatusPill.reserved{ background: rgba(255,153,0,.18); border-color: rgba(255,153,0,.35); }
.detailStatusPill.sold{ background: rgba(176,0,32,.10); border-color: rgba(176,0,32,.25); color:#B00020; }
.detailStatusPill.paused{ background: rgba(0,0,0,.06); }

.detailLoc{
  color: var(--muted);
  font-weight: 1000;
}

.cardActions{
  gap: 8px;
  flex-wrap: wrap;
}
.miniBtn{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
  color: var(--text);
  border-radius: 12px;
  padding: 6px 10px;
  cursor:pointer;
  font-weight: 1000;
}
.miniBtn.primary{
  border-color: rgba(123,30,59,.22);
  background: rgba(123,30,59,.08);
  color: var(--brand);
}


/* === Detalle: vendedor + reportes (estética consistente) === */
.detailSellerCard{
  margin-top: 10px;
  background: #FBF7F5;
  border: 1px solid var(--line);
  padding: 12px 12px;
  border-radius: 18px;
  display:flex;
  flex-direction: column;
  gap: 6px;
}
.detailSellerTop{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.detailSellerName{
  font-weight: 1000;
  color: var(--text);
}
.detailSellerMeta{
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}
.detailSellerHours{
  background: rgba(0,0,0,.06);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
}

.detailReportWrap{
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.detailReportBox{
  margin-top: 10px;
  background: #FBF7F5;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 18px;
}
.detailReportBox .modalActions{
  margin-top: 8px;
}



/* ===== Empty states (lindos) ===== */
.emptyState{
  text-align: center;
  padding: 18px 14px;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.6);
  backdrop-filter: blur(6px);
}
.emptyTitle{
  font-weight: 700;
  margin-bottom: 6px;
}
.emptyActions{
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Loader / Skeleton ===== */
@keyframes skeletonShimmer{
  0%{ background-position: 200% 0; }
  100%{ background-position: -200% 0; }
}
.sk{
  background: linear-gradient(90deg, rgba(0,0,0,.06) 25%, rgba(0,0,0,.10) 37%, rgba(0,0,0,.06) 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.2s ease-in-out infinite;
  border-radius: 12px;
}
.card--skeleton{
  pointer-events: none;
}
.card--skeleton .cardMedia{
  height: 170px;
}
.card--skeleton .skLine{
  height: 12px;
  margin-top: 10px;
  border-radius: 999px;
}
.card--skeleton .skLine.small{ height: 10px; opacity: .9; }
.card--skeleton .skLine.w60{ width: 60%; }
.card--skeleton .skLine.w40{ width: 40%; }
.card--skeleton .skLine.w80{ width: 80%; }

/* Detail loading overlay */
.detailModal{
  position: fixed;
}
.detailModal.isLoading .detailBody,
.detailModal.isLoading .detailHero,
.detailModal.isLoading .detailThumbs{
  opacity: 0;
  pointer-events: none;
}
.detailSkeleton{
  position: absolute;
  z-index: 1;
  pointer-events: none;
  inset: 0;
  padding: 18px;
  display: grid;
  gap: 12px;
}
.detailSkeleton .skHero{
  height: 210px;
  border-radius: 16px;
}
.detailSkeleton .skRow{
  display: flex;
  gap: 10px;
}
.detailSkeleton .skPill{
  height: 26px;
  width: 96px;
  border-radius: 999px;
}
.detailSkeleton .skTitle{
  height: 18px;
  border-radius: 999px;
}
.detailSkeleton .skTitle.w90{ width: 90%; }
.detailSkeleton .skTitle.w70{ width: 70%; }
.detailSkeleton .skBlock{
  height: 92px;
  border-radius: 14px;
}
.detailSkeleton .skBtns{
  display: flex;
  gap: 10px;
}
.detailSkeleton .skBtn{
  height: 42px;
  width: 150px;
  border-radius: 12px;
}

/* Footer improvements */
.footerLinks a{
  white-space: nowrap;
}


/* === Login real (Firebase Auth) === */
.authBox{
  margin-top: 10px;
  background: #FBF7F5;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
}
.authRow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.authTitle{
  font-weight: 1100;
}
.authBtns{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* === Mi cuenta: accesos rápidos === */
.accountQuickGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}
.accountQuick{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-decoration:none;
  box-shadow: 0 10px 30px rgba(0,0,0,.04);
}
.accountQuick:hover{
  transform: translateY(-1px);
}
.accountCount{
  font-weight: 1100;
  color: var(--brand);
}


/* === Mi cuenta: avatar + historial === */
.accountAvatarRow{
  display:flex;
  align-items:center;
  gap: 12px;
  margin: 10px 0 6px;
}
.avatarWrap{
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}
.avatar{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}
.avatarFallback{
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,.04);
  font-size: 22px;
}
.historyList{
  display:flex;
  flex-direction:column;
  gap: 10px;
  margin-top: 10px;
}
.histItem{
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,.03);
}
.histTitle{
  display:block;
  font-weight: 1100;
  color: var(--text);
  text-decoration:none;
}
.histTitle:hover{ text-decoration: underline; }
.histMeta{ margin-top: 4px; }


/* === Moderación (pendiente/publicada) === */
.badgeMod{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 1100;
  font-size: 12px;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.92);
  color: var(--text);
}
.badgeMod--pending{
  background: rgba(255, 242, 224, .92);
  border-color: rgba(245, 158, 11, .30);
  color: #9A4E00;
}
.detailModPill{
  background: rgba(255, 242, 224, .35);
  border-color: rgba(245, 158, 11, .28);
  color: #9A4E00;
}


/* Upload previews */
.thumbRow{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}
.thumbRow img{width:72px;height:72px;object-fit:cover;border-radius:14px;border:1px solid rgba(0,0,0,.10);box-shadow:0 6px 18px rgba(15, 23, 42, .08)}

/* === Home: infinite scroll + volver arriba === */
.homeMoreWrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 10px;
  padding: 14px 0 6px;
}
.homeSentinel{ width: 100%; height: 1px; }

.backToTop{
  position: fixed;
  right: 14px;
  bottom: 14px;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 30px rgba(15,23,42,.18);
  color: var(--text);
  z-index: 99;
  transition: transform .15s ease, box-shadow .15s ease;
}
.backToTop:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15,23,42,.22);
}
.backToTop .icon{ width: 20px; height: 20px; }

@media (max-width: 520px){
  .backToTop{ right: 10px; bottom: 10px; }
}


/* Admin panel */
.adminTabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.adminTabBtn.active{background:var(--brand);color:#fff;border-color:transparent}
.adminList{display:flex;flex-direction:column;gap:10px}
.adminReport{border:1px solid rgba(0,0,0,.10);border-radius:14px;padding:12px;background:#fff}
.adminReportTop{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.adminReportTitle{font-weight:900}
.adminReportMeta{display:flex;flex-wrap:wrap;gap:8px;color:var(--muted);font-size:13px;margin-top:6px}
.adminReportActions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.badgeTiny{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;border:1px solid rgba(0,0,0,.10);background:rgba(0,0,0,.03)}
.badgeTiny--pending{background:rgba(245,158,11,.12);border-color:rgba(245,158,11,.25)}
.badgeTiny--published{background:rgba(16,185,129,.12);border-color:rgba(16,185,129,.25)}
.badgeTiny--paused{background:rgba(59,130,246,.12);border-color:rgba(59,130,246,.25)}
.badgeTiny--sold{background:rgba(239,68,68,.10);border-color:rgba(239,68,68,.20)}


/* ==========================================================
   Mobile perfection pass (solo CSS)
   Objetivo: que en celular no haya cortes, choques ni zoom raro.
   ========================================================== */

@media (max-width: 520px){
  /* iOS: evitar el zoom automático en inputs/selects chicos */
  .searchInput,
  .searchSelect,
  .field input,
  .field select,
  .field textarea{
    font-size: 16px;
  }

  /* Search: layout firme (sin aplastar botones) */
  .searchForm{
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .searchField{
    grid-column: 1 / -1;
    min-width: 0;
  }
  .searchForm .btn{ width: 100%; }

  /* Un toque más compacto */
  .searchField{ padding: 0 10px; gap: 8px; }
  .searchSelect{ max-width: 140px; }

  /* Evitar choques en títulos/acciones */
  .sectionHead,
  .viewHead{ flex-wrap: wrap; row-gap: 6px; }
  .sectionRight{ flex-wrap: wrap; justify-content: flex-end; }
  .cardMeta{ flex-wrap: wrap; gap: 6px 10px; }

  /* Botones en detalle: que se acomoden sin overflow */
  .detailActions .btn,
  .detailOwnerTools .btn{ flex: 1 1 140px; }

  /* Modales: nunca más cortados en pantallas chicas */
  .modal{ max-height: calc(100vh - 24px); overflow: auto; }
  .detailModal{ max-height: calc(100vh - 24px); }

  /* Skeleton (cargando): evitar overflow horizontal */
  .detailSkeleton .skBtns{ flex-wrap: wrap; }
  .detailSkeleton .skBtn{ width: 100%; }

  /* iPhone / safe-area: que el botón flotante no quede pegado */
  .backToTop{ bottom: calc(10px + env(safe-area-inset-bottom)); right: calc(10px + env(safe-area-inset-right)); }
  .sheet{ padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 420px){
  /* Aún más compacto en pantallas muy chicas */
  .searchSelect{ max-width: 120px; }
  .detailTitle{ font-size: 20px; }
}

@media (max-width: 360px){
  .searchSelect{ max-width: 108px; }
}


/* PWA install button inside menu sheet */
.sheetNav button.sheetItem{width:100%;text-align:left;cursor:pointer;appearance:none;-webkit-appearance:none;font:inherit;}
.sheetItemBtn{background: #FBF7F5;}
