.page-main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.page-main-narrow {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 64px;
}

.panel-card {
  background: #161622;
  border: 1px solid #28283a;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.panel-card-accent {
  background: linear-gradient(135deg, #171530 0%, #1e1b4b 50%, #151d38 100%);
  border: 1px solid #6366f1;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.2);
}

.panel-card-cyan {
  background: linear-gradient(135deg, #13172e 0%, #1a1e3b 50%, #152438 100%);
  border: 1px solid #38bdf8;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 8px 32px rgba(56, 189, 248, 0.15);
}

.panel-card-indigo {
  background: #141420;
  border: 1px solid #3730a3;
  border-radius: 14px;
  padding: 28px;
  margin-bottom: 28px;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: #38bdf8;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 8px;
}

.docs-h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.2vw, 30px);
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.docs-h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: #ffffff;
}

.docs-lead {
  margin: 0 0 20px;
  font-size: 15px;
  color: #94a3b8;
  line-height: 1.7;
  max-width: 900px;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill {
  font-size: 12px;
  background: #20202e;
  color: #cbd5e1;
  border: 1px solid #33334d;
  padding: 4px 10px;
  border-radius: 6px;
}

.pill-indigo { color: #a5b4fc; }
.pill-cyan { color: #38bdf8; }
.pill-emerald { color: #34d399; }
.pill-amber { color: #fbbf24; }

.tag-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
}

.sub-box {
  background: #191928;
  border: 1px solid #2d2d46;
  border-radius: 10px;
  padding: 18px;
}

.tool-box {
  background: #0b101d;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 10px 14px;
}

.code-wrap {
  position: relative;
}

.code-block {
  margin: 0;
  background: #0a0c14;
  border: 1px solid #1e293b;
  border-radius: 10px;
  padding: 18px;
  color: #38bdf8;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-x: auto;
  line-height: 1.6;
}

.copy-btn {
  background: #222230;
  color: #ffffff;
  border: 1px solid #38384b;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.copy-btn:hover {
  background: #2c2c3f;
}

.copy-btn.copied {
  background: #10b981;
  border-color: #10b981;
}

.copy-btn-float {
  position: absolute;
  top: 12px;
  right: 12px;
}

.tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  padding: 6px 13px;
  border-radius: 6px;
  border: 1px solid #33334d;
  background: #1c1c28;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn.active {
  background: #6366f1;
  border-color: #6366f1;
  color: #ffffff;
}

.tab-btn-cyan.active {
  background: #0284c7;
  border-color: #0284c7;
  color: #ffffff;
}

.docs-table-wrap {
  overflow-x: auto;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #cbd5e1;
  text-align: left;
}

.docs-table th,
.docs-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #242436;
}

.docs-table th {
  color: #94a3b8;
  border-bottom-color: #33334d;
}

.method-badge {
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
}

.method-get { background: #065f46; color: #34d399; }
.method-post { background: #1e3a8a; color: #60a5fa; }
.method-put { background: #7c2d12; color: #fb923c; }
.method-delete { background: #831843; color: #f472b6; }

.docs-input {
  width: 100%;
  max-width: 420px;
  background: #161e2e;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 8px 12px;
  color: #f8fafc;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.docs-errors li strong.ok { color: #34d399; }
.docs-errors li strong.err { color: #f87171; }

/* Store styles */
.store-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  max-width: 520px;
  position: relative;
}

.store-search-input {
  width: 100%;
  background: #161622;
  color: #ffffff;
  border: 1px solid #2f2f42;
  border-radius: 8px;
  padding: 10px 38px 10px 14px;
  font-size: 14px;
  outline: none;
}

.store-search-input:focus {
  border-color: #6366f1;
}

.store-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.store-card {
  background: #161622;
  border: 1px solid #28283a;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.store-card:hover {
  transform: translateY(-3px);
  border-color: #6366f1;
}

.store-card-thumb {
  height: 190px;
  background: #0d0d14;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 12px;
  cursor: pointer;
}

.store-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.store-card-dim {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 15, 20, 0.85);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid #333344;
}

.store-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.store-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  cursor: pointer;
}

.store-card-desc {
  margin: 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.store-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #cbd5e1;
  padding-top: 8px;
  border-top: 1px solid #242436;
}

.store-card-actions {
  display: flex;
  gap: 8px;
}

.store-card-actions .btn {
  flex: 1;
  justify-content: center;
  font-size: 12px;
  padding: 8px 10px;
}

.store-state-box {
  background: #161622;
  border: 1px solid #28283a;
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  color: #94a3b8;
}

.store-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #3b3b54 transparent;
}

.store-gallery::-webkit-scrollbar {
  height: 6px;
}

.store-gallery::-webkit-scrollbar-track {
  background: rgba(15, 15, 25, 0.4);
  border-radius: 999px;
}

.store-gallery::-webkit-scrollbar-thumb {
  background: #3b3b54;
  border-radius: 999px;
}

.store-gallery::-webkit-scrollbar-thumb:hover {
  background: #6366f1;
}

.store-gallery-item {
  background: #0d0d14;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  padding: 8px;
  min-width: 130px;
  text-align: center;
  cursor: pointer;
}

.store-gallery-item img {
  width: 114px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
}

.lightbox-overlay[hidden] {
  display: none;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

/* JOINT-SRS-004: Layout Plantillas con Sidebar, Compartir y Acordeón Dev */
.templates-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.templates-sidebar {
  background: #141420;
  border: 1px solid #28283a;
  border-radius: 12px;
  padding: 12px;
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.templates-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  padding: 4px 10px 6px;
}

.templates-cat-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.templates-cat-btn:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #fff;
}

.templates-cat-btn.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.45);
  color: #fff;
  font-weight: 600;
}

.templates-sidebar-toggle {
  display: none;
  margin-bottom: 14px;
}

@media (max-width: 820px) {
  .templates-layout {
    grid-template-columns: 1fr;
  }
  .templates-sidebar-toggle {
    display: inline-flex;
  }
  .templates-sidebar {
    position: static;
  }
  .templates-sidebar.collapsed {
    display: none;
  }
}

.templates-sentinel {
  height: 24px;
  margin-top: 16px;
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1a1a28;
  border: 1px solid #2e2e44;
  color: #e2e8f0;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.share-btn:hover {
  border-color: #6366f1;
  background: #232336;
  color: #fff;
}

.dev-options-accordion {
  background: #11111b;
  border: 1px solid #28283e;
  border-radius: 12px;
  padding: 14px 18px;
  margin-top: 18px;
}

.dev-options-accordion > summary {
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #cbd5e1;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dev-options-accordion > summary::-webkit-details-marker {
  display: none;
}

.dev-options-accordion[open] > summary {
  margin-bottom: 14px;
  color: #fff;
}

.store-card-fan {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-card-fan .fan-card {
  position: absolute;
  max-height: 84%;
  max-width: 54%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  transition: transform 0.22s ease;
}

.store-card-fan .fan-card-left {
  z-index: 2;
  transform: translate(-30%, 5%) rotate(-8deg) scale(0.92);
  opacity: 0.95;
}

.store-card-fan .fan-card-right {
  z-index: 2;
  transform: translate(30%, 5%) rotate(8deg) scale(0.92);
  opacity: 0.95;
}

.store-card-fan .fan-card-far-left {
  z-index: 1;
  transform: translate(-56%, 11%) rotate(-15deg) scale(0.84);
  opacity: 0.84;
}

.store-card-fan .fan-card-far-right {
  z-index: 1;
  transform: translate(56%, 11%) rotate(15deg) scale(0.84);
  opacity: 0.84;
}

.store-card-fan .fan-card-center {
  z-index: 3;
  transform: translateY(-2%) scale(1);
}

.store-card:hover .store-card-fan .fan-card-left {
  transform: translate(-36%, 3%) rotate(-10deg) scale(0.94);
}

.store-card:hover .store-card-fan .fan-card-right {
  transform: translate(36%, 3%) rotate(10deg) scale(0.94);
}

.store-card:hover .store-card-fan .fan-card-far-left {
  transform: translate(-66%, 9%) rotate(-18deg) scale(0.86);
}

.store-card:hover .store-card-fan .fan-card-far-right {
  transform: translate(66%, 9%) rotate(18deg) scale(0.86);
}

.store-card:hover .store-card-fan .fan-card-center {
  transform: translateY(-4%) scale(1.03);
}

.store-card-count {
  position: absolute;
  bottom: 36px;
  right: 10px;
  z-index: 4;
  font-size: 11px;
  font-weight: 600;
  color: #e0e7ff;
  background: rgba(99, 102, 241, 0.78);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(165, 180, 252, 0.35);
}

.template-tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.template-tag-chip {
  display: inline-flex;
  align-items: center;
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.32);
  color: #c7d2fe;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.template-tag-chip:hover,
.template-tag-chip.active {
  background: rgba(99, 102, 241, 0.32);
  border-color: #818cf8;
  color: #fff;
}

.template-lang-badge {
  display: inline-flex;
  align-items: center;
  background: #1e293b;
  border: 1px solid #334155;
  color: #94a3b8;
  border-radius: 5px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* JOINT-SRS-006: Comunidad (Valoraciones, Comentarios y Favoritos) */
.fav-card-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 4;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(15, 15, 25, 0.72);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s;
}

.fav-card-btn:hover {
  transform: scale(1.08);
  border-color: #f43f5e;
}

.fav-card-btn.active {
  background: rgba(244, 63, 94, 0.28);
  border-color: #f43f5e;
}

.rating-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #fbbf24;
  font-weight: 600;
}

.rating-stars {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.rating-star-btn {
  background: none;
  border: none;
  padding: 2px 3px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: #475569;
  transition: transform 0.12s, color 0.12s;
}

.rating-star-btn.filled {
  color: #fbbf24;
}

.rating-stars:hover .rating-star-btn {
  color: #fbbf24;
}

.rating-stars .rating-star-btn:hover {
  transform: scale(1.15);
}

.rating-stars .rating-star-btn:hover ~ .rating-star-btn {
  color: #475569;
  transform: none;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.comment-item {
  background: #10101a;
  border: 1px solid #242436;
  border-radius: 8px;
  padding: 12px 14px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
  color: #94a3b8;
}

.comment-content {
  margin: 0;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.comment-textarea {
  width: 100%;
  min-height: 80px;
  background: #0d0d16;
  border: 1px solid #2e2e44;
  border-radius: 8px;
  padding: 10px 12px;
  color: #f8fafc;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
}
