/* --- VARIABLES Y CONFIGURACIÓN BASE --- */
:root {
    --color-principal: #1a1a1a;
    --color-secundario: #25d366; 
    --color-fondo: #f9f9f9;
    --color-tarjeta: #ffffff;
    --color-texto: #333333;
    --color-texto-mutado: #666666;
    --fuente-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--fuente-base);
    background-color: var(--color-fondo);
    color: var(--color-texto);
    line-height: 1.6;
}

.contenedor {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.menu-principal {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 18px 20px;
    margin: 0 0 22px;
    background: linear-gradient(135deg, #111111, #1f1f1f);
    border-top: 1px solid rgba(255,255,255,0.12);
    border-bottom: 1px solid rgba(255,255,255,0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.menu-link {
    display: inline-block;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.menu-link:hover {
    background: var(--color-secundario);
    color: var(--color-principal);
    transform: translateY(-2px);
}

/* --- CABECERA (HERO) --- */
.hero {
    background-color: var(--color-principal);
    color: #ffffff;
    text-align: center;
    padding: 60px 20px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.1rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto;
}

/* --- SECCIÓN DE PRODUCTOS --- */
.seccion-productos {
    padding: 60px 0;
}

.seccion-titulo {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 40px;
    position: relative;
}

.seccion-titulo::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--color-principal);
    margin: 10px auto 0;
}

.grid-productos {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.producto-card {
    background-color: var(--color-tarjeta);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .producto-card {
        flex-direction: row;
        align-items: center;
    }
    .producto-imagen, .producto-info {
        flex: 1;
    }
}

.producto-imagen {
    background-color: #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
}

.producto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
}

.producto-info {
    padding: 40px;
}

.tag-categoria {
    display: inline-block;
    background-color: #f0f0f0;
    color: var(--color-principal);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.producto-info h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.producto-info p {
    color: var(--color-texto-mutado);
    margin-bottom: 25px;
}

.lista-caracteristicas {
    list-style: none;
    margin-bottom: 30px;
}

.lista-caracteristicas li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.lista-caracteristicas li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-secundario);
    font-weight: bold;
}

.botones-compra {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-compra {
    display: inline-block;
    background-color: var(--color-principal);
    color: #ffffff;
    text-decoration: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: bold;
    transition: background 0.2s;
    text-align: center;
}

.btn-compra:hover {
    background-color: #333333;
}

.btn-muestra {
    background-color: #2f6fed;
}

.btn-muestra:hover {
    background-color: #2158bc;
}

/* --- SECCIÓN CONTACTO / ENCARGOS --- */
.seccion-contacto {
    background-color: #ffffff;
    padding: 60px 0;
    border-top: 1px solid #eaeaea;
}

.bloque-contacto {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.bloque-contacto p {
    color: var(--color-texto-mutado);
    margin-bottom: 30px;
}

.formulario-contacto {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.form-grupo {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-grupo label {
    font-size: 0.9rem;
    font-weight: bold;
}

.form-grupo input, .form-grupo textarea {
    padding: 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-size: 1rem;
}

.form-grupo textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-enviar {
    background-color: var(--color-principal);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-enviar:hover {
    background-color: #333333;
}

/* --- PIE DE PÁGINA --- */
footer {
    background-color: var(--color-principal);
    color: #888888;
    text-align: center;
    padding: 30px 20px;
    font-size: 0.9rem;
}

.botones-flotantes {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.btn-flotante {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
    background-color: white;
}

.btn-flotante:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.btn-flotante img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Contenedor principal de la calculadora */
.calculadora-contenedor {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

/* Espaciado de cada fila del formulario */
.grupo-campo {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Estilos de las etiquetas de texto */
.grupo-campo label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

/* Estilos para el selector y el input numérico */
.grupo-campo select,
.grupo-campo input[type="number"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    color: #1e293b;
    background-color: #ffffff;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto de enfoque al hacer clic en los campos */
.grupo-campo select:focus,
.grupo-campo input[type="number"]:focus {
    outline: none;
    border-color: #3b82f6; /* Azul moderno, puedes cambiarlo por el color de tu marca */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Ajuste para el botón de calcular */
#btn-calcular {
    width: 100%;
    border: none;
    cursor: pointer;
    font-weight: 600;
    justify-content: center;
    padding: 12px;
    transition: background-color 0.2s ease;
}

/* Caja contenedora del resultado */
.resultado-box {
    background-color: #f0fdf4; /* Fondo verde suave para éxito */
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    animation: fadeIn 0.3s ease-in-out;
}

.resultado-box p {
    margin: 0 0 8px 0;
    color: #166534;
    font-size: 0.95rem;
}

.resultado-box h4 {
    margin: 0;
    color: #14532d;
    font-size: 1.3rem;
    font-weight: 700;
}

/* Animación sutil al aparecer el resultado */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Contenedor que alinea los dos marcos en paralelo */
.contenedor-vistas-duo {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 15px;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 16px;
    border: 1px dashed #cbd5e1;
}

/* Columnas individuales para cada orientación */
.vista-columna {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.label-orientacion {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Base común para todos los marcos */
.marco-foto {
    background-color: #e2e8f0;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.marco-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-foto {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 500;
}

/* =======================================================
   PROPORCIONES EXACTAS ESCALADAS PARA AMBAS ORIENTACIONES 
   ======================================================= */

/* Tamaños 10x15 (Proporción 3:2) */
.marco-foto.h-10x15 { width: 135px; height: 90px; }
.marco-foto.v-10x15 { width: 90px; height: 135px; }

/* Tamaños 13x18 (Proporción 1.38:1) */
.marco-foto.h-13x18 { width: 138px; height: 100px; }
.marco-foto.v-13x18 { width: 100px; height: 138px; }

/* Tamaños A4 (Proporción Estándar 1:1.41) */
.marco-foto.h-A4 { width: 141px; height: 100px; }
.marco-foto.v-A4 { width: 100px; height: 141px; }

/* =======================================================
   SECCION DE STICKERS 
   ======================================================= */

/* Contenedor que emula el tamaño real de una hoja A4 escalada */
.hoja-a4-simulador {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    width: 160px;       /* Ancho representativo a escala */
    height: 226px;      /* Alto proporcional exacto de un A4 (1:1.41) */
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    box-sizing: border-box;
    overflow: hidden;
    padding: 8px;       /* Representa el margen de seguridad de impresión (aprox. 1cm) */
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* El elemento Grid donde inyectaremos las columnas dinámicamente */
#contenedor-grid-stickers {
    display: grid;
    width: 100%;
    height: 100%;
    justify-content: start;
    align-content: start;
}

/* El bloque interno de cada sticker generado */
.grid-mini-sticker {
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px dashed #3b82f6;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
}

/* =======================================================
   SECCION DE PLSTIFICADO 
   ======================================================= */

   /* Ajustes para la tabla de micas agregadas */
.tabla-resumen-contenedor {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 10px;
}

#tabla-plastificados th, 
#tabla-plastificados td {
    padding: 6px 4px;
}

#tabla-plastificados td button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
}

#tabla-plastificados td button:hover {
    color: #b91c1c;
}

