/* =========================================================================
   COMPARTIR CON QR (Etapa 7)
   - .cqr-*  piezas comunes: QR, enlace, botones y avisos (7A y 7B)
   - .cqr-modal-*  ventana "Compartir" del catálogo de la tienda (7A)
   - .cs-*   página "Compartir SolOS" (7B)
   Colores de la marca: azul noche -> lila (#0b1033 -> #4c1d95) con ámbar (#f6a623).
   Sube ?v= en las plantillas que lo cargan cada vez que cambie este archivo.
   ========================================================================= */

:root {
    --cqr-noche: #0b1033;
    --cqr-lila: #4c1d95;
    --cqr-violeta: #7c3aed;
    --cqr-ambar: #f6a623;
    --cqr-tinta: #111827;
}

/* ---------- QR ---------- */
.cqr-qr {
    background: #fff;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 18px 40px -12px rgba(11, 16, 51, 0.45);
    width: min(100%, 260px);
    margin: 0 auto;
}
.cqr-qr canvas {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    image-rendering: pixelated;      /* bordes nítidos al achicarse */
}

/* ---------- Enlace con botón de copiar ---------- */
.cqr-enlace {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    padding: 6px 6px 6px 16px;
    margin: 18px auto 0;
    max-width: 360px;
}
.cqr-enlace-texto {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem;
    color: #374151;
    direction: ltr;
}
.cqr-enlace-copiar {
    flex: none;
    border: 0;
    border-radius: 999px;
    background: var(--cqr-tinta);
    color: #fff;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cqr-enlace-copiar:hover { background: var(--cqr-violeta); }

/* ---------- Botones ---------- */
.cqr-acciones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.cqr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;                 /* fácil de tocar con el dedo */
    border-radius: 14px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: var(--cqr-tinta);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: transform .12s, box-shadow .12s, border-color .12s;
}
.cqr-btn i { font-size: 1.1rem; }
.cqr-btn:hover { border-color: var(--cqr-violeta); color: var(--cqr-violeta); }
.cqr-btn:active { transform: scale(.97); }
.cqr-btn:disabled { opacity: .6; }
.cqr-btn-principal {
    grid-column: 1 / -1;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--cqr-violeta), var(--cqr-lila));
    box-shadow: 0 10px 24px -10px rgba(124, 58, 237, 0.7);
}
.cqr-btn-principal:hover { color: #fff; filter: brightness(1.08); }
.cqr-btn-whatsapp {
    grid-column: 1 / -1;
    border: 0;
    color: #fff;
    background: #16a34a;
    box-shadow: 0 10px 24px -10px rgba(22, 163, 74, 0.7);
}
.cqr-btn-whatsapp:hover { color: #fff; background: #15803d; }
.cqr-btn[hidden] { display: none; }
/* "Descargar QR" a lo ancho; "Copiar enlace" y "Copiar QR" juntos en una fila */
.cqr-btn-ancho { grid-column: 1 / -1; }

/* ---------- Avisos ---------- */
.cqr-aviso {
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin-top: 0;
    border-radius: 12px;
    font-size: 0.86rem;
    line-height: 1.35;
    text-align: center;
    transition: opacity .2s, max-height .2s, margin .2s;
}
.cqr-aviso.visible { opacity: 1; max-height: 120px; margin-top: 12px; padding: 9px 12px; }
.cqr-aviso-ok { background: #ecfdf5; color: #065f46; }
.cqr-aviso-info { background: #fff7ed; color: #9a3412; }
.cqr-aviso-error { background: #fef2f2; color: #991b1b; }

/* =========================================================================
   7A — Ventana "Compartir" del catálogo de la tienda
   ========================================================================= */
.cqr-modal .modal-content {
    border: 0;
    border-radius: 26px;
    overflow: hidden;
    box-shadow: 0 30px 60px -20px rgba(11, 16, 51, 0.55);
}
.cqr-modal-cabecera {
    position: relative;
    text-align: center;
    color: #fff;
    padding: 22px 20px 92px;           /* espacio para que el QR "suba" sobre la cabecera */
    background:
        radial-gradient(circle at 88% 10%, rgba(246, 166, 35, 0.25), transparent 45%),
        linear-gradient(160deg, var(--cqr-noche), var(--cqr-lila));
}
.cqr-modal-cabecera .btn-close { position: absolute; top: 14px; right: 14px; }
.cqr-modal-marca {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cqr-ambar);
}
.cqr-modal-marca img { width: 26px; height: 26px; border-radius: 8px; }
.cqr-modal-titulo {
    margin: 10px 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.cqr-modal-cuerpo { position: relative; z-index: 1; padding: 0 20px 22px; margin-top: -76px; }   /* el QR va POR ENCIMA de la cabecera */
.cqr-modal-leyenda {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin: 12px 0 0;
}

/* =========================================================================
   7B — Página "Compartir SolOS"
   ========================================================================= */
.cs-pagina { max-width: 480px; margin: 0 auto; }
.cs-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #fff;
    border-radius: 30px;
    padding: 30px 22px 34px;
    background:
        radial-gradient(circle at 92% 6%, rgba(246, 166, 35, 0.28), transparent 40%),
        radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.45), transparent 50%),
        linear-gradient(165deg, var(--cqr-noche) 0%, #241a6b 55%, var(--cqr-lila) 100%);
    box-shadow: 0 30px 60px -24px rgba(11, 16, 51, 0.7);
}
/* Hexágonos del logo, muy suaves, de fondo */
.cs-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .09;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 66L0 50V18L28 2l28 16v32L28 66zm0 32L0 82' fill='none' stroke='%23ffffff' stroke-width='1.2'/%3E%3C/svg%3E");
    background-size: 56px 98px;
}
.cs-hero > * { position: relative; }
.cs-logo {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    object-fit: cover;
    box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(246, 166, 35, 0.55);
}
.cs-marca {
    margin: 16px 0 0;
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}
.cs-marca span { color: var(--cqr-ambar); }
.cs-eslogan {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 0;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}
.cs-eslogan::before,
.cs-eslogan::after { content: ""; width: 26px; height: 2px; background: var(--cqr-ambar); border-radius: 2px; }
.cs-hero .cqr-qr { margin-top: 26px; width: min(100%, 250px); }
.cs-escanea {
    margin: 18px 0 0;
    color: var(--cqr-ambar);
    font-weight: 700;
    font-size: 1rem;
}
.cs-panel {
    background: #fff;
    border-radius: 24px;
    padding: 4px 18px 20px;
    margin-top: 18px;
    box-shadow: 0 10px 30px -18px rgba(17, 24, 39, 0.35);
    border: 1px solid #f1f1f4;
}
.cs-beneficios {
    list-style: none;
    padding: 0;
    margin: 22px 0 6px;
    display: grid;
    gap: 12px;
}
.cs-beneficios li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    color: #374151;
}
.cs-beneficios i {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--cqr-violeta);
    background: #f3efff;
}
