/* Card shell */
.service-card {
  background: #fff;
  padding: 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid #eee;
  text-align: left;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Media */
.service-logo {
  object-fit: contain;
  height: 120px;
  border-radius: 0;
}

/* Title + category row */
.header-row {
  gap: 8px;
}
.header-row .card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-row .badge-soft-warning {
  max-width: 50%;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* 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;
}

/* 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;
}

/* 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;
}

/* 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;
  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-specific improvements */
@media (max-width: 576px) {
  /* 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;
  }

  /* Prevent the category badge from overflowing */
  .header-row .badge-soft-warning {
    max-width: 60%;
  }
}

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

/* 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;
}

/* Cards grid: 1 col by default; 2/3/4 on larger screens */
.cards-grid {
  display: grid;
  gap: 16px;
  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;
}
.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;
}

/* 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;
}


.service-logo-container {
  width: 60%;
  aspect-ratio: 1; /* Esto hace que sea cuadrado automáticamente */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
   margin: 1rem auto;
   box-shadow: -8px -8px 0.4px #000, 8px 8px 0.4px #FF2A42;
}

.service-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Mantiene la proporción */
}

/* 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 */
    }
}