Spaces:
Running
Running
| <html lang="es"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Galactic Miniatures - Tienda de Rol</title> | |
| <!-- Fuentes de Google --> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link href="https://fonts.googleapis.com/css2?family=Exo+2:wght@300;400;700&family=Orbitron:wght@400;700;900&display=swap" rel="stylesheet"> | |
| <style> | |
| /* --- VARIABLES & RESET --- */ | |
| :root { | |
| --bg-deep: #05050a; | |
| --bg-card: rgba(20, 20, 35, 0.6); | |
| --primary: #00f3ff; /* Cyan Neon */ | |
| --secondary: #bc13fe; /* Purple Neon */ | |
| --accent: #ff0055; /* Pink Neon */ | |
| --text-main: #e0e6ed; | |
| --text-muted: #8b9bb4; | |
| --glass-border: 1px solid rgba(255, 255, 255, 0.1); | |
| --glow: 0 0 15px rgba(0, 243, 255, 0.3); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Exo 2', sans-serif; | |
| background-color: var(--bg-deep); | |
| color: var(--text-main); | |
| overflow-x: hidden; | |
| min-height: 100vh; | |
| position: relative; | |
| } | |
| /* --- ESTRELLAS ANIMADAS (FONDO) --- */ | |
| #star-container { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| z-index: -1; | |
| background: radial-gradient(circle at center, #1a1a2e 0%, #000000 100%); | |
| overflow: hidden; | |
| } | |
| .star { | |
| position: absolute; | |
| background: white; | |
| border-radius: 50%; | |
| opacity: 0.8; | |
| animation: twinkle var(--duration) ease-in-out infinite; | |
| } | |
| @keyframes twinkle { | |
| 0%, 100% { opacity: 0.2; transform: scale(0.8); } | |
| 50% { opacity: 1; transform: scale(1.2); } | |
| } | |
| /* --- HEADER --- */ | |
| header { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| padding: 20px 5%; | |
| background: rgba(5, 5, 10, 0.8); | |
| backdrop-filter: blur(10px); | |
| border-bottom: var(--glass-border); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| } | |
| .logo { | |
| font-family: 'Orbitron', sans-serif; | |
| font-size: 1.5rem; | |
| font-weight: 900; | |
| color: var(--primary); | |
| text-transform: uppercase; | |
| letter-spacing: 2px; | |
| text-shadow: var(--glow); | |
| } | |
| .anycoder-link { | |
| font-size: 0.9rem; | |
| color: var(--text-muted); | |
| text-decoration: none; | |
| border: 1px solid var(--secondary); | |
| padding: 5px 15px; | |
| border-radius: 20px; | |
| transition: 0.3s; | |
| } | |
| .anycoder-link:hover { | |
| background: var(--secondary); | |
| color: white; | |
| box-shadow: 0 0 15px var(--secondary); | |
| } | |
| /* --- HERO SECTION --- */ | |
| .hero { | |
| text-align: center; | |
| padding: 80px 20px; | |
| } | |
| .hero h1 { | |
| font-family: 'Orbitron', sans-serif; | |
| font-size: 3rem; | |
| margin-bottom: 15px; | |
| background: linear-gradient(90deg, var(--primary), var(--secondary)); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| .hero p { | |
| color: var(--text-muted); | |
| font-size: 1.2rem; | |
| max-width: 600px; | |
| margin: 0 auto; | |
| } | |
| /* --- PRODUCT GRID --- */ | |
| .shop-container { | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| padding: 20px; | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | |
| gap: 30px; | |
| padding-bottom: 100px; | |
| } | |
| /* --- PRODUCT CARD --- */ | |
| .product-card { | |
| background: var(--bg-card); | |
| border: var(--glass-border); | |
| border-radius: 15px; | |
| overflow: hidden; | |
| backdrop-filter: blur(10px); | |
| transition: transform 0.3s ease, box-shadow 0.3s ease; | |
| position: relative; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .product-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 10px 30px rgba(0, 243, 255, 0.1); | |
| border-color: rgba(0, 243, 255, 0.3); | |
| } | |
| .product-image-container { | |
| width: 100%; | |
| height: 250px; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .product-image-container img { | |
| width: 100%; | |
| height: 100%; | |
| object-fit: cover; | |
| transition: transform 0.5s; | |
| } | |
| .product-card:hover .product-image-container img { | |
| transform: scale(1.1); | |
| } | |
| /* Badge */ | |
| .badge { | |
| position: absolute; | |
| top: 10px; | |
| right: 10px; | |
| background: var(--accent); | |
| color: white; | |
| padding: 5px 10px; | |
| font-size: 0.8rem; | |
| font-weight: bold; | |
| border-radius: 5px; | |
| font-family: 'Orbitron', sans-serif; | |
| z-index: 2; | |
| } | |
| .product-details { | |
| padding: 20px; | |
| flex-grow: 1; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .product-title { | |
| font-family: 'Orbitron', sans-serif; | |
| font-size: 1.2rem; | |
| margin-bottom: 10px; | |
| color: white; | |
| } | |
| .product-desc { | |
| font-size: 0.9rem; | |
| color: var(--text-muted); | |
| margin-bottom: 20px; | |
| line-height: 1.5; | |
| } | |
| /* --- CONTROLES (COLOR & SIZE) --- */ | |
| .config-section { | |
| margin-top: auto; /* Empuja hacia abajo */ | |
| } | |
| .config-label { | |
| font-size: 0.8rem; | |
| text-transform: uppercase; | |
| letter-spacing: 1px; | |
| color: var(--primary); | |
| margin-bottom: 8px; | |
| display: block; | |
| } | |
| /* Color Picker Styling */ | |
| .color-options { | |
| display: flex; | |
| gap: 10px; | |
| margin-bottom: 15px; | |
| } | |
| .color-option { | |
| cursor: pointer; | |
| position: relative; | |
| } | |
| .color-option input { | |
| display: none; | |
| } | |
| .color-circle { | |
| width: 25px; | |
| height: 25px; | |
| border-radius: 50%; | |
| border: 2px solid transparent; | |
| transition: all 0.2s; | |
| } | |
| .color-option input:checked + .color-circle { | |
| border-color: white; | |
| box-shadow: 0 0 10px var(--color-hex); | |
| transform: scale(1.2); | |
| } | |
| /* Size Picker Styling */ | |
| .size-options { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| .size-btn { | |
| flex: 1; | |
| background: rgba(255, 255, 255, 0.05); | |
| border: 1px solid rgba(255, 255, 255, 0.1); | |
| color: var(--text-muted); | |
| padding: 8px; | |
| cursor: pointer; | |
| font-family: 'Exo 2', sans-serif; | |
| font-weight: bold; | |
| transition: 0.3s; | |
| border-radius: 4px; | |
| } | |
| .size-btn:hover { | |
| border-color: var(--primary); | |
| color: white; | |
| } | |
| .size-btn.active { | |
| background: rgba(0, 243, 255, 0.1); | |
| border-color: var(--primary); | |
| color: var(--primary); | |
| box-shadow: 0 0 10px rgba(0, 243, 255, 0.1); | |
| } | |
| /* --- FOOTER & PRICE --- */ | |
| .card-footer { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| margin-top: 20px; | |
| padding-top: 15px; | |
| border-top: 1px solid rgba(255, 255, 255, 0.05); | |
| } | |
| .price { | |
| font-size: 1.3rem; | |
| font-weight: bold; | |
| color: white; | |
| } | |
| .add-btn { | |
| background: linear-gradient(45deg, var(--primary), var(--secondary)); | |
| border: none; | |
| padding: 10px 20px; | |
| color: white; | |
| font-weight: bold; | |
| border-radius: 5px; | |
| cursor: pointer; | |
| text-transform: uppercase; | |
| transition: 0.3s; | |
| } | |
| .add-btn:hover { | |
| box-shadow: 0 0 20px rgba(188, 19, 254, 0.6); | |
| transform: scale(1.05); | |
| } | |
| /* --- RESPONSIVE --- */ | |
| @media (max-width: 768px) { | |
| .hero h1 { font-size: 2rem; } | |
| header { flex-direction: column; gap: 10px; } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Fondo de Estrellas --> | |
| <div id="star-container"></div> | |
| <header> | |
| <div class="logo">Galactic<span style="color:var(--secondary)">Miniatures</span></div> | |
| <nav> | |
| <a href="#" class="anycoder-link" target="_blank">Built with anycoder</a> | |
| </nav> | |
| </header> | |
| <section class="hero"> | |
| <h1>Elige Tu Guerrero Estelar</h1> | |
| <p>Miniaturas de alta calidad para tus campañas de rol. Personaliza tu figura con colores vibrantes y diferentes escalas.</p> | |
| </section> | |
| <main class="shop-container"> | |
| <!-- PRODUCTO 1 --> | |
| <article class="product-card"> | |
| <div class="product-image-container"> | |
| <span class="badge">Best Seller</span> | |
| <!-- Imagen Placeholder: Warrior --> | |
| <img src="https://images.unsplash.com/photo-1612362464414-0492729dfdb1?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Cazador Estelar"> | |
| </div> | |
| <div class="product-details"> | |
| <h2 class="product-title">Cazador Estelar</h2> | |
| <p class="product-desc">Perfecto para guerreros de élite. Figura articulada con detalles mecanizados intrincados.</p> | |
| <div class="config-section"> | |
| <label class="config-label">Seleccionar Color</label> | |
| <div class="color-options"> | |
| <label class="color-option"> | |
| <input type="radio" name="color1" value="blue" checked> | |
| <div class="color-circle" style="--color-hex: #00f3ff; background: #00f3ff;"></div> | |
| </label> | |
| <label class="color-option"> | |
| <input type="radio" name="color1" value="red"> | |
| <div class="color-circle" style="--color-hex: #ff0055; background: #ff0055;"></div> | |
| </label> | |
| <label class="color-option"> | |
| <input type="radio" name="color1" value="green"> | |
| <div class="color-circle" style="--color-hex: #00ff66; background: #00ff66;"></div> | |
| </label> | |
| </div> | |
| <label class="config-label">Seleccionar Tamaño</label> | |
| <div class="size-options"> | |
| <button class="size-btn" onclick="selectSize(this)">28mm</button> | |
| <button class="size-btn active" onclick="selectSize(this)">32mm</button> | |
| <button class="size-btn" onclick="selectSize(this)">50mm</button> | |
| </div> | |
| </div> | |
| <div class="card-footer"> | |
| <div class="price">24.99 €</div> | |
| <button class="add-btn" onclick="addToCart('Cazador Estelar')">Añadir</button> | |
| </div> | |
| </div> | |
| </article> | |
| <!-- PRODUCTO 2 --> | |
| <article class="product-card"> | |
| <div class="product-image-container"> | |
| <!-- Imagen Placeholder: Alien --> | |
| <img src="https://images.unsplash.com/photo-1605806616949-1e87b487bc2a?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Alien Predator"> | |
| </div> | |
| <div class="product-details"> | |
| <h2 class="product-title">Xenomorfo Experto</h2> | |
| <p class="product-desc">Miniatura escala 32mm tallada a mano. Acabado realista en resina de alta resistencia.</p> | |
| <div class="config-section"> | |
| <label class="config-label">Seleccionar Color</label> | |
| <div class="color-options"> | |
| <label class="color-option"> | |
| <input type="radio" name="color2" value="black"> | |
| <div class="color-circle" style="--color-hex: #333; background: #1a1a1a;"></div> | |
| </label> | |
| <label class="color-option"> | |
| <input type="radio" name="color2" value="purple" checked> | |
| <div class="color-circle" style="--color-hex: #bc13fe; background: #bc13fe;"></div> | |
| </label> | |
| <label class="color-option"> | |
| <input type="radio" name="color2" value="gold"> | |
| <div class="color-circle" style="--color-hex: #ffd700; background: linear-gradient(135deg, #b8860b, #ffd700);"></div> | |
| </label> | |
| </div> | |
| <label class="config-label">Seleccionar Tamaño</label> | |
| <div class="size-options"> | |
| <button class="size-btn active" onclick="selectSize(this)">32mm</button> | |
| <button class="size-btn" onclick="selectSize(this)">70mm</button> | |
| </div> | |
| </div> | |
| <div class="card-footer"> | |
| <div class="price">32.50 €</div> | |
| <button class="add-btn" onclick="addToCart('Xenomorfo Experto')">Añadir</button> | |
| </div> | |
| </div> | |
| </article> | |
| <!-- PRODUCTO 3 --> | |
| <article class="product-card"> | |
| <div class="product-image-container"> | |
| <span class="badge">Nuevo</span> | |
| <!-- Imagen Placeholder: Mech --> | |
| <img src="https://images.unsplash.com/photo-1535378433864-48cf10419c5c?ixlib=rb-4.0.3&auto=format&fit=crop&w=600&q=80" alt="Mech Pilot"> | |
| </div> | |
| <div class="product-details"> | |
| <h2 class="product-title">Piloto de Mech</h2> | |
| <p class="product-desc"> Incluye pilote y mecha desmontable. Ideal para batallas de ciencia ficción.</p> | |
| <div class="config-section"> | |
| <label class="config-label">Seleccionar Color</label> | |
| <div class="color-options"> | |
| <label class="color-option"> | |
| <input type="radio" name="color3" value="orange" checked> | |
| <div class="color-circle" style="--color-hex: #ff9900; background: #ff9900;"></div> | |
| </label> | |
| <label class="color-option"> | |
| <input type="radio" name="color3" value="grey"> | |
| <div class="color-circle" style="--color-hex: #a0a0a0; background: #a0a0a0;"></div> | |
| </label> | |
| </div> | |
| <label class="config-label">Seleccionar Tamaño</label> | |
| <div class="size-options"> | |
| <button class="size-btn" onclick="selectSize(this)">28mm</button> | |
| <button class="size-btn" onclick="selectSize(this)">32mm</button> | |
| </div> | |
| </div> | |
| <div class="card-footer"> | |
| <div class="price">19.99 €</div> | |
| <button class="add-btn" onclick="addToCart('Piloto de Mech')">Añadir</button> | |
| </div> | |
| </div> | |
| </article> | |
| </main> | |
| <script> | |
| // --- GENERADOR DE ESTRELLAS --- | |
| function createStars() { | |
| const container = document.getElementById('star-container'); | |
| const starCount = 100; | |
| for (let i = 0; i < starCount; i++) { | |
| const star = document.createElement('div'); | |
| star.classList.add('star'); | |
| // Posición aleatoria | |
| const x = Math.random() * 100; | |
| const y = Math.random() * 100; | |
| // Tamaño aleatorio | |
| const size = Math.random() * 2 + 1; // Entre 1px y 3px | |
| // Duración de parpadeo aleatoria | |
| const duration = Math.random() * 3 + 2; // Entre 2s y 5s | |
| star.style.left = `${x}%`; | |
| star.style.top = `${y}%`; | |
| star.style.width = `${size}px`; | |
| star.style.height = `${size}px`; | |
| star.style.setProperty('--duration', `${duration}s`); | |
| container.appendChild(star); | |
| } | |
| } | |
| // --- LÓGICA DE INTERFAZ --- | |
| // Manejo de botones de tamaño | |
| function selectSize(btn) { | |
| // Encontrar el grupo de botones hermano (parent) y quitar clase active a todos | |
| const siblings = btn.parentElement.querySelectorAll('.size-btn'); | |
| siblings.forEach(sib => sib.classList.remove('active')); | |
| // Añadir clase active al botón cliqueado | |
| btn.classList.add('active'); | |
| } | |
| // Simulación de añadir al carrito | |
| function addToCart(productName) { | |
| // Obtener color seleccionado | |
| // Esta es una lógica visual simple para el mockup | |
| const colorInputs = document.querySelectorAll('input[type="radio"]:checked'); | |
| // Alertas simuladas (solo para el boceto) | |
| // En una app real, esto iría a un array de objetos | |
| console.log(`Producto: ${productName} añadido.`); | |
| // Feedback visual simple | |
| const btn = event.target; | |
| const originalText = btn.innerText; | |
| btn.innerText = "¡Añadido!"; | |
| btn.style.background = "#00ff66"; | |
| btn.style.color = "#000"; | |
| setTimeout(() => { | |
| btn.innerText = originalText; | |
| btn.style.background = ""; | |
| btn.style.color = ""; | |
| }, 1500); | |
| } | |
| // Inicialización | |
| window.onload = createStars; | |
| </script> | |
| </body> | |
| </html> |