:root {
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 206 62% 44%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 206 62% 90%;
    --accent-foreground: 206 62% 30%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 0 0% 89.8%;
    --input: 0 0% 89.8%;
    --ring: 206 62% 44%;
    --radius: .5rem;
}

/* basic layout */
.eg-elements-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.eg-grid-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* sidebar */
.eg-sidebar {
    background: hsl(var(--secondary));
    padding: 18px;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.eg-heading {
    margin: 0 0 12px;
    font-weight: 700;
    color: hsl(var(--foreground));
}

.eg-filter-block {
    margin-bottom: 18px;
}

.eg-filter-block input[type="search"] {
    width: 100%;
    padding: 10px;
    border-radius: calc(var(--radius));
    border: 1px solid hsl(var(--input));
}

/* terms */
.eg-term-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
}

.eg-term-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: hsl(var(--primary));
}

/* results grid */
.eg-results {
}

.eg-grid-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* card */
.element-card {
    background: hsl(var(--card));
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid hsl(var(--border));
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s ease;
    height: 100%;
}

.element-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.element-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    display: block;
}

.element-card-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.element-card-content h4 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    overflow: hidden;
}

.element-card-content .attributes {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: hsl(var(--muted-foreground));
}
.element-card-content .eg-view-btn {
    margin-top: 8px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgb(229, 229, 229);
    background: transparent;
    color: hsl(var(--primary));
    cursor: pointer;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3%;
    font-size: 0.85rem;
}
.element-card-content .eg-view-btn>svg{
    width: 1rem;
    height: 1rem;
}
.element-card-content .eg-view-btn:hover{
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

/* load more */
.eg-load-more-wrap {
    text-align: center;
    margin-top: 16px;
}

.eg-button {
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;

    border: 1px solid rgb(229, 229, 229);
    background: transparent;
    color: hsl(var(--primary));
}
.eg-button:hover{
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}



/* lightbox */
.eg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.eg-lb-inner {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.eg-lb-inner img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 6px;
}

.eg-lb-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

/* responsive */
@media (max-width: 900px) {
    .eg-grid-layout {
        grid-template-columns: 1fr;
    }

    .eg-grid-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .eg-grid-inner {
        grid-template-columns: 1fr;
    }
}
