:root {
  --bg-main: #0f1629;
  --bg-panel: #111c32;
  --bg-panel-alt: #0c1222;
  --bg-canvas: rgba(15, 30, 58, 0.6);
  --bg-highlight: rgba(37, 99, 235, 0.16);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(59, 130, 246, 0.6);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --danger: #f87171;
  --shadow: 0 16px 35px rgba(8, 15, 40, 0.45);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition: 0.2s ease-in-out;
  --sidebar-width: 280px;
}

html,
body {
  height: 100%;
  overflow: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, sans-serif;
  background: radial-gradient(circle at top left, #172042, #080c1b);
  color: var(--text-primary);
  min-height: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  grid-template-rows: 1fr auto; /* 1fr para contenido, auto para AI Dock */
  height: 100vh;
  overflow: hidden;
}

.sidebar {
width: var(--sidebar-width);
  height: 100%;
  background: linear-gradient(180deg, rgba(9, 21, 43, 0.95), rgba(7, 14, 32, 0.98));
  border-right: 1px solid rgba(59, 130, 246, 0.15);
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: transform 0.3s ease-in-out;
  position: relative; 
  z-index: 1;
  grid-row: 1 / span 2; /* Ocupa ambas filas */
  grid-column: 1;
  overflow: hidden;
}

.sidebar-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: #f8fafc;
}

.sidebar-header p {
  margin-top: 6px;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.sidebar-content-wrapper {
  flex-grow: 1; 
  display: flex;
  flex-direction: column;
  min-height: 0; 
}

.component-groups {
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
  flex: 1 1 auto;
  padding-right: 6px;
  scrollbar-color: var(--text-secondary) var(--bg-panel-alt);
  scrollbar-width: thin;
}

.component-group h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(148, 163, 184, 0.75);
}

.component-group button {
  width: 100%;
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: rgba(30, 41, 59, 0.45);
  color: var(--text-primary);
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), background var(--transition);
}

.component-group button:hover,
.component-group button:focus-visible {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(37, 99, 235, 0.5);
  transform: translateX(4px);
  outline: none;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.sidebar-action {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.6);
  background: rgba(14, 165, 233, 0.12);
  color: #e0f2fe;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.sidebar-action.secondary {
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(30, 41, 59, 0.3);
  color: var(--text-secondary);
}

.sidebar-action:hover,
.sidebar-action:focus-visible {
  transform: translateY(-1px);
  outline: none;
  background: rgba(14, 165, 233, 0.22);
}

.sidebar-action.secondary:hover,
.sidebar-action.secondary:focus-visible {
  background: rgba(148, 163, 184, 0.14);
  color: #f1f5f9;
}

.workspace {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.9fr);
  gap: 32px;
  padding: 36px;
  padding-bottom: 36px; /* Corregido de 120px a 36px */
  overflow-y: auto;
}


.canvas-panel,
.code-panel {
  background: rgba(17, 30, 61, 0.72);
  backdrop-filter: blur(26px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow: var(--shadow);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  min-height: 0;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-header h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
  color: #e5edff;
}

.panel-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.canvas {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  border-radius: var(--radius-md);
  border: 2px dashed rgba(148, 163, 184, 0.2);
  padding: 22px 22px 140px;
  background: linear-gradient(145deg, rgba(15, 30, 58, 0.55), rgba(6, 12, 28, 0.44));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
  overflow-y: auto; 
}


.canvas-placeholder {
  margin: auto;
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 360px;
  line-height: 1.6;
}

.layout-block {
  background: rgba(15, 23, 42, 0.78);
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.16);
  overflow: hidden;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  cursor: grab;
  width: 100%;
  flex: 0 0 auto;
}

.layout-block:active {
  cursor: grabbing;
}

.layout-block.is-selected {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.block-toolbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  background: rgba(30, 41, 59, 0.75);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.drag-handle {
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: rgba(148, 163, 184, 0.8);
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: grab;
}

.block-info h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  color: #f8fafc;
}

.block-info p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.75);
}

.block-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

.block-actions button {
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-primary);
  font-size: 0.85rem;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.block-actions button:hover,
.block-actions button:focus-visible {
  border-color: rgba(37, 99, 235, 0.6);
  background: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
  outline: none;
}

.block-actions .danger {
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}

.block-actions .danger:hover,
.block-actions .danger:focus-visible {
  background: rgba(248, 113, 113, 0.16);
}

