.carousel-container {
  position: relative;
  margin: 10px -20px 8px;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 20px;
  gap: 12px;
}

.carousel-track::-webkit-scrollbar {
  display: none;
}

.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(8, 20, 47, 0.06);
}

.carousel-slide img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 21 / 9;
}

.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}

.carousel-indicators span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-line);
  transition: all 0.3s ease;
}

.carousel-indicators span.is-active {
  width: 20px;
  border-radius: 999px;
  background: var(--color-mint);
}

.home-banner {
  aspect-ratio: 1774 / 887;
}

.explore-banner {
  aspect-ratio: 1774 / 887;
  margin: 4px 0 16px;
  border-radius: 20px;
}

.dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(0, 135, 81, 0.24);
}

.dots span:first-child {
  width: 16px;
  border-radius: 999px;
  background: #009b61;
}

.category-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 10px;
  margin: 0 -20px;
}

.category-row::-webkit-scrollbar {
  display: none;
}

.category-card {
  flex: 0 0 auto;
  width: 64px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.category-card span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(8, 20, 47, 0.05);
}

.category-card svg {
  width: 26px;
  height: 26px;
  color: var(--color-ink);
}

.category-card small {
  color: var(--color-ink);
  font-size: 11px;
}

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

.instant-delivery-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 10px;
  margin: 0 -20px;
}

.instant-delivery-row::-webkit-scrollbar {
  display: none;
}

.instant-delivery-card {
  flex: 0 0 auto;
  width: 140px;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 999px;
  background: #f3f5f7;
  color: var(--color-muted);
}

.search-box input,
.form-stack input,
.form-stack select,
.form-stack textarea {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--color-ink);
}

.pill-row {
  display: flex;
  gap: 9px;
  overflow: auto;
  margin: 18px 0 4px;
  scrollbar-width: none;
}

.pill {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 17px;
  border-radius: 999px;
  background: #f4f6f8;
  font-size: 12px;
  font-weight: 700;
}

.pill.is-active {
  background: var(--color-navy);
  color: #fff;
}

.horizontal-products {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 10px;
  margin: 0 -20px;
}

.horizontal-products::-webkit-scrollbar {
  display: none;
}

.horizontal-products .product-card {
  flex: 0 0 160px;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.compact-row {
  display: grid;
  grid-template-columns: 58px 1fr 34px;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  padding: 10px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
}

.mini-art {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  overflow: hidden;
  background: #f4f6f8;
}

.mini-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sell-banner {
  aspect-ratio: 1731 / 909;
  margin-bottom: 18px;
  border-radius: 20px;
}

.stepper {
  display: grid;
  grid-template-columns: 32px 1fr 32px 1fr 32px;
  align-items: center;
  margin: 20px 22px 8px;
}

.stepper span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0f3f6;
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 800;
}

.stepper span.is-active {
  background: var(--color-navy);
  color: #fff;
}

.stepper i {
  height: 2px;
  background: #dce2e8;
}

.step-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  color: var(--color-muted);
  font-size: 11px;
  text-align: center;
}

.form-stack {
  display: grid;
  gap: 14px;
}

.form-stack label {
  display: grid;
  gap: 8px;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 800;
}

.form-stack input,
.form-stack select,
.form-stack textarea {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--color-line);
  border-radius: 12px;
  background: #fff;
  color: var(--color-muted);
  font-weight: 500;
}

.form-stack textarea {
  min-height: 82px;
  padding-top: 13px;
  resize: none;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #cbd4de;
  border-radius: 14px;
  color: var(--color-muted);
  font-weight: 600;
  text-align: center;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 4px 0 16px;
  padding: 5px;
  border-radius: 999px;
  background: #f1f3f6;
}

.segmented button {
  min-height: 38px;
  border-radius: 999px;
  font-weight: 700;
}

.segmented .is-active {
  background: var(--color-navy);
  color: #fff;
}

.order-card {
  position: relative;
  display: grid;
  grid-template-columns: 70px 1fr 36px;
  gap: 12px;
  align-items: center;
  min-height: 112px;
  padding: 22px 12px 12px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 8px 20px rgba(8, 20, 47, 0.05);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;

  font-size: 11px;
  font-weight: 800;
}

