:root {
  --ink: #17231f;
  --muted: #65736c;
  --green: #075e4d;
  --green2: #e6f3ed;
  --line: #e5ebe7;
  --bg: #fbfcfa;
  --card: #fff;
  --shadow: 0 8px 28px rgba(24, 50, 36, 0.07);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #b3e5cc;
  outline-offset: 2px;
}
a {
  color: inherit;
  text-decoration: none;
}
.container {
  max-width: 1190px;
  margin: auto;
  padding: 0 24px;
}
.top {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.nav {
  height: 75px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -1px;
}
.mark {
  height: 37px;
  width: 37px;
  background: var(--green);
  color: white;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
}
.navlinks {
  display: flex;
  gap: 25px;
  margin-left: auto;
}
.navlink {
  border: 0;
  background: none;
  color: #596760;
  padding: 8px 0;
  font-weight: 600;
}
.navlink.active {
  color: var(--green);
}
.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  color: var(--ink);
}
.btn.primary {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.btn:hover {
  filter: brightness(0.97);
}
.nav-cta {
  display: flex;
  gap: 8px;
}
.hero {
  background: linear-gradient(115deg, #e6f4ed 0%, #f4f9f4 70%, #edf6f1 100%);
  border-radius: 27px;
  margin: 28px auto 28px;
  min-height: 305px;
  padding: 44px 48px;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  overflow: hidden;
  align-items: center;
  gap: 24px;
}
.eyebrow {
  font-weight: 700;
  letter-spacing: 0.07em;
  color: var(--green);
  font-size: 12px;
  text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(34px, 4.6vw, 53px);
  letter-spacing: -2px;
  line-height: 1.08;
  margin: 14px 0 18px;
  max-width: 620px;
}
.hero p {
  font-size: 16px;
  color: #4a6156;
  line-height: 1.65;
  max-width: 500px;
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 23px;
}
.hero-art {
  position: relative;
  height: 235px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.circle {
  height: 225px;
  width: 225px;
  border-radius: 50%;
  background: #d0e9da;
  position: absolute;
}
.float {
  position: absolute;
  background: #fff;
  border: 1px solid #e5eee7;
  border-radius: 18px;
  box-shadow: 0 15px 35px #24564119;
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 17px;
  font-weight: 700;
  font-size: 13px;
}
.float .emoji {
  font-size: 36px;
}
.f1 {
  top: 18px;
  left: 0;
  transform: rotate(-8deg);
}
.f2 {
  right: 0;
  top: 85px;
  transform: rotate(7deg);
}
.f3 {
  bottom: 1px;
  left: 16%;
  transform: rotate(-3deg);
}
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin: 29px 0 16px;
}
.section-header h2 {
  font-size: 26px;
  letter-spacing: -0.8px;
  margin: 0 0 7px;
}
.section-header p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.searchbar {
  display: flex;
  gap: 10px;
  background: white;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.searchbar input {
  border: 0;
  outline: none;
  flex: 1;
  padding: 10px;
  min-width: 0;
}
.searchbar select {
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 14px;
  color: #455a4f;
  background: white;
  max-width: 210px;
}
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}
.chip {
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: #536158;
  font-weight: 650;
}
.chip.active {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 17px;
}
.product {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
  overflow: hidden;
  box-shadow: 0 5px 16px #244c3210;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
  cursor: pointer;
}
.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.prod-img {
  height: 175px;
  background: var(--tone, #edf2ea);
  display: grid;
  place-items: center;
  position: relative;
  font-size: 76px;
}
.prod-img span {
  filter: drop-shadow(0 8px 5px #0001);
}
.pill {
  background: white;
  padding: 6px 10px;
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  font-size: 11px;
  color: #486356;
  font-weight: 700;
}
.prod-body {
  padding: 16px;
}
.prod-body h3 {
  margin: 0 0 9px;
  font-size: 15px;
  line-height: 1.35;
}
.price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.7px;
  margin: 0 0 8px;
}
.meta {
  color: var(--muted);
  font-size: 12px;
}
.banner {
  margin: 38px 0;
  background: #153c31;
  color: white;
  border-radius: 22px;
  padding: 30px 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.banner h2 {
  margin: 0 0 7px;
  font-size: 25px;
  letter-spacing: -0.8px;
}
.banner p {
  margin: 0;
  color: #d6e9df;
  font-size: 14px;
}
.banner .btn {
  white-space: nowrap;
}
.freight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.freight {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 21px;
  background: white;
}
.freight-top {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-bottom: 15px;
}
.avatar {
  height: 50px;
  width: 50px;
  display: grid;
  place-items: center;
  background: #eaf4ee;
  border-radius: 14px;
  font-size: 28px;
}
.freight h3 {
  margin: 0;
  font-size: 16px;
}
.freight p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.small {
  font-size: 12px;
  color: var(--muted);
}
.freight .btn {
  width: 100%;
  margin-top: 12px;
}
.footer {
  border-top: 1px solid var(--line);
  margin-top: 55px;
  padding: 29px 0;
  color: var(--muted);
  font-size: 12px;
}
.footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hidden {
  display: none !important;
}
.modal-wrap {
  position: fixed;
  inset: 0;
  background: #13231b99;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
.modal {
  background: white;
  border-radius: 22px;
  padding: 28px;
  width: min(100%, 530px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 90px #0003;
  position: relative;
}
.modal h2 {
  margin: 0 0 8px;
  font-size: 25px;
  letter-spacing: -0.6px;
}
.close {
  position: absolute;
  right: 18px;
  top: 16px;
  background: #f1f4f1;
  border: 0;
  border-radius: 50%;
  height: 34px;
  width: 34px;
  font-size: 21px;
}
.field {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}
.field label {
  font-size: 13px;
  font-weight: 700;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #dce5df;
  border-radius: 11px;
  padding: 12px;
  background: white;
  color: #19291f;
}
.field textarea {
  min-height: 85px;
  resize: vertical;
}
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.notice {
  background: #f0f7f2;
  padding: 13px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.5;
  color: #4d6255;
  margin: 18px 0;
}
.empty {
  padding: 42px;
  text-align: center;
  color: var(--muted);
  background: white;
  border-radius: 18px;
  border: 1px dashed #d5e2d8;
}
.detail-emoji {
  font-size: 75px;
  background: #eff5ef;
  text-align: center;
  padding: 25px;
  border-radius: 16px;
  margin-bottom: 16px;
}
.flash {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #183e30;
  color: white;
  border-radius: 12px;
  padding: 13px 20px;
  z-index: 50;
  box-shadow: var(--shadow);
  font-size: 14px;
}
.badge-demo {
  font-size: 11px;
  font-weight: 700;
  background: #fef4df;
  color: #886011;
  border-radius: 999px;
  padding: 5px 10px;
}
.section {
  scroll-margin-top: 100px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-art {
    display: none;
  }
  .freight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 650px) {
  .container {
    padding: 0 15px;
  }
  .nav {
    height: 66px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 20px;
  }
  .navlinks {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 25px;
    display: none;
  }
  .nav-cta {
    margin-left: auto;
  }
  .nav-cta .btn:first-child {
    display: none;
  }
  .nav-cta .btn {
    padding: 9px 11px;
    font-size: 12px;
  }
  .hero {
    padding: 28px 24px;
    min-height: 0;
    border-radius: 20px;
    margin: 17px auto 25px;
  }
  .hero h1 {
    font-size: 34px;
    letter-spacing: -1.3px;
  }
  .hero p {
    font-size: 14px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .prod-img {
    height: 137px;
    font-size: 61px;
  }
  .prod-body {
    padding: 12px;
  }
  .price {
    font-size: 19px;
  }
  .prod-body h3 {
    font-size: 14px;
  }
  .section-header h2 {
    font-size: 23px;
  }
  .searchbar {
    flex-wrap: wrap;
  }
  .searchbar select {
    max-width: none;
    width: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 12px 6px;
  }
  .banner {
    padding: 23px;
    flex-direction: column;
    align-items: start;
  }
  .freight-grid {
    grid-template-columns: 1fr;
  }
  .field-row {
    grid-template-columns: 1fr;
  }
  .modal {
    padding: 22px;
  }
}

/* CampusLoop v0.3 - Modo Mudanza */

.moving-section {
  padding: 75px 20px;
}

.moving-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 35px;
}

.moving-label {
  color: #08745e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
}

.moving-heading h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin: 15px 0;
}

.moving-heading p {
  color: #65736c;
  line-height: 1.7;
}

.moving-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.moving-card {
  padding: 36px;
  background: #f1f7f3;
  border: 1px solid #e5ebe7;
  border-radius: 22px;
  transition: transform 0.2s ease;
}

.moving-card:hover {
  transform: translateY(-4px);
}

.moving-icon {
  font-size: 36px;
  margin-bottom: 20px;
}

.moving-card h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.moving-card p {
  color: #65736c;
  line-height: 1.6;
  margin-bottom: 24px;
}

.moving-button {
  display: inline-block;
  padding: 12px 20px;
  background: #08745e;
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.moving-button:hover {
  background: #075e4d;
}

@media (max-width: 700px) {
  .moving-grid {
    grid-template-columns: 1fr;
  }

  .moving-card {
    padding: 25px;
  }
}

/* CampusLoop v0.4 — Paquetes de mudanza */
.moving-heading > .btn { margin-top: 16px; }
.moving-button { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.bundle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.bundle-card { border: 1px solid var(--line); border-radius: 20px; background: white; padding: 22px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bundle-card h3 { margin: 0; font-size: 19px; line-height: 1.3; }
.bundle-card p { margin: 0; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.bundle-card .bundle-emoji { font-size: 36px; background: #f1f7f3; border-radius: 14px; padding: 16px; }
.bundle-details { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.bundle-details span { background: #f4f7f5; padding: 5px 8px; border-radius: 8px; }
.bundle-price { font-size: 23px; font-weight: 750; color: var(--ink); }
.bundle-card .btn { margin-top: auto; width: 100%; }
.bundle-items { display: grid; gap: 9px; margin: 14px 0; }
.bundle-item { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.bundle-item input { min-width: 0; }
.bundle-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; margin: 8px 0; align-items: start; }
.bundle-item-row input { width: 100%; }
.bundle-helper { color: var(--muted); font-size: 12px; }
.bundle-add { margin: 7px 0 16px; }
.bundle-summary { background: #f1f7f3; border-radius: 12px; padding: 12px; line-height: 1.6; margin-bottom: 16px; }
@media (max-width: 900px) { .bundle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .bundle-grid { grid-template-columns: 1fr; }
  .bundle-item-row { grid-template-columns: minmax(0, 1fr) 90px auto; }
  .bundle-card { padding: 18px; }
}


/* CampusLoop v0.5 — Fotos de artículos y galería */
.prod-img .product-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-img .pill { z-index: 1; }
.photo-counter {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  background: #17231fdd;
  color: white;
  font-size: 11px;
  font-weight: 700;
}
.photo-preview-grid, .gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.photo-preview { position: relative; aspect-ratio: 1; }
.photo-preview img, .gallery-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px;
}
.photo-preview > button {
  position: absolute; top: 5px; right: 5px;
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: #182821ed; color: white; font-size: 20px; cursor: pointer;
}
.main-photo-tag {
  position: absolute; bottom: 6px; left: 6px;
  padding: 4px 6px; border-radius: 6px; background: #fff;
  color: #173629; font-size: 10px; font-weight: 700;
}
.gallery-main { height: min(45vh, 350px); background: #f2f5f2; border-radius: 15px; overflow: hidden; margin-bottom: 10px; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb { border: 2px solid transparent; border-radius: 12px; padding: 2px; aspect-ratio: 1; background: #f3f5f3; cursor: pointer; }
.gallery-thumb.selected { border-color: var(--green); }
#itemPhotos { padding: 10px; }

/* CampusLoop v0.6: acceso y sesión */
.auth-tabs { display: flex; gap: 10px; margin: 20px 0; }
.auth-tabs .btn { flex: 1; }
.auth-error { border: 1px solid #f4b4b4; background: #fff3f2; color: #8a1e1e; }


/* CampusLoop - Espaciado del formulario de autenticación */

#authSubmit {
  margin-top: 20px;
}

/* CampusLoop - Confirmar contraseña */

#confirmPasswordGroup {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  margin-bottom: 16px;
}

#confirmPasswordGroup[hidden] {
  display: none;
}

#confirmPasswordGroup label {
  display: block;
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
}

#authConfirmPassword {
  display: block;
  width: 100%;
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  box-sizing: border-box;
}
#authConfirmPassword:focus {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

/* Ocultar confirmar contraseña al iniciar sesión */
#confirmPasswordGroup[hidden] {
  display: none !important;
}

/* CampusLoop v0.7 */
#remoteStatus { margin: 0 0 12px; }
.owner-actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.owner-actions .btn { flex: 1; min-width: 150px; }


/* CampusLoop - Botón actualizar anuncios */

.catalog-actions {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0 20px;
}

.catalog-actions .btn {
  cursor: pointer;
}

/* CampusLoop v0.9: panel de usuario */
.my-listings { display: grid; gap: 12px; margin: 16px 0; }
.my-listing { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px solid #dce7e0; border-radius: 14px; }
.my-listing-cover { width: 84px; height: 84px; flex: none; display: grid; place-items: center; background: #edf3ef; border-radius: 10px; overflow: hidden; font-size: 32px; }
.my-listing-cover img { width: 100%; height: 100%; object-fit: cover; }
.my-listing-info { flex: 1; min-width: 0; display: grid; gap: 6px; }
.my-listing-info strong { overflow-wrap: anywhere; }
.my-listing-info > span { font-size: 13px; color: #536c61; }
.my-listing-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.my-listing-actions .btn { padding: 8px 12px; }
.photo-preview .make-cover { top: auto; right: 5px; bottom: 5px; border-radius: 7px; font-size: 15px; background: #fff; color: #135c46; }
@media(max-width: 480px) { .my-listing-cover { width: 64px; height: 64px; } .my-listing { align-items: flex-start; } }

/* CampusLoop v0.10: acción destructiva separada de los cambios de estado. */
.my-listing-actions .delete-listing-btn { color: #9a2525; border-color: #e8b5b5; }
.my-listing-actions .delete-listing-btn:hover { background: #fff0f0; }

/* CampusLoop v0.12 - perfiles */
.profile-heading { display:flex; align-items:center; gap:16px; margin:18px 0; }
.profile-heading h3 { margin:0 0 5px; }
.profile-avatar { flex: none; width:68px; height:68px; border-radius:50%; background:#dbeee3; color:#165943; display:grid; place-items:center; font-size:30px; font-weight:800; }
.profile-bio { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; }
.profile-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:16px; }
.profile-listings { display:grid; gap:10px; margin:16px 0; }
.profile-listing { font:inherit; text-align:left; cursor:pointer; width:100%; background:#f7faf8; border:1px solid #dce7e0; border-radius:12px; padding:12px; display:grid; gap:5px; color:inherit; }
.profile-listing:hover, .profile-listing:focus-visible { border-color:#147853; }
.profile-listing span { color:#536c61; font-size:13px; }
.seller-profile-link { margin: 12px 0; }

/* CampusLoop v0.13: fotos de perfil */
.profile-avatar-photo { display:block; object-fit:cover; border:2px solid #dbeee3; }
.profile-avatar-editor { display:flex; align-items:center; gap:18px; margin:18px 0; flex-wrap:wrap; }
.profile-avatar-editor .profile-avatar { width:96px; height:96px; font-size:38px; }
.profile-avatar-controls { flex:1; min-width:200px; }
.profile-avatar-controls label { display:block; font-weight:600; margin-bottom:8px; }
.profile-avatar-controls input[type=file] { max-width:100%; font-size:14px; }
.profile-avatar-controls .small { margin:8px 0; }

/* CampusLoop v0.13.3: foto ampliada a la derecha de Mi cuenta */
.nav-cta { align-items: center; }
.nav-user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid #dbeee3;
  color: #165943;
  background: #dbeee3;
  font-size: 21px;
  font-weight: 800;
}
.nav-user-avatar[hidden] { display: none; }
.nav-user-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 650px) {
  .nav-cta { gap: 6px; }
  .nav-user-avatar { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
}
