/* ===== Search Bar ===== */
.gp-search-bar { margin-bottom: 20px; }
.gp-search-bar input {
    width: 100%; max-width: 400px; padding: 12px 18px;
    border: 1px solid #ddd; border-radius: 30px; font-size: 15px; outline: none;
    transition: 0.3s;
}
.gp-search-bar input:focus { border-color: #2271b1; box-shadow: 0 0 5px rgba(34,113,177,0.3); }

/* ===== Carousel Cards ===== */
.gp-carousel { margin-bottom: 25px; }
.gp-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08); margin: 0 10px; cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gp-card:hover { transform: translateY(-6px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.gp-card-image img { width: 100%; height: 220px; object-fit: cover; display: block; }
.gp-card-body { padding: 15px; }
.gp-card-body h3 { margin: 0 0 8px; font-size: 18px; color: #222; }
.gp-card-body p { margin: 0; font-size: 14px; color: #666; }

.gp-view-more { text-align: center; margin-top: 20px; }
.gp-btn {
    display: inline-block; background: #2271b1; color: #fff; padding: 10px 25px;
    border-radius: 25px; text-decoration: none; border: none; cursor: pointer;
    font-size: 14px; transition: background 0.3s;
}
.gp-btn:hover { background: #16527d; color: #fff; }

/* ===== Full Page Grid ===== */
.gp-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px; margin-bottom: 30px;
}
.gp-pagination { text-align: center; }
.gp-pagination .page-numbers {
    display: inline-block; padding: 8px 14px; margin: 0 3px; background: #f0f0f0;
    border-radius: 5px; color: #333; text-decoration: none;
}
.gp-pagination .page-numbers.current { background: #2271b1; color: #fff; }

/* ===== Modal Popup ===== */
.gp-modal-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.75); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.gp-modal-box {
    background: #fff; width: 90%; max-width: 800px; max-height: 90vh;
    overflow-y: auto; border-radius: 10px; padding: 30px; position: relative;
    animation: gpFadeIn 0.3s ease;
}
@keyframes gpFadeIn { from{opacity:0; transform: scale(0.95);} to{opacity:1; transform:scale(1);} }

.gp-modal-close {
    position: absolute; top: 15px; right: 20px; font-size: 28px; cursor: pointer; color: #888;
}
.gp-modal-close:hover { color: #000; }

#gp-modal-title { font-size: 28px; margin-bottom: 10px; color: #222; }
#gp-modal-caption { font-size: 16px; color: #555; margin-bottom: 20px; }

.gp-modal-main-image-wrap { position: relative; margin-bottom: 25px; }
#gp-modal-main-image {
    width: 100%; max-height: 400px; object-fit: cover; border-radius: 10px; cursor: zoom-in;
}

.gp-modal-related-list {
    display: flex; flex-wrap: wrap; gap: 12px;
}
.gp-modal-related-list img {
    width: 110px; height: 110px; object-fit: cover; border-radius: 8px;
    cursor: zoom-in; transition: transform 0.2s;
}
.gp-modal-related-list img:hover { transform: scale(1.05); }
.gp-related-item { position: relative; }
.gp-remove-related {
    position: absolute; top: -6px; right: -6px; background: red; color: #fff;
    width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px;
    font-size: 12px; cursor: pointer;
}

/* ===== Admin Controls ===== */
.gp-admin-controls { margin-bottom: 15px; }
.gp-edit-btn { background: #f0ad4e; }
.gp-save-btn { background: #28a745; margin-left: 10px; }
[contenteditable="true"] { border: 2px dashed #2271b1; padding: 5px; background: #f7fbff; }

/* ===== Zoom Viewer ===== */
.gp-zoom-overlay {
    position: fixed; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.92); z-index: 999999;
    display: flex; align-items: center; justify-content: center;
}
.gp-zoom-overlay img {
    max-width: 85%; max-height: 85vh; border-radius: 8px;
    box-shadow: 0 0 30px rgba(255,255,255,0.15);
}
.gp-zoom-close {
    position: absolute; top: 25px; right: 35px; font-size: 40px; color: #fff; cursor: pointer;
}
.gp-zoom-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    font-size: 40px; color: #fff; cursor: pointer; padding: 10px 15px;
    user-select: none; transition: 0.2s;
}
.gp-zoom-arrow:hover { color: #2271b1; }
.gp-zoom-prev { left: 20px; }
.gp-zoom-next { right: 20px; }

@media(max-width: 600px){
    .gp-modal-box { padding: 15px; }
    #gp-modal-title { font-size: 22px; }
}