/* ==========================================================================
   La Petite Alice Filters — FINAL VERSION
========================================================================== */


/* =============================
   HEADER FILTER BUTTON
============================= */

.woocommerce-products-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lpa-filters-bar {
    margin: 0px 0 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    align-self: center;
}

.lpa-filters-btn {
    padding: 12px 26px;
    color: #3a2f26;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lpa-filters-btn:hover {
    color: #544844;
}


/* =============================
   MODAL BASE
============================= */

.lpa-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
}

.lpa-modal.open {
    display: block;
}

.lpa-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
}


/* =============================
   MODAL PANEL
============================= */

.lpa-modal-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1100px, calc(100vw - 48px));
    max-height: calc(100vh - 60px);
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.16);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


/* =============================
   HEADER
============================= */

.lpa-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px;
}

.lpa-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #3a2f26;
}

.lpa-close {
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
    color: #3a2f26;
}


/* =============================
   BODY
============================= */

.lpa-modal-body {
    padding: 28px;
    overflow-y: auto;
}


/* =============================
   GRID LAYOUT
============================= */

.lpa-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 40px;
}


/* =============================
   FILTER COLUMN
============================= */

.lpa-col h4 {
    margin-bottom: 14px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #3a2f26;
}

.lpa-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 20px;
    border-right: 1px solid #eee;
}

.lpa-col:last-child {
    border-right: none;
}


/* =============================
   LINKS
============================= */

.lpa-col a {
    display: inline-block;
    width: fit-content;

    text-decoration: none;
    color: #3a2f26;

    font-size: 14px;
    line-height: 1.5;

    position: relative;
    transition: all 0.2s ease;
}

.lpa-col a:hover {
    opacity: 0.7;
}

.lpa-col a.active {
    color: #3a2f26;
}

.lpa-col a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 100%;
    height: 1px;
    background: #3a2f26;
}


/* =============================
   BODY LOCK
============================= */

body.no-scroll {
    overflow: hidden;
}


/* =============================
   MOBILE
============================= */

@media (max-width: 768px) {

    /* Button spacing */
    .lpa-filters-bar {
        margin: 18px 0;
    }

    .lpa-filters-btn {
        width: 100%;
        max-width: 280px;
    }

    /* Modal becomes bottom sheet */
    .lpa-modal-panel {
        top: auto;
        bottom: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
    }

    .lpa-modal-header {
        padding: 18px 20px;
    }

    .lpa-modal-header h3 {
        font-size: 18px;
    }

    .lpa-modal-body {
        padding: 20px;
        max-height: calc(85vh - 70px);
    }

    /* Single column */
    .lpa-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .lpa-col a {
        font-size: 16px;
    }
}