.model-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.model-card {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.model-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

.stl-viewer {
    margin: 10px 0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    min-height: 300px;
}

.stl-viewer:not(.is-ready)::before {
    content: 'Loading 3D Model...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #999;
    font-size: 14px;
}

.stl-viewer canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.model-meta {
    margin-top: 10px;
}

.model-meta p {
    margin: 5px 0;
}

.model-card .button {
    display: inline-block;
    padding: 8px 16px;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

.model-card .button.secondary {
    background: #2ecc71;
    margin-right: 5px;
}

.model-card .button.primary {
    background: #3498db;
    display: block;
    text-align: center;
}

.download-links {
    margin: 10px 0;
}

/* Filters */
.model-filters {
    margin-bottom: 30px;
}

.model-filters form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.model-filters .filter-search {
    flex: 1;
    min-width: 250px;
}

.model-filters .filter-selects {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.model-filters input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.model-filters select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: auto;
    min-width: 150px;
}

.model-filters button {
    padding: 8px 20px;
    background: #3498db;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    flex-shrink: 0;
}

/* Single View */
.model-single {
    max-width: 1200px;
    margin: 0 auto;
}

.model-main-preview {
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    min-height: 400px;
}

.model-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .model-layout {
        grid-template-columns: 1fr;
    }
}

.model-info-box {
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.model-info-box h3 {
    margin-top: 0;
    border-bottom: 2px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.model-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.model-info-box li {
    margin-bottom: 10px;
}

.download-buttons .button {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 10px;
    padding: 10px 0;
    border-radius: 4px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
}

.download-buttons .button.primary {
    background: #27ae60;
    color: #fff;
}

.download-buttons .button.secondary {
    background: #3498db;
    color: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
}

.instructions {
    margin-top: 10px;
    font-size: 0.95em;
    line-height: 1.5;
}