.block-preview {
  padding: 26px;
  background: rgba(10, 16, 32, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
}

.preview-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #020617;
  box-shadow: 0 22px 45px rgba(8, 15, 30, 0.55);
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.preview-screen {
  position: relative;
  width: 1920px;
  margin: 0 auto;
  transform-origin: top center;
  background: transparent;
  pointer-events: none;
}

.is-dragging {
  opacity: 0.75;
  transform: scale(0.98);
}

.drag-over-top {
  box-shadow: inset 0 3px 0 var(--accent);
}

.drag-over-bottom {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.ai-command {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-radius: var(--radius-md);
  background: rgba(9, 16, 33, 0.92);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 18px 22px;
  backdrop-filter: blur(24px);
  box-shadow: 0 30px 60px rgba(6, 12, 33, 0.55);
}

.ai-command label {
  font-size: 0.95rem;
  color: rgba(148, 163, 184, 0.88);
}

.ai-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.ai-input-wrapper input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(8, 15, 40, 0.9);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.ai-input-wrapper input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.ai-input-wrapper button {
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(14, 116, 233, 0.95));
  color: #f8fafc;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.ai-input-wrapper button:hover,
.ai-input-wrapper button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(14, 165, 233, 0.4);
  outline: none;
}

.ai-feedback {
  margin: 0;
  min-height: 20px;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.75);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ai-feedback.visible {
  opacity: 1;
}

.code-tabs {
  display: inline-flex;
  background: rgba(8, 15, 32, 0.6);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  width: fit-content;
}

.code-tabs button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.code-tabs button.active {
  background: rgba(56, 189, 248, 0.18);
  color: #e2f2ff;
  transform: translateY(-1px);
}

.editor-stack {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  border: 1px solid rgba(148, 163, 184, 0.15);
  background: rgba(10, 16, 30, 0.9);
}

.editor-pane {
  flex: 1 1 auto;
  display: none;
  min-height: 0;
  position: relative;
  height: 100%;
}

.editor-pane.active {
  display: block;
}

.editor-inner {
  display: flex;
  height: 100%;
  flex: 1 1 auto;
  position: relative;
  overflow: hidden;
}

.editor-gutter {
  width: 52px;
  background: #1e1e1e;
  color: rgba(197, 208, 230, 0.55);
  font-family: "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 18px 0;
  text-align: right;
  border-right: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
  line-height: 1.55;
}

.editor-gutter span {
  display: block;
  padding: 0 14px 0 12px;
}

.codigo-editable {
  width: 100%;
  flex: 1 1 auto;
  height: 100%;
  border: none;
  background: #1e1e1e;
  color: #f8fafc;
  font-family: "Fira Code", Menlo, Consolas, monospace;
  font-size: 0.92rem;
  line-height: 1.55;
  padding: 18px 18px 18px 16px;
  resize: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  overflow: auto;
}

.codigo-editable:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.45);
}

.codigo-editable.is-disabled {
  opacity: 0.55;
}

.code-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.code-actions button {
  flex: 1;
  min-width: 140px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
}

.code-actions button:hover,
.code-actions button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(37, 99, 235, 0.22);
  outline: none;
}

.code-actions .secondary {
  background: rgba(148, 163, 184, 0.12);
  color: rgba(226, 232, 240, 0.9);
}

.code-actions .danger {
  border-color: rgba(248, 113, 113, 0.3);
  color: #fecdd3;
}

.code-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  background: rgba(15, 23, 42, 0.45);
  box-shadow: none;
}

.code-panel {
  padding: 0;
  position: relative;
}

.vscode-shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0f1629;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow);
}

.vscode-titlebar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 42px;
  background: linear-gradient(180deg, rgba(19, 25, 46, 0.95), rgba(10, 15, 30, 0.95));
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  position: relative;
}

.traffic-lights {
  position: absolute;
  left: 18px;
  display: flex;
  gap: 8px;
}

.traffic-lights .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.45);
}

.traffic-lights .yellow {
  background: #fbbf24;
}

.traffic-lights .green {
  background: #34d399;
}

.window-title {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(148, 163, 184, 0.75);
}

