/* ==========================================================================
   Partner cards
   Tokens come from geist-4geeks.css. Fallbacks keep the listing usable when
   the stylesheet is loaded on its own.
   ========================================================================== */
.service-card {
  --card-border: var(--border, #eaeaea);
  --card-border-hover: var(--border-hover, #111111);
  --card-accent: var(--accent, #ff2a42);
  --card-accent-soft: var(--accent-soft, rgba(255, 42, 66, 0.08));
  --card-text: var(--text, #111111);
  --card-muted: var(--subtext, #666666);
  --card-radius: 12px;

  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0;
  overflow: hidden;
  color: var(--card-text);
  text-align: left;
  text-decoration: none;
  background: var(--canvas, #ffffff);
  border: 1px solid var(--card-border);
  border-radius: var(--card-radius);
  box-shadow: none;
  transition: transform 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.service-card:hover,
.service-card:focus {
  color: var(--card-text);
  text-decoration: none;
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--card-border-hover);
  box-shadow: var(--shadow-pop, 0 1px 2px rgba(0, 0, 0, 0.04),
      0 4px 12px rgba(0, 0, 0, 0.05));
}

.service-card:focus-visible {
  outline: 2px solid var(--card-accent);
  outline-offset: 3px;
}

/* Offer variant: thin accent rail across the top edge */
.service-card--offer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 2;
  height: 3px;
  background: var(--card-accent);
  pointer-events: none;
}

/* Media panel ------------------------------------------------------------- */
.service-card__media {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 168px;
  padding: 1.5rem;
  overflow: hidden;
  background-color: #f7f7f7;
  background-image: radial-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 14px 14px;
  border-bottom: 1px solid var(--card-border);
}

.service-card__logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 90%;
  max-height: 85%;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  filter: none;
}

.service-card__monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  color: var(--card-accent);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  background: var(--canvas, #ffffff);
  border: 1px solid var(--card-border);
  border-radius: 50%;
}

.service-card__monogram[hidden] {
  display: none;
}

.service-card--no-logo .service-card__media {
  background-image: none;
  background-color: #fafafa;
}

/* Body -------------------------------------------------------------------- */
.service-card__body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 1.25rem 1.25rem 1.5rem;
}

.service-card__eyebrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.service-card__category {
  overflow: hidden;
  color: var(--card-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.service-card__title {
  display: -webkit-box;
  margin: 0 0 0.5rem;
  overflow: hidden;
  color: var(--card-text);
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.service-card__description {
  display: -webkit-box;
  margin: 0 0 1rem;
  overflow: hidden;
  color: var(--card-muted);
  font-size: 0.875rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.service-card__offer {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.5rem 0.65rem;
  color: #555555;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  background: #f6f6f6;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.service-card__offer i {
  flex: 0 0 auto;
  color: #9aa0a6;
  font-size: 0.8rem;
  line-height: 1.4;
}

.service-card__offer span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.service-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.9rem;
  margin-bottom: 1.25rem;
  color: var(--card-muted);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.service-card__meta-item {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 0.3rem;
}

.service-card__meta-item i {
  flex: 0 0 auto;
  color: #9aa0a6;
  font-size: 0.8rem;
}

.service-card__meta-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-card__footer {
  padding-top: 1rem;
  margin-top: auto;
  border-top: 1px solid var(--card-border);
}

.service-card__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 1rem;
  color: var(--card-text);
  font-size: 0.875rem;
  font-weight: 600;
  background: transparent;
  border: 1px solid var(--card-text);
  border-radius: 8px;
  transition: color 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease;
}

.service-card__cta i {
  margin-left: 0.5rem;
  font-size: 0.9rem;
  transition: transform 0.2s ease;
}

.service-card:hover .service-card__cta,
.service-card:focus-visible .service-card__cta {
  color: #ffffff;
  background: var(--card-text);
  border-color: var(--card-text);
}

.service-card:hover .service-card__cta i,
.service-card:focus-visible .service-card__cta i {
  transform: translateX(3px);
}

@media (max-width: 767px) {
  .service-card__media {
    height: 140px;
    padding: 1.25rem;
  }

  .service-card__description {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }

  .service-card__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-card,
  .service-card__cta,
  .service-card__cta i {
    transition: none;
  }

  .service-card:hover {
    transform: none;
  }

  .service-card:hover .service-card__cta i,
  .service-card:focus-visible .service-card__cta i {
    transform: none;
  }
}

/* Body text */
.body-sm {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #6c757d;
}

/* Category badge (amber) */
.badge-soft-warning {
  background-color: #fff7e6;
  color: #ff9f43;
  padding: 0.3em 0.55em;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
}
@media (max-width: 767px) {
  .badge-soft-warning {
    white-space: normal;
  }
}

/* Price first */
.badge-price {
  background: #f8f9fa;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 0.3em 0.55em;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

/* Offer (GREEN) */
.badge-soft-success {
  background-color: #eafaf1;
  color: #198754;
  padding: 0.3em 0.55em;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .badge-soft-success {
    white-space: normal;
  }
}

/* Offer (RED) */
.badge-soft-danger {
  background-color: #fdecec;
  color: #dc3545;
  padding: 0.3em 0.55em;
  border-radius: 0.375rem;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .badge-soft-danger {
    white-space: normal;
  }
}

/* Location + delivery */
.meta-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dot-sep::before {
  content: '•';
  margin: 0 6px 0 2px;
  color: #9aa0a6;
}

/* CTA */
.btn-4g-primary {
  background-color: #dc3545;
  color: #fff;
  border: none;
  padding: 8px 0.75rem;
  min-height: 44px;
  border-radius: 0.375rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  text-align: center;
}
.btn-4g-primary:hover {
  background-color: #c82333;
  box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* Meta row */
.meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

/* Clamp description */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Mobile + tablet portrait improvements */
@media (max-width: 767px) {
  /* Location/delivery stacked and left aligned */
  .meta-inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  /* Let users read a bit more in small screens */
  .line-clamp-3 {
    -webkit-line-clamp: 5;
    line-clamp: 5;
  }
}

/************------------------------------------------*/

/* Page header */
.marketplace-page .page-header-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

/* Muted text size aligned with app */
.marketplace-page .text-muted {
  font-size: 0.875rem;
}

/* Category badge (used inside cards too for consistency) */
.marketplace-page .badge-soft-warning {
  background-color: #fff7e6;
  color: #ff9f43;
  padding: 0.35em 0.65em;
  font-size: 0.75rem;
  border-radius: 0.25rem;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 767px) {
  .marketplace-page .badge-soft-warning {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
}

/* Cards grid: 1 col by default; 2/3/4 on larger screens */
.cards-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

/* ≥768px: 2 columns */
@media (min-width: 768px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ≥1200px: 3 columns */
@media (min-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ≥1400px: 4 columns (same as Add-on Services) */
@media (min-width: 1400px) {
  .cards-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- Modal (confirmation) ---------- */

.custom-modal {
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
}

/* Normalize modal typography to a single base size */
.custom-modal,
.custom-modal .modal-body,
.custom-modal .modal-footer,
.custom-modal .modal-header {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #212529;
}

/* Keep title bold without increasing size */
.custom-modal .modal-title {
  font-weight: 600;
  font-size: 0.875rem;
  margin: 0;
}

/* Divider */
.custom-separator {
  margin: 0.5rem 0 1rem;
  border-top: 1px solid #e5e7eb;
}

/* Service name + description inside modal */
.custom-modal h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
}
.custom-modal p {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

/* Key facts layout */
.facts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px 16px;
  margin-bottom: 4px;
}
.fact {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 8px;
}
@media (max-width: 576px) {
  .fact {
    grid-template-columns: 1fr;
  }
  .fact-label {
    margin-bottom: 2px;
  }
}
.fact-label,
.fact-value {
  font-size: 0.875rem;
}
.fact-label {
  color: #6c757d;
  font-weight: 600;
}
.fact-value {
  color: #212529;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Two columns for facts on wider modals */
@media (min-width: 576px) {
  .facts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Modal badges (inherit base sizing) */
.badge-price {
  background: #f8f9fa;
  color: #111827;
  border: 1px solid #e5e7eb;
  padding: 0.3em 0.55em;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.badge-soft-success {
  background-color: #eafaf1;
  color: #198754;
  padding: 0.3em 0.55em;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 767px) {
  .badge-soft-success {
    white-space: normal;
  }
}

/* Modal buttons */
.custom-cancel-btn {
  color: #212529;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
}
.custom-cancel-btn:hover {
  background-color: #e9ecef;
}
.custom-confirm-btn {
  background-color: #dc3545;
  color: #fff;
  border: none;
}
.custom-confirm-btn:hover {
  background-color: #c82333;
}

/* Validation */
.is-invalid {
  border-color: #dc3545;
}
.invalid-feedback {
  color: #dc3545;
  font-size: 0.75rem;
}

/* Input + label inside modal */
.modal-body .form-label {
  font-weight: 500;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  margin-left: 0.25rem;
}
.modal-body .form-control {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #ced4da;
  width: 100%;
  box-sizing: border-box;
}

/* Footer layout utilities for even button spacing */
.d-flex {
  display: flex;
}
.gap-2 {
  gap: 0.5rem;
}
.flex-fill {
  flex: 1 1 auto;
}

.market-container, .market-container-sm, .market-container-md, .market-container-lg, .market-container-xl {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}


/* Breakpoints */
@media (min-width: 576px) {
    .market-container, .market-container-sm {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .market-container, .market-container-sm, .market-container-md {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .market-container, .market-container-sm, .market-container-md, .market-container-lg {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .market-container, .market-container-sm, .market-container-md, .market-container-lg, .market-container-xl {
        max-width: 1300px; /* aquí puedes cambiar el ancho que quieras */
    }
}

/* ---------- Marketplace Filter Bar ---------- */

.marketplace-filter {
  background: #fff;
  border: 1px solid var(--border, #eaeaea);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow-pop, 0 1px 2px rgba(0, 0, 0, 0.04),
      0 4px 12px rgba(0, 0, 0, 0.05));
}

.filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .filter-row {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .filter-search {
    flex: 1 1 100%;
  }

  .filter-category,
  .filter-location {
    flex: 1 1 calc(50% - 0.375rem);
  }
}

@media (min-width: 992px) {
  .filter-row {
    flex-wrap: nowrap;
  }

  .filter-search {
    flex: 2 1 0;
  }

  .filter-category,
  .filter-location {
    flex: 1 1 0;
  }
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6c757d;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.filter-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.filter-icon {
  position: absolute;
  left: 0.75rem;
  color: #adb5bd;
  font-size: 0.875rem;
  pointer-events: none;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  min-height: 44px;
  font-size: 0.875rem;
  border: 1px solid #ced4da;
  border-radius: 8px;
  background-color: #fff;
  color: #212529;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--accent, #ff2a42);
  box-shadow: 0 0 0 0.2rem rgba(255, 42, 66, 0.15);
}

.filter-input::placeholder {
  color: #adb5bd;
}

.filter-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px 12px;
  padding-right: 2rem;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
}

.btn-clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  white-space: nowrap;
}

.btn-clear-filters:hover {
  background-color: #e9ecef;
  color: #212529;
}

.filter-results-info {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
}

#results-count {
  font-size: 0.8125rem;
  color: #6c757d;
  font-weight: 500;
}

/* ---------- No Results State ---------- */

.no-results-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.no-results-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 50%;
  color: #adb5bd;
  font-size: 1.75rem;
}

.no-results-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #212529;
  margin: 0 0 0.5rem;
}

.no-results-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin: 0 0 1.25rem;
}

.no-results-state .btn-secondary {
  display: inline-block;
}

/* ---------- Service Card Wrapper (for filtering) ---------- */

.service-card-wrapper {
  height: 100%;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.service-card-wrapper.is-hidden {
  display: none;
}