/* ── Filter Buttons ── */
.wpct-gallery-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    justify-content: center;
}

.wpct-filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--e-global-color-0591621, #ed7d37);
    background: transparent;
    color: var(--e-global-color-text, #ed7d37);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}

.wpct-filter-btn:hover {
    border-color: var(--e-global-color-primary, #ed7d37);
    color: var(--e-global-color-primary);
    background: transparent;
}

.wpct-filter-btn.is-active {
    background: linear-gradient(135deg, #d96287 0%, #e07b39 50%, #d2a451 100%) !important;
    color: #fff;
    border-color: transparent;
}

/* ── Grid ── */
.wpct-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

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

@media (max-width: 600px) {
    .wpct-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Item ── */
.wpct-gallery-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.10);
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
}

.wpct-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.wpct-gallery-item.is-hidden {
    display: none;
}

/* ── Image ── */
.wpct-gallery-img {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wpct-gallery-img img {
    width: 100%;
    height: 320px;
    object-fit: fill;
    display: block;
    transition: transform 0.4s ease;
}

.wpct-gallery-item:hover .wpct-gallery-img img {
    transform: scale(1.05);
}

/* ── Overlay zoom icon ── */
.wpct-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.wpct-gallery-item:hover .wpct-gallery-overlay {
    background: rgba(0, 0, 0, 0.30);
}

.wpct-zoom-icon {
    color: #fff;
    font-size: 28px;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

.wpct-gallery-item:hover .wpct-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

/* ── Footer ── */
.wpct-gallery-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: #f9f0f6a6;
    gap: 8px;
    flex-shrink: 0;
}

.wpct-gallery-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--e-global-color-text, #333);
    line-height: 1.4;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpct-gallery-cat {
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--e-global-color-text);
    background: #F3F1EDA1;
    padding: .25rem .6rem;
    white-space: nowrap;
    flex-shrink: 0;
    border: 1px solid #e8e4df;
}

/* ════════════════════════════════
   Modal
════════════════════════════════ */
.wpct-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.wpct-modal.is-open {
    display: flex;
}

.wpct-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
}

.wpct-modal-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 860px;
    max-height: 95vh;
    padding: 0 56px;
    box-sizing: border-box;
}

/* ── Main image ── */
.wpct-modal-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 65vh;
    overflow: hidden;
}

.wpct-modal-img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.2s ease;
}

/* ── Info bar ── */
.wpct-modal-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 4px 8px;
    gap: 12px;
}

.wpct-modal-title {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wpct-modal-counter {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    flex-shrink: 0;
}

/* ── Thumbnail strip ── */
.wpct-modal-thumbs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    width: 100%;
    padding: 4px 0 6px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.wpct-modal-thumbs::-webkit-scrollbar {
    height: 4px;
}

.wpct-modal-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.wpct-modal-thumbs img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.5;
    flex-shrink: 0;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.wpct-modal-thumbs img:hover {
    opacity: 0.85;
}

.wpct-modal-thumbs img.is-active {
    opacity: 1;
    border-color: #ed7d37;
}

.wpct-modal-thumbs img.is-hidden-thumb {
    display: none;
}

/* ── Nav buttons ── */
.wpct-modal-close,
.wpct-modal-prev,
.wpct-modal-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.10);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    line-height: 1;
    z-index: 2;
}

.wpct-modal-close:hover,
.wpct-modal-prev:hover,
.wpct-modal-next:hover {
    background: rgba(255, 255, 255, 0.22);
}

.wpct-modal-close {
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    font-size: 22px;
}

.wpct-modal-prev,
.wpct-modal-next {
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    font-size: 30px;
}

.wpct-modal-prev {
    left: 4px;
}

.wpct-modal-next {
    right: 4px;
}

@media (max-width: 600px) {
    .wpct-modal-content {
        padding: 0 44px;
    }

    .wpct-modal-prev {
        left: 0;
    }

    .wpct-modal-next {
        right: 0;
    }

    .wpct-modal-thumbs img {
        width: 52px;
        height: 40px;
    }
}