/* GunBroker Integration Styles for Carbon Gun Company */

/* GunBroker Badge */
.gunbroker-badge {
    background: white;
    color: #333;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #ddd;
}

/* GunBroker Product Card - Match regular product cards */
.gunbroker-item {
    background-color: var(--ast-global-color-1);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gunbroker-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Fix stretched images - match regular product images */
.gunbroker-item .product-image {
    width: 100%;
    height: 280px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    object-fit: contain;
    padding: 1rem;
}

/* Product Info - match regular cards */
.gunbroker-item .product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gunbroker-item .product-name {
    margin-bottom: 0.5rem;
    color: var(--ast-global-color-4);
    font-size: 1rem;
    min-height: 2.8em;
}

.gunbroker-item .product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ast-global-color-4);
    margin-bottom: 1rem;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn-view-gunbroker,
.btn-inquire {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-view-gunbroker {
    background: white;
    color: #333;
    border: 2px solid #ddd;
}

.btn-view-gunbroker:hover {
    background: #f5f5f5;
    border-color: #ccc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-inquire {
    background: transparent;
    color: var(--ast-global-color-4);
    border: 2px solid var(--ast-global-color-4);
}

.btn-inquire:hover {
    background: var(--ast-global-color-4);
    color: var(--ast-global-color-0);
    transform: translateY(-2px);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1rem;
    color: #666;
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #ddd;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 40px 20px;
    color: #d32f2f;
    font-size: 1rem;
    background: #ffebee;
    border-radius: 8px;
    margin: 20px 0;
}

/* No Products Message */
.no-products {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 1rem;
}

/* Product Manufacturer & Caliber */
.product-manufacturer,
.product-caliber {
    font-size: 0.875rem;
    color: var(--ast-global-color-4);
    opacity: 0.8;
    margin: 4px 0;
}

.product-condition {
    font-size: 0.875rem;
    color: var(--ast-global-color-4);
    opacity: 0.8;
    font-style: italic;
    margin: 4px 0;
}

/* GunBroker Section Header */
.gunbroker-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0 20px;
    padding-bottom: 15px;
}

.gunbroker-section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gunbroker-logo {
    height: 30px;
    width: auto;
}

/* Category Navigation Buttons */
.category-navigation {
    background: #ffffff;
    padding: 2.5rem 0;
    margin-bottom: 3rem;
}

.category-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.category-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    border: 2px solid #000;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    min-width: 200px;
}

.category-btn:hover {
    background: #fff;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-text {
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .product-actions {
        flex-direction: column;
    }

    .btn-view-gunbroker,
    .btn-inquire {
        width: 100%;
    }

    .gunbroker-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .category-navigation {
        padding: 1.5rem 0;
    }

    .category-buttons {
        flex-direction: column;
        padding: 0 1rem;
        gap: 1rem;
    }

    .category-btn {
        width: 100%;
        min-width: auto;
    }

    .gunbroker-item .product-image {
        height: 240px;
    }
}