* {
  box-sizing: border-box;
}

/* ============= LAYOUT GENERAL ============= */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #eef1f5 0%, #d9dde5 100%) !important;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrapper {
  background: transparent !important;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 0;
}
.navbar-logo-img {
  height: 40px;
  max-width: 100%;
}

/* ============= GRID GENERAL 2x2 ============= */
/* "main   right"
   "bottom right" */

.wrapper.negocio-layout {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 10px 12px;
}

.negocio-page-layout {
  display: grid;
  grid-template-areas:
    "main   right"
    "bottom right";
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
  grid-template-rows: minmax(0, 0.62fr) minmax(0, 0.38fr);
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  gap: 18px;
}

/* Ajuste para anchos intermedios (laptops/tablets apaisadas) */
@media (max-width: 1280px) and (min-width: 1024px) {
  .negocio-page-layout {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 14px;
  }
}

/* ============= CARD PRINCIPAL ============= */

.negocio-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
}

.negocio-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 24px 14px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.negocio-card h1 {
  font-size: 26px;
  font-weight: 700;
  color: #2a0aa0;
  margin: 0 0 2px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;   
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-word;      
}

.negocio-card p {
  margin: 3px 0;
  font-size: 14px;
  line-height: 1.4;
}

/* datos + descripción lado a lado */

.negocio-card .card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.negocio-info-layout {
  display: flex;
  flex-direction: column;
  gap: 4px !important;
}

/* desktop: dos columnas */
@media (min-width: 1024px) {
  .negocio-info-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }

  .negocio-info-block,
  .negocio-description-block {
    flex: 1;
  }

  .negocio-card h1 {
    text-align: center;
  }

  .negocio-info-block p,
  .negocio-description-block p {
    text-align: left;
  }
}

.negocio-description {
  margin-top: 2px;
}

/* fila: botones izq + discover der */

.negocio-actions-row {
  margin-top: 0  !important;
  padding-top: 4px;
}

/* desktop: convertimos en grid 1fr / 1fr para alinear con la descripción */
@media (min-width: 1024px) {
  .negocio-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr;  /* izquierda = botones, derecha = discover */
    align-items: flex-start;
    column-gap: 24px;
  }
}

/* botones principal */

.card-buttons {
  margin-top: 0 !important;
  gap: 4px !important;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start; /* un poco a la izquierda */
  text-align: left;
}

.card-buttons .whatsapp-button,
.card-buttons .details-button {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 230px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
}

.card-buttons .whatsapp-button {
  background: #22c55e;
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(16,185,129,0.4);
}

.card-buttons .details-button {
  background: #0f172a;
  color: #e5e7eb;
  box-shadow: 0 10px 26px rgba(15,23,42,0.55);
}

/* Discover a la derecha de los botones */

.negocio-internal-links {
  text-align: left;
  margin-top: 10px;
}

.negocio-internal-links h2 {
  font-size: 15px;
  margin: 0 0 4px;
  color: #111827;
}

.negocio-internal-links ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.negocio-internal-links li {
  margin-bottom: 2px;
}
.negocio-internal-links a {
  color: #2563eb;
  text-decoration: none;
  font-size: 13px;
}
.negocio-internal-links a:hover {
  text-decoration: underline;
}

/* ============= IZQ ABAJO: 2 CARDS IGUALES A LA DERECHA ============= */

.extra-related {
  grid-area: bottom;
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(15,23,42,0.08);
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
}

.extra-related.hidden {
  display: none;
}

.extra-related-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
}

.extra-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  flex: 1;
}

/* ============= CARD BASE (DERECHA Y ABAJO) ============= */

.related-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 9px 10px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.related-card-content h3 {
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 700;
  color: #2a0aa0;
}

.related-card-content h3 a {
  text-decoration: none;
  color: inherit;
}

.related-card-content p {
  margin: 2px 0;
  font-size: 13px;
  line-height: 1.35;
}