.status.green { background: #e6f8ef; color: #09834c; }
.status.yellow { background: #fff4d8; color: #a66a00; }
.status.red { background: #ffe8e8; color: #d62a2a; }

.order-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--color-line);
  border-radius: 50%;
  color: var(--color-muted);
}

.profile-dark-header {
  background: var(--color-navy);
  margin: -20px -20px 0;
  /* Top padding is now handled dynamically in profileScreen.js for safe areas */
  padding: 0 20px 40px;
  color: #fff;
}

.profile-top-info {
  display: flex;
  gap: 20px;
  align-items: center;
}

.avatar-container {
  position: relative;
}

.avatar.large-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  padding: 0;
}

.edit-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2cb774;
  border: 2px solid var(--color-navy);
  color: #fff;
}

.edit-badge svg {
  width: 14px;
  height: 14px;
}

.user-info h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
}

.user-info p {
  margin: 0 0 10px;
  color: #8fa0b5;
  font-size: 14px;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  border: 1px solid #1a2a46;
  background: transparent;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.verified-badge svg {
  color: #2cb774;
  width: 16px;
  height: 16px;
}

.profile-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  text-align: center;
  padding: 0 10px;
}

.profile-stats span {
  display: grid;
  gap: 4px;
}

.profile-stats strong {
  font-size: 20px;
  color: #fff;
}

.profile-stats small {
  color: #8fa0b5;
  font-size: 11px;
}

.profile-content-card {
  background: #fbfcfe;
  margin: 0 -20px;
  margin-top: -24px;
  padding: 0 20px 40px;
  border-radius: 24px 24px 0 0;
  min-height: 400px;
  position: relative;
}

.mini-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mini-products article {
  display: grid;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: #fff;
}

.mini-products .mini-art {
  width: 100%;
  height: 82px;
  border-radius: 0;
}

.mini-products strong,
.mini-products small {
  padding: 0 9px;
}

.mini-products small {
  padding-bottom: 10px;
  color: var(--color-muted);
  font-size: 11px;
}

.logout {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 54px;
  margin-top: 14px;
  border: 1px solid var(--color-line);
  border-radius: 14px;
  background: #fff;
  color: #f02f3c;
  font-weight: 800;
}

.settings-wrap {
  display: grid;
  gap: 20px;
}

.settings-wrap h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.edit-profile {
  position: relative;
  display: grid;
  justify-content: center;
  margin: 12px 0 22px;
}

.camera-dot {
  position: absolute;
  right: calc(50% - 48px);
  bottom: 0;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--color-mint);
  color: #fff;
}

.camera-dot svg {
  width: 15px;
  height: 15px;
}

.settings-section {
  margin-bottom: 22px;
}

.settings-section h2 {
  margin-bottom: 12px;
}

.toggle {
  position: relative;
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #d2d6dd;
  transition: background-color 0.3s ease;
  cursor: pointer;
  flex-shrink: 0;
  margin-left: auto;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(8, 20, 47, 0.15);
  content: "";
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.toggle.is-on {
  background: var(--color-mint);
}

.toggle.is-on::after {
  transform: translateX(20px);
}

/* "Entrega inmediata" toggle's own campus/horario fields — sellScreen.js
   and productDetailScreen.js's edit sheet both used a hard display:none
   -> flex swap here before, which snapped open/shut with no animation at
   all (the toggle switch itself already animates fine via .toggle above;
   this is what actually looked broken). max-height instead of height
   because the content's real height isn't known ahead of time. */
.instant-fields-reveal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.25s ease, margin-top 0.35s ease;
}
.instant-fields-reveal.is-open {
  max-height: 420px;
  opacity: 1;
  margin-top: 12px;
}

.legal-list button {
  min-height: 76px;
}

.school-current,
.notice {
  padding: 16px;
  border: 1px solid rgba(67, 199, 129, 0.18);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #f2fbf6, #e2f6eb);
}

.school-banner {
  aspect-ratio: 1774 / 887;
  margin: 16px 0 20px;
  border-radius: 18px;
}

.school-current small {
  color: var(--color-muted);
  font-weight: 700;
}

.school-current div {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr 30px;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.school-current div > span,
.school-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #fff;
  font-size: 24px;
}

.school-current p {
  grid-column: 2;
  margin: -18px 0 0;
  color: var(--color-muted);
  font-size: 12px;
}

.school-current i {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-mint);
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.radio {
  width: 22px;
  height: 22px;
  border: 2px solid #aeb7c3;
  border-radius: 50%;
}

.notice {
  margin: 18px 0 0;
  color: #315067;
  font-size: 13px;
  line-height: 1.4;
}

