* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ebebeb;
    color: #333;
}

header {
    background: #fff159;
    padding: 12px 0;
    box-shadow: 0 1px 0 0 rgba(0,0,0,.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.logo-search {
    display: flex;
    align-items: center;
    gap: 32px;
}

.logo {
    font-size: 30px;
    font-weight: 400;
    color: #000;
    white-space: nowrap;
    letter-spacing: -0.3px;
}

.search-bar {
    flex: 1;
    display: flex;
    max-width: 600px;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,.2);
    overflow: hidden;
}

.search-bar input {
    flex: 1;
    padding: 9px 15px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-bar input::placeholder {
    color: #999;
}

.search-btn {
    padding: 0 16px;
    background: #fff;
    border: none;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #f7f7f7;
}

.btn-admin {
    padding: 10px 20px;
    background: #3483fa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    margin-left: 16px;
}

.btn-admin:hover {
    background: #2968c8;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h2 {
    margin-bottom: 24px;
    color: #333;
    font-size: 24px;
}

.close {
    color: #999;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
}

.close:hover {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 8px 0;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #3483fa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.btn-submit:hover {
    background: #2968c8;
}


.main-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
}

.sidebar {
    width: 220px;
    height: fit-content;
}

.filter-section {
    background: #fff;
    padding: 16px;
    margin-bottom: 16px;
    border-radius: 4px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: rgba(0,0,0,.9);
    font-weight: 600;
}

.category-list {
    list-style: none;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: rgba(0,0,0,.55);
    text-decoration: none;
    font-size: 14px;
}

.category-list a:hover {
    color: #3483fa;
}

.filter-list {
    list-style: none;
}

.filter-list li {
    margin-bottom: 8px;
}

.filter-list label {
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content {
    flex: 1;
}

.results-header {
    background: transparent;
    padding: 0 0 16px 0;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.results-count {
    font-size: 24px;
    color: rgba(0,0,0,.9);
}

.sort-options select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.product-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    cursor: pointer;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-info {
    padding: 15px;
}

.product-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: normal;
}

.product-description {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.product-badge {
    display: inline-block;
    background: #e6f7ff;
    color: #1890ff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-bottom: 10px;
}

.download-btn {
    width: 100%;
    padding: 8px;
    background: #3483fa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.download-btn:hover {
    background: #2968c8;
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .search-bar {
        max-width: 100%;
    }
}