.related-card-buttons {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-card-buttons .whatsapp-button,
.related-card-buttons .details-button {
  display: block;
  width: 100%;
  padding: 6px 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.related-card-buttons .whatsapp-button {
  background: #22c55e;
  color: #ffffff;
}

.related-card-buttons .details-button {
  background: #0f172a;
  color: #e5e7eb;
}

/* derecha: columna con 3 cards */

.negocio-related {
  grid-area: right;
  background: rgba(255,255,255,0.96);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  padding: 12px 14px 12px;
  display: flex;
  flex-direction: column;
}

.negocio-related.hidden {
  display: none;
}

.related-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  text-align: center;
}

.negocio-related .cards-grid {
  display: flex !important;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
}

/* ============= FOOTER ============= */

footer {
  text-align: center;
  padding: 4px 0 6px;
  font-size: 11px;
  color: #777;
}

/* ============= DESKTOP SIN SCROLL (pero ajustable por altura) ============= */

@media (min-width: 1024px) {
  html, body {
    overflow: hidden; /* sin scroll en desktop alto */
  }

  .wrapper.negocio-layout {
    height: calc(100vh - 70px); /* navbar + footer aprox */
  }

  .negocio-page-layout {
    height: 100%;
  }
}

/* Si la pantalla es baja, permitimos scroll para que no se corte nada */
@media (min-width: 1024px) and (max-height: 750px) {
  html, body {
    overflow-y: auto;
  }
  .wrapper.negocio-layout {
    height: auto;
  }
  .negocio-page-layout {
    height: auto;
  }
}

/* ============= MOBILE / TABLET ============= */

@media (max-width: 1023px) {
  html, body {
    overflow-y: auto;
  }

  .wrapper.negocio-layout {
    padding: 60px 12px 24px;
  }

  .negocio-page-layout {
    grid-template-areas:
      "main"
      "right"
      "bottom";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    max-width: 620px;
  }

  .negocio-actions-row {
    flex-direction: column;
  }

  .extra-cards-grid {
    grid-template-columns: 1fr;
  }

  .negocio-related .cards-grid {
    flex-direction: column;
  }
}

/* ============= MOBILE CHICO ============= */

@media (max-width: 768px) {
  .negocio-card {
    padding: 14px 14px 12px;
  }

  .negocio-card h1 {
    font-size: 22px;
  }

  .negocio-card p {
    font-size: 13px;
  }

  .card-buttons {
    align-items: stretch;
  }

  .card-buttons .whatsapp-button,
  .card-buttons .details-button {
    width: 100%;        /* botones full width en mobile */
    min-width: 0;
  }

  .negocio-internal-links h2 {
    font-size: 14px;
  }

  .negocio-internal-links a {
    font-size: 12px;
  }

  .extra-related-title,
  .related-title {
    font-size: 14px;
  }

  .related-card-content h3 {
    font-size: 13px;
  }

  .related-card-content p {
    font-size: 12px;
  }
}

/* ============= MOBILE MUY CHICO (≤ 360px) ============= */

@media (max-width: 360px) {
  .wrapper.negocio-layout {
    padding: 52px 8px 20px;
  }

  .negocio-card h1 {
    font-size: 20px;
  }

  .negocio-card p {
    font-size: 12px;
  }
}

/* Estilos para el bloque de requerimientos de Cesar */
.extra-links-block {
    margin-top: 10px;
    text-align: left;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 10px;
}

.copy-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    width: 100%;
    overflow: hidden;
}

.copy-link-container p {
    font-size: 13px !important;
    margin: 0 !important;
    color: #4b5563;
    white-space: nowrap; 
}

.copy-link-container a {
    color: #2563eb;
    text-decoration: underline;
    word-break: break-all;
}

.copy-btn-action {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    padding: 3px 0;
    width: 70px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    flex-shrink: 0;
}

.tochat-upsell-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tochat-upsell-links li {
    margin-bottom: 6px;
}

.tochat-upsell-links a {
    font-size: 13px;
    color: #2563eb;
    font-weight: 500;
    text-decoration: none;
}

.tochat-upsell-links a:hover {
    text-decoration: underline;
}

.copy-icon-svg {
    width: 16px !important;   
    height: 16px !important;
    min-width: 16px;
    color: #4b5563;          
    opacity: 0.6;            
    flex-shrink: 0;           
    margin-right: 8px;
}
