/* GunBroker Listings Plugin Styles */

.gb-listings-wrap {
    font-family: inherit;
    max-width: 100%;
}

/* Search Form */
.gb-search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gb-search-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
}

.gb-search-form button {
    padding: 10px 20px;
    background: #1a1a2e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
}

.gb-search-form button:hover {
    background: #16213e;
}

.gb-clear-search {
    padding: 10px 14px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* Grid */
.gb-listings-grid {
    display: grid;
    /* grid-template-columns set inline via shortcode columns attribute */
    gap: 20px;
    margin-bottom: 30px;
}

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

/* Card */
.gb-item-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gb-item-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.gb-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Image */
.gb-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gb-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
}

.gb-item-card:hover .gb-item-image img {
    transform: scale(1.04);
}

.gb-no-image {
    color: #aaa;
    font-size: 13px;
}

/* Details */
.gb-item-details {
    padding: 14px;
}

.gb-item-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    line-height: 1.3;
    color: #222;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gb-item-condition {
    display: inline-block;
    font-size: 11px;
    background: #f0f0f0;
    color: #555;
    padding: 2px 7px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.gb-item-price {
    margin: 8px 0;
    font-size: 16px;
    font-weight: 700;
}

.gb-buy-now    { color: #c0392b; }
.gb-current-bid { color: #2980b9; }
.gb-no-price   { color: #888; font-size: 14px; font-weight: normal; }

.gb-item-time {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.gb-view-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 8px 14px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.15s;
}

.gb-item-card:hover .gb-view-btn {
    background: #c0392b;
}

/* Pagination */
.gb-pagination {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin: 20px 0;
    align-items: center;
}

.gb-page-link,
.gb-page-current {
    padding: 7px 13px;
    border-radius: 4px;
    font-size: 14px;
    text-decoration: none;
}

.gb-page-link {
    border: 1px solid #ccc;
    color: #333;
}

.gb-page-link:hover {
    background: #f0f0f0;
}

.gb-page-current {
    background: #1a1a2e;
    color: #fff;
    border: 1px solid #1a1a2e;
}

/* Error / Empty */
.gb-error,
.gb-no-results {
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: #555;
    text-align: center;
}

.gb-powered-by {
    font-size: 12px;
    color: #aaa;
    text-align: right;
    margin-top: 16px;
}

.gb-powered-by a {
    color: #aaa;
}

/* Responsive */
@media (max-width: 600px) {
    .gb-listings-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .gb-item-image {
        height: 150px;
    }
}
