/* Custom styles for the accessories page */
.accessories-page .hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.accessories-page .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.accessories-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

.accessories-page .badge {
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: 4px;
}

.accessories-page .modal-header {
    border-bottom: 3px solid #f8f9fa;
}

.accessories-page .modal-footer {
    border-top: none;
}

.accessories-page .compatible-products {
    min-height: 60px;
}

.accessories-page .part-number {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.accessories-page .card-img-top-wrapper {
    position: relative;
    background-color: #f8f9fa;
}

.accessories-page .card-img-top-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.8), rgba(255,255,255,0));
    pointer-events: none;
}

/* Ensure consistent card heights */
.accessories-page .accessory-card .card-body {
    display: flex;
    flex-direction: column;
}

.accessories-page .accessory-card .card-text {
    flex-grow: 1;
}

/* Tag Pills Styling */
.accessories-page .tag-pill {
    position: relative;
    font-weight: 500;
    border-radius: 20px !important;
    transition: all 0.3s ease;
    padding: 8px 16px;
    font-size: 0.875rem;
    white-space: nowrap;
    border: 1px solid #dee2e6;
}

.accessories-page .tag-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.accessories-page .tag-pill.active {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: white !important;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.accessories-page .tag-pill i {
    font-size: 0.8rem;
}

/* Filter badges for active filters */
.filter-badge {
    display: inline-flex;
    align-items: center;
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.filter-badge .close-badge {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    color: #1976d2;
    opacity: 0.7;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 2px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.filter-badge .close-badge:hover {
    opacity: 1;
    background-color: rgba(25, 118, 210, 0.1);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .accessories-page .compatible-products {
        min-height: auto;
    }
    
    .accessories-page .tag-pill {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    #tagPills {
        gap: 8px !important;
    }
}

/* Distributor badge */
.distributor-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.distributor-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.distributor-badge .distributor-logo {
    height: 30px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.distributor-badge .distributor-name {
    color: #212529;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Distributor card in modal */
.distributor-card {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-decoration: none;
    color: #212529;
    transition: transform 0.2s, box-shadow 0.2s;
}

.distributor-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    color: #212529;
}

.distributor-card .logo-container {
    width: 80px;
    height: 80px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-right: 1px solid #e9ecef;
}

.distributor-card .logo-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.distributor-card .distributor-info {
    flex-grow: 1;
    padding: 15px;
}

.distributor-card .distributor-name {
    font-weight: 600;
    margin-bottom: 2px;
}

.distributor-card .distributor-url {
    color: #6c757d;
}

.distributor-card .distributor-action {
    padding: 0 20px;
    color: #0d6efd;
}

.distributor-links-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Fix button alignment */
.accessory-card .btn-sm {
    padding: 0.375rem 0.75rem;
}