/* ==========================================================================
   LÍNEA GRÁFICA COMÚN DE LOS PANELES FEMA (igual que el panel de FEMA CMS)
   Menú arriba con desplegables · botón destacado con degradé · Ayuda · Mi Cuenta
   Inicio con saludo y 4 tarjetas grandes que se ponen negras al pasar el mouse
   y muestran dos botones · firma "Producto premium" abajo.
   Mismo archivo en todos los productos: si se cambia uno, se cambian todos.
   ========================================================================== */
:root {
    --pf-azul: #1e169c; --pf-azul-2: #3b2bd9; --pf-rojo: #ff203c;
    --pf-tinta: #0a0e27; --pf-tinta-2: #4f5563; --pf-tinta-3: #8a8e9c;
    --pf-linea: #ececef; --pf-barra: #fafbfc;
    --pf-degrade: linear-gradient(135deg, #1e169c 0%, #6b1ea7 50%, #ff203c 100%);
    --pf-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pfBarrido { 0% { left: -100%; } 100% { left: 200%; } }

/* ---------- Barra de arriba ---------- */
.app.es-arriba { display: block; min-height: 100vh; }
.pf-barra { background: var(--pf-barra); border-bottom: 1px solid var(--pf-linea); position: sticky; top: 0; z-index: 60; font-family: 'Outfit', sans-serif; }
.pf-barra-in { max-width: 1500px; margin: 0 auto; padding: 0 32px; min-height: 98px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.pf-marca { display: flex; align-items: center; gap: 16px; flex: none; text-decoration: none !important; }
.pf-marca img { height: 54px; width: auto; display: block; }
.pf-marca span { font-size: 15px; font-weight: 800; letter-spacing: .22em; padding-left: 16px; border-left: 2px solid #e4e6ee; line-height: 1.6;
    background: var(--pf-degrade); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }

.pf-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.pf-nav > a, .pf-drop > .pf-drop-btn {
    position: relative; overflow: hidden; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 11px 11px; border-radius: 10px; border: 1px solid transparent; background: transparent;
    color: var(--pf-tinta) !important; text-decoration: none !important;
    font-family: 'Outfit', sans-serif; font-size: clamp(16px, 1.15vw, 22px); font-weight: 700; letter-spacing: -.1px; line-height: 1.2;
    cursor: pointer; transition: color .4s, background .4s, border-color .4s;
}
.pf-nav > a::before, .pf-drop > .pf-drop-btn::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; z-index: 2; pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 40%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.08) 60%, transparent 100%);
    transform: skewX(-20deg);
}
.pf-nav > a:hover::before, .pf-drop:hover > .pf-drop-btn::before { animation: pfBarrido .7s ease-out forwards; }
.pf-nav > a:hover, .pf-drop:hover > .pf-drop-btn { color: #fff !important; background: var(--pf-tinta); border-color: var(--pf-tinta); }
.pf-nav svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-nav > a.pf-casa { padding: 4px 6px; }
.pf-nav > a.pf-casa svg { width: 26px; height: 26px; stroke-width: 2.1; }
.pf-cuenta { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--pf-rojo); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; }

/* Botón destacado (el "Ver Página Web" de cada producto) */
.pf-nav > a.pf-destacado {
    gap: 7px; padding: 10px 20px; border: none; color: #fff !important;
    background: var(--pf-degrade) !important; box-shadow: 0 6px 18px rgba(30,22,156,.3);
}
.pf-nav > a.pf-destacado::before { background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.18) 40%, rgba(255,255,255,.42) 50%, rgba(255,255,255,.18) 60%, transparent 100%); }
.pf-nav > a.pf-destacado svg { width: 18px; height: 18px; }

/* Desplegables */
.pf-drop { position: relative; display: inline-block; }
.pf-drop::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 10px; }
.pf-drop-flecha { transition: transform .25s var(--pf-ease); }
.pf-drop:hover .pf-drop-flecha { transform: rotate(180deg); }
.pf-drop-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 200;
    display: flex; flex-direction: column; gap: 2px; min-width: 200px; padding: 8px; white-space: nowrap;
    background: #fff; border: 1px solid var(--pf-linea); border-radius: 10px; box-shadow: 0 8px 24px rgba(10,14,39,.08);
    opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .2s, transform .2s, visibility .2s;
}
.pf-drop:last-child .pf-drop-menu { left: auto; right: 0; }
.pf-drop:hover .pf-drop-menu, .pf-drop:focus-within .pf-drop-menu { opacity: 1; visibility: visible; transform: none; }
.pf-drop-menu a, .pf-drop-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 11px; border: 0; border-radius: 10px; background: transparent;
    font-family: 'Outfit', sans-serif; font-size: clamp(16px, 1.15vw, 22px); font-weight: 700; letter-spacing: -.1px; line-height: 1.2;
    color: var(--pf-tinta) !important; text-align: left; cursor: pointer;
    text-decoration: none; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.pf-drop-menu a:hover, .pf-drop-menu button:hover { text-decoration: underline; background: transparent; }
