/* =========================================================
   WONDERWORLD · ELEMENTOS / PRODUCTOS
   Estilo alineado al home (index) y compatible con Bootstrap
   Scoped a body.elem-page para no afectar otras páginas
   ========================================================= */

/* RESET SUAVE LOCAL */
.elem-page *,
.elem-page *::before,
.elem-page *::after {
    box-sizing: border-box;
}

/* ================= TIPOGRAFÍA Y BASE ================= */

body.ww-body.elem-page {
    margin: 0;
    padding: 0;
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f3f6fb;
    color: #1e2445;
}

/* ================= HEADER + NAVBAR ================= */

.elem-page .ww-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Nav principal */
.elem-page .ww-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    padding-block: 0.4rem;
}

/* Marca / logo */

.elem-page .ww-brand {
    text-decoration: none;
}

.elem-page .ww-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0b2147 0%, #1b4074 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e0f2ff;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.4);
}

.elem-page .ww-logo-text {
    display: inline-flex;
    flex-direction: column;
    line-height: 1.1;
}

.elem-page .ww-logo-text strong {
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.elem-page .ww-logo-text span {
    font-size: 0.74rem;
    opacity: 0.78;
}

/* Toggler personalizado (hamburguesa) */

.elem-page .ww-navbar-toggler {
    border-color: rgba(15, 23, 42, 0.25);
    padding: 0.2rem 0.45rem;
}

.elem-page .ww-navbar-toggler:focus {
    box-shadow: 0 0 0 0.15rem rgba(11, 99, 214, 0.32);
}

.elem-page .ww-navbar-toggler-icon {
    background-image: none;
    width: 1.3rem;
    height: 1.3rem;
    position: relative;
}

.elem-page .ww-navbar-toggler-icon::before,
.elem-page .ww-navbar-toggler-icon::after,
.elem-page .ww-navbar-toggler-icon span {
    content: "";
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background-color: #0b2147;
    transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.elem-page .ww-navbar-toggler-icon::before {
    top: 0;
}

.elem-page .ww-navbar-toggler-icon::after {
    bottom: 0;
}

.elem-page .ww-navbar-toggler-icon span {
    top: 50%;
    transform: translateY(-50%);
}

/* Nav-links dentro del navbar */

.elem-page .ww-navbar .nav-link {
    position: relative;
    font-size: 0.9rem;
    font-weight: 500;
    color: #222842;
    padding-inline: 0.4rem;
    padding-block: 0.2rem;
    margin-inline: 0.2rem;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.elem-page .ww-navbar .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.1rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: #0b2147;
    transition: width 0.25s ease-out;
}

.elem-page .ww-navbar .nav-link:hover {
    color: #0b2147;
    transform: translateY(-1px);
}

.elem-page .ww-navbar .nav-link.active {
    color: #0b2147;
    font-weight: 600;
}

.elem-page .ww-navbar .nav-link.active::after {
    width: 100%;
}

/* CTA Catálogo */

.elem-page .ww-nav-cta {
    border-radius: 999px;
    padding-inline: 1rem !important;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.35);
}

/* ================= LAYOUT GENERAL MAIN ================= */

.elem-page .elem-main {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(79, 209, 255, 0.12), transparent 55%),
        radial-gradient(circle at bottom right, rgba(11, 99, 214, 0.12), transparent 55%),
        #f3f6fb;
    display: flex;
    flex-direction: column;
}

/* ================= HERO / ENCABEZADO ================= */

.elem-page .elem-hero {
    background: transparent;
}

.elem-page .elem-hero-left {
    animation: elem-fade-left 700ms ease-out both;
}

.elem-page .elem-hero-right {
    animation: elem-fade-right 750ms ease-out both;
}

/* Botón volver */

.elem-page .elem-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 0;
    background: #e6f2ff;
    color: #0b2147;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.12);
    transition:
        background 0.15s ease-out,
        color 0.15s ease-out,
        transform 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.elem-page .elem-back:hover {
    background: #0b63d6;
    color: #e7f3ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(11, 99, 214, 0.5);
}

/* Tag/píldora */

.elem-page .elem-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.9rem;
    border-radius: 999px;
    background: rgba(11, 33, 71, 0.96);
    color: #e0f2ff;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    margin-top: 0.35rem;
    animation: elem-fade-down 650ms ease-out both;
}

.elem-page .elem-tag-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4fd1ff;
}

/* Texto hero */

.elem-page .elem-title {
    margin: 0 0 0.6rem;
    font-size: clamp(2.1rem, 3vw + 1rem, 3rem);
    line-height: 1.05;
    color: #0b2147;
}

.elem-page .elem-subtitle {
    margin: 0;
    font-size: 0.97rem;
    color: #404a67;
    max-width: 36rem;
}

/* Badge hero */