.vscode-shell .code-tabs {
  margin: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.vscode-shell .panel-header {
  padding: 20px 28px 0;
}

.vscode-shell .code-tabs button {
  border-radius: 6px;
  font-size: 0.88rem;
  padding: 6px 18px;
  color: rgba(148, 163, 184, 0.85);
}

.vscode-shell .code-tabs button.active {
  background: rgba(37, 99, 235, 0.18);
  color: #e2f2ff;
}

.vscode-shell .editor-stack {
  margin: 16px 28px 0;
  flex: 1 1 auto;
}

.vscode-shell .code-actions {
  padding: 20px 28px 28px;
}

.ai-dock {
  position: relative; 
  grid-column: 2;
  grid-row: 2;
  padding: 0 36px 36px 36px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  z-index: 10; 
  background: transparent;
  width: 100%;
}

.ai-dock::before {
  content: "";
  position: absolute;
  inset: -40px 5%;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.25), transparent 65%);
  filter: blur(46px);
  z-index: -1;
}

.ai-command {
    width: 100%;
    background: rgba(9, 16, 33, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.28);
    backdrop-filter: blur(24px);
    box-shadow: 0 30px 60px rgba(6, 12, 33, 0.55);
}

.menu-toggle {
  display: none;
}

.menu-toggle-label {
  position: fixed;
  top: 20px;
  left: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(14, 116, 233, 0.92);
  color: white;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.menu-toggle-label .hamburger {
  width: 22px;
  height: 2px;
  background: currentColor;
  position: relative;
  display: inline-block;
}

.menu-toggle-label .hamburger::before,
.menu-toggle-label .hamburger::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  background: currentColor;
  left: 0;
  transition: transform 0.25s ease;
}

.menu-toggle-label .hamburger::before {
  top: -6px;
}

.menu-toggle-label .hamburger::after {
  top: 6px;
}

#menu-toggle:checked + .menu-toggle-label .hamburger {
  background: transparent;
}

#menu-toggle:checked + .menu-toggle-label .hamburger::before {
  transform: translateY(6px) rotate(45deg);
}

#menu-toggle:checked + .menu-toggle-label .hamburger::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* Botones utilitarios */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}

.btn-primary {
  background: linear-gradient(130deg, rgba(14, 165, 233, 0.9), rgba(59, 130, 246, 0.95));
  color: #f8fafc;
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.45);
}

.btn-outline {
  border: 1px solid rgba(148, 163, 184, 0.45);
  color: #e2e8f0;
  background: transparent;
}

.btn-outline:hover {
  border-color: rgba(59, 130, 246, 0.6);
  color: #dbeafe;
}

.btn-link {
  color: rgba(129, 230, 217, 0.92);
  text-decoration: none;
}

.btn-ghost {
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: rgba(37, 99, 235, 0.08);
  color: #cbd5f5;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Componentes */
.hero-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  align-items: center;
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.32), rgba(17, 24, 39, 0.9));
  border-radius: var(--radius-md);
  padding: 36px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: rgba(129, 230, 217, 0.9);
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0;
  color: #f8fafc;
}

.hero-subtitle {
  font-size: 1rem;
  color: rgba(226, 232, 240, 0.8);
  margin: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.hero-media img {
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.45);
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(15, 23, 42, 0.88);
  border-radius: var(--radius-md);
  padding: 22px;
}

.carousel-control {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(8, 15, 32, 0.8);
  color: #e2e8f0;
  font-size: 1.4rem;
  cursor: pointer;
}

.carousel-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.carousel-slide {
  background: rgba(30, 41, 59, 0.65);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.carousel-slide h3 {
  margin: 0 0 8px;
}

.carousel-slide p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.section-header.center {
  text-align: center;
  align-items: center;
}

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.8rem;
  color: rgba(129, 230, 217, 0.8);
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #e0f2fe;
}

.section-subtitle {
  margin: 0;
  color: rgba(148, 163, 184, 0.8);
}

