.lgc-app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Columna coche */
.lgc-app-main {
  position: sticky;
  top: 0;
  align-self: start; /* 👈 asegura que se pegue arriba */
  height: auto; /* deja que la altura se ajuste */
}

.lgc-layers-container {
  position: relative;
  width: 100%;
  padding-top: 75%; /* relación de aspecto (16:9). Ajusta según tu base */
  background: #fafafa;
  border-radius: 16px;
  overflow: hidden;
}

.lgc-base-image,
.lgc-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* 👈 ya no auto, ahora todas mismas dimensiones */
  object-fit: contain;
}

.lgc-layer {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.lgc-main-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr; /* izquierda imagen - derecha opciones */
  gap: 2rem;
  align-items: flex-start;
}

.lgc-app-main {
  position: sticky;
  top: 80px; /* debajo del topbar */
  align-self: start;
}

/* Resumen ocupa todo el ancho */
.lgc-summary-bottom {
  margin-top: 3rem;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  grid-column: 1 / -1; /* 👉 ocupa todo el ancho */
}

/* Botón de expandir estilo Porsche */
.lgc-expand-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 5;
}
.lgc-expand-btn:hover {
  background: #fff;
  transform: scale(1.1);
}

/* Columna opciones (sidebar) */
.lgc-app-sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Título */
.lgc-model-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* Precio */
.lgc-price {
  font-size: 26px;
  font-weight: 700;
  color: #c4a239;
  margin-bottom: 25px;
  text-align: center;
  transition: all 0.3s ease;
}

/* === OPCIONES === */
.lgc-group {
  margin-bottom: 1rem;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fafafa;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.lgc-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lgc-group-header:hover {
  background: #f8f8f8;
}
.lgc-group-header .count {
  font-size: 0.8rem;
  color: #666;
  background: #eee;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 1rem;
}
.lgc-group-header .toggle-icon {
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.3s;
}
.lgc-group.open .toggle-icon {
  transform: rotate(45deg); /* + → x */
}
.lgc-group-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1rem;
}
.lgc-group.open .lgc-group-content {
  max-height: 500px;
  padding: 1rem;
}

.lgc-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid #eee;
  font-size: 15px;
  cursor: pointer;
}
.lgc-option input[type="radio"],
.lgc-option input[type="checkbox"] {
  accent-color: #c4a239;
  transform: scale(1.2);
  cursor: pointer;
}

/* Thumbnails */
.lgc-thumb {
  width: 45px;
  height: 45px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}
.lgc-thumb:hover {
  transform: scale(1.05);
  border-color: #c4a239;
}

/* === BOTÓN === */
.lgc-btn-save {
  background: #c4a239;
  color: #fff;
  border: none;
  width: 100%;
  padding: 16px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}
.lgc-btn-save:hover {
  background: #111;
  color: #fff;
}

/* ===== TOPBAR estilo Porsche ===== */
.lgc-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid #eee;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.lgc-topbar-left,
.lgc-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.lgc-topbar-center {
  text-align: center;
  flex: 1;
}

.lgc-topbar-logo {
  max-height: 50px; /* controla la altura */
  max-width: 120px; /* controla el ancho */
  height: auto;
  width: auto;
  object-fit: contain;
}

.lgc-topbar-link {
  font-size: 14px;
  color: #333;
  text-decoration: none;
  transition: color 0.2s ease;
}
.lgc-topbar-link:hover {
  color: #c4a239;
}

.lgc-topbar-price {
  font-weight: 700;
  font-size: 16px;
  margin-right: 12px;
  color: #111;
}

.lgc-btn-outline {
  background: transparent;
  color: #000; /* negro por defecto */
  border: 2px solid #000;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
}

/* Hover */
.lgc-btn-outline:hover {
  background: #000; /* negro sólido */
  color: #fff;
}

.lgc-btn-outline:focus {
  outline: none;
  box-shadow: none;
  background: transparent; /* se mantiene igual que normal */
  color: #000;
  border: 2px solid #000;
}

/* Active (cuando lo presionas) */
.lgc-btn-outline:active {
  background: #b4975a; /* dorado opcional al presionar */
  color: #fff;
  border-color: #b4975a;
}