.elem-page .elem-hero-badge {
    padding: 1.5rem 1.7rem;
    border-radius: 26px;
    background: linear-gradient(135deg, #0b63d6 0%, #1d9bf0 40%, #4fd1ff 100%);
    color: #ffffff;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.5);
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.elem-page .elem-hero-badge span:first-child {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.elem-page .elem-hero-badge span:last-child {
    font-size: 0.88rem;
    opacity: 0.98;
}

/* ================= SUBMENU CATEGORÍAS ================= */

.elem-page .elem-cats-nav {
    padding: 0 0 0.4rem;
}

.elem-page .elem-cats-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.elem-page .elem-cats-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.elem-page .elem-cats-scroll::-webkit-scrollbar {
    height: 6px;
}

.elem-page .elem-cats-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.elem-page .elem-cats-scroll::-webkit-scrollbar-thumb {
    background: #cbd5f5;
    border-radius: 999px;
}

.elem-page .elem-cat-pill {
    flex: 0 0 auto;
    padding: 0.4rem 1rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: #0b2147;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition:
        background 0.15s ease-out,
        color 0.15s ease-out,
        transform 0.15s ease-out,
        border-color 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.elem-page .elem-cat-pill:hover {
    background: #d0e3ff;
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(148, 163, 184, 0.4);
}

.elem-page .elem-cat-pill.is-active {
    background: #0b63d6;
    color: #e7f3ff;
    border-color: rgba(15, 23, 42, 0.4);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.4);
}

/* ================= GRID DE ELEMENTOS ================= */

.elem-page .elem-grid-section {
    padding-top: 0.4rem;
}

/* Estado vacío */

.elem-page .elem-empty {
    margin-top: 0.5rem;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px dashed rgba(148, 163, 184, 0.9);
    text-align: center;
    color: #475569;
    font-size: 0.92rem;
}

/* Tarjetas generales */

.elem-page .elem-card {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.35) !important;
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.09);
    cursor: pointer;
    transition:
        transform 0.16s ease-out,
        box-shadow 0.16s ease-out,
        border-color 0.16s ease-out,
        background 0.16s ease-out;
}

.elem-page .elem-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.18);
    border-color: rgba(11, 99, 214, 0.65) !important;
    background: #f9fbff;
}

/* Imagen de tarjeta */

.elem-page .elem-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0b2147;
}

.elem-page .elem-card-image img {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition:
        transform 0.22s ease-out,
        filter 0.22s ease-out;
}

.elem-page .elem-card:hover .elem-card-image img {
    transform: scale(1.07);
    filter: saturate(1.08);
}

/* Placeholder */

.elem-page .elem-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 250px;
    background: radial-gradient(circle at top left, #0b2147 0%, #1d3660 45%, #020617 100%);
    color: #e0f2ff;
    font-weight: 700;
    font-size: 1.4rem;
}

/* Cuerpo de tarjeta */

.elem-page .elem-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.elem-page .elem-card-body h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #0b2147;
}

.elem-page .elem-card-body p {
    margin: 0;
    font-size: 0.87rem;
    color: #4b5563;
}

/* Chips */

.elem-page .elem-chip {
    align-self: flex-start;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    background: #0b63d6;
    color: #e0f2ff;
}

.elem-page .elem-chip-soft {
    background: #e6f2ff;
    color: #0b2147;
}

/* Diferencias visuales categoría vs producto */

.elem-page .elem-card-cat .elem-card-body h3 {
    font-weight: 700;
}

.elem-page .elem-card-prod .elem-card-body h3 {
    font-weight: 600;
}

/* ================= FOOTER ================= */

.elem-page .elem-footer {
    padding: 1.6rem 1.5rem 2.4rem;
    text-align: center;
    font-size: 0.8rem;
    color: #7a8198;
}

/* ================= MODAL / VISOR DE PRODUCTO ================= */

.elem-page .elem-modal {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease-out;
}

.elem-page .elem-modal.is-open {
    pointer-events: auto;
    opacity: 1;
}

.elem-page .elem-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

.elem-page .elem-modal-dialog {
    position: relative;
    max-width: 980px;
    width: 100%;
    margin: 1.2rem;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55);
    z-index: 1;
    padding: 1.6rem 1.8rem;
    transform: translateY(20px) scale(0.98);
    opacity: 0;
    transition:
        transform 0.18s ease-out,
        opacity 0.18s ease-out;
}

.elem-page .elem-modal.is-open .elem-modal-dialog {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Botón cerrar */

.elem-page .elem-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.92);
    color: #e5e7eb;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.5);
    transition:
        background 0.15s ease-out,
        transform 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.elem-page .elem-modal-close:hover {
    background: #0b63d6;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.7);
}

/* Contenido modal */

.elem-page .elem-modal-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 1.4rem;
    align-items: stretch;
}

/* Imagen dentro del modal */

.elem-page .elem-modal-image-wrap {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #000;
}

.elem-page .elem-modal-image-wrap img {
    display: block;
    width: 100%;
    height: 430px;
    object-fit: cover;
    background: #000;
}

/* Navegación (flechas) */

.elem-page .elem-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.85);
    color: #e5e7eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
    transition:
        background 0.15s ease-out,
        transform 0.15s ease-out,
        box-shadow 0.15s ease-out;
}

.elem-page .elem-modal-prev {
    left: 10px;
}

.elem-page .elem-modal-next {
    right: 10px;
}

.elem-page .elem-modal-nav:hover {
    background: #0b63d6;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.8);
}

/* Info modal */

.elem-page .elem-modal-info {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.2rem;
}

.elem-page .elem-modal-info .elem-tag {
    margin-bottom: 0.4rem;
}

.elem-page #elem-modal-title {
    margin: 0;
    font-size: 1.4rem;
    color: #0b2147;
}

.elem-page #elem-modal-desc {
    margin: 0;
    font-size: 0.93rem;
    color: #4b5563;
}

.elem-page .elem-modal-hint {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #6b7280;
}

/* ================= ANIMACIONES ================= */

@keyframes elem-fade-left {
    from {
        opacity: 0;
        transform: translateX(-18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes elem-fade-right {
    from {
        opacity: 0;
        transform: translateX(18px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes elem-fade-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 992px) {
    .elem-page .ww-navbar {
        padding-block: 0.35rem;
    }
}

@media (max-width: 720px) {
    .elem-page .elem-modal-image-wrap img {
        height: 300px;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .elem-page .elem-title {
        font-size: 1.9rem;
    }

    .elem-page .elem-modal-image-wrap img {
        height: 260px;
        object-fit: cover;
    }
}
