/* ============================================================
   Carloslist — site styles (on top of Bootstrap 5)
   ============================================================ */

:root{
  --paper:#f4f2ed;
  --card:#fbfaf7;
  --ink:#1b1a17;
  --ink-soft:#2f2c25;
  --muted:#5c564a;
  --faint:#8a8375;
  --rule:#d8d3c7;
  --rule-light:#e2ded3;
  --link:#1c4fa1;
  --accent:#a8442a;
}

body{
  background:var(--paper);
  color:var(--ink);
  font-family:"Public Sans",system-ui,-apple-system,"Segoe UI",sans-serif;
  font-size:14px;
}
a{ color:var(--link); text-decoration:none; }
a:hover{ color:var(--accent); text-decoration:underline; }
.serif{ font-family:"Newsreader",Georgia,serif; }

.shell{ max-width:1180px; }

/* --- header --- */
.site-header{ background:var(--card); border-bottom:1px solid var(--rule); }
.brand-word{ font-family:"Newsreader",Georgia,serif; font-size:26px; font-weight:600; letter-spacing:-.02em; color:var(--ink); }
.brand-tag{ font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--faint); }
.city-dot{ width:6px; height:6px; border-radius:50%; background:var(--accent); display:inline-block; }
.btn-ink{ background:var(--ink); color:var(--card); border:1px solid var(--ink); border-radius:2px; font-weight:600; }
.btn-ink:hover{ background:#000; color:#fff; }
.btn-outline-ink{ background:#fff; color:var(--ink); border:1px solid #cdc7b9; border-radius:2px; }

/* --- search bar --- */
.searchbar{ background:var(--card); border-bottom:1px solid var(--rule-light); }
.searchbar .form-control,
.searchbar .form-select{
  border:1px solid #cdc7b9; border-radius:2px; background:#fff;
  font-size:14px; padding:.6rem .75rem;
}
.searchbar .form-control:focus,
.searchbar .form-select:focus{ box-shadow:none; border-color:var(--ink); }

/* live suggestions */
.suggest{
  position:absolute; z-index:1050; left:0; right:0; top:calc(100% + 4px);
  background:#fff; border:1px solid var(--rule); border-radius:2px;
  box-shadow:0 6px 20px rgba(27,26,23,.10); display:none; max-height:340px; overflow:auto;
}
.suggest a{ display:block; padding:9px 12px; border-bottom:1px solid var(--rule-light); color:var(--ink); }
.suggest a:last-child{ border-bottom:0; }
.suggest a:hover{ background:var(--paper); text-decoration:none; }
.suggest .s-title{ color:var(--link); font-size:13.5px; }
.suggest .s-meta{ color:var(--faint); font-size:11.5px; }

/* --- section headings --- */
.rail-title{
  font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint);
  padding-bottom:8px; border-bottom:1px solid var(--rule); margin-bottom:8px;
}
.cat-head{
  display:flex; align-items:baseline; justify-content:space-between;
  padding-bottom:7px; border-bottom:2px solid var(--ink); margin-bottom:9px;
}
.cat-head .name{ font-family:"Newsreader",Georgia,serif; font-size:19px; font-weight:600; }
.cat-head .count{ font-size:11px; color:var(--faint); }
.cat-links{ display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; font-size:13.5px; }

.side-card{ border:1px solid var(--rule); background:var(--card); padding:14px; }

/* --- featured rail --- */
.feat a{ display:block; color:inherit; }
.feat .f-title{ font-size:13.5px; line-height:1.35; color:var(--link); }
.feat .f-meta{ font-size:12px; color:var(--muted); margin-top:2px; }

/* --- listing rows (used here and on results page) --- */
.row-listing{
  display:grid; grid-template-columns:96px 1fr auto; gap:16px;
  padding:13px 8px; border-bottom:1px solid var(--rule-light); color:inherit; align-items:start;
}
.row-listing:hover{ background:var(--card); text-decoration:none; }
.row-listing .r-title{ font-size:15.5px; color:var(--link); font-weight:500; line-height:1.3; }
.row-listing .r-desc{ font-size:13px; color:var(--muted); margin-top:4px; line-height:1.45; }
.row-listing .r-meta{ display:flex; gap:8px; margin-top:7px; font-size:11.5px; color:var(--faint); }
.row-listing .r-price{ font-family:"Newsreader",Georgia,serif; font-size:19px; font-weight:600; text-align:right; }

.thumb{
  height:72px; border:1px solid var(--rule); object-fit:cover; width:100%;
  background:repeating-linear-gradient(135deg,#e8e4d9 0 6px,#ded9cc 6px 12px);
}
.thumb-empty{
  display:flex; align-items:center; justify-content:center;
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:9px; color:var(--faint);
}
.badge-featured{
  font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  background:var(--accent); color:#fff; padding:2px 6px; border-radius:2px; vertical-align:middle;
}

/* --- footer --- */
.site-footer{ background:var(--card); border-top:1px solid var(--rule); font-size:12.5px; color:var(--muted); }
.site-footer strong{ color:var(--ink); }

@media (max-width: 991.98px){
  .cat-links{ grid-template-columns:1fr; }
  .row-listing{ grid-template-columns:76px 1fr; }
  .row-listing .r-price{ text-align:left; grid-column:2; }
}

/* --- results page --- */
.results-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  padding-bottom:8px; border-bottom:2px solid var(--ink); margin-bottom:6px;
}
.filter-check{ display:flex; align-items:center; gap:7px; font-size:13px; color:var(--ink-soft); cursor:pointer; }
.filter-check input{ accent-color:var(--ink); }
.empty-state{ padding:40px 8px; text-align:center; color:var(--muted); font-size:13.5px; }
.pager{ display:flex; flex-wrap:wrap; gap:6px; margin-top:18px; }
.pager button{
  border:1px solid #cdc7b9; background:#fff; color:var(--link);
  border-radius:2px; font-size:12.5px; padding:5px 10px; min-width:34px;
}
.pager button:hover{ background:var(--card); }
.pager button.is-current{ background:var(--ink); border-color:var(--ink); color:#fff; }

/* pager links (server-rendered, index page) */
.pager a, .pager .is-current{
  display:inline-block; border:1px solid #cdc7b9; background:#fff; color:var(--link);
  border-radius:2px; font-size:12.5px; padding:5px 10px; min-width:34px; text-align:center;
}
.pager a:hover{ background:var(--card); text-decoration:none; }
.pager .is-current{ background:var(--ink); border-color:var(--ink); color:#fff; }

/* --- detail page (anuncio.php) --- */
.crumbs{ font-size:12px; color:var(--muted); }
.notice-strip{
  background:#f4e7d9; border:1px solid #d9c3a4; color:#6b4a1e;
  font-size:12.5px; padding:8px 12px; margin-bottom:14px; border-radius:2px;
}
.detail-title{ font-size:29px; font-weight:600; line-height:1.2; margin:10px 0 4px; }
.detail-sub{ font-size:12.5px; color:var(--faint); margin-bottom:18px; }
.detail-body{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); white-space:normal; }

.gallery{ margin:0; }
.gallery > img{
  width:100%; max-height:520px; object-fit:contain; background:#efece3;
  border:1px solid var(--rule); display:block;
}
.gallery-thumbs{ display:grid; grid-template-columns:repeat(auto-fill,minmax(84px,1fr)); gap:8px; margin-top:8px; }
.g-thumb{ padding:0; border:1px solid var(--rule); background:#fff; height:64px; overflow:hidden; border-radius:2px; }
.g-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.g-thumb.is-active{ border-color:var(--ink); box-shadow:0 0 0 1px var(--ink) inset; }
.gallery-empty{
  height:220px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--rule); color:var(--faint); font-size:12.5px;
  background:repeating-linear-gradient(135deg,#e8e4d9 0 8px,#ded9cc 8px 16px);
}

.spec-grid{
  display:grid; grid-template-columns:auto 1fr; gap:6px 18px;
  font-size:13.5px; margin:0;
}
.spec-grid dt{ color:var(--faint); font-weight:400; }
.spec-grid dd{ margin:0; color:var(--ink-soft); }

.price-big{ font-size:34px; font-weight:600; line-height:1; }
.price-note{ font-size:12.5px; color:var(--faint); margin:4px 0 16px; }
.phone-locked{ font-size:12.5px; color:var(--muted); background:var(--paper); border:1px solid var(--rule); padding:8px 10px; }
.avatar-mono{
  width:38px; height:38px; flex:0 0 38px; border:1px solid var(--rule); background:var(--paper);
  display:flex; align-items:center; justify-content:center;
  font-family:"Newsreader",Georgia,serif; font-size:18px; color:var(--ink);
}
.verified-line{ font-size:12px; color:#3d6b3f; margin-bottom:6px; }
.safety{ font-size:12.5px; line-height:1.55; color:var(--muted); }
.safety-title{ font-weight:600; color:var(--accent); margin-bottom:5px; }
.btn-outline-ink.is-on{ border-color:var(--ink); font-weight:600; }

/* --- forms (contact, report, publicar) --- */
.form-field{ border:1px solid #cdc7b9; border-radius:2px; background:#fff; font-size:14px; }
.form-field:focus{ box-shadow:none; border-color:var(--ink); }
.form-feedback{ font-size:12.5px; padding:8px 10px; border-radius:2px; }
.form-feedback.is-ok{ background:#e6efe4; border:1px solid #bcd4b8; color:#2f5b31; }
.form-feedback.is-bad{ background:#f6e3de; border:1px solid #dcb5aa; color:#8a3320; }

.form-block{ border-top:1px solid var(--rule); padding:20px 0 4px; }
.form-block legend{
  font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--faint);
  float:none; width:auto; margin-bottom:14px;
}
.field{ margin-bottom:16px; }
.field-label{ display:block; font-size:12.5px; font-weight:600; color:var(--ink-soft); margin-bottom:5px; }
.field-help{ font-size:12px; color:var(--faint); margin-top:5px; line-height:1.5; }

.dropzone{
  display:flex; flex-direction:column; align-items:center; gap:4px; cursor:pointer;
  border:1px dashed #cdc7b9; background:var(--card); padding:26px; text-align:center;
  font-size:13.5px; color:var(--muted); border-radius:2px;
}
.dropzone:hover{ border-color:var(--ink); }
.dropzone strong{ color:var(--ink); font-size:14px; }
.dropzone span{ font-size:12px; color:var(--faint); }
.photo-preview{ display:grid; grid-template-columns:repeat(auto-fill,minmax(96px,1fr)); gap:8px; margin-top:10px; }
.p-thumb{ position:relative; border:1px solid var(--rule); background:#fff; height:76px; }
.p-thumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.p-del{
  position:absolute; top:2px; right:2px; width:20px; height:20px; line-height:1;
  border:1px solid var(--rule); background:#fff; color:var(--ink); border-radius:2px; font-size:14px;
}
.p-main{
  position:absolute; bottom:0; left:0; right:0; background:rgba(27,26,23,.78); color:#fff;
  font-size:9.5px; letter-spacing:.1em; text-transform:uppercase; text-align:center; padding:2px 0;
}

.steps{ margin:0; padding-left:18px; font-size:13px; color:var(--muted); line-height:1.55; }
.steps li{ margin-bottom:6px; }
.done-box{ border:1px solid var(--rule); background:var(--card); padding:26px; }
.done-box p{ font-size:14.5px; color:var(--muted); line-height:1.6; margin:8px 0 0; }

/* --- account (cuenta.php, entrar.php) --- */
.account-head{
  display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:20px;
  padding-bottom:12px; border-bottom:2px solid var(--ink);
}
.account-stats{ display:flex; gap:28px; }
.account-stats div{ display:flex; flex-direction:column; align-items:flex-end; }
.account-stats strong{ font-family:"Newsreader",Georgia,serif; font-size:24px; font-weight:600; line-height:1; }
.account-stats span{ font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--faint); margin-top:4px; }

.account-tabs{ display:flex; flex-wrap:wrap; gap:2px; border-bottom:1px solid var(--rule); margin-bottom:6px; }
.account-tabs a{
  font-size:13px; color:var(--ink-soft); padding:7px 12px; border:1px solid transparent;
  border-bottom:0; margin-bottom:-1px;
}
.account-tabs a:hover{ background:var(--card); text-decoration:none; }
.account-tabs a.is-current{
  background:var(--card); border-color:var(--rule); color:var(--ink); font-weight:600;
}
.account-tabs a span{ color:var(--faint); font-size:11.5px; }

.my-listing{
  display:grid; grid-template-columns:96px 1fr auto; gap:16px; align-items:start;
  padding:14px 8px; border-bottom:1px solid var(--rule-light);
}
.my-listing .r-title{ font-size:15.5px; color:var(--link); font-weight:500; line-height:1.3; }
.my-listing .r-meta{ display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; font-size:11.5px; color:var(--faint); }
.my-listing .r-price{ font-family:"Newsreader",Georgia,serif; font-size:19px; font-weight:600; text-align:right; }

.pill{
  font-size:10px; letter-spacing:.1em; text-transform:uppercase;
  padding:2px 7px; border-radius:2px; border:1px solid transparent;
}
.pill-live{ background:#e6efe4; border-color:#bcd4b8; color:#2f5b31; }
.pill-wait{ background:#f4e7d9; border-color:#d9c3a4; color:#6b4a1e; }
.pill-off{ background:#ece9e1; border-color:var(--rule); color:var(--faint); }
.pill-warn{ background:#fdf6e6; border-color:#e0cf9b; color:#6b5310; }

.my-actions{ display:flex; flex-wrap:wrap; gap:14px; margin-top:10px; font-size:12.5px; }
.my-actions button{
  border:0; background:none; padding:0; color:var(--link); font-size:12.5px; font-family:inherit;
}
.my-actions button:hover{ color:var(--accent); text-decoration:underline; }
.my-actions button:disabled{ color:var(--faint); text-decoration:none; }
.my-actions button.is-danger{ color:#8a3320; }

.thread-row{
  display:flex; justify-content:space-between; gap:16px; align-items:center;
  padding:11px 8px; border-bottom:1px solid var(--rule-light); color:inherit;
}
.thread-row:hover{ background:var(--card); text-decoration:none; }

.account-flash{
  position:fixed; left:50%; bottom:26px; transform:translate(-50%,14px);
  background:var(--ink); color:var(--card); font-size:13px; padding:10px 18px; border-radius:2px;
  box-shadow:0 8px 24px rgba(27,26,23,.22); opacity:0; pointer-events:none; transition:.18s ease;
  z-index:1080; max-width:min(520px,90vw);
}
.account-flash.is-shown{ opacity:1; transform:translate(-50%,0); }
.account-flash.is-bad{ background:#8a3320; color:#fff; }

/* --- edit page: existing photos --- */
.edit-photos{ display:grid; grid-template-columns:repeat(auto-fill,minmax(132px,1fr)); gap:10px; margin-bottom:6px; }
.edit-photo{ border:1px solid var(--rule); background:#fff; padding:6px; display:flex; flex-direction:column; gap:6px; }
.edit-photo img{ width:100%; height:92px; object-fit:cover; display:block; }
.edit-photo-main,
.edit-photo-del{ display:flex; align-items:center; gap:6px; font-size:11.5px; color:var(--ink-soft); cursor:pointer; }
.edit-photo-del{ color:#8a3320; }
.edit-photo input{ accent-color:var(--ink); }
.edit-photo.is-doomed{ opacity:.45; }
.edit-photo.is-doomed img{ filter:grayscale(1); }

/* --- messages --- */
.msg-layout{ display:grid; grid-template-columns:300px 1fr; gap:20px; align-items:start; }
.msg-list{ border:1px solid var(--rule); background:var(--card); max-height:70vh; overflow:auto; }
.msg-item{
  position:relative; display:block; padding:12px 14px;
  border-bottom:1px solid var(--rule-light); color:inherit; text-decoration:none;
}
.msg-item:hover{ background:#fff; text-decoration:none; }
.msg-item.is-current{ background:#fff; box-shadow:inset 3px 0 0 var(--ink); }
.msg-item-top{ display:flex; justify-content:space-between; gap:10px; align-items:baseline; }
.msg-who{ font-size:13.5px; color:var(--link); font-weight:500; }
.msg-when{ font-size:11px; color:var(--faint); white-space:nowrap; }
.msg-about{ font-size:11.5px; color:var(--faint); margin-top:3px; }
.msg-snippet{ font-size:12.5px; color:var(--muted); margin-top:4px; line-height:1.45; }
.msg-item.is-unread .msg-who,
.msg-item.is-unread .msg-snippet{ color:var(--ink); font-weight:500; }
.msg-dot{
  position:absolute; top:14px; right:8px; width:7px; height:7px; border-radius:50%;
  background:#8a3320;
}
.msg-thread{ border:1px solid var(--rule); background:var(--card); display:flex; flex-direction:column; min-height:420px; }
.msg-thread-head{
  display:grid; grid-template-columns:64px 1fr; gap:12px; align-items:center;
  padding:12px 16px; border-bottom:1px solid var(--rule);
}
.msg-thread-head .thumb{ width:64px; height:48px; object-fit:cover; }
.msg-scroll{ flex:1; overflow:auto; padding:16px; display:flex; flex-direction:column; gap:10px; max-height:52vh; }
.msg-day{
  align-self:center; font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--faint); margin:6px 0;
}
.msg-bubble{
  align-self:flex-start; max-width:min(72%,520px); background:#fff; border:1px solid var(--rule);
  padding:9px 12px; font-size:13.5px; line-height:1.55; color:var(--ink); text-wrap:pretty;
}
.msg-bubble.is-mine{ align-self:flex-end; background:#f1efe7; }
.msg-bubble-who{ font-size:11px; color:var(--faint); margin-bottom:3px; }
.msg-reply{ border-top:1px solid var(--rule); padding:12px 16px; }

/* --- favorites --- */
.fav-row{ align-items:start; }
.fav-row.is-inactive .thumb{ filter:grayscale(1); opacity:.7; }
.fav-row.is-inactive .r-price{ color:var(--faint); text-decoration:line-through; }

@media (max-width: 991.98px){
  .msg-layout{ grid-template-columns:1fr; }
  .msg-list{ max-height:none; }
}

@media (max-width: 575.98px){
  .my-listing{ grid-template-columns:72px 1fr; }
  .my-listing .r-price{ grid-column:2; text-align:left; }
  .account-stats{ gap:18px; }
  .msg-bubble{ max-width:88%; }
}

/* --- text pages (ayuda, terminos, privacidad, cookies, acerca) --- */
.doc-section{ margin-bottom:30px; }
.doc-h2{ font-family:"Newsreader",Georgia,serif; font-size:20px; font-weight:600; color:var(--ink); margin:0 0 10px; }
.doc-p{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); margin:0 0 12px; text-wrap:pretty; max-width:64ch; }
.doc-list{ font-size:14.5px; line-height:1.65; color:var(--ink-soft); padding-left:20px; margin:0 0 12px; max-width:64ch; }
.doc-list li{ margin-bottom:7px; }
.faq-item{ border-top:1px solid var(--rule-light); padding:14px 0; }
.faq-q{ font-size:14.5px; font-weight:600; color:var(--ink); margin-bottom:5px; }
.faq-a{ font-size:14px; line-height:1.6; color:var(--ink-soft); margin:0; max-width:64ch; text-wrap:pretty; }

/* --- paid plans (precios.php, destacar.php) --- */
.plan-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:12px; }
.plan{ position:relative; display:block; margin:0; cursor:pointer; }
.plan.is-static{ cursor:default; }
.plan input{ position:absolute; opacity:0; pointer-events:none; }
.plan-body{
  display:flex; flex-direction:column; gap:3px; height:100%;
  border:1px solid var(--rule); background:var(--card); padding:14px 15px;
}
.plan:hover .plan-body{ border-color:#b3ac9c; }
.plan input:checked + .plan-body{ border-color:var(--ink); box-shadow:inset 0 0 0 1px var(--ink); background:#fff; }
.plan input:focus-visible + .plan-body{ outline:2px solid var(--accent); outline-offset:2px; }
.plan-name{ font-size:13px; font-weight:600; color:var(--ink); }
.plan-price{ font-family:"Newsreader",Georgia,serif; font-size:27px; font-weight:600; line-height:1.15; }
.plan-rate{ font-size:11px; letter-spacing:.06em; text-transform:uppercase; color:var(--faint); }
.plan-desc{ font-size:12.5px; color:var(--muted); line-height:1.5; margin-top:5px; }
.plan.is-off{ cursor:not-allowed; }
.plan.is-off .plan-body{ opacity:.5; }

/* --- orders in cuenta.php --- */
.order-row{
  display:flex; flex-wrap:wrap; align-items:baseline; gap:10px;
  padding:10px 2px; border-bottom:1px solid var(--rule-light); font-size:13px;
}
.order-row .ref{ font-variant-numeric:tabular-nums; color:var(--faint); font-size:11.5px; }
.order-row .amount{ margin-left:auto; font-variant-numeric:tabular-nums; font-weight:600; }