.product-grid {
  background: rgba(17, 24, 39, 0.82);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.product-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.product-card {
  display: flex;
  flex-direction: column;
  background: rgba(15, 23, 42, 0.85);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  overflow: hidden;
}

.product-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.price {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f9a8d4;
}

.feature-section {
  background: rgba(15, 23, 42, 0.82);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.feature-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.feature-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 12px;
}

.cta-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(14, 116, 233, 0.4), rgba(8, 47, 73, 0.75));
  padding: 28px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.search-section {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.search-form {
  display: grid;
  grid-template-columns: 1fr 200px auto;
  gap: 12px;
}

.search-form input,
.search-form select {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(8, 15, 32, 0.85);
  color: var(--text-primary);
}

.faq-section {
  background: rgba(17, 24, 39, 0.85);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.faq-items details {
  background: rgba(15, 23, 42, 0.72);
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq-items summary {
  cursor: pointer;
  font-weight: 600;
  color: #e2e8f0;
}

.contact-section {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.contact-form {
  display: grid;
  gap: 12px;
}

.contact-form input,
.contact-form textarea {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(8, 15, 32, 0.84);
  color: var(--text-primary);
}

.testimonials {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.testimonial-card {
  background: rgba(30, 41, 59, 0.6);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.testimonial-card blockquote {
  margin: 0;
  font-style: italic;
  color: rgba(226, 232, 240, 0.85);
}

.testimonial-card figcaption {
  display: flex;
  flex-direction: column;
  color: rgba(148, 163, 184, 0.8);
}

.pricing-table {
  background: rgba(15, 23, 42, 0.85);
  border-radius: var(--radius-md);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

.pricing-card {
  background: rgba(30, 41, 59, 0.62);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.pricing-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  color: rgba(226, 232, 240, 0.78);
}

.pricing-price {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #bae6fd;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(148, 163, 184, 0.8);
}

.pricing-card.featured {
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 20px 35px rgba(14, 165, 233, 0.2);
}

.pricing-card .badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.25);
  color: #e0f2fe;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.site-footer {
  background: rgba(6, 10, 23, 0.85);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px;
}

.footer-brand strong {
  font-size: 1.6rem;
  color: #f8fafc;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 18px;
}

.footer-links h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: rgba(226, 232, 240, 0.9);
}

.footer-links a {
  color: rgba(148, 163, 184, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: rgba(56, 189, 248, 0.9);
}

/* Responsividad */
@media (max-width: 1200px) {
  .app-shell{
    grid-template-rows: auto 1fr auto;
    height: 100vh;
  }
  
  
  .workspace {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .code-panel {
    order: 3;
  }

  .canvas-panel {
    order: 2;
  }

  .ai-dock {
    width: min(640px, calc(100vw - 60px));
  }
}

@media (max-width: 980px) {

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    height: 100vh;
  }

.sidebar {
    position: fixed; 
    top: 0;             
    left: 0;           
    width: 100%;       
    max-height: 75px; 
    border-bottom: 1px solid rgba(59, 130, 246, 0.15);
    transition: max-height 0.4s ease-out, border-bottom 0.4s ease-out;
    box-shadow: 20px 0 40px rgba(6, 12, 30, 0.65);
    z-index: 1000;
    overflow-x: auto;
    overflow-y: visible;
    padding: 0;
    display: flex;
    flex-direction: column;
  }


  .sidebar-content-wrapper {
        opacity: 0;
        height: 0;
    }

    .sidebar.is-open {
        max-height: 230px;
    }
    
    .sidebar.is-open .sidebar-content-wrapper {
        transition: opacity 0.3s ease 0.1s;
        opacity: 1;
        height: auto;
    }


    #sidebar-toggle-btn {
        display: flex; 
        justify-content: center;
        align-items: center;
        width: 50px; 
        height: 50px;
        border-radius: 50%;
        padding: 10px;
        background: rgba(59, 130, 246, 0.15);
        color: white;
        border: 2px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
        cursor: pointer;
        left: 50%;
        transform: translateX(-50%);
        position: sticky; 
        bottom: -25px; 
        z-index: 10;
        margin-top: 0; 
    }

      .toggle-icon {
      display: inline-block;
      transition: transform 0.3s ease;
  }

    
    .sidebar.is-open .toggle-icon {
      transform: rotate(180deg);
  }

    .sidebar-content-wrapper nav, .sidebar-content-wrapper footer {
        padding: 15px 22px;
    }



  .workspace {
    grid-column: 1;
    grid-row: 2;  
    width: 100%;
    padding: 100px 22px 36px; 
    display: flex;
    flex-direction: column; 
    gap: 16px; 
    overflow-y: auto;
  }


  .component-groups {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 20px; 
        overflow-x: auto; 
        overflow-y: hidden;
    }
    

    .component-group {
        flex-shrink: 0; 
        display: block;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        min-width: 150px;
        align-items: center; 
    }
    
    .component-group h2 {
        margin-bottom: 5px;
        font-size: 0.9em;
        clip: rect(auto);
    }
    
    .component-group button {
        width: auto;
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 8px;
        flex-shrink: 0; 
        white-space: nowrap;
        padding: 8px 12px;
    }

      .canvas, 
  .editor-stack, 
  .ai-dock {
    width: 100%;
    min-height: 10vh; 
  }

  .canvas {
    min-height: 40vh;
    padding-bottom: 22px; 
  }
  
  .editor-stack {
    min-height: 10vh;
    max-width: 90%;
    
  }

  .ai-dock {
    grid-column: 1; 
    grid-row: auto;
    width: 100%;
    grid-row: 3;
  }


  .sidebar-footer {
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding-top: 15px;
    }
    
    .sidebar-footer .sidebar-action {
        flex-grow: 1;
        padding: 10px;
        font-size: 0.85em;
    }

    .sidebar-header{
      display: none;
    }
    
  
    .canvas-panel{
    min-height: 400px;
    max-height: 50vh;
    overflow-y: auto; 
    overflow-x: hidden; 
  }
  
  .code-panel {
    min-height: 400px;
    max-height: 50vh;
    overflow-x: hidden; 
  }

  .code-panel {
    display: flex;
    flex-direction: column;
    height: 100%; 
  }
  
  .vscode-shell {
    flex: 1 1 auto; 
    overflow-y: auto; 
    height: 100%;
    min-height: 0;
  }

  .code-actions {
    position: relative;
    margin-top: 15px; 
    padding-bottom: 20px;
    flex-shrink: 0;
  }
}

@media (max-width: 720px) {
  .carousel {
    flex-direction: column;
  }

  .carousel-track {
    grid-template-columns: 1fr;
  }

  .search-form {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .code-actions {
    flex-direction: column;
  }

  .code-actions button {
    width: 100%;
  }

  .vscode-shell {
    border-radius: 16px;
  }

  .vscode-shell .code-tabs {
    padding: 4px 10px;
  }

  .vscode-shell .code-tabs button {
    flex: 1;
    justify-content: center;
  }

  .vscode-shell .panel-header,
  .vscode-shell .editor-stack,
  .vscode-shell .code-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .ai-dock {
    width: 100%;
    padding: 18px 18px;
  }
}

/* --- ESTILOS DEL CARRITO DE COMPRAS --- */

.shopping-cart-container {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.shopping-cart-container h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.8rem;
    border-bottom: 1px solid #3d404d;
    padding-bottom: 10px;
}

.cart-items-list {
    margin-bottom: 20px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #3d404d;
    transition: background-color 0.3s;
}

.cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.item-details {
    flex-grow: 1;
}

.item-details h5 {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.item-price {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 700;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 15px;
}

.item-controls button {
    background-color: #555866;
    color: var(--text-light);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.2s;
    padding: 0;
    line-height: 1;
}

.item-controls button:hover {
    background-color: #66697a;
}

.item-controls input[type="number"] {
    width: 40px;
    text-align: center;
    padding: 5px 0;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #33363f;
    color: var(--text-light);
    font-size: 1rem;
    -moz-appearance: textfield; 
}
.item-controls input[type="number"]::-webkit-outer-spin-button,
.item-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none; 
    margin: 0;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 10px;
}

.remove-item-btn:hover {
    color: #ff5438;
}

.cart-summary {
    text-align: right;
    padding: 15px 0;
    border-top: 2px solid var(--bg-light);
}

.cart-summary p {
    margin: 5px 0;
    color: var(--text-dark);
}

.cart-summary h4 {
    margin-top: 10px;
    font-size: 1.4rem;
    color: var(--text-light);
}

.cart-summary span {
    font-weight: 700;
    color: var(--primary);
}

.cart-summary h4 span {
    color: var(--accent);
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding-top: 20px;
}

.cart-actions button {
    flex: 1;
    padding: 12px;
    font-size: 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.cart-actions .primary-btn {
    background-color: var(--primary);
    color: var(--text-light);
}

.cart-actions .secondary-btn {
    background-color: #555866;
    color: var(--text-light);
}

/* --- ESTILOS CARRUSEL DE RESEÑAS --- */
.reviews-system-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 25px;
    background-color: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
.reviews-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}
.reviews-header h3 {
    color: var(--primary);
    font-size: 1.8rem;
}
.average-rating {
    display: flex;
    align-items: center;
}
.rating-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
    margin-right: 10px;
}
.total-reviews {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-left: 10px;
}
.stars-display {
    color: gold;
    font-size: 1.5rem;
    letter-spacing: 2px;
}
.star-filled::before {
    content: "\2605";
}
.star-empty::before {
    content: "\2606";
    color: #666;
}
.carousel-wrapper {
    position: relative;
    padding: 0 40px;
}
.reviews-carousel {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 10px 0;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.reviews-carousel::-webkit-scrollbar {
    display: none;
}
.review-card {
    flex: 0 0 320px; 
    scroll-snap-align: start;
    background-color: #33363f;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    border-left: 5px solid var(--primary);
    min-height: 200px;
}
.reviewer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.reviewer-name {
    font-weight: 600;
    color: var(--text-light);
    font-size: 1.1rem;
}
.review-date {
    font-size: 0.8rem;
    color: #999;
}
.review-stars {
    color: gold;
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.review-text {
    font-size: 0.95rem;
    color: var(--text-dark);
    line-height: 1.5;
    flex-grow: 1;
}
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--primary);
    color: var(--text-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.2s, background-color 0.2s;
}
.carousel-nav-btn:hover {
    opacity: 1;
    background-color: var(--accent);
}
.left-arrow {
    left: 0;
}
.right-arrow {
    right: 0;
}
@media (max-width: 768px) {
    .review-card {
        flex: 0 0 280px; 
    }
}

/* --- ESTILOS DEL GESTOR DE AGENDA --- */

.agenda-manager-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.agenda-manager-container h3 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.agenda-form-section {
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.agenda-form-section .form-group {
    margin-bottom: 15px;
}

.agenda-form-section label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.agenda-form-section input[type="date"],
.agenda-form-section input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #33363f;
    color: var(--text-light);
    font-size: 1rem;
    box-sizing: border-box;
}

.submit-btn {
    width: 100%;
    margin-top: 10px;
}

.agenda-list-section h4 {
    color: var(--text-light);
    margin-bottom: 15px;
}

.styled-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
    background-color: #2c2f37;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
}

.agenda-item {
    padding: 12px 15px;
    border-bottom: 1px solid #3e424d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.agenda-item:last-child {
    border-bottom: none;
}

.agenda-item:hover {
    background-color: #3e424d;
}

.item-date {
    font-weight: 700;
    color: var(--accent);
    min-width: 110px;
    text-align: right;
    padding-left: 15px;
}

.item-description {
    flex-grow: 1;
    color: var(--text-light);
}

.empty-message {
    text-align: center;
    padding: 20px;
    color: #888;
}

.clear-btn {
    background-color: #555866;
    color: var(--text-light);
    border: none;
    padding: 8px 15px;
}

.hidden {
    display: none !important;
}

.past-event .item-description {
    text-decoration: line-through;
    color: #888;
}
.past-event .item-date {
    color: #888;
}


.form-container-3in1 {
    width: 100%;
    max-width: 400px;
    margin: 40px auto;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.form-tabs {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    border-bottom: 2px solid #333;
}

.tab-btn {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    transition: color 0.3s, border-bottom 0.3s;
    border-bottom: 2px solid transparent;
    font-weight: 600;
    opacity: 0.7;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    opacity: 1;
}

.auth-form h3 {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.6rem;
}

.auth-form p {
    color: var(--text-dark);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.hidden {
    display: none !important;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.auth-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 6px;
    background-color: #33363f;
    color: var(--text-light);
    font-size: 1rem;
    box-sizing: border-box;
}

.auth-form input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.2);
}

.submit-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.3s, opacity 0.3s;
}

.primary-btn {
    background-color: var(--primary);
}

.accent-btn {
    background-color: var(--accent);
}

.submit-btn:hover {
    opacity: 0.9;
}

.form-link-p {
    text-align: center;
    margin-top: 15px;
}

.form-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.form-link:hover {
    color: var(--accent);
    text-decoration: underline;
}
/*ESTILOS CHAT BOT*/

.chat-container {
    width: 350px;
    height: 450px;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border: 1px solid #3d404d;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    padding: 15px;
}

#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: #33363f;
    scrollbar-color: var(--primary) #33363f;
    scrollbar-width: thin;
}

.chat-message {
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-size: 0.95rem;
}

.user-message {
    background-color: var(--primary);
    color: var(--text-light);
    align-self: flex-end;
    margin-left: auto;
}

.bot-message {
    background-color: #555866;
    color: var(--text-light);
    align-self: flex-start;
    margin-right: auto;
}

.chat-input-area {
    display: flex;
    gap: 10px;
}

#user-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 20px;
    background-color: #40444b;
    color: var(--text-light);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: var(--primary);
}

.send-btn {
    padding: 10px 20px;
    background-color: var(--accent); 
    color: var(--text-light);
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.send-btn:hover {
    background-color: #ff5438;
    transform: translateY(-1px);
}