.pin-distance {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  color: var(--color-muted);
  font-size: 11px;
}

.pin-distance svg {
  width: 14px;
  height: 14px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 30px;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  background: var(--color-line);
  z-index: 0;
}

.timeline-step {
  display: grid;
  justify-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.timeline-step span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--color-line);
  color: var(--color-muted);
}

.timeline-step span svg {
  width: 14px;
  height: 14px;
}

.timeline-step small {
  font-size: 10px;
  color: var(--color-muted);
  font-weight: 700;
}

.timeline-step.is-active span {
  border-color: #f7a834;
  color: #f7a834;
}

.timeline-step.is-active ~ .timeline-step span {
  border-color: var(--color-line);
  color: #d1d6dc;
}

.timeline-step.is-completed span {
  background: #09834c;
  border-color: #09834c;
  color: #fff;
}

.buyer-card {
  display: grid;
  grid-template-columns: 50px 1fr 44px;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: #fdfdfd;
}

.buyer-card .avatar {
  width: 50px;
  height: 50px;
}

.buyer-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.buyer-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 12px;
}

.buyer-card .verified {
  padding: 3px 6px;
  background: #e6f8ef;
  border-radius: 4px;
  font-size: 10px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-line);
  font-size: 13px;
}

.detail-row span {
  color: var(--color-muted);
}

.detail-row strong {
  font-weight: 600;
}

.detail-row:last-child {
  border-bottom: none;
}

/* School Dropdown */
.school-dropdown-overlay {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  width: calc(100vw - 32px);
  max-width: 400px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.15);
  z-index: 100;
  padding: 20px 20px 12px;
  border: 1px solid var(--color-line);
}

.school-dropdown-overlay::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 32px;
  width: 16px;
  height: 16px;
  background: #fff;
  transform: rotate(45deg);
  border-left: 1px solid var(--color-line);
  border-top: 1px solid var(--color-line);
  border-radius: 3px 0 0 0;
}

.school-dropdown-overlay.is-open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0) scale(1);
}

.school-dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.school-dropdown-current {
  margin-bottom: 16px;
}

.school-dropdown-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: #f5f7fa;
  color: var(--color-ink);
}

.school-dropdown-icon.is-active {
  background: #eaf8f1;
  color: var(--color-mint);
}

.school-dropdown-divider {
  height: 1px;
  background: #f0f3f7;
  margin: 0 -20px 16px;
}

.school-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-muted);
  margin-bottom: 16px;
}

.school-dropdown-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.school-dropdown-text small {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.school-dropdown-text strong {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: var(--color-ink);
}

.school-dropdown-item .school-dropdown-text small {
  font-size: 13px;
  font-weight: 500;
}

.school-dropdown-btn {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0 0 12px;
  color: var(--color-mint);
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  cursor: pointer;
}

/* Animated Splash Background */
.splash-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  overflow: hidden;
  z-index: 0;
  background: #fff;
}

.splash-bubble {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: floatBubble 15s infinite alternate ease-in-out;
}

.splash-bubble.b1 {
  width: 300px; height: 300px;
  background: rgba(22, 163, 74, 0.4);
  top: -100px; left: -100px;
  animation-delay: 0s;
  animation-duration: 12s;
}

.splash-bubble.b2 {
  width: 250px; height: 250px;
  background: rgba(30, 58, 138, 0.3); /* Navy blue from logo */
  bottom: -50px; right: -50px;
  animation-delay: -3s;
  animation-duration: 15s;
}

.splash-bubble.b3 {
  width: 200px; height: 200px;
  background: rgba(22, 163, 74, 0.3);
  bottom: 30%; left: -50px;
  animation-delay: -7s;
  animation-duration: 18s;
}

@keyframes floatBubble {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(80px, -50px) scale(1.1); }
  66% { transform: translate(-40px, 80px) scale(0.9); }
  100% { transform: translate(60px, 60px) scale(1.2); }
}

/* No animation at all — every earlier attempt at a push/pop effect
   (fade+scale, then a subtler version, then slide-only) kept reading as
   "there's still something happening" on every single tap. Navigation is
   now an instant, flat swap, same as a plain website. */
.page-transition,
.page-transition-back,
.page-transition-exit-forward,
.page-transition-exit-back {
  animation: none;
}
@keyframes stepPop { 0% { transform: scale(0.8); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
.step-active { animation: stepPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