.pf-drop-menu svg { width: 15px; height: 15px; stroke-width: 2; }
.pf-drop-menu .pf-salir, .pf-drop-menu .pf-salir:hover { color: var(--pf-rojo) !important; }
.pf-drop-menu hr { display: none; }

/* Celular: menú hamburguesa con acordeones */
.pf-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; color: var(--pf-tinta); }
.pf-toggle svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
.pf-toggle .pf-cerrar, .pf-toggle.abierto .pf-abrir { display: none; }
.pf-toggle.abierto .pf-cerrar { display: block; }
@media (max-width: 1100px) {
    .pf-barra-in { min-height: 70px; padding: 10px 20px; position: relative; }
    .pf-marca img { height: 40px; }
    .pf-marca span { font-size: 13px; padding-left: 12px; }
    .pf-toggle { display: inline-flex; }
    .pf-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0;
        background: #fff; border-bottom: 1px solid var(--pf-linea); box-shadow: 0 12px 32px rgba(10,14,39,.08); max-height: calc(100vh - 70px); overflow-y: auto; }
    .pf-nav.abierto { display: flex; }
    .pf-nav > a, .pf-drop > .pf-drop-btn { width: 100%; border-radius: 0; padding: 14px 24px; font-size: 17px; justify-content: flex-start; }
    .pf-nav > a::before, .pf-drop > .pf-drop-btn::before { display: none; }
    .pf-nav > a:hover, .pf-drop:hover > .pf-drop-btn { background: transparent; color: var(--pf-tinta) !important; border-color: transparent; }
    .pf-nav > a.pf-destacado { margin: 8px 20px; width: auto; justify-content: center; }
    .pf-nav > a.pf-casa { padding: 14px 24px; }
    .pf-drop { width: 100%; }
    .pf-drop::after { display: none; }
    .pf-drop-menu a, .pf-drop-menu button { font-size: 17px; padding: 8px 0; }
    .pf-drop-menu { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 24px 8px 36px; min-width: 0; }
    .pf-drop.abierto .pf-drop-menu { display: flex; }
    .pf-drop:hover .pf-drop-flecha { transform: none; }
    .pf-drop.abierto .pf-drop-flecha { transform: rotate(180deg); }
}

/* ---------- Inicio: saludo y 4 tarjetas ---------- */
.pf-inicio { max-width: 1500px; margin: 0 auto; padding: 48px 32px 0; font-family: 'Outfit', sans-serif; }
.pf-hola { display: table; margin: 0 0 6px; font-size: 38px; font-weight: 700; letter-spacing: -1.2px; line-height: 1.15;
    background: var(--pf-degrade); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.pf-bajada { margin: 0; font-size: 20px; color: var(--pf-tinta-2); }
.pf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; margin-top: 32px; }
.pf-card {
    position: relative; overflow: hidden; z-index: 1; height: 400px; padding: 36px 30px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: #fff; border: 1px solid var(--pf-linea); border-radius: 18px; box-shadow: 0 8px 24px rgba(10,14,39,.04);
    color: var(--pf-tinta); text-decoration: none !important; cursor: pointer;
    transition: background .4s, box-shadow .4s, border-color .4s;
}
.pf-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; z-index: 2; pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,.18) 50%, rgba(255,255,255,.06) 60%, transparent 100%);
    transform: skewX(-20deg);
}
.pf-card:hover::before { animation: pfBarrido .9s ease-out forwards; }
.pf-card:hover { background: var(--pf-tinta); border-color: transparent; box-shadow: 0 25px 50px rgba(10,14,39,.35); }
.pf-card-ico { width: 70px; height: 70px; flex: none; margin-bottom: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center;
    background: rgba(30,22,156,.06); border: 1px solid var(--pf-linea); transition: background .4s, border-color .4s; }
