/* ===== RESET SIMPLE ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
}

/* ===== HEADER ===== */
.store-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: linear-gradient(to right, rgba(15,23,42,0.96), rgba(15,23,42,0.92));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 10px;
  background: #0b1120;
}

.brand h1 {
  font-size: 4rem;
  font-weight: 600;
}

.brand-tagline {
  font-size: 1rem;
  color: #9ca3af;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== BUSCADOR ===== */
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #020617;
  border-radius: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(75, 85, 99, 0.8);
  min-width: 220px;
}

.search-box .icon {
  font-size: 0.85rem;
  opacity: 0.8;
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #e5e7eb;
  font-size: 0.85rem;
  width: 100%;
}

/* ===== CATEGORÍAS ===== */
.categories-bar {
  padding: 8px 18px 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(31, 41, 55, 0.9);
  background: radial-gradient(circle at top left, rgba(56,189,248,0.16), transparent 58%), #020617;
}

.chip {
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.9rem;
  border: 1px solid rgba(75,85,99,0.9);
  background: rgba(15,23,42,0.9);
  color: #cbd5f5;
  cursor: pointer;
  transition: 0.15s ease;
}
.chip:hover {
  border-color: rgba(59,130,246,0.9);
}
.chip.active {
  background: linear-gradient(to right, #2563eb, #4f46e5);
  border-color: transparent;
  color: white;
}

/* ===== MAIN ===== */
.store-main {
  padding: 16px 18px 40px;
}

.apps-section {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 16px;
}

/* ===== GRID DE APPS ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 10px;
}

/* ===== TARJETA ===== */
.app-card {
  background: radial-gradient(circle at top left, rgba(56,189,248,0.12), transparent 55%),
              radial-gradient(circle at bottom right, rgba(129,140,248,0.26), transparent 60%),
              #020617;
  border-radius: 16px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(51,65,85,0.95);
  display: flex;
  gap: 10px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.app-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15,23,42,0.9);
  border-color: rgba(59,130,246,0.9);
}

.app-thumb {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  background: #020617;
  flex-shrink: 0;
}

.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.app-title {
  font-size: 0.98rem;
  font-weight: 600;
}

.app-meta {
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 2px 0 4px;
}

.app-desc {
  font-size: 0.8rem;
  color: #cbd5f5;
  margin-bottom: 6px;
  line-height: 1.35;
  max-height: 3.1em;
  overflow: hidden;
}

/* BADGE tipo app (Gratis / Pagada) */
.badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  color: #e5e7eb;
}

/* ===== PIE DE TARJETA ===== */
.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: #9ca3af;
}

.stats span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* BOTONES */
.btn-row {
  display: flex;
  gap: 6px;
}

