﻿/* ════════════════════════════════════════════════════════════════
   Ideas Home — Estilos del nuevo template (refresh visual)
   Convive con el CSS actual; usa prefijos `ih-*` para evitar
   conflictos con clases existentes del proyecto.
   ──────────────────────────────────────────────────────────────── */

:root {
    --ih-bd: #2C5AA0;
    --ih-bl: #5B9BD5;
    --ih-bx: #1F3B5C;
    --ih-red: #E24B4A;
    --ih-tx: #333;
    --ih-bg: #F5F5F5;
    --ih-wh: #fff;
    --ih-br: #E0E0E0;
    --ih-sh: 0 2px 8px rgba(0, 0, 0, .08);
}

/* ════════ HERO ════════ */
.ih-hero {
    background: linear-gradient(135deg, var(--ih-bd), var(--ih-bx));
    color: #fff;
    text-align: center;
    padding: 38px 20px 30px;
}

    .ih-hero h1 {
        font-size: 26px;
        margin-bottom: 8px;
        font-weight: 600;
    }

    .ih-hero p {
        font-size: 14px;
        opacity: .9;
        margin-bottom: 14px;
    }

.ih-htags {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ih-htag {
    background: rgba(255, 255, 255, .15);
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
}

/* ════════ BREADCRUMB ════════ */
.ih-bc {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 13px;
    color: #666;
}

/* ════════ LAYOUT FILTROS + GRID ════════ */
.ih-lay {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px 30px;
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .ih-lay {
        grid-template-columns: 1fr;
    }
}

/* ════════ SIDEBAR FILTROS ════════ */
.ih-sb {
    background: var(--ih-wh);
    border: 1px solid var(--ih-br);
    border-radius: 10px;
    padding: 14px;
    height: fit-content;
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

@media (max-width: 900px) {
    .ih-sb {
        position: static;
        display: none;
    }

        .ih-sb.open {
            display: block;
        }
}

.ih-sg {
    border-bottom: 1px solid var(--ih-br);
    padding: 10px 0;
}

    .ih-sg:last-child {
        border-bottom: none;
    }

.ih-sgb {
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    user-select: none;
}

.ih-sgc {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .ih-sgc.collapsed {
        display: none;
    }

.ih-sgt {
    transition: transform .2s;
}

.ih-sg.collapsed .ih-sgt {
    transform: rotate(-90deg);
}

.ih-fl {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    padding: 3px 0;
    color: #555;
}

    .ih-fl input[type="checkbox"] {
        cursor: pointer;
    }

.ih-fc {
    margin-left: auto;
    color: #999;
    font-size: 11px;
}

/* ════════ TOOLBAR (resultados, sort, view) ════════ */
.ih-main {
    min-width: 0;
}

.ih-tlb {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--ih-wh);
    border: 1px solid var(--ih-br);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.ih-rcount {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.ih-tlb-r {
    margin-left: auto;
    display: flex;
    gap: 8px;
    align-items: center;
}

.ih-ss2 {
    padding: 7px 10px;
    border: 1px solid var(--ih-br);
    border-radius: 7px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    outline: none;
}

.ih-vb {
    display: flex;
    border: 1px solid var(--ih-br);
    border-radius: 7px;
    overflow: hidden;
}

.ih-vbtn {
    background: #fff;
    border: none;
    padding: 7px 9px;
    cursor: pointer;
    color: #999;
}

    .ih-vbtn.active {
        background: var(--ih-bd);
        color: #fff;
    }

.ih-fltb {
    display: none;
    padding: 7px 11px;
    border: 1px solid var(--ih-br);
    background: #fff;
    border-radius: 7px;
    font-size: 13px;
    cursor: pointer;
    align-items: center;
    gap: 5px;
}

@media (max-width: 900px) {
    .ih-fltb {
        display: inline-flex;
    }
}

/* ════════ GRID DE PRODUCTOS ════════ */
.ih-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

    .ih-grid.ih-lv {
        grid-template-columns: 1fr;
    }

        .ih-grid.ih-lv .ih-card {
            display: flex;
            flex-direction: row;
        }

        .ih-grid.ih-lv .ih-ciw {
            width: 200px;
            flex-shrink: 0;
        }

/* ════════ CARD DE PRODUCTO ════════ */
.ih-card {
    background: var(--ih-wh);
    border: 1px solid var(--ih-br);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

    .ih-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--ih-sh);
    }

.ih-ciw {
    position: relative;
    background: #fafafa;
    aspect-ratio: 1;
    overflow: hidden;
}

.ih-ci {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform .25s;
}

.ih-card:hover .ih-ci {
    transform: scale(1.05);
}

.ih-ciph {
    display: none;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 60px;
    color: #ccc;
}

.ih-fb {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, .9);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

    .ih-fb:hover,
    .ih-fb.active {
        color: var(--ih-red);
    }

.ih-cb {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 5px;
}

.ih-ccat {
    font-size: 11px;
    color: var(--ih-bd);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: .3px;
}

.ih-cname {
    font-size: 14px;
    font-weight: 600;
    color: var(--ih-tx);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ih-cdesc {
    font-size: 12px;
    color: #777;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ih-ccode {
    font-size: 11px;
    color: #aaa;
}

.ih-cprice {
    font-size: 18px;
    font-weight: 700;
    color: var(--ih-bd);
    margin-top: auto;
}

.ih-cprice-orig {
    text-decoration: line-through;
    font-size: 12px;
    color: #999;
    font-weight: 400;
    margin-right: 6px;
}

.ih-cprice-disc {
    color: var(--ih-red);
}

.ih-cbadge-disc {
    display: inline-block;
    background: var(--ih-red);
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
}

.ih-badd {
    background: var(--ih-bd);
    color: #fff;
    border: none;
    padding: 9px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
    font-weight: 500;
    transition: background .15s;
}

    .ih-badd:hover {
        background: var(--ih-bx);
    }

/* ════════ EMPTY STATE ════════ */
.ih-empty {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

    .ih-empty p {
        margin-top: 14px;
        font-size: 14px;
    }

/* ════════ PAGINACIÓN (estilada para mantener tu PagedList) ════════ */
.ih-pag {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    flex-wrap: wrap;
}

    .ih-pag a,
    .ih-pag .ih-pb {
        background: #fff;
        border: 1px solid var(--ih-br);
        padding: 7px 12px;
        border-radius: 6px;
        cursor: pointer;
        color: #555;
        font-size: 13px;
        text-decoration: none;
        transition: all .15s;
    }

        .ih-pag a:hover {
            border-color: var(--ih-bd);
            color: var(--ih-bd);
        }

        .ih-pag .active,
        .ih-pag .ih-pb.active {
            background: var(--ih-bd);
            color: #fff;
            border-color: var(--ih-bd);
        }

    .ih-pag .disabled {
        opacity: .45;
        pointer-events: none;
    }

.ih-pinf {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* ════════ QUICK VIEW MODAL ════════ */
.ih-movl {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: 1050;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

    .ih-movl.open {
        display: flex;
    }

.ih-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: ih-modal-in .2s ease-out;
}

@keyframes ih-modal-in {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ih-mcl {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, .06);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    z-index: 1;
}

    .ih-mcl:hover {
        background: rgba(0, 0, 0, .12);
    }

.ih-mb {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 26px;
}

@media (max-width: 700px) {
    .ih-mb {
        grid-template-columns: 1fr;
    }
}

.ih-mi {
    background: #fafafa;
    border-radius: 10px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

    .ih-mi img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        padding: 14px;
    }

.ih-mif {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ih-mcat {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--ih-bd);
    font-weight: 600;
    letter-spacing: .3px;
}

.ih-mnm {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.ih-mcd {
    font-size: 12px;
    color: #999;
}

.ih-mds {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
}

.ih-mpr {
    font-size: 28px;
    font-weight: 700;
    color: var(--ih-bd);
    margin: 5px 0;
}

.ih-mqr {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}

.ih-mq {
    display: flex;
    border: 1px solid var(--ih-br);
    border-radius: 7px;
    overflow: hidden;
}

    .ih-mq button {
        background: #f4f4f4;
        border: none;
        width: 34px;
        height: 38px;
        cursor: pointer;
        font-size: 16px;
    }

        .ih-mq button:hover {
            background: #e8e8e8;
        }

    .ih-mq span {
        display: flex;
        align-items: center;
        padding: 0 16px;
        font-weight: 600;
        min-width: 50px;
        justify-content: center;
    }

.ih-bam {
    flex: 1;
    background: var(--ih-bd);
    color: #fff;
    border: none;
    padding: 11px;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background .15s;
}

    .ih-bam:hover {
        background: var(--ih-bx);
    }

.ih-mln {
    display: inline-block;
    margin-top: 6px;
    color: var(--ih-bd);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

    .ih-mln:hover {
        text-decoration: underline;
    }

.ih-mtr {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--ih-br);
}

.ih-mti {
    font-size: 11px;
    color: #777;
    background: #f5f5f5;
    padding: 4px 9px;
    border-radius: 14px;
}

/* ════════ VISTOS RECIENTEMENTE ════════ */
.ih-hist {
    max-width: 1280px;
    margin: 18px auto 0;
    padding: 0 20px;
}

.ih-hist-inner {
    background: var(--ih-wh);
    border: 1px solid var(--ih-br);
    border-radius: 10px;
    padding: 14px;
}

    .ih-hist-inner h3 {
        font-size: 14px;
        margin-bottom: 10px;
        color: var(--ih-tx);
    }

.ih-hist-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.ih-hist-item {
    flex-shrink: 0;
    width: 110px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

    .ih-hist-item img {
        width: 100%;
        height: 90px;
        object-fit: contain;
        background: #fafafa;
        border-radius: 6px;
        padding: 6px;
    }

    .ih-hist-item div {
        font-size: 11px;
        margin-top: 4px;
        color: #555;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* ════════ TOAST NOTIFICATIONS ════════ */
.ih-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--ih-bx);
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1100;
    opacity: 0;
    transition: all .3s;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}

    .ih-toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

/* ════════ TRUST BADGES ════════ */
.ih-trust {
    background: #fff;
    border-top: 1px solid var(--ih-br);
    padding: 22px 0;
    margin-top: 30px;
}

.ih-tin {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 14px;
}

.ih-ti {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}