.pf-card-ico svg { width: 34px; height: 34px; stroke: var(--pf-azul); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .4s; }
.pf-card:hover .pf-card-ico { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); }
.pf-card:hover .pf-card-ico svg { stroke: #fff; }
.pf-card h3 { margin: 0 0 18px; font-size: 42px; font-weight: 700; letter-spacing: -.8px; line-height: 1.1; color: var(--pf-tinta); transition: color .4s; }
.pf-card:hover h3 { color: #fff; }
.pf-card p { margin: 0; max-width: 280px; font-size: 20px; font-weight: 500; line-height: 1.55; color: var(--pf-tinta-2); transition: opacity .3s; }
.pf-card:hover p { opacity: 0; }
.pf-card-acciones { position: absolute; left: 30px; right: 30px; bottom: 30px; z-index: 4; display: flex; flex-direction: column; gap: 12px; opacity: 0; pointer-events: none; transition: opacity .3s; }
.pf-card:hover .pf-card-acciones { opacity: 1; pointer-events: auto; }
.pf-accion {
    display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 22px; border-radius: 12px;
    font-size: 22px; font-weight: 600; letter-spacing: -.2px; color: #fff !important; text-decoration: none !important;
    opacity: 0; transition: opacity .3s, background .2s, box-shadow .2s;
}
.pf-card:hover .pf-accion { opacity: 1; }
.pf-card:hover .pf-accion:nth-child(1) { transition-delay: .12s; }
.pf-card:hover .pf-accion:nth-child(2) { transition-delay: .2s; }
.pf-accion svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-accion.es-rojo { background: var(--pf-rojo); }
.pf-accion.es-rojo:hover { background: #e01933; box-shadow: 0 6px 18px rgba(255,32,60,.4); }
.pf-accion.es-azul { background: var(--pf-azul); }
.pf-accion.es-azul:hover { background: var(--pf-azul-2); box-shadow: 0 6px 18px rgba(30,22,156,.4); }

/* Firma y versión */
.pf-firma { margin: 40px auto 0; padding: 0 32px 40px; display: flex; align-items: center; justify-content: center; gap: 14px; font-family: 'Outfit', sans-serif; }
.pf-firma p { margin: 0; text-align: center; line-height: 1.35; font-size: 14px; color: var(--pf-tinta-3); }
.pf-firma p svg { width: 15px; height: 15px; fill: var(--pf-rojo); vertical-align: -2px; }
.pf-firma a { display: inline-flex; line-height: 0; }
.pf-firma img { height: 40px; width: auto; display: block; opacity: .9; transition: opacity .18s; }
.pf-firma a:hover img { opacity: 1; }
.pf-version { text-align: center; padding: 26px 16px 34px; font-size: 16px; color: #353535; letter-spacing: .2px; font-family: 'Outfit', sans-serif; }

/* En pantallas táctiles no hay mouse: los botones de cada tarjeta quedan siempre a la vista */
@media (hover: none), (max-width: 760px) {
    .pf-card { height: auto; min-height: 0; padding: 28px 22px; }
    .pf-card:hover { background: #fff; box-shadow: 0 8px 24px rgba(10,14,39,.04); border-color: var(--pf-linea); }
    .pf-card:hover h3 { color: var(--pf-tinta); }
    .pf-card:hover p { opacity: 1; }
    .pf-card:hover .pf-card-ico { background: rgba(30,22,156,.06); border-color: var(--pf-linea); }
    .pf-card:hover .pf-card-ico svg { stroke: var(--pf-azul); }
    .pf-card-ico { margin-bottom: 20px; }
    .pf-card h3 { font-size: 32px; margin-bottom: 12px; }
    .pf-card p { font-size: 17px; }
    .pf-card-acciones { position: static; opacity: 1; pointer-events: auto; margin-top: 20px; width: 100%; }
    .pf-accion { opacity: 1; font-size: 18px; padding: 14px 18px; }
}
@media (max-width: 760px) {
    .pf-inicio { padding: 24px 16px 0; }
    .pf-hola { font-size: 28px; letter-spacing: -.6px; }
    .pf-bajada { font-size: 17px; }
    .pf-firma { flex-direction: column; gap: 12px; padding: 0 20px 34px; }
}
@media (prefers-reduced-motion: reduce) { .pf-card::before, .pf-nav a::before, .pf-drop-btn::before { animation: none !important; } }

/* ---------- Logo propio del cliente y sus colores ---------- */
button.pf-marca { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
.pf-marca img { max-width: 240px; max-height: 54px; height: auto !important; width: auto; object-fit: contain; }
.pf-marca.es-vacia {
    height: 64px; min-width: 210px; padding: 0 18px; gap: 10px; justify-content: center;
    border: 2px dashed #c9cbe0; border-radius: 14px; background: #fff;
    color: var(--pf-azul); font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700;
    transition: border-color .2s, background .2s;
}
.pf-marca.es-vacia svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.pf-marca.es-vacia span { padding: 0; border: 0; letter-spacing: 0; font-size: inherit; font-weight: 700; line-height: 1.2; background: none; color: inherit; -webkit-text-fill-color: currentColor; }
.pf-marca.es-vacia:hover { border-color: var(--pf-azul); background: #fbfaff; }
.pf-marca.es-propia, .pf-marca.es-propia:focus, .pf-marca.es-propia:focus-visible { border-radius: 10px; outline: none !important; }
.pf-marca.es-propia:hover { opacity: .82; }   /* el logo lleva al inicio (se cambia desde Mi Cuenta) */
.pf-marca .pf-producto { font-size: 15px; font-weight: 800; letter-spacing: .22em; padding-left: 16px; border-left: 2px solid #e4e6ee; line-height: 1.6;
    background: var(--pf-degrade); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
@media (max-width: 1100px) {
    .pf-marca img { max-height: 40px; max-width: 170px; }
    .pf-marca.es-vacia { height: 46px; min-width: 0; font-size: 14px; padding: 0 12px; }
}

.pf-modal { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(10,14,39,.5); backdrop-filter: blur(3px); font-family: 'Outfit', sans-serif; }
.pf-modal[hidden] { display: none; }
.pf-modal-caja { position: relative; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 30px 70px -30px rgba(10,14,39,.45); }
.pf-modal-caja::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--pf-degrade); }
.pf-modal-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 22px 24px 16px; border-bottom: 1px solid var(--pf-linea); }
.pf-modal-cab h3 { margin: 0; font-size: 22px; font-weight: 700; color: var(--pf-tinta); }
.pf-modal-cab p { margin: 4px 0 0; font-size: 15px; color: var(--pf-tinta-2); }
.pf-modal-x { width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; font-size: 26px; line-height: 1; color: var(--pf-tinta-3); }
.pf-modal-x:hover { background: #f7f8fa; color: var(--pf-tinta); }
.pf-modal-cuerpo { padding: 20px 24px 6px; }
.pf-rotulo { display: block; margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--pf-tinta-3); }
.pf-logo-zona { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 140px; padding: 18px; margin-bottom: 10px;
    border: 2px dashed #c9cbe0; border-radius: 14px; background: #fbfaff; cursor: pointer; text-align: center; transition: border-color .2s; }
.pf-logo-zona:hover { border-color: var(--pf-azul); }
.pf-logo-zona img { max-width: 100%; max-height: 110px; object-fit: contain; }
.pf-logo-zona b { color: var(--pf-tinta); font-size: 16px; }
.pf-logo-zona small { color: var(--pf-tinta-3); font-size: 13px; }
.pf-logo-zona input { display: none; }
.pf-logo-quitar { border: 0; background: none; padding: 0; color: var(--pf-rojo); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pf-paletas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.pf-paleta { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border: 2px solid var(--pf-linea); border-radius: 12px; background: #fff; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: var(--pf-tinta); }
.pf-paleta i { display: flex; width: 100%; height: 26px; border-radius: 7px; overflow: hidden; }
.pf-paleta i b { flex: 1; }
.pf-paleta.activa { border-color: var(--pf-tinta); }
.pf-colores { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.pf-color { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid #e4e6ee; border-radius: 12px; cursor: pointer; }
.pf-color input { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; flex: none; }
.pf-color span { font-size: 14px; color: var(--pf-tinta-2); line-height: 1.25; }
.pf-color span b { display: block; color: var(--pf-tinta); font-size: 15px; }
.pf-modal-pie { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 24px 20px; }
.pf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 11px; border: 1.5px solid var(--pf-azul); background: var(--pf-azul); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; }
.pf-btn.es-sec { background: #fff; color: #353535; border-color: #e4e6ee; }
.pf-btn.es-sec:hover { background: var(--pf-tinta); border-color: var(--pf-tinta); color: #fff; }
.pf-btn[disabled] { opacity: .5; cursor: wait; }
@media (max-width: 560px) { .pf-paletas { grid-template-columns: repeat(2, 1fr); } .pf-colores { grid-template-columns: 1fr; } }

/* Logo subido: brillo que lo barre, recortado a la forma del logo */
.pf-brillo { position: relative; display: inline-block; line-height: 0; }
.pf-brillo img { display: block; }
.pf-marca span.pf-brillo { padding: 0; border: 0; letter-spacing: 0; font-size: 0; line-height: 0; background: none; color: inherit; -webkit-text-fill-color: currentColor; display: block; }
.pf-brillo::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(100deg, rgba(255,255,255,0) 42%, rgba(255,255,255,.9) 50%, rgba(255,255,255,0) 58%);
    background-size: 300% 100%; background-repeat: no-repeat;
    -webkit-mask-image: var(--pf-logo); mask-image: var(--pf-logo);
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    animation: pfBrilloLogo 3s linear infinite;
}
@keyframes pfBrilloLogo { 0% { background-position: 130% 0; } 70%, 100% { background-position: -30% 0; } }
@media (prefers-reduced-motion: reduce) { .pf-brillo::after { animation: none; display: none; } }