.btn-small {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(to right, #22c55e, #16a34a);
  color: white;
}
.btn-primary:hover {
  filter: brightness(1.05);
}

.btn-ghost {
  background: rgba(15,23,42,0.9);
  border: 1px solid rgba(75,85,99,0.8);
  color: #e5e7eb;
}
.btn-ghost:hover {
  border-color: rgba(148,163,184,0.9);
}

/* ===== ESTADO VACÍO ===== */
.empty-state {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #9ca3af;
}

/* ===== FOOTER ===== */
.store-footer {
  border-top: 1px solid rgba(31,41,55,0.9);
  padding: 10px 18px;
  font-size: 0.8rem;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  .store-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .header-right {
    width: 100%;
  }
  .search-box {
    flex: 1;
  }
  .store-main {
    padding: 14px 12px 30px;
  }
}

/* Tarjeta simple estilo Play Store */
.play-card {
  display:flex;
  gap:10px;
  padding:10px;
  border-radius:12px;
  background:#020617;
  border:1px solid rgba(51,65,85,0.9);
  cursor:pointer;
  transition:0.15s ease;
}
.play-card:hover {
  transform:translateY(-2px);
  box-shadow:0 12px 24px rgba(15,23,42,0.9);
  border-color:rgba(59,130,246,0.9);
}
.play-icon {
  width:64px;
  height:74px;
  border-radius:16px;
  object-fit:cover;
}
.play-info {
  flex:1;
}
.play-name {
  font-size:0.95rem;
  font-weight:600;
  margin-bottom:2px;
}
.play-line1 {
  font-size:0.78rem;
  color:#a5b4fc;
}
.play-line2 {
  font-size:0.78rem;
  color:#9ca3af;
}
.play-line3 {
  font-size:0.78rem;
  color:#9ca3af;
}

/* Overlay detalle */
.overlay {
  position:fixed;
  inset:0;
  display:flex;
  justify-content:center;
  align-items:flex-start;
  padding:20px 10px;
  z-index:50;
}
.overlay.hidden {
  display:none;
}
.overlay-backdrop {
  position:fixed;
  inset:0;
  background:rgba(15,23,42,0.8);
  backdrop-filter:blur(8px);
}
.overlay-panel {
  position:relative;
  max-width:900px;
  width:100%;
  max-height:100%;
  overflow:auto;
  background:#020617;
  border-radius:18px;
  border:1px solid rgba(75,85,99,0.9);
  padding:18px;
  z-index:51;
  color:#e5e7eb;
}
.overlay-close {
  position:absolute;
  top:10px;
  right:10px;
  border:none;
  background:transparent;
  color:#e5e7eb;
  font-size:1.1rem;
  cursor:pointer;
}
.overlay-header {
  display:flex;
  gap:14px;
  align-items:center;
  margin-bottom:14px;
}
.overlay-icon {
  width:80px;
  height:80px;
  border-radius:22px;
  object-fit:cover;
}
.install-share-row button {
  aspect-ratio: 1890 / 709;
  width: 100px;
  padding: 0;
  border: 2px solid white;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.install-share-row button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.install-share-row button:hover img {
  transform: scale(1.1);
}


/* instalacion */
.install-share-row {
  display: flex;
  gap: 10px;

  /* 👇 NECESARIO PARA QUE SE VEAN TODOS */
  flex-wrap: wrap;

  margin-bottom: 10px;
  align-items: center;
}

.share-btn {
  padding: 0 !important;
  background: transparent !important;
  border: 2px solid white !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  aspect-ratio: 1890/709; /* usa la misma proporción */
  width: 100px; /* ajusta si quieres más pequeño */
  cursor: pointer;
}
.share-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.share-btn:hover {
  filter: brightness(1.05);
}

.detail-stats {
  font-size:0.8rem;
  color:#9ca3af;
  margin-bottom:12px;
}
.rating-block {
  border-top:1px solid rgba(31,41,55,0.9);
  border-bottom:1px solid rgba(31,41,55,0.9);
  padding:10px 0;
  margin-bottom:14px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.rating-label {
  font-size:0.85rem;
}
.stars-row {
  display:flex;
  gap:4px;
}
.star-btn {
  border:none;
  background:transparent;
  font-size:1.1rem;
  cursor:pointer;
  color:#facc15;
}
.star-btn:disabled {
  opacity:0.5;
  cursor:default;
}
.like-btn {
  border:none;
  border-radius:999px;
  padding:6px 12px;
  font-size:0.8rem;
  background:rgba(59,130,246,0.18);
  color:#bfdbfe;
  cursor:pointer;
}
.detail-desc {
  font-size:0.88rem;
  color:#e5e7eb;
  margin-bottom:10px;
}

.screenshots-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  margin-top: 20px;
}

.screenshots-row img {
  width: 220px;
  height: 400px;
  object-fit: cover;
  border-radius: 14px;
}

/* ===== GRAFICO DE ESTRELLAS ===== */
.stars-graph {
  display: flex;
  gap: 20px;
  margin: 15px 0;
  align-items: center;
}

.stars-left {
  text-align: center;
  min-width: 90px;
}

.rating-big {
  font-size: 3.2rem;
  font-weight: 700;
  color: #facc15;
}

.rating-total {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-top: -4px;
}

.stars-bars {
  flex: 1;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
}

.bar-row span {
  width: 16px;
  text-align: right;
  font-size: 0.8rem;
  color: #cbd5f5;
}

.bar {
  flex: 1;
  height: 10px;
  background: rgba(148,163,184,0.2);
  border-radius: 40px;
}

.bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 40px;
  transition: width 0.4s ease;
}

/* Reseñas */
.review-form {
  background: rgba(255,255,255,0.04);
  padding: 12px;
  border-radius: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(75,85,99,0.5);
}
h2 {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  font-size: 1.2rem;
  font-weight: 600;
  color: #e5e7eb;
}
.review-form h3 {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.review-form label {
  display:block;
  font-size:0.8rem;
  margin-bottom: 10px;
  color:#cbd5f5;
}

.review-form textarea {
  width: 100%;
  height: 80px;
  padding: 10px;
  background: #0f172a;
  border: 1px solid rgba(148,163,184,0.6);
  color: white;
  border-radius: 10px;
  resize: none;
  font-size:0.85rem;
}

.reviews-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-item {
  background: rgba(255,255,255,0.05);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(75,85,99,0.4);
  margin-top: 14px;
}

.review-stars {
  color: #facc15;
  font-size: 0.95rem;
}

.review-text {
  margin-top: 4px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.review-time {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

.store-footer {
  margin-top: auto;
}

/* color estrellas */
.star-static {
  color: #FFD700;
  font-size: 26px;
  margin-right: 4px;
  pointer-events: none;
}

/* ===== INFORMACIÓN EN CUADRICULA ===== */
.info-grid {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.info-box {
  background: rgba(255,255,255,0.04);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(75,85,99,0.4);
  display: grid;
  grid-template-columns: 30px 1fr;
  column-gap: 10px;
  align-items: center;
}

.info-icon {
  font-size: 1.6rem;
  color: #facc15;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #cbd5f5;
  margin-bottom: 2px;
}

.info-value {
  font-size: 0.88rem;
  color: #e5e7eb;
}

/* ==================================================
   ESTILOS NUEVOS PARA LOS BOTONES OPCIONALES
   ================================================== */


/* ==================================================
  botnes imagen
   ================================================== */
.install-share-row button {
  aspect-ratio: 1890 / 709; /* RELACIÓN REAL DE TU IMAGEN */
  width: 100px;             /* ancho ajustable */
  padding: 0;
  border: 2px solid white;
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.install-share-row button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover; /* llena sin dejar bordes */
}


.install-share-row button:hover img {
  transform: scale(1.1);
}



