.ggr-wrap {
    width: 100%;
    max-width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
}

.ggr-wrap *,
.ggr-wrap *::before,
.ggr-wrap *::after {
    box-sizing: border-box;
}

.ggr-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 32px;
    border-bottom: 1px solid #e0e0e0;
}

.ggr-filter-btn {
    display: inline-block;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    background: transparent;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    position: relative;
    bottom: -1px;
}

.ggr-filter-btn:hover {
    color: #c0392b;
    text-decoration: none;
}

.ggr-filter-btn.active {
    color: #1a1a1a;
    font-weight: 700;
    border-color: #e0e0e0;
    border-bottom-color: #fff;
    background: #fff;
}

.ggr-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    width: 100%;
    transition: opacity 0.2s;
}

.ggr-grid.ggr-loading {
    opacity: 0.4;
    pointer-events: none;
}

@media (max-width: 900px) {
    .ggr-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 560px) {
    .ggr-grid { grid-template-columns: 1fr; }
}

.ggr-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.2s;
}

.ggr-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

.ggr-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

.ggr-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ggr-yt-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.15);
    transition: background 0.2s;
}

.ggr-card:hover .ggr-yt-overlay {
    background: rgba(0,0,0,0.28);
}

.ggr-yt-overlay svg {
    width: 52px;
    height: auto;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
}

.ggr-img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.2s;
}

.ggr-card:hover .ggr-img-overlay {
    background: rgba(0,0,0,0.32);
}

.ggr-img-overlay svg {
    width: 44px;
    height: 44px;
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.5));
    stroke-width: 1.5;
}

.ggr-card:hover .ggr-img-overlay svg {
    opacity: 1;
}

.ggr-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f4;
}

.ggr-card-placeholder svg {
    width: 48px;
    height: 48px;
    color: #bbb;
}

.ggr-card-body {
    padding: 18px 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ggr-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.ggr-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 2px;
}

.ggr-badge-type {
    background: #1a1a1a;
    color: #fff;
}

.ggr-badge-cat {
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
}

.ggr-card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
    line-height: 1.3;
}

.ggr-card-subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px;
    line-height: 1.4;
    flex: 1;
}

.ggr-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #c0392b;
    border: 2px solid #c0392b;
    border-radius: 2px;
    text-decoration: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    width: fit-content;
    letter-spacing: 0.02em;
    margin-top: auto;
}

.ggr-btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.ggr-btn:hover {
    background: #c0392b;
    color: #fff;
    text-decoration: none;
}

.ggr-loadmore-wrap {
    text-align: center;
    margin-top: 40px;
}

.ggr-loadmore-btn {
    display: inline-block;
    padding: 12px 36px;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: background 0.15s, color 0.15s;
}

.ggr-loadmore-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

.ggr-loadmore-btn:disabled,
.ggr-loadmore-btn.loading {
    opacity: 0.5;
    cursor: not-allowed;
}

.ggr-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 40px;
}

.ggr-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    border: 1px solid #ddd;
    border-radius: 2px;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.ggr-pagination .page-numbers:hover {
    border-color: #c0392b;
    color: #c0392b;
    text-decoration: none;
}

.ggr-pagination .page-numbers.current {
    background: #c0392b;
    border-color: #c0392b;
    color: #fff;
    font-weight: 700;
}

.ggr-no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #888;
    padding: 40px 0;
    font-size: 15px;
}

.elementor-widget-shortcode .ggr-wrap,
.elementor-section .ggr-wrap {
    width: 100%;
}

.ggr-card.ggr-skeleton .ggr-card-media,
.ggr-card.ggr-skeleton .ggr-card-title,
.ggr-card.ggr-skeleton .ggr-card-subtitle,
.ggr-card.ggr-skeleton .ggr-btn {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ggr-shimmer 1.4s infinite;
    color: transparent;
    border-color: transparent;
}

@keyframes ggr-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ggr-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
    padding: 16px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ggr-popup-overlay.active {
    display: flex;
}

.ggr-popup-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.7);
}

.ggr-popup-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    z-index: 9999;
    right: 0;
    background: unset;
    padding: 8px 10px;
}

.ggr-popup-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.ggr-popup-video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.ggr-popup-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    flex-shrink: 0;
}

.ggr-popup-close:hover {
    background: rgba(0,0,0,0.8);
    border-color: rgba(255,255,255,0.6);
}

.ggr-popup-close svg {
    width: 16px;
    height: 16px;
    color: #fff;
    pointer-events: none;
}

@media (max-width: 600px) {
    .ggr-popup-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .ggr-popup-inner {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}

.ggr-img-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    align-items: stretch;
    justify-content: stretch;
    overscroll-behavior: contain;
    -webkit-tap-highlight-color: transparent;
}

.ggr-img-popup-overlay.active {
    display: flex;
}

.ggr-img-popup-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.ggr-img-popup-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    flex-shrink: 0;
    gap: 12px;
    min-height: 52px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.ggr-img-popup-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.ggr-img-popup-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.ggr-img-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    color: #fff;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.ggr-img-ctrl:hover,
.ggr-img-ctrl:focus-visible {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.4);
    outline: none;
}

.ggr-img-ctrl svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
    flex-shrink: 0;
}

/* Close button — slightly more prominent */
.ggr-img-ctrl.ggr-img-popup-close {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
}

.ggr-img-ctrl.ggr-img-popup-close:hover {
    background: rgba(192,57,43,0.75);
    border-color: rgba(192,57,43,0.9);
}

.ggr-img-zoom-level {
    color: rgba(255,255,255,0.7);
    font-size: 12px;
    min-width: 40px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.ggr-img-popup-canvas {
    flex: 1;
    min-height: 0;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

#ggr-img-popup-img {
    display: block;
    transform-origin: center center;
    transition: transform 0.2s ease;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
    border-radius: 2px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}

#ggr-img-popup-img.dragging {
    cursor: grabbing;
    transition: none;
}

/* Zoom hint text at bottom-right */
.ggr-img-zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 16px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    pointer-events: none;
    user-select: none;
}

/* ── Tablet ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ggr-img-popup-toolbar {
        padding: 8px 12px;
        min-height: 48px;
    }
    .ggr-img-ctrl {
        width: 38px;
        height: 38px;
    }
    .ggr-img-ctrl svg {
        width: 17px;
        height: 17px;
    }
    .ggr-img-popup-canvas {
        padding: 10px;
    }
}

/* ── Mobile ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ggr-img-popup-toolbar {
        padding: 8px 10px;
        gap: 8px;
        min-height: 52px;
    }
    .ggr-img-ctrl {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
    .ggr-img-ctrl svg {
        width: 18px;
        height: 18px;
    }
    .ggr-img-zoom-level {
        font-size: 11px;
        min-width: 36px;
    }
    .ggr-img-popup-title {
        font-size: 13px;
    }
    .ggr-img-popup-canvas {
        padding: 8px;
    }
    .ggr-img-zoom-hint {
        display: none;
    }
}