.lgc-btn-solid {
  background: #111;
  color: #fff;
  border: none;
  padding: 6px 18px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.lgc-btn-solid:hover {
  background: #c4a239;
}

/* === SLIDER DE MODELOS === */
.lgc-slider-nav {
  position: relative;
  padding: 2rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.lgc-models-list {
  display: flex;
  gap: 2rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
}
.lgc-models-list::-webkit-scrollbar {
  display: none; /* Chrome */
}

.lgc-model-card {
  flex: 0 0 300px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  padding: 1rem;
}
.lgc-model-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.lgc-model-card img {
  width: 100%;
  height: auto; /* 👈 deja que fluya según proporción */
  max-height: 220px; /* 👈 límite para que no crezca infinito */
  object-fit: contain;
  margin-bottom: 1rem;
}

.lgc-model-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  text-transform: uppercase;
  color: #111;
}

/* Botón de configurar */
.lgc-btn,
.lgc-save-btn,
.lgc-app-sidebar button,
#lgc-summary-bottom button {
  background-color: #000; /* Negro base */
  color: #fff;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 6px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.lgc-btn:hover,
.lgc-save-btn:hover,
.lgc-app-sidebar button:hover,
#lgc-summary-bottom button:hover {
  background-color: #c8a73e; /* Dorado */
  color: #000;
  border-color: #c8a73e;
}

/* Flechas flotantes */
.lgc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
}
.lgc-arrow:hover {
  background: #c4a239;
  color: #fff;
}

.lgc-arrow-left {
  left: 10px;
}
.lgc-arrow-right {
  right: 10px;
}

.lgc-group-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1rem;
}

.lgc-option-card {
  border: 2px solid #ddd;
  border-radius: 10px;
  padding: 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
}

.lgc-option-card:hover {
  border-color: #c4a239;
  transform: scale(1.05);
}

.lgc-option-card.selected {
  border-color: #c4a239;
  box-shadow: 0 0 8px rgba(196, 162, 57, 0.5);
}

.lgc-option-img {
  width: 100%;
  height: 80px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 6px;
}

.lgc-option-label {
  font-size: 14px;
  font-weight: 500;
}

.lgc-contact-form {
  margin: 30px auto 0; /* centra horizontal */
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 500px; /* controla ancho máximo */
  text-align: center; /* centra textos */
}

.lgc-contact-form input {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 16px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.lgc-contact-form input:focus {
  outline: none;
  border-color: #b22255;
  box-shadow: 0 0 6px rgba(178, 34, 85, 0.4);
}

.lgc-save-btn {
  background: #b22255;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  width: 100%;
}

.lgc-save-btn:hover {
  background: #8e1a44;
}

.lgc-alert {
  margin-top: 15px;
  padding: 12px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.lgc-alert.success {
  background-color: #d1fae5; /* verde suave */
  color: #065f46; /* verde oscuro */
  border: 1px solid #10b981;
}

.lgc-alert.error {
  background-color: #fee2e2; /* rojo suave */
  color: #991b1b; /* rojo oscuro */
  border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .lgc-model-card {
    flex: 0 0 240px;
  }
  .lgc-model-card img {
    height: 160px;
  }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .lgc-app-container {
    display: block;
    padding: 0;
  }
  .lgc-main-wrapper {
    display: block; /* 👈 en móviles, apilar en lugar de grid */
  }

  .lgc-app-main {
    position: relative;
    width: 100%;
    height: auto;
    max-width: 100%;
    margin-bottom: 20px; /* separación con la sidebar */
  }

  .lgc-layers-container {
    height: auto;
  }

  .lgc-app-sidebar {
    margin-top: 0;
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    max-height: none;
  }
}

/* Ajustes móviles */
@media (max-width: 768px) {
  .lgc-topbar {
    display: flex;
    justify-content: space-between; /* 👈 uno a la izq, otro a la der */
    align-items: center;
    flex-wrap: nowrap;
    padding: 10px 16px;
  }

  .lgc-topbar-left,
  .lgc-topbar-right {
    flex: 0 0 auto;
  }

  .lgc-topbar-center {
    display: none;
  }

  .lgc-model-title {
    margin-top: 2rem; /* 👈 espacio extra debajo de la imagen */
    text-align: center; /* opcional para que quede más bonito */
  }

  /*.lgc-topbar-center {*/
  /*  flex: 1 1 100%;*/
  /*  order: -1;*/
  /*  margin-bottom: 6px;*/
  /*}*/

  /* Imagen flotante */
  .lgc-app-main {
    position: sticky;
    top: 60px; /* espacio debajo del topbar */
    z-index: 50;
  }

  .lgc-layers-container {
    max-height: 250px; /* para que no ocupe toda la pantalla */
  }
}
