/* ============================================================
   DLK Product Grid
   ============================================================ */

/* ------------------------------------------------------------
   Grid container
   ------------------------------------------------------------ */
.dlk-product-grid {
    position: relative;
}

.dlk-product-grid--loading {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* ------------------------------------------------------------
   Grid items
   ------------------------------------------------------------ */
.dlk-product-grid__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(240px, 1fr));
    gap: 24px;
    
    margin-bottom: 32px;
    
    @media (max-width: 1024px) {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }
    
    @media (max-width: 768px) {
        grid-template-columns: repeat(1, minmax(240px, 1fr));
    }
}

/* List mode — single column */
.dlk-product-grid--list .dlk-product-grid__items {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* ------------------------------------------------------------
   Layout toggle (grid / list view switcher)
   ------------------------------------------------------------ */
.dlk-layout-toggle {
    display: flex;
    gap: 4px;
}

.dlk-layout-toggle__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--e-global-color-primary, #024887);
    border-radius: 4px;
    color: var(--e-global-color-primary, #024887);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;

    &:hover {
        background: #e6edf3;
    }

    &.dlk-layout-toggle__btn--active {
        background: var(--e-global-color-primary, #024887);
        color: #fff;
        cursor: default;
    }
}

/* ------------------------------------------------------------
   Empty state
   ------------------------------------------------------------ */
.dlk-product-grid__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    
    p {
        margin-bottom: 16px;
    }
    
    .dlk-btn {
        background-color: var(--e-global-color-accent);
        font-size: 18px;
        font-weight: 500;
        fill: var(--e-global-color-8dcaf53);
        color: var(--e-global-color-8dcaf53);
        padding: 10px 50px 10px 50px;
        border-radius: 5px;

        transition: background-color .3s ease-in-out;
        
        &:hover {
            background-color: var(--e-global-color-5a964de);
            color: var(--e-global-color-8dcaf53);
        }
    }
    
}



/* ------------------------------------------------------------
   Pagination
   ------------------------------------------------------------ */
.dlk-product-grid__pagination-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;

    /* Numbered page buttons (box style) */
    button.dlk-page-btn {
        display: flex;
        width: 48px;
        height: 48px;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
        border: 1px solid #024887;
        background: #fff;
        cursor: pointer;
        color: #024887;
        font-family: "FS Joey", sans-serif;
        font-size: 20px;
        font-weight: 700;
        line-height: normal;
        padding: 0;
        transition: background 0.15s;
        
        &:hover,
        &:focus {
            color: #024887;
            border-radius: 8px;
            border: 1px solid #E6EDF3;
            background: #E6EDF3;
        }
    }


    button.dlk-page-btn--active {
        background: #E6EDF3;
        border-color: #E6EDF3;
        cursor: default;
    }

    /* First / last page buttons (underlined text, no box) */
    button.dlk-page-edge {
        display: flex;
        align-items: center;
        height: 48px;
        padding: 0 4px;
        background: none;
        border: none;
        cursor: pointer;
        color: #024887;
        font-family: "FS Joey", sans-serif;
        font-size: 20px;
        font-weight: 700;
        line-height: normal;
        text-decoration-line: underline;
        text-decoration-style: solid;
        text-decoration-skip-ink: none;
        text-underline-offset: auto;
        text-underline-position: from-font;

        &:hover,
        &:focus {
            background-color: transparent;
            color: #009FE3;
        }
    }

    button.dlk-page-edge--active {
        cursor: default;
    }

    /* Ellipsis separator */
    .dlk-page-ellipsis {
        display: flex;
        align-items: center;
        height: 48px;
        padding: 0 4px;
        color: #A3A3A3;
        font-family: "FS Joey", sans-serif;
        font-size: 20px;
        font-weight: 700;
        line-height: normal;
        user-select: none;
    }

    /* Prev / Next arrow buttons */
    button.dlk-page-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 48px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        color: #024887;
        
        &:hover,
        &:focus {
            opacity: 0.7;
            background-color: transparent;
        }
        
        .dlk-page-arrow__icon {
            display: flex;
            align-items: center;
        }
        
        .dlk-page-arrow__icon--left {
            transform: scaleX(-1);
        }
    }
}